File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,8 @@ tasks:
111
111
vars :
112
112
NODE_LTS_VERSION : 16
113
113
- func : install dependencies
114
+ vars :
115
+ NPM_VERSION : 9
114
116
- func : run tests
115
117
vars :
116
118
TEST_TARGET : node
@@ -213,8 +215,11 @@ tasks:
213
215
commands :
214
216
- func : fetch source
215
217
vars :
218
+ # This needs to stay pinned at Node v18.16.0 for consistency across perf runs.
216
219
NODE_LTS_VERSION : v18.16.0
217
220
- func : install dependencies
221
+ vars :
222
+ NPM_VERSION : 9
218
223
- func : run benchmarks
219
224
vars :
220
225
WEB : false
Original file line number Diff line number Diff line change 2
2
set -o errexit # Exit the script with error if any of the commands fail
3
3
4
4
NODE_LTS_VERSION=${NODE_LTS_VERSION:- 16}
5
- # npm 10 does not work with Node < 18 so npm 9 will be installed on those versions.
6
- NODE_LOWEST_LTS=18
5
+ # npm version can be defined in the environment for cases where we need to install
6
+ # a version lower than latest to support EOL Node versions.
7
+ NPM_VERSION=${NPM_VERSION:- latest}
7
8
8
9
source " ${PROJECT_DIRECTORY} /.evergreen/init-node-and-npm-env.sh"
9
10
97
98
fi
98
99
99
100
if [[ $operating_system != " win" ]]; then
100
- # Update npm to latest when we can
101
- if [[ $NODE_LTS_VERSION -lt $NODE_LOWEST_LTS ]]; then
102
- npm install --global npm@9
103
- else
104
- npm install --global npm@latest
105
- fi
101
+ npm install --global npm@$NPM_VERSION
106
102
hash -r
107
103
fi
108
104
You can’t perform that action at this time.
0 commit comments