Conversation
Allow JSONStream test dependencies to fetch their transitive Git dependency when running with npm 12. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 1896c431-0032-423c-afbe-3133ce92cec7
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1158 +/- ##
=======================================
Coverage 96.20% 96.20%
=======================================
Files 29 29
Lines 2213 2213
=======================================
Hits 2129 2129
Misses 84 84 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
I originally submitted the same change as you've suggested here in #1127 which I then abandoned since nobody was available to merge it. In the meantime the repo has become active again. Hopefully this time it will be actioned! |
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow the JSONStream fixture to fetch its transitive Git dependency when CITGM runs its tests with npm 12.
Why this is needed
npm 12 changed
allow-gitto default tonone. JSONStream itself does not use a Git dependency at runtime, but CITGM installs its development dependencies to execute the package test suite. The selected dependency tree contains:assertions@2.3.4referencesfomattodirectly by Git commit. npm 12 therefore stops installation withEALLOWGITbefore the JSONStream tests execute.The Git dependency is transitive, so
allow-git=rootwould not permit it. This change setsnpm_config_allow_git=allonly in JSONStream's CITGM environment. npm's default policy remains unchanged for every other fixture.JSONStream remains useful in CITGM because it exercises an existing package name containing uppercase characters, as discussed in #1113.
Addresses npm/cli#10026. This replaces the unmerged approach from #1127 without changing JSONStream's unrelated platform skips.
Validation
./node_modules/.bin/eslint --cache./node_modules/.bin/prettier --check lib/lookup.json./node_modules/.bin/tap run test/test-lookup.js test/test-create-options.jsjq empty lib/lookup.jsongit diff --checkThe full test suite was also attempted locally. Tests that spawn npm could not run because the machine's npm executable is linked to an npm/cli checkout with missing workspace links. The targeted lookup and environment tests pass.