Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare migration to ESM #1022

Merged
merged 21 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [14.x, 16.x, 18.x, 20.x, 22.x]
# Do not support --experimental-require-module
# Commented until we have a solution to run tests without it
# node-version: [14, 16, 18, 20, 22]
# node-version: [20, 22] // fails on 20 with (0 , _getDomain.default) is not a function
node: [22]
steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
Expand Down
1 change: 1 addition & 0 deletions ava.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export default {
],
},
},
nodeArguments: ["--experimental-require-module"],
files: [
"packages/**/test.js",
"packages/**/test/*.js",
Expand Down
1 change: 1 addition & 0 deletions e2e.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ export default {
],
},
},
nodeArguments: ["--experimental-require-module"],
files: ["test/*.js"],
};
13 changes: 8 additions & 5 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default [
jsx: true,
},
},
sourceType: "script",
sourceType: "commonjs",
},

rules: {
Expand Down Expand Up @@ -65,6 +65,10 @@ export default [
"error",
{ allowModules: ["ava", "sinon", "@xmpp/test"] },
],
"n/no-extraneous-import": [
"error",
{ allowModules: ["ava", "sinon", "@xmpp/test"] },
],

// promise
// https://github.com/xjamundx/eslint-plugin-promise
Expand All @@ -88,10 +92,9 @@ export default [
},
},
{
files: ["server/ctl.js"],
rules: {
"n/no-unsupported-features/es-syntax": "off",
"n/no-unsupported-features/es-syntax": "off",
files: ["packages/client/**/*.js"],
languageOptions: {
sourceType: "module",
},
},
];
Loading
Loading