diff --git a/.github/workflows/publish-internal-personas.yml b/.github/workflows/publish-internal-personas.yml index 33b7d028..8b007c9b 100644 --- a/.github/workflows/publish-internal-personas.yml +++ b/.github/workflows/publish-internal-personas.yml @@ -164,12 +164,15 @@ jobs: echo "::group::Preparing $NAME ($DIR)" pushd "$DIR" >/dev/null + # --workspaces-update=false keeps `npm version` from reifying the root + # lockfile, which fails on pnpm's workspace:* protocol if an npm + # `workspaces` field ever appears in the root package.json. if [ "$INPUT_VERSION" = "none" ]; then : elif [[ "$INPUT_VERSION" == pre* ]]; then - npm version "$INPUT_VERSION" --no-git-tag-version --preid="$INPUT_PREID" + npm version "$INPUT_VERSION" --no-git-tag-version --preid="$INPUT_PREID" --workspaces-update=false else - npm version "$INPUT_VERSION" --no-git-tag-version --allow-same-version + npm version "$INPUT_VERSION" --no-git-tag-version --allow-same-version --workspaces-update=false fi VERSION=$(node -p 'require("./package.json").version') popd >/dev/null diff --git a/.github/workflows/publish-persona.yml b/.github/workflows/publish-persona.yml index 3c1c4d7e..643d5e98 100644 --- a/.github/workflows/publish-persona.yml +++ b/.github/workflows/publish-persona.yml @@ -98,14 +98,17 @@ jobs: BUMP='${{ github.event.inputs.version }}' PREID='${{ github.event.inputs.prerelease_id }}' + # --workspaces-update=false keeps `npm version` from reifying the root + # lockfile, which fails on pnpm's workspace:* protocol if an npm + # `workspaces` field ever appears in the root package.json. if [ -n "$CUSTOM" ]; then - npm version "$CUSTOM" --no-git-tag-version --allow-same-version + npm version "$CUSTOM" --no-git-tag-version --allow-same-version --workspaces-update=false elif [ "$BUMP" = "none" ]; then : # keep existing version elif [[ "$BUMP" == pre* ]]; then - npm version "$BUMP" --no-git-tag-version --preid="$PREID" + npm version "$BUMP" --no-git-tag-version --preid="$PREID" --workspaces-update=false else - npm version "$BUMP" --no-git-tag-version + npm version "$BUMP" --no-git-tag-version --workspaces-update=false fi VERSION=$(node -p 'require("./package.json").version') diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c7d3521e..0dfe3367 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -171,7 +171,10 @@ jobs: } for (const e of heals) { - execSync(`npm version ${baseline} --no-git-tag-version --allow-same-version`, { + // --workspaces-update=false: with any npm `workspaces` config in scope, + // `npm version` otherwise tries to reify the root lockfile and dies on + // pnpm's workspace:* protocol (EUNSUPPORTEDPROTOCOL). + execSync(`npm version ${baseline} --no-git-tag-version --allow-same-version --workspaces-update=false`, { cwd: `packages/${e.pkg}`, stdio: 'inherit', }); @@ -196,14 +199,17 @@ jobs: PREID='${{ github.event.inputs.prerelease_id }}' for pkg in ${{ steps.targets.outputs.packages }}; do pushd "packages/$pkg" > /dev/null + # --workspaces-update=false keeps `npm version` from reifying the root + # lockfile, which fails on pnpm's workspace:* protocol if an npm + # `workspaces` field ever appears in the root package.json. if [ -n "$CUSTOM" ]; then - npm version "$CUSTOM" --no-git-tag-version --allow-same-version + npm version "$CUSTOM" --no-git-tag-version --allow-same-version --workspaces-update=false elif [ "$BUMP" = "none" ]; then : # keep existing version (useful for first publish or re-publish) elif [[ "$BUMP" == pre* ]]; then - npm version "$BUMP" --no-git-tag-version --preid="$PREID" + npm version "$BUMP" --no-git-tag-version --preid="$PREID" --workspaces-update=false else - npm version "$BUMP" --no-git-tag-version + npm version "$BUMP" --no-git-tag-version --workspaces-update=false fi NEW=$(node -p "require('./package.json').version") VERSIONS+=" $pkg:$NEW" diff --git a/package.json b/package.json index e5ad6c85..7d087d61 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,6 @@ "private": true, "version": "0.1.0", "packageManager": "pnpm@10.17.1", - "workspaces": [ - "packages/*" - ], "devDependencies": { "@types/node": "^22.18.0", "agent-trajectories": "^0.5.3",