object-path-immutable
Advanced tools
Comparing version 3.1.1 to 4.0.0
Changelog | ||
=========== | ||
### 4.0 | ||
- **Breaking change**: the previous default export is now called `wrap()` | ||
- **Possible breaking change**: `object-path-immutable` now uses ES modules which means if you are in an ESM environment you will have to use named exports. | ||
### 3.0 | ||
@@ -5,0 +10,0 @@ |
@@ -1,2 +0,2 @@ | ||
type Path = string | ReadonlyArray<string>; | ||
type Path = string | ReadonlyArray<number | string>; | ||
@@ -15,3 +15,3 @@ interface WrappedObject<T> { | ||
interface ObjectPathImmutable { | ||
<T>(obj: T): WrappedObject<T> | ||
wrap<T>(obj: T): WrappedObject<T> | ||
set<T = object>(src: T, path?: Path, value?: any): T | ||
@@ -18,0 +18,0 @@ push<T = object>(src: T, path?: Path, value?: any): T |
{ | ||
"name": "object-path-immutable", | ||
"version": "3.1.1", | ||
"version": "4.0.0", | ||
"description": "Modify deep object properties without modifying the original object (immutability). Works great with React and Redux.", | ||
@@ -16,7 +16,9 @@ "author": "Mario Casciaro <m@mario.fyi>", | ||
}, | ||
"main": "index.js", | ||
"main": "cjs/object-path-immutable.js", | ||
"module": "esm/object-path-immutable.js", | ||
"sideEffects": false, | ||
"scripts": { | ||
"build": "rollup -c", | ||
"pretest": "standard", | ||
"test": "npm run build && mocha test.js", | ||
"test": "npm run build && mocha test/test.js", | ||
"coveralls": "nyc npm test && nyc report --reporter=text-lcov | coveralls", | ||
@@ -28,14 +30,14 @@ "coverage": "nyc npm test", | ||
"dependencies": { | ||
"is-plain-object": "3.0.0" | ||
"is-plain-object": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"chai": "^4.2.0", | ||
"coveralls": "^3.0.4", | ||
"coveralls": "^3.0.6", | ||
"nyc": "^14.1.1", | ||
"mocha": "^6.1.4", | ||
"mocha": "^6.2.0", | ||
"mocha-lcov-reporter": "^1.3.0", | ||
"rollup": "^1.16.2", | ||
"rollup-plugin-commonjs": "^10.0.1", | ||
"rollup-plugin-node-resolve": "^5.1.0", | ||
"standard": "^12.0.1" | ||
"rollup": "^1.21.4", | ||
"rollup-plugin-commonjs": "^10.1.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"standard": "^14.3.1" | ||
}, | ||
@@ -65,5 +67,7 @@ "keywords": [ | ||
"ignore": [ | ||
"dist" | ||
"umd", | ||
"esm", | ||
"cjs" | ||
] | ||
} | ||
} |
import resolve from 'rollup-plugin-node-resolve' | ||
import commonjs from 'rollup-plugin-commonjs' | ||
import pkg from './package.json' | ||
export default { | ||
input: 'index.js', | ||
export default [{ | ||
input: 'src/object-path-immutable.js', | ||
plugins: [ | ||
@@ -12,5 +13,20 @@ commonjs(), | ||
name: 'objectPathImmutable', | ||
file: 'dist/object-path-immutable.js', | ||
file: `umd/${pkg.name}.js`, | ||
format: 'umd' | ||
}] | ||
} | ||
}, { | ||
input: 'src/object-path-immutable.js', | ||
output: { | ||
file: `cjs/${pkg.name}.js`, | ||
format: 'cjs', | ||
esModule: false | ||
}, | ||
external: ['is-plain-object'] | ||
}, { | ||
input: 'src/object-path-immutable.js', | ||
output: { | ||
file: `esm/${pkg.name}.js`, | ||
format: 'esm' | ||
}, | ||
external: ['is-plain-object'] | ||
}] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51134
12
1545
1
+ Addedis-plain-object@3.0.1(transitive)
- Removedis-plain-object@3.0.0(transitive)
- Removedisobject@4.0.0(transitive)
Updatedis-plain-object@^3.0.0