File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -6,15 +6,16 @@ set -o errexit # Exit the script with error if any of the commands fail
6
6
set -o xtrace
7
7
8
8
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)"
10
10
}
11
11
12
12
CURRENT_TS_VERSION=$( get_current_ts_version)
13
13
14
14
export TSC=" ./node_modules/typescript/bin/tsc"
15
15
export TS_VERSION=${TS_VERSION:= $CURRENT_TS_VERSION }
16
16
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) "
18
19
19
20
echo " Typescript $( $TSC -v) "
20
21
You can’t perform that action at this time.
0 commit comments