insomnia/packages/insomnia-app
SaintAPI a2bc704f80
Differential (Additive/Removal) patching when switching between design / debug (#3124)
* fix(import) do differential patching for design activity imports

This patch adds differential patching for imports that occur during the switching between
design and debug tabs inside of Designer. As reported through #2971, and others, this patch
favors existing data over imported data, values that exist already on the document will remain
unchanged, only new values (including array based values) will be added / removed.

This also includes a bypass feature for urls, currently these options are not exposed through
the interface but could be. This feature is an object to allow for future properties for
preference-based patching.

- Adds `options.enableDiffBasedPatching` and `options.enableDiffDeep` to `importRaw` for backwards compat.
- Adds `options.bypassDiffProps.url` for url bypassing and use an object for future items.
- Adds `diffPatchObj` based on differential patching for objects (works with arrays as well).

Future ideas:

- `hasBeenModifiedByUser` property map object to allow changing properties that haven't been touched by the user with options.

fixes: #2971, #2882, #3038, #2442

* adds some basic tests

- also adds jest (which was (mistakenly) not there before)
- does not call `.hasOwnProperty` directly, per https://eslint.org/docs/rules/no-prototype-builtins (which, we will add more formally at a later date)

* don't special-case workspaces

this ensures the behavior of the initial PR is more preserved

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2021-03-03 12:57:09 -05:00
..
.storybook Swap out switch for new activity toggle component (#2335) 2020-06-30 16:54:56 -07:00
app Differential (Additive/Removal) patching when switching between design / debug (#3124) 2021-03-03 12:57:09 -05:00
bin Upgrade yarn-standalone.js (#1202) 2019-05-09 13:45:26 -04:00
config Bump version 2021-03-03 11:09:25 +13:00
flow-typed Support hyphen - and other special characters in variable names (#2601) 2020-10-02 07:49:05 +13:00
scripts fix: add back app to the build context 2021-03-03 11:41:23 +13:00
send-request Remove Core and Designer specific cases (#3034) 2021-02-03 12:19:22 +13:00
webpack Updating webpack configuration for development (#3043) 2021-02-04 10:29:15 +13:00
.babelrc Expose styled-components on the window object for UI plugins (#2528) 2020-08-21 06:44:08 +12:00
.flowconfig Fix GitLab sync (#2162) 2020-05-15 14:11:06 +12:00
.gitignore
.npmrc Upgrade Electron (#2403) 2020-07-27 22:18:26 -07:00
package-lock.json Differential (Additive/Removal) patching when switching between design / debug (#3124) 2021-03-03 12:57:09 -05:00
package.json Differential (Additive/Removal) patching when switching between design / debug (#3124) 2021-03-03 12:57:09 -05:00
README.md

Insomnia App

The main desktop application.