From 08a5cf78b912288405ae7be93c2863231120bd14 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 29 Oct 2026 16:33:25 -0700 Subject: [PATCH] Stop requiring an ignored lockfile in release workflows The test lockfile is generated locally and excluded from version control. Requiring it in the bump patch prevents release PR creation, and checking it before tagging fails on a clean checkout. Keep release version checks limited to the tracked package manifests. --- .github/workflows/bump-release.yml | 12 ++---------- .github/workflows/tag-release.yml | 5 ----- build/azure-pipelines/release.yml | 6 ------ 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/.github/workflows/bump-release.yml b/.github/workflows/bump-release.yml index d6b83cf..b1a2a6b 100644 --- a/.github/workflows/bump-release.yml +++ b/.github/workflows/bump-release.yml @@ -59,19 +59,11 @@ jobs: fs.writeFileSync("bower.json", JSON.stringify(bower, null, 2) + "\n"); NODE - npm install --prefix test --package-lock-only --ignore-scripts --no-audit --no-fund - packageVersion="$(jq -r '.version' package.json)" - lockVersion="$(jq -r '.packages[".."].version' test/package-lock.json)" - if [ "$packageVersion" != "$lockVersion" ]; then - echo "package.json version $packageVersion does not match test/package-lock.json version $lockVersion." >&2 - exit 1 - fi - - name: Run tests run: node ./test/runTests.js - name: Create version bump patch - run: git diff --binary -- package.json bower.json test/package-lock.json > tslib-bump.patch + run: git diff --binary -- package.json bower.json > tslib-bump.patch - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: @@ -105,7 +97,7 @@ jobs: set -euo pipefail git apply --index "$RUNNER_TEMP/tslib-bump.patch" mapfile -t changedFiles < <(git diff --cached --name-only) - expectedFiles=("bower.json" "package.json" "test/package-lock.json") + expectedFiles=("bower.json" "package.json") if [ "${changedFiles[*]}" != "${expectedFiles[*]}" ]; then echo "Unexpected files in version bump: ${changedFiles[*]}" >&2 exit 1 diff --git a/.github/workflows/tag-release.yml b/.github/workflows/tag-release.yml index bd87dd3..39e05eb 100644 --- a/.github/workflows/tag-release.yml +++ b/.github/workflows/tag-release.yml @@ -51,11 +51,6 @@ jobs: echo "package.json version $version does not match bower.json version $bowerVersion." >&2 exit 1 fi - lockVersion="$(jq -r '.packages[".."].version' test/package-lock.json)" - if [ "$version" != "$lockVersion" ]; then - echo "package.json version $version does not match test/package-lock.json version $lockVersion." >&2 - exit 1 - fi echo "changed=true" >> "$GITHUB_OUTPUT" echo "version=$version" >> "$GITHUB_OUTPUT" diff --git a/build/azure-pipelines/release.yml b/build/azure-pipelines/release.yml index 96fb450..255cc8f 100644 --- a/build/azure-pipelines/release.yml +++ b/build/azure-pipelines/release.yml @@ -117,12 +117,6 @@ extends: exit 1 fi - lock_version="$(node -p "require('./test/package-lock.json').packages['..'].version")" - if [ "$package_version" != "$lock_version" ]; then - echo "package.json version $package_version does not match test/package-lock.json version $lock_version." >&2 - exit 1 - fi - echo "Tag $tag matches package.json version $package_version; staging $package_spec." mkdir -p "$staging" npm pack --pack-destination "$staging"