Skip to content

build: update dependency @discoveryjs/json-ext to v1 (main)#32742

Merged
alan-agius4 merged 1 commit intoangular:mainfrom
angular-robot:ng-renovate/main-discoveryjs-json-ext-1-x
Mar 11, 2026
Merged

build: update dependency @discoveryjs/json-ext to v1 (main)#32742
alan-agius4 merged 1 commit intoangular:mainfrom
angular-robot:ng-renovate/main-discoveryjs-json-ext-1-x

Conversation

@angular-robot
Copy link
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@discoveryjs/json-ext 0.6.31.0.0 age adoption passing confidence

Release Notes

discoveryjs/json-ext (@​discoveryjs/json-ext)

v1.0.0

Compare Source

  • parseChunked():
    • Refactored from class-based to function-based implementation, as a result a bit smaller and faster
    • Added reviver support (similar to JSON.parse()), both as a second argument (parseChunked(input, reviver)) and in options (parseChunked(input, { reviver }))
    • Added support for JSONL (NDJSON) mode, which allows parsing multiple JSON values from a stream of chunks, where each value is separated by a newline character, i.e. parseChunked(input, { mode }), where mode can be json (default), jsonl, or auto
    • Added onRootValue option for incremental stream processing, useful in JSONL mode, which is called with each parsed root value
    • Added onChunk option for progress tracking
    • When onRootValue is specified, parseChunked() returns number of processed root values instead of collecting and returning parsed values
    • Fixed OOM on very long arrays (corner case, millions of elements)
    • Fixed various issues with parsing of malformed JSON
  • stringifyChunked():
    • Added mode option with "json" (default) and "jsonl" values; mode: "jsonl" serializes iterable input into newline-delimited JSON values
  • stringifyInfo():
    • Added mode option with "json" (default) and "jsonl" values; mode: "jsonl" computes byte size for newline-delimited JSON values

  • If you want to rebase/retry this PR, check this box

See associated pull request for more information.
@angular-robot angular-robot added action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project target: automation This PR is targeted to only merge into the branch defined in Github [bot use only] labels Mar 11, 2026
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

@alan-agius4 alan-agius4 merged commit 82b91f1 into angular:main Mar 11, 2026
38 checks passed
@alan-agius4
Copy link
Collaborator

This PR was merged into the repository. The changes were merged into the following branches:

@alan-agius4 alan-agius4 deleted the ng-renovate/main-discoveryjs-json-ext-1-x branch March 11, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: build & ci Related the build and CI infrastructure of the project target: automation This PR is targeted to only merge into the branch defined in Github [bot use only]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants