Skip to content

Commit 3e533a0

Browse files
authored
Switch module to ESM (#606)
2 parents f00b854 + cc37d37 commit 3e533a0

31 files changed

Lines changed: 150 additions & 79 deletions

.prettierrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
trailingComma: "all",
33
proseWrap: "always",
44
};

RELEASE_NOTES.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,18 @@ Read more:
2121

2222
## v0.18.0
2323

24+
- Now published as pure ESM, but worry not as unflagged require(ESM) is now
25+
enabled by default in
26+
[Node 20.19.0+](https://nodejs.org/pt-br/blog/release/v20.19.0),
27+
[Node 22.12.0+](https://nodejs.org/en/blog/release/v22.12.0) and Node 24+ so
28+
everything should continue to work as before.
2429
- Since Node 20 is EOL, Node 22 is now the minimum supported version, per our
2530
[requirements documentation](https://worker.graphile.org/docs/requirements).
2631
- `Runner` gains `[Symbol.asyncDispose]()` method, so you can
2732
`await using runner = await run(...)` and the worker will be released when you
2833
reach the end of the scope. (Primarily useful for tests.)
2934
- Maintenance work: upgrade to latest TypeScript, Jest, eliminate ts-node, fix
30-
yargs, use erasable syntax only for type-stripping support,
35+
yargs, use erasable syntax only for type-stripping support.
3136
- `LogLevel` export is now type only - a string union rather than a TypeScript
3237
const enum.
3338

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { rand } = require("../blah.js");
1+
const { rand } = require("../blah.cjs");
22
module.exports = (_payload, helpers) => {
33
helpers.logger.debug(rand());
44
return "some sausages";
File renamed without changes.

__tests__/fixtures/tasks/wouldyoulike_ts.js renamed to __tests__/fixtures/tasks/wouldyoulike_ts.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
3-
const blah_1 = require("../blah.js");
3+
const blah_1 = require("../blah.cjs");
44
exports.default = (_payload, helpers) => {
55
helpers.logger.debug((0, blah_1.rand)());
66
return "some TS sausages";
File renamed without changes.

0 commit comments

Comments
 (0)