File tree Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 33## main
44- Prune devDependencies with Yarn 2 ([ #891 ] ( https://github.com/heroku/heroku-buildpack-nodejs/pull/891 ) )
55- Add 10.x, 12.x, and 14.x to inventory ([ 902] ( https://github.com/heroku/heroku-buildpack-nodejs/pull/902 ) )
6+ - Fix yarn workspace plugin detection ([ #905 ] ( https://github.com/heroku/heroku-buildpack-nodejs/pull/905 ) )
67
78## v183 (2020-02-03)
89- Update node version to 14 ([ #885 ] ( https://github.com/heroku/heroku-buildpack-nodejs/pull/885 ) )
Original file line number Diff line number Diff line change @@ -175,6 +175,7 @@ yarn_prune_devdependencies() {
175175 cd " $build_dir " || return
176176
177177 if has_yarn_workspace_plugin_installed " $build_dir " ; then
178+ echo " Running 'yarn workspaces focus --all --production'"
178179 meta_set " workspace-plugin-present" " true"
179180
180181 # The cache is removed beforehand because the command is running an install on devDeps, and
Original file line number Diff line number Diff line change @@ -28,7 +28,15 @@ has_yarn_cache() {
2828has_yarn_workspace_plugin_installed () {
2929 local build_dir=" $1 "
3030 local plugin_paths=$( get_yarn_plugin_paths " $build_dir " )
31- [[ ! -n $plugin_paths ]] && echo " $plugin_paths " | grep plugin-workspace-tools
31+ local path
32+
33+ if [[ -n $plugin_paths ]]; then
34+ path=$( echo " $plugin_paths " | grep plugin-workspace-tools)
35+ else
36+ path=" "
37+ fi
38+
39+ [[ ! " $path " == " " ]]
3240}
3341
3442get_yarn_plugin_paths () {
Original file line number Diff line number Diff line change @@ -679,6 +679,7 @@ testYarn2() {
679679 assertCaptured " The buildpack won't cache the dependencies in .yarn/cache."
680680 assertCaptured " Running 'yarn install' with yarn.lock"
681681 assertCaptured " Version 3.9.7" # tsc output
682+ assertCaptured " Running 'yarn workspaces focus --all --production'"
682683 assertCapturedSuccess
683684}
684685
You can’t perform that action at this time.
0 commit comments