From 94b35c18ccf86b01c113c1847ec172019680a7b4 Mon Sep 17 00:00:00 2001 From: Corbin Crutchley Date: Mon, 13 Apr 2026 01:53:35 -0700 Subject: [PATCH] chore: fix issues with PNPM 11 --- .github/actions/setup/action.yml | 6 +++++- .github/workflows/ci.yml | 28 ---------------------------- MODULE.bazel | 8 -------- 3 files changed, 5 insertions(+), 37 deletions(-) diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index ca30849..90c4a63 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -22,7 +22,11 @@ runs: shell: bash run: uv python install - - uses: pnpm/action-setup@v6 + # v6 uses pnpm 11 which writes a second YAML document to pnpm-lock.yaml, + # breaking Bazel's yq-based lockfile parsing. + # See: https://github.com/pnpm/action-setup/issues/225 + # See: https://github.com/aspect-build/rules_js/issues/2798 + - uses: pnpm/action-setup@v5 with: cache: true diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 655ed4a..f88600c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,34 +22,6 @@ jobs: disk-cache: ${{ github.workflow }} cache-save: ${{ github.ref == 'refs/heads/main' }} - - name: Debug yq lockfile parsing - run: | - # Check if pnpm install modified the lockfile - echo "=== Lockfile modifications ===" - git diff --stat pnpm-lock.yaml || true - git diff pnpm-lock.yaml | head -100 || true - echo "=== Lockfile checksum ===" - sha256sum pnpm-lock.yaml - - # Download the same yq version Bazel uses - curl -fsSL https://github.com/mikefarah/yq/releases/download/v4.45.2/yq_linux_amd64 -o /tmp/yq - chmod +x /tmp/yq - /tmp/yq --version - /tmp/yq pnpm-lock.yaml -o=json > /tmp/lockfile.json 2>&1 - echo "JSON output size: $(wc -c < /tmp/lockfile.json)" - python3 -c " - import json, sys - with open('/tmp/lockfile.json') as f: - content = f.read() - print(f'Total length: {len(content)}') - try: - json.loads(content) - print('Valid JSON') - except json.JSONDecodeError as e: - print(f'INVALID JSON at offset {e.pos}: {e.msg}') - print(f'Context: {repr(content[max(0,e.pos-30):e.pos+30])}') - " - - name: Build run: bazel build //... diff --git a/MODULE.bazel b/MODULE.bazel index ec9e9e7..aa7e564 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -6,14 +6,6 @@ module( bazel_dep(name = "aspect_rules_py", version = "1.11.2") bazel_dep(name = "aspect_rules_js", version = "3.0.3") bazel_dep(name = "aspect_rules_lint", version = "2.5.0") - -# TODO: Remove after debugging CI yq issue -single_version_override( - module_name = "aspect_rules_js", - patches = ["//patches:rules_js_debug_yq.patch"], - patch_strip = 1, -) -bazel_dep(name = "yq.bzl", version = "0.3.5") bazel_dep(name = "bazel_lib", version = "3.2.2") bazel_dep(name = "rules_nodejs", version = "6.7.3") bazel_dep(name = "platforms", version = "1.0.0") -- 2.51.2