Skip to content

lookup: add allow-git for JSONStream - #1127

Open
MikeMcC399 wants to merge 1 commit into
nodejs:mainfrom
MikeMcC399:jsonstream-git
Open

lookup: add allow-git for JSONStream#1127
MikeMcC399 wants to merge 1 commit into
nodejs:mainfrom
MikeMcC399:jsonstream-git

Conversation

@MikeMcC399

Copy link
Copy Markdown
Contributor

Situation

JSONStream fails under npm 12.

See #1114 (comment) for steps to reproduce and for logs.

It is blocked by npm 12 as described in the logs:

npm error Fetching packages of type "git" have been disabled
npm error Refusing to fetch "fomatto@git://github.com/BonsaiDen/Fomatto.git#468666f600b46f9067e3da7200fd9df428923ea6"

https://github.com/dominictarr/JSONStream was archived Dec 4, 2018 and is therefore unsupported, since issues can no longer be logged, and new releases are no longer possible.

#1114 proposed to remove JSONStream, however @ljharb stated that it needed to be retained, since it exercises the use of a package name with uppercase characters.

Change

Modify entry for JSONStream in lib/lookup.json to add:

"npm_config_allow_git": "all"

which allows it to run under npm 12. See https://docs.npmjs.com/cli/v12/using-npm/config#allow-git.

Checklist
  • npm test passes
  • contribution guidelines followed
    here

Note

https://github.com/dominictarr/JSONStream remains unsupported.

To test the ability to use a package that includes uppercase characters, an active package would be preferable to JSONStream, however it hasn't been possible to identify any alternative so far. Commonly-used packages conform to npm naming rules introduced several years ago that prohibit the introduction of new packages with names including uppercase characters. See npm blog post from Dec 26, 2017.

https://docs.npmjs.com/creating-a-package-json-file

The "name" field contains your package's name and must be lowercase without any spaces. May contain hyphens, dots, and underscores.

JSONStream has flaky results on macOS and a hard fail on Windows, unrelated to the change to allow git:

Node.js npm macos ubuntu windows
22.23.1 10.9.8 pass pass HARD FAIL
24.19.0 11.17.0 FLAKE FAIL pass pass
26.7.0 11.19.0 pass pass pass
26.7.0 12.0.2 FLAKE FAIL pass pass
error:                     | *** destroy_missing.js ***
error:                     |
error:                     | (node:7984) [DEP0128] DeprecationWarning: Invalid 'main' field in '\\?\C:\Users\RUNNER~1\AppData\Local\Temp\7c04b44f\JSONStream\node_modules\it-is\node_modules\assertions\package.json' of './assert.js'. Please either fix that or report it to the module author
error:                     | (Use `node --trace-deprecation ...` to show where the warning was created)
error:                     | (node:7984) [DEP0128] DeprecationWarning: Invalid 'main' field in '\\?\C:\Users\RUNNER~1\AppData\Local\Temp\7c04b44f\JSONStream\node_modules\it-is\node_modules\assertions\node_modules\traverser\package.json' of './traverser.sync'. Please either fix that or report it to the module author
error:                     | PASSED
error:                     | node:events:497
error:                     | throw er; // Unhandled 'error' event
error:                     | ^
error:                     |
error:                     | Error: This socket has been ended by the other party

@codecov-commenter

codecov-commenter commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.33%. Comparing base (09ca92b) to head (fb7dac8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1127   +/-   ##
=======================================
  Coverage   96.33%   96.33%           
=======================================
  Files          29       29           
  Lines        2213     2213           
=======================================
  Hits         2132     2132           
  Misses         81       81           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@MikeMcC399
MikeMcC399 marked this pull request as ready for review August 14, 2026 06:16
@MikeMcC399 MikeMcC399 mentioned this pull request Aug 14, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants