Skip to content

Commit

Permalink
finish merge
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Jul 16, 2024
1 parent 9e87db0 commit b29655f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 46 deletions.
61 changes: 23 additions & 38 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3453,7 +3453,7 @@ tasks:
- {key: NPM_VERSION, value: '9'}
- func: install dependencies
- func: run lint checks
- name: check-types-typescript-next-node-types-20.12.7
- name: check-types-typescript-next-node-types-20.14.10
tags:
- check-types-typescript-next
- typescript-compilation
Expand All @@ -3465,12 +3465,12 @@ tasks:
- {key: NODE_LTS_VERSION, value: '16'}
- {key: NPM_VERSION, value: '9'}
- {key: TS_VERSION, value: next}
- {key: TYPES_VERSION, value: 20.12.7}
- {key: TYPES_VERSION, value: 20.14.10}
- func: install dependencies
- func: check types
- name: compile-driver-typescript-current-node-types-20.12.7
- name: check-types-typescript-current-node-types-20.14.10
tags:
- compile-driver-typescript-current
- check-types-typescript-current
- typescript-compilation
commands:
- command: expansions.update
Expand All @@ -3480,12 +3480,12 @@ tasks:
- {key: NODE_LTS_VERSION, value: '16'}
- {key: NPM_VERSION, value: '9'}
- {key: TS_VERSION, value: current}
- {key: TYPES_VERSION, value: 20.12.7}
- {key: TYPES_VERSION, value: 20.14.10}
- func: install dependencies
- func: compile driver
- name: check-types-typescript-current-node-types-20.12.7
- func: check types
- name: check-types-typescript-next-node-types-16.x
tags:
- check-types-typescript-current
- check-types-typescript-next
- typescript-compilation
commands:
- command: expansions.update
Expand All @@ -3494,13 +3494,13 @@ tasks:
updates:
- {key: NODE_LTS_VERSION, value: '16'}
- {key: NPM_VERSION, value: '9'}
- {key: TS_VERSION, value: current}
- {key: TYPES_VERSION, value: 20.12.7}
- {key: TS_VERSION, value: next}
- {key: TYPES_VERSION, value: 16.x}
- func: install dependencies
- func: check types
- name: check-types-typescript-4.4-node-types-20.12.7
- name: check-types-typescript-current-node-types-16.x
tags:
- check-types-typescript-4.4
- check-types-typescript-current
- typescript-compilation
commands:
- command: expansions.update
Expand All @@ -3509,13 +3509,13 @@ tasks:
updates:
- {key: NODE_LTS_VERSION, value: '16'}
- {key: NPM_VERSION, value: '9'}
- {key: TS_VERSION, value: '4.4'}
- {key: TYPES_VERSION, value: 20.12.7}
- {key: TS_VERSION, value: current}
- {key: TYPES_VERSION, value: 16.x}
- func: install dependencies
- func: check types
- name: check-types-typescript-next-node-types-16.x
- name: check-types-typescript-4.4-node-types-18.11.9
tags:
- check-types-typescript-next
- check-types-typescript-4.4
- typescript-compilation
commands:
- command: expansions.update
Expand All @@ -3524,11 +3524,11 @@ tasks:
updates:
- {key: NODE_LTS_VERSION, value: '16'}
- {key: NPM_VERSION, value: '9'}
- {key: TS_VERSION, value: next}
- {key: TYPES_VERSION, value: 16.x}
- {key: TS_VERSION, value: '4.4'}
- {key: TYPES_VERSION, value: 18.11.9}
- func: install dependencies
- func: check types
- name: compile-driver-typescript-current-node-types-16.x
- name: compile-driver-typescript-current-node-types-20.14.10
tags:
- compile-driver-typescript-current
- typescript-compilation
Expand All @@ -3540,12 +3540,12 @@ tasks:
- {key: NODE_LTS_VERSION, value: '16'}
- {key: NPM_VERSION, value: '9'}
- {key: TS_VERSION, value: current}
- {key: TYPES_VERSION, value: 16.x}
- {key: TYPES_VERSION, value: 20.14.10}
- func: install dependencies
- func: compile driver
- name: check-types-typescript-current-node-types-16.x
- name: compile-driver-typescript-current-node-types-16.x
tags:
- check-types-typescript-current
- compile-driver-typescript-current
- typescript-compilation
commands:
- command: expansions.update
Expand All @@ -3557,22 +3557,7 @@ tasks:
- {key: TS_VERSION, value: current}
- {key: TYPES_VERSION, value: 16.x}
- func: install dependencies
- func: check types
- name: check-types-typescript-4.4-node-types-16.x
tags:
- check-types-typescript-4.4
- typescript-compilation
commands:
- command: expansions.update
type: setup
params:
updates:
- {key: NODE_LTS_VERSION, value: '16'}
- {key: NPM_VERSION, value: '9'}
- {key: TS_VERSION, value: '4.4'}
- {key: TYPES_VERSION, value: 16.x}
- func: install dependencies
- func: check types
- func: compile driver
- name: download-and-merge-coverage
tags: []
commands:
Expand Down
10 changes: 6 additions & 4 deletions .evergreen/generate_evergreen_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -532,14 +532,16 @@ function* makeTypescriptTasks() {

const typesVersion = require('../package.json').devDependencies['@types/node'].slice(1)
yield makeCheckTypesTask('next', typesVersion);
yield makeCompileTask('current', typesVersion);
yield makeCheckTypesTask('current', typesVersion);
yield makeCheckTypesTask('4.4', typesVersion);

yield makeCheckTypesTask('next', '16.x');
yield makeCompileTask('current', '16.x');
yield makeCheckTypesTask('current', '16.x');
yield makeCheckTypesTask('4.4', '16.x');

// typescript 4.4 only compiles our types with this particular version
yield makeCheckTypesTask('4.4', '18.11.9');

yield makeCompileTask('current', typesVersion);
yield makeCompileTask('current', '16.x');
}

BUILD_VARIANTS.push({
Expand Down
7 changes: 3 additions & 4 deletions .evergreen/run-typescript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ set -o errexit # Exit the script with error if any of the commands fail

source "${PROJECT_DIRECTORY}/.evergreen/init-node-and-npm-env.sh"

set -o xtrace

case $TS_CHECK in
COMPILE_DRIVER|CHECK_TYPES) # Ok
;;
Expand Down Expand Up @@ -32,10 +30,11 @@ function get_ts_version() {
export TSC="./node_modules/typescript/bin/tsc"
export TS_VERSION=$(get_ts_version)

# On old versions of TS we need to put the node types back to 18.11.19
npm install --no-save --force typescript@"$TS_VERSION" "@types/node@$TYPES_VERSION"
npm install --no-save --force "typescript@$TS_VERSION" "@types/node@$TYPES_VERSION"

echo "Typescript $($TSC -v)"
echo "Types: $(cat node_modules/@types/node/package.json | jq -r .version)"
echo "Nodejs: $(node -v)"

# check resolution uses the default latest types
echo "import * as mdb from '.'" > file.ts && node $TSC --noEmit --traceResolution file.ts | grep 'mongodb.d.ts' && rm file.ts
Expand Down

0 comments on commit b29655f

Please sign in to comment.