From 2ab56dae7742006ae2b54efbb2120f5a12fee0aa Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Fri, 19 Sep 2025 23:13:08 +0900 Subject: [PATCH 1/3] fix for scoped packages --- packages/plugin-npm/sources/npmHttpUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/plugin-npm/sources/npmHttpUtils.ts b/packages/plugin-npm/sources/npmHttpUtils.ts index c7058e53b74..b064be2241d 100644 --- a/packages/plugin-npm/sources/npmHttpUtils.ts +++ b/packages/plugin-npm/sources/npmHttpUtils.ts @@ -624,8 +624,9 @@ async function getOidcToken(registry: string, {configuration, ident}: {configura return null; try { + const escapedName = encodeURIComponent(structUtils.stringifyIdent(ident)); const response = await httpUtils.post( - `${registry}/-/npm/v1/oidc/token/exchange/package/${ident.name.replace(/^@/, `%40`)}`, + `${registry}/-/npm/v1/oidc/token/exchange/package/${escapedName}`, null, { configuration, From 3317fddcd24366dce9f7f646c0a01a80dee9808b Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Fri, 19 Sep 2025 23:13:15 +0900 Subject: [PATCH 2/3] release --- .yarn/versions/c1a29eeb.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .yarn/versions/c1a29eeb.yml diff --git a/.yarn/versions/c1a29eeb.yml b/.yarn/versions/c1a29eeb.yml new file mode 100644 index 00000000000..3f407a81d84 --- /dev/null +++ b/.yarn/versions/c1a29eeb.yml @@ -0,0 +1,24 @@ +releases: + "@yarnpkg/cli": patch + "@yarnpkg/plugin-npm": patch + "@yarnpkg/plugin-npm-cli": patch + +declined: + - "@yarnpkg/plugin-compat" + - "@yarnpkg/plugin-constraints" + - "@yarnpkg/plugin-dlx" + - "@yarnpkg/plugin-essentials" + - "@yarnpkg/plugin-init" + - "@yarnpkg/plugin-interactive-tools" + - "@yarnpkg/plugin-nm" + - "@yarnpkg/plugin-pack" + - "@yarnpkg/plugin-patch" + - "@yarnpkg/plugin-pnp" + - "@yarnpkg/plugin-pnpm" + - "@yarnpkg/plugin-stage" + - "@yarnpkg/plugin-typescript" + - "@yarnpkg/plugin-version" + - "@yarnpkg/plugin-workspace-tools" + - "@yarnpkg/builder" + - "@yarnpkg/core" + - "@yarnpkg/doctor" From 75c1a3898e052f13ec4afa2a24cd664664c39d08 Mon Sep 17 00:00:00 2001 From: Hyeseong Kim Date: Fri, 19 Sep 2025 23:41:53 +0900 Subject: [PATCH 3/3] use existing util --- packages/plugin-npm/sources/npmHttpUtils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/plugin-npm/sources/npmHttpUtils.ts b/packages/plugin-npm/sources/npmHttpUtils.ts index b064be2241d..33527ef79ab 100644 --- a/packages/plugin-npm/sources/npmHttpUtils.ts +++ b/packages/plugin-npm/sources/npmHttpUtils.ts @@ -624,9 +624,8 @@ async function getOidcToken(registry: string, {configuration, ident}: {configura return null; try { - const escapedName = encodeURIComponent(structUtils.stringifyIdent(ident)); const response = await httpUtils.post( - `${registry}/-/npm/v1/oidc/token/exchange/package/${escapedName}`, + `${registry}/-/npm/v1/oidc/token/exchange/package${getIdentUrl(ident)}`, null, { configuration,