Skip to content

Commit 2ff2830

Browse files
only cherry-pick the files I want
1 parent d107025 commit 2ff2830

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.evergreen/run-typescript.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ set -o errexit # Exit the script with error if any of the commands fail
66
set -o xtrace
77

88
function get_current_ts_version {
9-
node -e "console.log(require('./package-lock.json').dependencies.typescript.version)"
9+
node -e "console.log(require('./package-lock.json').packages['node_modules/typescript'].version)"
1010
}
1111

1212
CURRENT_TS_VERSION=$(get_current_ts_version)
1313

1414
export TSC="./node_modules/typescript/bin/tsc"
1515
export TS_VERSION=${TS_VERSION:=$CURRENT_TS_VERSION}
1616

17-
npm install --no-save --force typescript@"$TS_VERSION"
17+
# On old versions of TS we need to put the node types back to 18.11.19
18+
npm install --no-save --force typescript@"$TS_VERSION" "$(if [[ $TS_VERSION == '4.0.2' ]]; then echo "@types/[email protected]"; else echo ""; fi)"
1819

1920
echo "Typescript $($TSC -v)"
2021

0 commit comments

Comments
 (0)