Skip to content

Commit 929a43a

Browse files
committed
chore: rename deno files to ".mjs"
To ensure it is loaded and recognized as a module. Makes eslint 9.0 configuration easier.
1 parent b1ac0f5 commit 929a43a

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"mongo": "node ./tools/repl.js",
102102
"publish-7x": "npm publish --tag 7x",
103103
"test": "mocha --exit ./test/*.test.js",
104-
"test-deno": "deno run --allow-env --allow-read --allow-net --allow-run --allow-sys --allow-write ./test/deno.js",
104+
"test-deno": "deno run --allow-env --allow-read --allow-net --allow-run --allow-sys --allow-write ./test/deno.mjs",
105105
"test-rs": "START_REPLICA_SET=1 mocha --timeout 30000 --exit ./test/*.test.js",
106106
"test-tsd": "node ./test/types/check-types-filename && tsd",
107107
"setup-test-encryption": "bash scripts/configure-cluster-with-encryption.sh",

test/.eslintrc.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ rules:
44
# In `document.test.js` we sometimes use self assignment to test setters
55
no-self-assign: off
66
ignorePatterns:
7-
- deno.js
8-
- deno*.js
7+
- deno*.mjs

test/deno.js renamed to test/deno.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ await fixtures.mochaGlobalSetup();
1717

1818
const child_args = [
1919
...Deno.args,
20-
resolve(fileURLToPath(import.meta.url), '../deno_mocha.js')
20+
resolve(fileURLToPath(import.meta.url), '../deno_mocha.mjs')
2121
];
2222

2323
const child = spawn(process.execPath, child_args, { stdio: 'inherit' });
File renamed without changes.

test/mocha-fixtures.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const mms = require('mongodb-memory-server');
44

55
/*
66
7-
Note: dont use any mocha-specific things in this file, it may or may not be called without mocha (see deno.js)
7+
Note: dont use any mocha-specific things in this file, it may or may not be called without mocha (see deno.mjs)
88
99
*/
1010

0 commit comments

Comments
 (0)