Skip to content

fix: remove packageManager field to unblock DK pnpm publish#44

Merged
brenonovelli merged 4 commits into
mainfrom
fix/remove-packagemanager-field
Jun 13, 2026
Merged

fix: remove packageManager field to unblock DK pnpm publish#44
brenonovelli merged 4 commits into
mainfrom
fix/remove-packagemanager-field

Conversation

@brenonovelli

Copy link
Copy Markdown
Collaborator

Root cause

When DK runs pnpm publish --registry <CodeArtifact-URL>, it sets that registry globally for the pnpm invocation. The "packageManager": "pnpm@10.14.0" field triggers corepack/pnpm to try to download @pnpm/exe (or pnpm) from the currently configured registry — which is CodeArtifact. CodeArtifact doesn't have these packages and returns 401.

[ERROR] GET https://main-053131491888.d.codeartifact.us-east-1.amazonaws.com/npm/internal-npm/@pnpm%2Fexe: Unauthorized - 401
No authorization header was set for the request.

Fix

Remove "packageManager": "pnpm@10.14.0" from root package.json.

  • pnpm remains the package manager — pnpm-workspace.yaml still enforces workspace resolution
  • No functional change for local development (corepack was optional anyway)
  • Removes the trigger that causes pnpm to try to download itself from CodeArtifact during DK publish

After merging

Bump both packages to 0.5.4 (or re-trigger with same 0.5.3 if CodeArtifact hasn't stored it) and push a new v0.5.X tag.

🤖 Generated with Claude Code

brenonovelli and others added 4 commits June 13, 2026 00:00
…pm via CodeArtifact

When DK runs `pnpm publish --registry <CodeArtifact-URL>`, pnpm sets that
registry globally. The `"packageManager": "pnpm@10.14.0"` field triggers
corepack/pnpm to try to download @pnpm/exe from the configured registry
(CodeArtifact) — which doesn't have it and returns 401.

Removing the field keeps pnpm as the package manager (pnpm-workspace.yaml
still enforces it) without triggering the version enforcement download.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… DK CI

pnpm v10 blocks build scripts by default. Without the packageManager field,
the DK pod uses its globally installed pnpm v10 which exits with code 1 when
build scripts are ignored — causing the node-install step to fail.

Explicitly allowlist the packages that legitimately need build scripts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Instead of removing the packageManager field (which turbo requires to resolve
workspaces), disable pnpm's version enforcement via .npmrc. This prevents pnpm
from trying to download @pnpm/exe from the CodeArtifact registry when DK runs
pnpm publish --registry <CodeArtifact-URL>.

Also keeps pnpm.onlyBuiltDependencies to avoid ERR_PNPM_IGNORED_BUILDS
with pnpm v10's default build script blocking.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonar-workflows

Copy link
Copy Markdown

Failed Quality Gate failed

  • 69 New Issues (is greater than 0)
  • 0.00% Coverage on New Code (is less than 80.00%)
  • 0.00% Security Hotspots Reviewed on New Code (is less than 100.00%)

Project ID: ads-js

View in SonarQube

@brenonovelli brenonovelli merged commit 52d88a1 into main Jun 13, 2026
6 of 7 checks passed
@brenonovelli brenonovelli deleted the fix/remove-packagemanager-field branch June 13, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant