From 4abb59cd3cda2fa44d935d227489a70201665186 Mon Sep 17 00:00:00 2001 From: Asher Date: Mon, 16 Nov 2026 12:44:56 -0900 Subject: [PATCH] Support pnpm for post-install --- ci/build/npm-postinstall.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ci/build/npm-postinstall.sh b/ci/build/npm-postinstall.sh index 3621e1e61..98a0bd5ba 100755 --- a/ci/build/npm-postinstall.sh +++ b/ci/build/npm-postinstall.sh @@ -90,11 +90,16 @@ main() { fi } -install_with_yarn_or_npm() { +install_with_package_manager() { echo "User agent: ${npm_config_user_agent-none}" - # For development we enforce npm, but for installing the package as an + # For development we enforce pnpm, but for installing the package as an # end-user we want to keep using whatever package manager is in use. case "${npm_config_user_agent-}" in + pnpm*) + if ! pnpm install --prod; then + return 1 + fi + ;; npm*) if ! npm install --omit=dev; then return 1 @@ -116,7 +121,7 @@ install_with_yarn_or_npm() { vscode_install() { echo 'Installing Code dependencies...' cd lib/vscode - if ! install_with_yarn_or_npm; then + if ! install_with_package_manager; then return 1 fi @@ -124,7 +129,7 @@ vscode_install() { symlink_bin_script helpers browser browser .sh cd extensions - if ! install_with_yarn_or_npm; then + if ! install_with_package_manager; then return 1 fi