obj-serialize
Advanced tools
Comparing version 1.0.1 to 2.0.0
{ | ||
"name": "obj-serialize", | ||
"version": "1.0.1", | ||
"description": "Simple utility to serialize objects to be passed around to another context.", | ||
"main": "./lib/obj-serialize.cjs", | ||
"version": "2.0.0", | ||
"description": "Simple utility to serialize objects to be passed around to another context. Useful in Next.js Pages Router projects.", | ||
"author": { | ||
@@ -20,2 +19,4 @@ "name": "Igor Klepacki", | ||
"serialization", | ||
"json", | ||
"objects", | ||
"util" | ||
@@ -27,39 +28,43 @@ ], | ||
"homepage": "https://github.com/neg4n/obj-serialize/#readme", | ||
"source": "src/index.ts", | ||
"module": "./lib/obj-serialize.module.js", | ||
"unpkg": "./lib/obj-serialize.umd.js", | ||
"types": "./lib/index.d.ts", | ||
"files": [ | ||
"lib" | ||
"README.md", | ||
"dist" | ||
], | ||
"exports": { | ||
".": { | ||
"require": "./dist/serialize.js", | ||
"import": "./dist/serialize.mjs" | ||
}, | ||
"./predefined": { | ||
"require": "./dist/predefined.js", | ||
"import": "./dist/predefined.mjs" | ||
} | ||
}, | ||
"module": "./dist/serialize.mjs", | ||
"main": "./dist/serialize.js", | ||
"license": "MIT", | ||
"prettier": { | ||
"printWidth": 90, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
}, | ||
"scripts": { | ||
"dev": "ts-node src/index.ts", | ||
"prepublishOnly": "npm run build", | ||
"prebuild": "rimraf lib", | ||
"build": "microbundle", | ||
"build:watch": "microbundle watch" | ||
}, | ||
"devDependencies": { | ||
"@jest/globals": "^29.7.0", | ||
"@jest/types": "^29.6.3", | ||
"@types/flat": "^5.0.2", | ||
"@types/node": "^18.7.18", | ||
"microbundle": "^0.15.1", | ||
"jest": "^29.7.0", | ||
"next": "^14.0.4", | ||
"prettier": "^2.7.1", | ||
"rimraf": "^3.0.2", | ||
"ts-node": "^10.9.1", | ||
"ts-jest": "^29.1.1", | ||
"tsup": "^8.0.1", | ||
"typescript": "^4.8.3" | ||
}, | ||
"dependencies": { | ||
"@types/lodash": "^4.14.185", | ||
"flat": "^5.0.2", | ||
"lodash": "^4.17.21" | ||
"flattie": "^1.1.0", | ||
"nestie": "^1.0.3" | ||
}, | ||
"scripts": { | ||
"test": "pnpm jest --verbose", | ||
"test:coverage": "pnpm jest --coverage", | ||
"prebuild": "rimraf dist", | ||
"build": "tsup src --dts --minify --format esm,cjs", | ||
"build:watch": "pnpm run build --watch" | ||
} | ||
} | ||
} |
@@ -60,3 +60,4 @@ # obj-serialize | ||
> ⛔️ Error: Error serializing `.smallDogs[0].birth` returned from `getServerSideProps` in “/“. | ||
> [!CAUTION] | ||
> Error: Error serializing `.smallDogs[0].birth` returned from `getServerSideProps` in “/“. | ||
> Reason: `object` (“[object Date]”) cannot be serialized as JSON. Please only return JSON serializable data types. | ||
@@ -112,2 +113,3 @@ | ||
> [!NOTE] | ||
> ℹ️ There is a special value called `SkipSerialization`. It is a unique token that is intended to be used when serialisation traverse does not meet any condition in your serialisation rules and you just need to skip the process for particular case. It has to be this token and not `null` or `undefined` since these two can also have impact on desired data after the serialization. | ||
@@ -114,0 +116,0 @@ |
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
2
21
140
11353
11
12
+ Addedflattie@^1.1.0
+ Addednestie@^1.0.3
+ Addedflattie@1.1.1(transitive)
+ Addednestie@1.0.3(transitive)
- Removed@types/lodash@^4.14.185
- Removedflat@^5.0.2
- Removedlodash@^4.17.21
- Removed@types/lodash@4.17.5(transitive)
- Removedflat@5.0.2(transitive)
- Removedlodash@4.17.21(transitive)