chore: parse pack --json object output in node integration#9747
Merged
Conversation
martinrrm
previously approved these changes
Jul 10, 2026
npm pack --json now emits an object keyed by package name (#9247) instead of an array, so the release integration workflow's jq -r .[0].filename fails with 'Cannot index object with number'. Parse the filename from the object instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 91528ac3-495a-4617-9630-c31478a0691f
7a7b9d6 to
15459a1
Compare
martinrrm
approved these changes
Jul 10, 2026
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.
Problem
The
build nodejsjobs inRelease Integration / publishfail at.github/workflows/node-integration.yml:As of #9247 (sync json output of pack and publish),
npm pack --jsonno longer outputs an array.logTarnow buffers{ [tar.name]: tarball }, so the output is an object keyed by package name:{ "npm": { "filename": "npm-12.0.1.tgz", ... } }The workflow still parsed it with
.[0].filename, which errors on an object. npm 12.0.x is the first release carrying this change, so the release integration only started breaking now.Fix
Parse the filename from the object instead of an array index:
Verified locally: returns
npm-12.0.1.tgz.