build: update dependency @discoveryjs/json-ext to v1 (main)#32742
Conversation
See associated pull request for more information.
There was a problem hiding this comment.
Code Review
This pull request updates the @discoveryjs/json-ext dependency to a new major version, 1.0.0. The changes are confined to package.json and the lock file. While the update is for a dependency, my review identified a related improvement opportunity regarding dependency management. The project uses both @discoveryjs/json-ext and jsonc-parser for similar functionality. I have added a comment suggesting consolidating to a single library to improve code consistency and maintainability.
| "@babel/preset-env": "7.29.0", | ||
| "@babel/runtime": "7.28.6", | ||
| "@discoveryjs/json-ext": "0.6.3", | ||
| "@discoveryjs/json-ext": "1.0.0", |
There was a problem hiding this comment.
This dependency update highlights an opportunity for consolidation. The project currently uses both @discoveryjs/json-ext and jsonc-parser (e.g., in packages/angular_devkit/build_angular/src/builders/server/index.ts) for parsing JSON with comments. Maintaining two dependencies for the same task increases complexity and the overall dependency footprint. A follow-up to standardize on a single library would improve maintainability.
|
This PR was merged into the repository. The changes were merged into the following branches:
|
This PR contains the following updates:
0.6.3→1.0.0Release Notes
discoveryjs/json-ext (@discoveryjs/json-ext)
v1.0.0Compare Source
parseChunked():reviversupport (similar toJSON.parse()), both as a second argument (parseChunked(input, reviver)) and in options (parseChunked(input, { reviver }))parseChunked(input, { mode }), wheremodecan bejson(default),jsonl, orautoonRootValueoption for incremental stream processing, useful in JSONL mode, which is called with each parsed root valueonChunkoption for progress trackingonRootValueis specified,parseChunked()returns number of processed root values instead of collecting and returning parsed valuesstringifyChunked():modeoption with"json"(default) and"jsonl"values;mode: "jsonl"serializes iterable input into newline-delimited JSON valuesstringifyInfo():modeoption with"json"(default) and"jsonl"values;mode: "jsonl"computes byte size for newline-delimited JSON values