From 15459a1115d326f2bf328a43c27dcd2b73948d5c Mon Sep 17 00:00:00 2001 From: reggi Date: Fri, 10 Jul 2026 13:30:35 -0400 Subject: [PATCH] fix: parse pack --json object output in node integration 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 --- .github/workflows/node-integration.yml | 2 +- scripts/template-oss/node-integration-yml.hbs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/node-integration.yml b/.github/workflows/node-integration.yml index 054b7f1b657a7..929d73b513141 100644 --- a/.github/workflows/node-integration.yml +++ b/.github/workflows/node-integration.yml @@ -107,7 +107,7 @@ jobs: echo "::group::packing npm release $npmVersion" pushd "$npmDir" >/dev/null node scripts/resetdeps.js - npmtarball="$(node . pack --loglevel=silent --json | jq -r .[0].filename)" + npmtarball="$(node . pack --loglevel=silent --json | jq -r 'to_entries[0].value.filename')" tar czf "$npmFile" -C "$npmDir" . popd >/dev/null echo "npm=$npmFile" >> $GITHUB_OUTPUT diff --git a/scripts/template-oss/node-integration-yml.hbs b/scripts/template-oss/node-integration-yml.hbs index 9b4391d3991f2..5fef5f10c2b1f 100644 --- a/scripts/template-oss/node-integration-yml.hbs +++ b/scripts/template-oss/node-integration-yml.hbs @@ -105,7 +105,7 @@ jobs: echo "::group::packing npm release $npmVersion" pushd "$npmDir" >/dev/null node scripts/resetdeps.js - npmtarball="$(node . pack --loglevel=silent --json | jq -r .[0].filename)" + npmtarball="$(node . pack --loglevel=silent --json | jq -r 'to_entries[0].value.filename')" tar czf "$npmFile" -C "$npmDir" . popd >/dev/null echo "npm=$npmFile" >> $GITHUB_OUTPUT