Skip to content
Myr

No trailing commas, might break babel, fixes #21

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 c8718e7 · Browse files · 7 files+26 added−22 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

7 files+26 added−22 removed

  • tests:+17 added−17 removed
  • other:+9 added−5 removed

7 files+26 added−22 removed

modified:__tests__/base.js+9 added-9 removed
147 unmodified lines
148 anArray: [3, 2, {c: 3}, 1],149 aProp: "hi",150 messy: {151 nested: {152 yummie: true,152 yummie: true153 },154 coffee: false,155 },154 coffee: false155 }156 })157 expect(nextState.messy.nested).toBe(baseState.anObject.nested)158 })159
11 unmodified lines
171 anArray: [3, 2, {c: 3}, 1],172 aProp: "hello",173 messy: {174 nested: {175 yummie: true,175 yummie: true176 },177 coffee: true,178 },177 coffee: true178 }179 })180 expect(nextState.messy.nested).toBe(baseState.anObject.nested)181 })182
52 unmodified lines
235 anArray: [3, 2, {c: 3}, 1],236 aProp: "hi",237 anObject: {238 nested: {239 yummie: true,239 yummie: true240 },241 coffee: false,242 },241 coffee: false242 }243 }244 }245})
modified:__tests__/frozen.js+1 added-1 removed
modified:__tests__/performance.js+4 added-4 removed
modified:__tests__/readme.js+3 added-3 removed
modified:.prettierrc+1 added-1 removed
4 unmodified lines
5 "requirePragma": false,6 "semi": false,7 "singleQuote": false,8 "tabWidth": 4,9 "trailingComma": "all",9 "trailingComma": "none",10 "useTabs": false,11 "overrides": [12 {13 "files": "*.json",
6 unmodified lines
modified:changelog.md+5 added-1 removed
1# Changelog23### 0.1.2 (2-1-2018)45* Fixed issue where trailing commas could break consumers. Fixes [#21](https://github.com/mweststrate/immer/pull/21).67### 0.1.1 (2-1-2018)85* Fixed issue where TypeScript typings were not correctly exposed. Fixes [#18](https://github.com/mweststrate/immer/pull/18).9* Fixed issue where TypeScript typings were not correctly exposed. Fixes [#18](https://github.com/mweststrate/immer/issue/18).1011### 0.1.0 (1-1-2018)1213* Fixed `immer` function export, it is now properly exposed as the `default` export. So `import immer from "immer"`. See [#15](https://github.com/mweststrate/immer/pull/15)
9 unmodified lines
modified:immer.js+3 added-3 removed
59 unmodified lines
60 deleteProperty(target, property) {61 const copy = getOrCreateCopy(target)62 delete copy[property]63 return true64 },64 }65 }6667 // creates a copy for a base object if there ain't one68 function getOrCreateCopy(base) {
31 unmodified lines
100 : Object.assign({}, base)101 Object.defineProperty(proxyTarget, CLONE_TARGET, {102 enumerable: false,103 value: base,104 configurable: true,104 configurable: true105 })106 } else {107 proxyTarget = base108 }
107 unmodified lines
216 autoFreeze = enableAutoFreeze217}218219Object.defineProperty(exports, "__esModule", {220 value: true,220 value: true221})222module.exports.default = immer223module.exports.setAutoFreeze = setAutoFreeze