Skip to content

Commit

Permalink
chore(NODE-6488): specify target=es2021 for ts compilation tests (#4303)
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson authored Nov 14, 2024
1 parent 691cbbb commit 1320ad8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .evergreen/run-typescript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ if [ "$TS_CHECK" == "COMPILE_DRIVER" ]; then
npm run build:ts
elif [ "$TS_CHECK" == "CHECK_TYPES" ]; then
echo "checking driver types"
if [ "$TS_VERSION" == "4.4" ]; then
# check compilation
node $TSC mongodb.d.ts
node $TSC mongodb.d.ts --module commonjs --target es2021
else
node $TSC mongodb.d.ts --module node16 --target es2021
fi
else
"Invalid value $TS_CHECK for TS_CHECK environment variable."
exit 1
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ This is the lowest typescript version guaranteed to work with our driver: older
Since typescript [does not restrict breaking changes to major versions](https://github.com/Microsoft/TypeScript/wiki/Breaking-Changes), we consider this support best effort.
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).

Additionally, our Typescript types are compatible with the ECMAScript standard for our minimum supported Node version. Currently, our Typescript targets es2021.

## Installation

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.
Expand Down

0 comments on commit 1320ad8

Please sign in to comment.