fixes
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Michel Weststrate · committed by Michel Weststrate · parent ac57da5 · Browse files · 6 files·+74 added−74 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+74 added−74 removed
- tests:+73 added−73 removed
- other:+1 added−1 removed
Provenance
- Commit
472ab66- Tree
231237a- Author
Michel Weststrate <mweststrate@fb.com>- Committer
Michel Weststrate <mweststrate@fb.com>- Parent
ac57da5
6 files changed+74 added−74 removed
modified:__tests__/__snapshots__/base.js.snap+51 added-51 removed
1 // Jest Snapshot v1, https://goo.gl/fbAQLP2 3-exports[`base functionality - es5 (autofreeze) async recipe function works with rejected promises 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":0,\\"b\\":1}"`;3+exports[`base functionality - es5 (autofreeze) async recipe function works with rejected promises 1`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":0,\\"b\\":1}"`;4 5-exports[`base functionality - es5 (autofreeze) recipe functions cannot return a modified child draft 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;5+exports[`base functionality - es5 (autofreeze) recipe functions cannot return a modified child draft 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;6 7-exports[`base functionality - es5 (autofreeze) recipe functions cannot return an object that references itself 1`] = `"Immer forbids circular references"`;7+exports[`base functionality - es5 (autofreeze) recipe functions cannot return an object that references itself 1`] = `"Invariant failed: Immer forbids circular references"`;8 9-exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;9+exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 1`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;10 11-exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 2`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;11+exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 2`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;12 13-exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 3`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;13+exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 3`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;14 15-exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 4`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;15+exports[`base functionality - es5 (autofreeze) revokes the draft once produce returns 4`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;16 17-exports[`base functionality - es5 (autofreeze) throws on computed properties 1`] = `"Immer drafts cannot have computed properties"`;17+exports[`base functionality - es5 (autofreeze) throws on computed properties 1`] = `"Invariant failed: Immer drafts cannot have computed properties"`;18 19-exports[`base functionality - es5 (autofreeze) throws when the draft is modified and another object is returned 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;19+exports[`base functionality - es5 (autofreeze) throws when the draft is modified and another object is returned 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;20 21-exports[`base functionality - es5 (autofreeze)(patch listener) async recipe function works with rejected promises 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":0,\\"b\\":1}"`;21+exports[`base functionality - es5 (autofreeze)(patch listener) async recipe function works with rejected promises 1`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":0,\\"b\\":1}"`;22 23-exports[`base functionality - es5 (autofreeze)(patch listener) recipe functions cannot return a modified child draft 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;23+exports[`base functionality - es5 (autofreeze)(patch listener) recipe functions cannot return a modified child draft 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;24 25-exports[`base functionality - es5 (autofreeze)(patch listener) recipe functions cannot return an object that references itself 1`] = `"Immer forbids circular references"`;25+exports[`base functionality - es5 (autofreeze)(patch listener) recipe functions cannot return an object that references itself 1`] = `"Invariant failed: Immer forbids circular references"`;26 27-exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;27+exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 1`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;28 29-exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 2`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;29+exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 2`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;30 31-exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 3`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;31+exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 3`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;32 33-exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 4`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;33+exports[`base functionality - es5 (autofreeze)(patch listener) revokes the draft once produce returns 4`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;34 35-exports[`base functionality - es5 (autofreeze)(patch listener) throws on computed properties 1`] = `"Immer drafts cannot have computed properties"`;35+exports[`base functionality - es5 (autofreeze)(patch listener) throws on computed properties 1`] = `"Invariant failed: Immer drafts cannot have computed properties"`;36 37-exports[`base functionality - es5 (autofreeze)(patch listener) throws when the draft is modified and another object is returned 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;37+exports[`base functionality - es5 (autofreeze)(patch listener) throws when the draft is modified and another object is returned 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;38 39-exports[`base functionality - es5 (no freeze) async recipe function works with rejected promises 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":0,\\"b\\":1}"`;39+exports[`base functionality - es5 (no freeze) async recipe function works with rejected promises 1`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":0,\\"b\\":1}"`;40 41-exports[`base functionality - es5 (no freeze) recipe functions cannot return a modified child draft 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;41+exports[`base functionality - es5 (no freeze) recipe functions cannot return a modified child draft 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;42 43-exports[`base functionality - es5 (no freeze) recipe functions cannot return an object that references itself 1`] = `"Immer forbids circular references"`;43+exports[`base functionality - es5 (no freeze) recipe functions cannot return an object that references itself 1`] = `"Invariant failed: Immer forbids circular references"`;44 45-exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;45+exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 1`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;46 47-exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 2`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;47+exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 2`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":1}"`;48 49-exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 3`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;49+exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 3`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;50 51-exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 4`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;51+exports[`base functionality - es5 (no freeze) revokes the draft once produce returns 4`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? [1]"`;52 53-exports[`base functionality - es5 (no freeze) throws on computed properties 1`] = `"Immer drafts cannot have computed properties"`;53+exports[`base functionality - es5 (no freeze) throws on computed properties 1`] = `"Invariant failed: Immer drafts cannot have computed properties"`;54 55-exports[`base functionality - es5 (no freeze) throws when the draft is modified and another object is returned 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;55+exports[`base functionality - es5 (no freeze) throws when the draft is modified and another object is returned 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;56 57-exports[`base functionality - proxy (autofreeze) array drafts throws when a non-numeric property is added 1`] = `"Immer only supports setting array indices and the 'length' property"`;57+exports[`base functionality - proxy (autofreeze) array drafts throws when a non-numeric property is added 1`] = `"Invariant failed: Immer only supports setting array indices and the 'length' property"`;58 59-exports[`base functionality - proxy (autofreeze) array drafts throws when a non-numeric property is deleted 1`] = `"Immer only supports deleting array indices"`;59+exports[`base functionality - proxy (autofreeze) array drafts throws when a non-numeric property is deleted 1`] = `"Invariant failed: Immer only supports deleting array indices"`;60 61 exports[`base functionality - proxy (autofreeze) async recipe function works with rejected promises 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;62 63-exports[`base functionality - proxy (autofreeze) recipe functions cannot return a modified child draft 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;63+exports[`base functionality - proxy (autofreeze) recipe functions cannot return a modified child draft 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;64 65-exports[`base functionality - proxy (autofreeze) recipe functions cannot return an object that references itself 1`] = `"Immer forbids circular references"`;65+exports[`base functionality - proxy (autofreeze) recipe functions cannot return an object that references itself 1`] = `"Invariant failed: Immer forbids circular references"`;66 67 exports[`base functionality - proxy (autofreeze) revokes the draft once produce returns 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;68 69 exports[`base functionality - proxy (autofreeze) revokes the draft once produce returns 2`] = `"Cannot perform 'set' on a proxy that has been revoked"`;9 unmodified lines79 exports[`base functionality - proxy (autofreeze) revokes the draft once produce returns 7`] = `"Cannot perform 'get' on a proxy that has been revoked"`;80 81 exports[`base functionality - proxy (autofreeze) revokes the draft once produce returns 8`] = `"Cannot perform 'set' on a proxy that has been revoked"`;82 83-exports[`base functionality - proxy (autofreeze) throws on computed properties 1`] = `"Immer drafts cannot have computed properties"`;83+exports[`base functionality - proxy (autofreeze) throws on computed properties 1`] = `"Invariant failed: Immer drafts cannot have computed properties"`;84 85-exports[`base functionality - proxy (autofreeze) throws when Object.defineProperty() is used on drafts 1`] = `"Object.defineProperty() cannot be used on an Immer draft"`;85+exports[`base functionality - proxy (autofreeze) throws when Object.defineProperty() is used on drafts 1`] = `"Invariant failed: Object.defineProperty() cannot be used on an Immer draft"`;86 87-exports[`base functionality - proxy (autofreeze) throws when Object.setPrototypeOf() is used on a draft 1`] = `"Object.setPrototypeOf() cannot be used on an Immer draft"`;87+exports[`base functionality - proxy (autofreeze) throws when Object.setPrototypeOf() is used on a draft 1`] = `"Invariant failed: Object.setPrototypeOf() cannot be used on an Immer draft"`;88 89-exports[`base functionality - proxy (autofreeze) throws when the draft is modified and another object is returned 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;89+exports[`base functionality - proxy (autofreeze) throws when the draft is modified and another object is returned 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;90 91-exports[`base functionality - proxy (autofreeze)(patch listener) array drafts throws when a non-numeric property is added 1`] = `"Immer only supports setting array indices and the 'length' property"`;91+exports[`base functionality - proxy (autofreeze)(patch listener) array drafts throws when a non-numeric property is added 1`] = `"Invariant failed: Immer only supports setting array indices and the 'length' property"`;92 93-exports[`base functionality - proxy (autofreeze)(patch listener) array drafts throws when a non-numeric property is deleted 1`] = `"Immer only supports deleting array indices"`;93+exports[`base functionality - proxy (autofreeze)(patch listener) array drafts throws when a non-numeric property is deleted 1`] = `"Invariant failed: Immer only supports deleting array indices"`;94 95 exports[`base functionality - proxy (autofreeze)(patch listener) async recipe function works with rejected promises 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;96 97-exports[`base functionality - proxy (autofreeze)(patch listener) recipe functions cannot return a modified child draft 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;97+exports[`base functionality - proxy (autofreeze)(patch listener) recipe functions cannot return a modified child draft 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;98 99-exports[`base functionality - proxy (autofreeze)(patch listener) recipe functions cannot return an object that references itself 1`] = `"Immer forbids circular references"`;99+exports[`base functionality - proxy (autofreeze)(patch listener) recipe functions cannot return an object that references itself 1`] = `"Invariant failed: Immer forbids circular references"`;100 101 exports[`base functionality - proxy (autofreeze)(patch listener) revokes the draft once produce returns 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;102 103 exports[`base functionality - proxy (autofreeze)(patch listener) revokes the draft once produce returns 2`] = `"Cannot perform 'set' on a proxy that has been revoked"`;9 unmodified lines113 exports[`base functionality - proxy (autofreeze)(patch listener) revokes the draft once produce returns 7`] = `"Cannot perform 'get' on a proxy that has been revoked"`;114 115 exports[`base functionality - proxy (autofreeze)(patch listener) revokes the draft once produce returns 8`] = `"Cannot perform 'set' on a proxy that has been revoked"`;116 117-exports[`base functionality - proxy (autofreeze)(patch listener) throws on computed properties 1`] = `"Immer drafts cannot have computed properties"`;117+exports[`base functionality - proxy (autofreeze)(patch listener) throws on computed properties 1`] = `"Invariant failed: Immer drafts cannot have computed properties"`;118 119-exports[`base functionality - proxy (autofreeze)(patch listener) throws when Object.defineProperty() is used on drafts 1`] = `"Object.defineProperty() cannot be used on an Immer draft"`;119+exports[`base functionality - proxy (autofreeze)(patch listener) throws when Object.defineProperty() is used on drafts 1`] = `"Invariant failed: Object.defineProperty() cannot be used on an Immer draft"`;120 121-exports[`base functionality - proxy (autofreeze)(patch listener) throws when Object.setPrototypeOf() is used on a draft 1`] = `"Object.setPrototypeOf() cannot be used on an Immer draft"`;121+exports[`base functionality - proxy (autofreeze)(patch listener) throws when Object.setPrototypeOf() is used on a draft 1`] = `"Invariant failed: Object.setPrototypeOf() cannot be used on an Immer draft"`;122 123-exports[`base functionality - proxy (autofreeze)(patch listener) throws when the draft is modified and another object is returned 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;123+exports[`base functionality - proxy (autofreeze)(patch listener) throws when the draft is modified and another object is returned 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;124 125-exports[`base functionality - proxy (no freeze) array drafts throws when a non-numeric property is added 1`] = `"Immer only supports setting array indices and the 'length' property"`;125+exports[`base functionality - proxy (no freeze) array drafts throws when a non-numeric property is added 1`] = `"Invariant failed: Immer only supports setting array indices and the 'length' property"`;126 127-exports[`base functionality - proxy (no freeze) array drafts throws when a non-numeric property is deleted 1`] = `"Immer only supports deleting array indices"`;127+exports[`base functionality - proxy (no freeze) array drafts throws when a non-numeric property is deleted 1`] = `"Invariant failed: Immer only supports deleting array indices"`;128 129 exports[`base functionality - proxy (no freeze) async recipe function works with rejected promises 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;130 131-exports[`base functionality - proxy (no freeze) recipe functions cannot return a modified child draft 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;131+exports[`base functionality - proxy (no freeze) recipe functions cannot return a modified child draft 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;132 133-exports[`base functionality - proxy (no freeze) recipe functions cannot return an object that references itself 1`] = `"Immer forbids circular references"`;133+exports[`base functionality - proxy (no freeze) recipe functions cannot return an object that references itself 1`] = `"Invariant failed: Immer forbids circular references"`;134 135 exports[`base functionality - proxy (no freeze) revokes the draft once produce returns 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;136 137 exports[`base functionality - proxy (no freeze) revokes the draft once produce returns 2`] = `"Cannot perform 'set' on a proxy that has been revoked"`;9 unmodified lines147 exports[`base functionality - proxy (no freeze) revokes the draft once produce returns 7`] = `"Cannot perform 'get' on a proxy that has been revoked"`;148 149 exports[`base functionality - proxy (no freeze) revokes the draft once produce returns 8`] = `"Cannot perform 'set' on a proxy that has been revoked"`;150 151-exports[`base functionality - proxy (no freeze) throws on computed properties 1`] = `"Immer drafts cannot have computed properties"`;151+exports[`base functionality - proxy (no freeze) throws on computed properties 1`] = `"Invariant failed: Immer drafts cannot have computed properties"`;152 153-exports[`base functionality - proxy (no freeze) throws when Object.defineProperty() is used on drafts 1`] = `"Object.defineProperty() cannot be used on an Immer draft"`;153+exports[`base functionality - proxy (no freeze) throws when Object.defineProperty() is used on drafts 1`] = `"Invariant failed: Object.defineProperty() cannot be used on an Immer draft"`;154 155-exports[`base functionality - proxy (no freeze) throws when Object.setPrototypeOf() is used on a draft 1`] = `"Object.setPrototypeOf() cannot be used on an Immer draft"`;155+exports[`base functionality - proxy (no freeze) throws when Object.setPrototypeOf() is used on a draft 1`] = `"Invariant failed: Object.setPrototypeOf() cannot be used on an Immer draft"`;156 157-exports[`base functionality - proxy (no freeze) throws when the draft is modified and another object is returned 1`] = `"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;157+exports[`base functionality - proxy (no freeze) throws when the draft is modified and another object is returned 1`] = `"Invariant failed: An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."`;158 159 exports[`complex nesting map / set / object modify deep object 1`] = `160 Object {161 "map": Map {278 unmodified linesmodified:__tests__/__snapshots__/curry.js.snap+8 added-8 removed
1 // Jest Snapshot v1, https://goo.gl/fbAQLP2 3-exports[`curry - es5 should check arguments 1`] = `"The first or second argument to \`produce\` must be a function"`;3+exports[`curry - es5 should check arguments 1`] = `"Invariant failed: The first or second argument to \`produce\` must be a function"`;4 5-exports[`curry - es5 should check arguments 2`] = `"The first or second argument to \`produce\` must be a function"`;5+exports[`curry - es5 should check arguments 2`] = `"Invariant failed: The first or second argument to \`produce\` must be a function"`;6 7-exports[`curry - es5 should check arguments 3`] = `"The first or second argument to \`produce\` must be a function"`;7+exports[`curry - es5 should check arguments 3`] = `"Invariant failed: The first or second argument to \`produce\` must be a function"`;8 9-exports[`curry - es5 should check arguments 4`] = `"The third argument to \`produce\` must be a function or undefined"`;9+exports[`curry - es5 should check arguments 4`] = `"Invariant failed: The third argument to \`produce\` must be a function or undefined"`;10 11-exports[`curry - proxy should check arguments 1`] = `"The first or second argument to \`produce\` must be a function"`;11+exports[`curry - proxy should check arguments 1`] = `"Invariant failed: The first or second argument to \`produce\` must be a function"`;12 13-exports[`curry - proxy should check arguments 2`] = `"The first or second argument to \`produce\` must be a function"`;13+exports[`curry - proxy should check arguments 2`] = `"Invariant failed: The first or second argument to \`produce\` must be a function"`;14 15-exports[`curry - proxy should check arguments 3`] = `"The first or second argument to \`produce\` must be a function"`;15+exports[`curry - proxy should check arguments 3`] = `"Invariant failed: The first or second argument to \`produce\` must be a function"`;16 17-exports[`curry - proxy should check arguments 4`] = `"The third argument to \`produce\` must be a function or undefined"`;17+exports[`curry - proxy should check arguments 4`] = `"Invariant failed: The third argument to \`produce\` must be a function or undefined"`;modified:__tests__/__snapshots__/manual.js.snap+10 added-10 removed
1 // Jest Snapshot v1, https://goo.gl/fbAQLP2 3-exports[`manual - es5 cannot modify after finish 1`] = `"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":2}"`;3+exports[`manual - es5 cannot modify after finish 1`] = `"Invariant failed: Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? {\\"a\\":2}"`;4 5-exports[`manual - es5 should check arguments 1`] = `"First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;5+exports[`manual - es5 should check arguments 1`] = `"Invariant failed: First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;6 7-exports[`manual - es5 should check arguments 2`] = `"First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;7+exports[`manual - es5 should check arguments 2`] = `"Invariant failed: First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;8 9-exports[`manual - es5 should check arguments 3`] = `"First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;9+exports[`manual - es5 should check arguments 3`] = `"Invariant failed: First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;10 11-exports[`manual - es5 should not finish drafts from produce 1`] = `"First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;11+exports[`manual - es5 should not finish drafts from produce 1`] = `"Invariant failed: First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;12 13-exports[`manual - es5 should not finish twice 1`] = `"The given draft is already finalized"`;13+exports[`manual - es5 should not finish twice 1`] = `"Invariant failed: The given draft is already finalized"`;14 15 exports[`manual - es5 should support patches drafts 1`] = `16 Array [17 Array [33 unmodified lines51 `;52 53 exports[`manual - proxy cannot modify after finish 1`] = `"Cannot perform 'set' on a proxy that has been revoked"`;54 55-exports[`manual - proxy should check arguments 1`] = `"First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;55+exports[`manual - proxy should check arguments 1`] = `"Invariant failed: First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;56 57-exports[`manual - proxy should check arguments 2`] = `"First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;57+exports[`manual - proxy should check arguments 2`] = `"Invariant failed: First argument to \`createDraft\` must be a plain object, an array, or an immerable object"`;58 59-exports[`manual - proxy should check arguments 3`] = `"First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;59+exports[`manual - proxy should check arguments 3`] = `"Invariant failed: First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;60 61-exports[`manual - proxy should not finish drafts from produce 1`] = `"First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;61+exports[`manual - proxy should not finish drafts from produce 1`] = `"Invariant failed: First argument to \`finishDraft\` must be a draft returned by \`createDraft\`"`;62 63 exports[`manual - proxy should not finish twice 1`] = `"Cannot perform 'get' on a proxy that has been revoked"`;64 65 exports[`manual - proxy should support patches drafts 1`] = `36 unmodified linesmodified:__tests__/__snapshots__/patch.js.snap+3 added-3 removed
1 // Jest Snapshot v1, https://goo.gl/fbAQLP2 3-exports[`applyPatches throws when \`op\` is not "add", "replace", nor "remove" 1`] = `"Unsupported patch operation: copy"`;3+exports[`applyPatches throws when \`op\` is not "add", "replace", nor "remove" 1`] = `"Invariant failed: Unsupported patch operation: copy"`;4 5-exports[`applyPatches throws when \`path\` cannot be resolved 1`] = `"Cannot apply patch, path doesn't resolve: a/b"`;5+exports[`applyPatches throws when \`path\` cannot be resolved 1`] = `"Invariant failed: Cannot apply patch, path doesn't resolve: a/b"`;6 7-exports[`applyPatches throws when \`path\` cannot be resolved 2`] = `"Cannot apply patch, path doesn't resolve: a/b/c"`;7+exports[`applyPatches throws when \`path\` cannot be resolved 2`] = `"Invariant failed: Cannot apply patch, path doesn't resolve: a/b/c"`;modified:__tests__/readme.js+1 added-1 removed
231 unmodified lines232 // The old one was never modified233 expect(usersById_v1.size).toBe(0)234 // And trying to change a Map outside a producers is going to: NO!235 expect(() => usersById_v3.clear()).toThrowErrorMatchingInlineSnapshot(236- `"This object has been frozen and should not be mutated"`236+ `"Invariant failed: This object has been frozen and should not be mutated"`237 )238 })modified:jest.config.build.js+1 added-1 removed
1233456710 unmodified linesmodule.exports = { moduleNameMapper: { "src/.*": "<rootDir>" "src/.*": "<rootDir>/dist/immer.esm.js" }, testURL: "http://localhost", globals: { USES_BUILD: true,10 unmodified lines