Skip to content

Commit 1320ad8

Browse files
chore(NODE-6488): specify target=es2021 for ts compilation tests (#4303)
1 parent 691cbbb commit 1320ad8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.evergreen/run-typescript.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,12 @@ if [ "$TS_CHECK" == "COMPILE_DRIVER" ]; then
4444
npm run build:ts
4545
elif [ "$TS_CHECK" == "CHECK_TYPES" ]; then
4646
echo "checking driver types"
47+
if [ "$TS_VERSION" == "4.4" ]; then
4748
# check compilation
48-
node $TSC mongodb.d.ts
49+
node $TSC mongodb.d.ts --module commonjs --target es2021
50+
else
51+
node $TSC mongodb.d.ts --module node16 --target es2021
52+
fi
4953
else
5054
"Invalid value $TS_CHECK for TS_CHECK environment variable."
5155
exit 1

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ This is the lowest typescript version guaranteed to work with our driver: older
9999
Since typescript [does not restrict breaking changes to major versions](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes), we consider this support best effort.
100100
If you run into any unexpected compiler failures against our supported TypeScript versions, please let us know by filing an issue on our [JIRA](https://jira.mongodb.org/browse/NODE).
101101

102+
Additionally, our Typescript types are compatible with the ECMAScript standard for our minimum supported Node version. Currently, our Typescript targets es2021.
103+
102104
## Installation
103105

104106
The recommended way to get started using the Node.js 5.x driver is by using the `npm` (Node Package Manager) to install the dependency in your project.

0 commit comments

Comments
 (0)