Skip to content

Commit

Permalink
Skip pruning for pnpm workspaces since it's not supported (#1295)
Browse files Browse the repository at this point in the history
* Skip pruning for pnpm workspaces since it's not supported
  • Loading branch information
colincasey authored Jul 13, 2024
1 parent 4bbca74 commit 2698420
Show file tree
Hide file tree
Showing 8 changed files with 620 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [Unreleased]

- Skip pruning for pnpm workspace applications. ([#1295](https://github.com/heroku/heroku-buildpack-nodejs/pull/1295))

## [v258] - 2024-07-10

Expand Down
4 changes: 4 additions & 0 deletions lib/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,10 @@ pnpm_prune_devdependencies() {
echo "Skipping because PNPM_SKIP_PRUNING is '$PNPM_SKIP_PRUNING'"
meta_set "skipped-prune" "true"
return 0
elif [ -f "$build_dir/pnpm-workspace.yaml" ] || [ -f "$build_dir/pnpm-workspace.yml" ]; then
echo "Skipping because pruning is not supported for pnpm workspaces (https://pnpm.io/cli/prune)"
meta_set "skipped-prune" "true"
return 0
fi

pnpm_version=$(pnpm --version)
Expand Down
16 changes: 16 additions & 0 deletions test/fixtures/pnpm-workspace-binaries/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "pnpm-workspace-binaries",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "pnpm -r build"
},
"keywords": [],
"author": "",
"license": "ISC",
"packageManager": "[email protected]+sha256.dbdf5961c32909fb030595a9daa1dae720162e658609a8f92f2fa99835510ca5",
"engines": {
"node": "20.x"
}
}
15 changes: 15 additions & 0 deletions test/fixtures/pnpm-workspace-binaries/packages/one/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "one",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "next --version"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"next": "15.0.0-rc.0"
}
}
15 changes: 15 additions & 0 deletions test/fixtures/pnpm-workspace-binaries/packages/two/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "two",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "next --version"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"next": "15.0.0-rc.0"
}
}
Loading

0 comments on commit 2698420

Please sign in to comment.