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

CI: drop Node.js 16 #1337

Merged
merged 8 commits into from Jan 30, 2024
Merged

CI: drop Node.js 16 #1337

merged 8 commits into from Jan 30, 2024

Conversation

azu
Copy link
Member

@azu azu commented Jan 30, 2024

close #1336

Changes

  • Remove Node.js 16 support
  • Add Node.js 18/20 to CI
  • Change to use import instead of loader
    • loader cause ERR_UNKNOWN_FILE_EXTENSION error
  • Use .js instead of .ts in some dynamic importing test
    • e.g. --rules-dir test need to import js file, but --import can not transpile it.

@azu azu linked an issue Jan 30, 2024 that may be closed by this pull request
@azu
Copy link
Member Author

azu commented Jan 30, 2024


(node:2315) ExperimentalWarning: `--experimental-loader` may be removed in the future; instead use `register()`:
--import 'data:text/javascript,import { register } from "node:module"; import { pathToFileURL } from "node:url"; register("ts-node/esm", pathToFileURL("./"));'
(Use `node --trace-warnings ...` to show where the warning was created)
(node:2315) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.

/home/runner/work/textlint/textlint/packages/@textlint/feature-flag/test/textlint-feature-flag-test.ts:2
import assert from "assert";
^^^^^^

This is caused by ts-node issue.

@@ -9,7 +9,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
# https://github.com/TypeStrong/ts-node/issues/2094
node: [ 16, 18.18.2 ]
node: [ 18.18.2, 20 ]
Copy link
Member Author

@azu azu Jan 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

18.19.0 and 20.x change --import behavior.
It breaks tests.

We need to find a solution to this problem.

  • use tsimp - some behavior is different with ts-node?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mocha --import ts-node/esm does not handle import("./file.ts").

@azu azu added the Type: Breaking Change Includes breaking changes label Jan 30, 2024
@azu azu merged commit 8bac111 into master Jan 30, 2024
17 checks passed
@azu azu deleted the feature/1336 branch January 30, 2024 13:37
@github-actions github-actions bot mentioned this pull request Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Breaking Change Includes breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop Node.js 16 support
1 participant