Conversation
Deploying rslib with
|
| Latest commit: |
44174d5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://0f8caad0.rslib.pages.dev |
| Branch Preview URL: | https://refactor-drop-node-18.rslib.pages.dev |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 44174d5318
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR drops Node.js 18 support across the repo by updating engine constraints, un-skipping Node 18-gated integration tests, and aligning documentation and CI configuration with the new supported Node baseline.
Changes:
- Updated
engines.nodeto^20.19.0 || >=22.12.0in the root and key packages. - Removed Node 18 conditional skips in multiple integration tests (notably tsgo-related suites).
- Updated docs and GitHub Actions workflows to reflect the new runtime/support posture.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/zh/guide/start/quick-start.mdx | Updates environment prep guidance and adds runtime/version requirements tip. |
| website/docs/en/guide/start/quick-start.mdx | Same as above for English docs; rewords section title and adds runtime list + tip. |
| tests/integration/redirect/dtsTsgo.test.ts | Removes Node 18 skip for tsgo dts redirect integration tests. |
| tests/integration/dts-tsgo/bundle/index.test.ts | Removes Node 18 skip for tsgo “bundle: true” integration tests. |
| tests/integration/dts-tsgo/bundle-false/index.test.ts | Removes Node 18 skip for tsgo “bundle: false” integration tests. |
| tests/integration/dts-tsgo/build/index.test.ts | Removes Node 18 skip for tsgo “build: true” integration tests. |
| tests/integration/banner-footer/index.test.ts | Removes Node 18 skip for banner/footer integration test. |
| packages/plugin-dts/rslib.config.ts | Changes build syntax setting from Node 18 to ES target. |
| packages/plugin-dts/package.json | Updates Node engine requirement for the package. |
| packages/create-rslib/rslib.config.ts | Changes build syntax setting from Node 18 to ES target. |
| packages/create-rslib/package.json | Updates Node engine requirement for the package. |
| packages/core/rslib.config.ts | Changes build syntax setting from Node 18 to ES target. |
| packages/core/package.json | Updates Node engine requirement for the package. |
| package.json | Updates workspace-level Node engine requirement. |
| .github/workflows/test.yml | Updates CI Node version matrix (now Node 24 only). |
| .github/workflows/reusable-test.yml | Removes Node 18 special handling steps. |
| .github/workflows/release.yml | Bumps release workflow Node version. |
| .github/workflows/preview.yml | Bumps preview workflow Node version. |
| .github/workflows/lint.yml | Bumps lint workflow Node version. |
| .github/workflows/benchmark.yml | Bumps benchmark workflow Node version (placeholder job). |
| format: 'esm', | ||
| bundle: false, | ||
| syntax: ['node 18.12.0'], | ||
| syntax: ['es2023'], |
There was a problem hiding this comment.
syntax: ['es2023'] is currently treated as es2022 for Rspack target (newer ES versions are mapped down), so it doesn't actually express an ES2023 target. If the goal is “modern syntax”, use es2022 explicitly; if the goal is “Node runtime target”, prefer a node XX browserslist target that matches the supported engines.
| syntax: ['es2023'], | |
| syntax: ['es2022'], |
| { | ||
| format: 'esm', | ||
| syntax: ['node 18.12.0'], | ||
| syntax: ['es2023'], |
There was a problem hiding this comment.
syntax: ['es2023'] is mapped down to es2022 for Rspack target, so this setting won’t actually target ES2023. Consider using es2022 explicitly (or a node XX target aligned with the supported engines) to make the intended runtime/syntax level unambiguous.
| syntax: ['es2023'], | |
| syntax: ['es2022'], |
| "engines": { | ||
| "node": ">=18.12.0" | ||
| "node": "^20.19.0 || >=22.12.0" | ||
| }, |
There was a problem hiding this comment.
create-rslib now requires Node ^20.19.0 || >=22.12.0, but the bundled templates still generate configs with syntax: ['node 18'] (e.g. template-node-esm-ts / template-node-dual-ts). Update the templates to reflect the new minimum Node target so newly generated projects don’t default to an unsupported runtime target.
| { | ||
| format: 'esm', | ||
| syntax: ['node 18.12.0'], | ||
| syntax: ['es2023'], |
There was a problem hiding this comment.
syntax: ['es2023'] is mapped down to es2022 for Rspack target, so it won’t actually target ES2023. Consider using es2022 explicitly (or a node XX target aligned with the supported engines) so the intended compilation target is clear.
| syntax: ['es2023'], | |
| syntax: ['es2022'], |
| - Rslib >= 0.20 requires Node.js version 20.19+, 22.12+. | ||
| - Rslib < 0.20 requires Node.js 18.12.0 or higher. | ||
|
|
There was a problem hiding this comment.
This “Version requirements” tip only lists Node.js versions even though the section claims Node/Deno/Bun runtimes. Clarify that these requirements apply when using the Node.js runtime (and/or document minimum supported Deno/Bun versions) to prevent reader confusion.
| - Rslib >= 0.20 requires Node.js version 20.19+, 22.12+. | |
| - Rslib < 0.20 requires Node.js 18.12.0 or higher. | |
| These version requirements apply when using the Node.js runtime: | |
| - Rslib >= 0.20 requires Node.js version 20.19+ or 22.12+. | |
| - Rslib < 0.20 requires Node.js 18.12.0 or higher. | |
| When using Deno or Bun, ensure that your runtime (and any Node.js compatibility layer it provides) supports at least the corresponding Node.js version required by your Rslib version. |
| :::tip 版本要求 | ||
|
|
||
| 下面是通过 nvm 安装的例子: | ||
| - Rslib >= 0.20 要求 Node.js 版本 20.19+,22.12+。 | ||
| - Rslib < 0.20 要求 Node.js 18.12.0 或更高版本。 |
There was a problem hiding this comment.
“版本要求”只列了 Node.js 版本,但本节同时提到 Node/Deno/Bun 运行时。建议补充说明这些要求仅适用于使用 Node.js 运行时(以及如有需要补充 Deno/Bun 的最低版本),避免读者误解。
| strategy: | ||
| matrix: | ||
| runner: [ubuntu-latest, windows-latest] | ||
| node-version: [22] | ||
| node-version: [24] | ||
| uses: ./.github/workflows/reusable-test.yml |
There was a problem hiding this comment.
CI now runs tests only on Node 24, but the repo's declared engines are "^20.19.0 || >=22.12.0". Add CI coverage for the minimum supported versions (e.g. 20.19.x and 22.12.x) to avoid shipping regressions that only reproduce on the supported floor versions.
| - name: Setup Node.js | ||
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6 | ||
| with: | ||
| node-version: 22 | ||
| node-version: 24 | ||
| cache: 'pnpm' |
There was a problem hiding this comment.
Release workflow was bumped to Node 24, which isn't mentioned in the PR summary and reduces confidence that publishing is validated on the supported LTS floors (20.19.x / 22.12.x). Consider pinning release to a supported LTS (or running a small matrix) so the release environment matches the stated engine range.
Summary
As Node.js 18 reached its end-of-life on April 30, 2025, Rslib will no longer support this version since v0.20.0. The minimum supported version will be Node.js 20.19.
Related Links
Checklist