Skip to content

Commit

Permalink
move to mjs extension
Browse files Browse the repository at this point in the history
otherwise node will be sad.
  • Loading branch information
43081j committed Nov 21, 2020
1 parent 6692ea1 commit a6e9d3a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ makeBundle(
})
.join("\n");

fs.writeFileSync("pkg/fake-timers-esm.js", source);
fs.writeFileSync("pkg/fake-timers-esm.mjs", source);
}
);
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test-check-coverage": "npm run test-coverage && nyc check-coverage",
"test-cloud": "mochify --wd --no-detect-globals --timeout=10000",
"test-coverage": "nyc --all --reporter text --reporter html --reporter lcovonly npm run test-node",
"test-esm": "node -r esm test-esm/fake-timers-esm-test.js",
"test-esm": "node test-esm/fake-timers-esm-test.mjs",
"test": "npm run lint && npm run test-node && npm run test-headless && npm run test-esm",
"bundle": "node ./build.js",
"prepublishOnly": "npm run bundle",
Expand Down Expand Up @@ -86,7 +86,7 @@
}
]
},
"module": "./pkg/fake-timers-esm.js",
"module": "./pkg/fake-timers-esm.mjs",
"cdn": "./pkg/fake-timers.js",
"jsdelivr": "./pkg/fake-timers.js",
"main": "./src/fake-timers-src.js",
Expand All @@ -105,7 +105,7 @@
"statements": 92,
"exclude": [
"**/*-test.js",
"**/*-test-esm.js",
"test-esm/**",
"build.js",
"coverage/**",
"pkg/**"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-console */
import * as timers from "../pkg/fake-timers-esm.js";
import * as timers from "../pkg/fake-timers-esm.mjs";

const expectedExports = ["timers", "createClock", "install", "withGlobal"];

Expand Down

0 comments on commit a6e9d3a

Please sign in to comment.