Skip to content

Commit 33b6624

Browse files
committed
feat(NODE-4520): deprecate callback support and implement wrapper library
1 parent 8f16019 commit 33b6624

29 files changed

+6737
-7
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
lib
33
test/disabled
44
!etc/docs
5+
!*.test-d.ts
6+
*.d.ts

etc/mongodb-callbacks/.eslintrc.json

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"project": "./etc/mongodb-callbacks/jsconfig.json",
6+
"ecmaVersion": 2019
7+
},
8+
"env": {
9+
"node": true,
10+
"es6": true
11+
},
12+
"plugins": ["prettier", "@typescript-eslint"],
13+
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
14+
"rules": {
15+
"strict": "error",
16+
"prettier/prettier": "error",
17+
"no-console": "error",
18+
"valid-typeof": "error",
19+
"eqeqeq": [
20+
"error",
21+
"always",
22+
{
23+
"null": "ignore"
24+
}
25+
],
26+
"no-implicit-coercion": "error",
27+
"@typescript-eslint/strict-boolean-expressions": "error"
28+
}
29+
}

etc/mongodb-callbacks/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!mongodb-legacy.d.ts

etc/mongodb-callbacks/.mocharc.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/mocharc.json",
3+
"extension": ["js", "ts"],
4+
"recursive": true,
5+
"failZero": true,
6+
"sort": true,
7+
"color": true,
8+
"require": [
9+
"test/hooks/fake_server.js"
10+
]
11+
}

etc/mongodb-callbacks/jsconfig.json

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"compilerOptions": {
3+
"moduleResolution": "node",
4+
"target": "es2020",
5+
"allowJs": true,
6+
"checkJs": true,
7+
"strict": false,
8+
"strictNullChecks": true,
9+
"strictPropertyInitialization": true,
10+
"noEmit": true
11+
}
12+
}

etc/mongodb-callbacks/mongodb-legacy.d.ts

+1,119
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)