From 0a3deef2a972207c3541cac07c2ae5ea7566a202 Mon Sep 17 00:00:00 2001 From: Origin173 <2864696212@qq.com> Date: Sun, 16 Aug 2026 20:16:31 +0800 Subject: [PATCH] fix(ci): allow sharp/unrs-resolver build scripts via pnpm-workspace.yaml Current pnpm versions (v10+) no longer honor the old `only-built-dependencies` key and fail `pnpm install` with ERR_PNPM_IGNORED_BUILDS for ignored native build scripts. Add the replacement `allowBuilds` config in pnpm-workspace.yaml so the Build Artifacts workflow can install sharp and unrs-resolver again. --- .npmrc | 6 +++--- pnpm-workspace.yaml | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 pnpm-workspace.yaml diff --git a/.npmrc b/.npmrc index 48804d2f..29b599a4 100644 --- a/.npmrc +++ b/.npmrc @@ -1,3 +1,3 @@ -# Allow build scripts for native dependencies -only-built-dependencies[]=sharp -only-built-dependencies[]=unrs-resolver \ No newline at end of file +# Build script allowances for native dependencies live in pnpm-workspace.yaml +# (allowBuilds) — the old `only-built-dependencies` key is no longer honored by +# current pnpm versions. \ No newline at end of file diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 00000000..6f1621a5 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,5 @@ +# Allow native build scripts for dependencies with ignored builds (pnpm v10+). +# This replaces the old `onlyBuiltDependencies` setting. +allowBuilds: + sharp: true + unrs-resolver: true