diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 8e7f590..1dcea37 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -60,7 +60,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] - node-version: [14.x, 16.x, 18.x, 20.x] + node-version: [18.x, 20.x, 21.x] webpack-version: [latest] runs-on: ${{ matrix.os }} diff --git a/babel.config.js b/babel.config.js index 471d337..b65dedb 100644 --- a/babel.config.js +++ b/babel.config.js @@ -10,7 +10,7 @@ module.exports = (api) => { "@babel/preset-env", { targets: { - node: "14.15.0", + node: "18.12.0", }, }, ], diff --git a/package.json b/package.json index 3512799..e5c5b97 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ }, "main": "dist/cjs.js", "engines": { - "node": ">= 14.15.0" + "node": ">= 18.12.0" }, "scripts": { "start": "npm run build -- -w", @@ -24,7 +24,7 @@ "security": "npm audit --production", "lint:prettier": "prettier --list-different .", "lint:js": "eslint --cache .", - "lint:spelling": "cspell \"**/*.*\"", + "lint:spelling": "cspell --no-must-find-files --cache --quiet \"**/*.*\"", "lint": "npm-run-all -l -p \"lint:**\"", "fix:js": "npm run lint:js -- --fix", "fix:prettier": "npm run lint:prettier -- --write", diff --git a/test/helpers/execute.js b/test/helpers/execute.js index d205732..f5cbbb4 100644 --- a/test/helpers/execute.js +++ b/test/helpers/execute.js @@ -8,7 +8,7 @@ export default (code) => { const module = new Module(resource, parentModule); // eslint-disable-next-line no-underscore-dangle module.paths = Module._nodeModulePaths( - path.resolve(__dirname, "../fixtures") + path.resolve(__dirname, "../fixtures"), ); module.filename = resource; diff --git a/test/helpers/normalizeErrors.js b/test/helpers/normalizeErrors.js index d3ba357..e478246 100644 --- a/test/helpers/normalizeErrors.js +++ b/test/helpers/normalizeErrors.js @@ -16,5 +16,5 @@ function removeCWD(str) { export default (errors) => errors.map((error) => - removeCWD(error.toString().split("\n").slice(0, 2).join("\n")) + removeCWD(error.toString().split("\n").slice(0, 2).join("\n")), ); diff --git a/test/loader.test.js b/test/loader.test.js index b10be73..5457e5d 100644 --- a/test/loader.test.js +++ b/test/loader.test.js @@ -14,7 +14,7 @@ describe("loader", () => { const compiler = getCompiler("simple.js"); const stats = await compile(compiler); const { source, sourceMap } = execute( - getModuleSource("./foo.coffee", stats) + getModuleSource("./foo.coffee", stats), ); expect(source).toMatchSnapshot("source"); @@ -27,7 +27,7 @@ describe("loader", () => { const compiler = getCompiler("bare.js"); const stats = await compile(compiler); const { source, sourceMap } = execute( - getModuleSource("./bare.coffee", stats) + getModuleSource("./bare.coffee", stats), ); expect(source).toMatchSnapshot("source"); @@ -55,7 +55,7 @@ describe("loader", () => { }); const stats = await compile(compiler); const { source, sourceMap } = execute( - getModuleSource("./foo.coffee", stats) + getModuleSource("./foo.coffee", stats), ); expect(source).toMatchSnapshot("source"); @@ -81,7 +81,7 @@ describe("loader", () => { const compiler = getCompiler("simple.js", { sourceMap: true }); const stats = await compile(compiler); const { source, sourceMap } = execute( - getModuleSource("./foo.coffee", stats) + getModuleSource("./foo.coffee", stats), ); expect(source).toMatchSnapshot("source"); @@ -94,7 +94,7 @@ describe("loader", () => { const compiler = getCompiler("simple.js", { sourceMap: false }); const stats = await compile(compiler); const { source, sourceMap } = execute( - getModuleSource("./foo.coffee", stats) + getModuleSource("./foo.coffee", stats), ); expect(source).toMatchSnapshot("source"); @@ -107,7 +107,7 @@ describe("loader", () => { const compiler = getCompiler("simple.js", {}, { devtool: "source-map" }); const stats = await compile(compiler); const { source, sourceMap } = execute( - getModuleSource("./foo.coffee", stats) + getModuleSource("./foo.coffee", stats), ); expect(source).toMatchSnapshot("source"); @@ -120,7 +120,7 @@ describe("loader", () => { const compiler = getCompiler("simple.js", {}, { devtool: false }); const stats = await compile(compiler); const { source, sourceMap } = execute( - getModuleSource("./foo.coffee", stats) + getModuleSource("./foo.coffee", stats), ); expect(source).toMatchSnapshot("source"); @@ -133,11 +133,11 @@ describe("loader", () => { const compiler = getCompiler( "simple.js", { sourceMap: true }, - { devtool: false } + { devtool: false }, ); const stats = await compile(compiler); const { source, sourceMap } = execute( - getModuleSource("./foo.coffee", stats) + getModuleSource("./foo.coffee", stats), ); expect(source).toMatchSnapshot("source"); @@ -150,7 +150,7 @@ describe("loader", () => { const compiler = getCompiler("simple.js", { unknown: true }); const stats = await compile(compiler); const { source, sourceMap } = execute( - getModuleSource("./foo.coffee", stats) + getModuleSource("./foo.coffee", stats), ); expect(source).toMatchSnapshot("source"); @@ -163,7 +163,7 @@ describe("loader", () => { const compiler = getCompiler("baz.js", { literate: true }); const stats = await compile(compiler); const { source, sourceMap } = execute( - getModuleSource("./baz.litcoffee", stats) + getModuleSource("./baz.litcoffee", stats), ); expect(source).toMatchSnapshot("source");