Conversation
Deploying rslib with
|
| Latest commit: |
fc26fcc
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://49aea145.rslib.pages.dev |
| Branch Preview URL: | https://feat-core-experiments-exe.rslib.pages.dev |
experiments.exe support
There was a problem hiding this comment.
Pull request overview
Adds experimental experiments.exe support to package bundled Node.js (esm/cjs) library outputs as Single Executable Applications (SEA), including target resolution / cross-target generation and new integration + unit test coverage.
Changes:
- Add
experiments.execonfiguration types, validation, and an Rsbuild plugin flow that builds SEA executables after compilation. - Implement target binary resolution (including downloading official Node binaries) and executable output naming/placement logic.
- Add docs (EN/ZH), new integration fixtures/tests, and CI wiring for SEA-specific integration tests on Node 25.7.0.
Reviewed changes
Copilot reviewed 34 out of 35 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| website/docs/zh/config/lib/experiments.mdx | Documents experiments.exe (ZH), options, constraints, and examples |
| website/docs/en/config/lib/experiments.mdx | Documents experiments.exe (EN), options, constraints, and examples |
| tests/integration/exe/index.test.ts | Integration coverage for cjs/esm/watch + multi-target generation |
| tests/integration/exe/cjs/src/index.ts | CJS SEA fixture entry reading node:sea asset |
| tests/integration/exe/cjs/src/exeHelper.ts | CJS fixture helper to ensure bundling behavior |
| tests/integration/exe/cjs/rslib.config.ts | CJS fixture config enabling experiments.exe + assets |
| tests/integration/exe/cjs/package.json | Declares fixture package metadata |
| tests/integration/exe/cjs/assets/message.txt | CJS fixture SEA asset payload |
| tests/integration/exe/esm/src/index.ts | ESM SEA fixture entry reading node:sea asset |
| tests/integration/exe/esm/src/exeHelper.ts | ESM fixture helper to ensure bundling behavior |
| tests/integration/exe/esm/rslib.config.ts | ESM fixture config enabling experiments.exe + assets |
| tests/integration/exe/esm/package.json | Declares fixture package metadata |
| tests/integration/exe/esm/assets/message.txt | ESM fixture SEA asset payload |
| tests/integration/exe/multi-target/src/index.ts | Multi-target fixture entry for cross-platform outputs |
| tests/integration/exe/multi-target/src/exeHelper.ts | Multi-target fixture helper |
| tests/integration/exe/multi-target/rslib.config.ts | Multi-target config generating linux/darwin/win32 executables |
| tests/integration/exe/multi-target/package.json | Declares multi-target fixture package metadata |
| tests/integration/exe/multi-target/assets/message.txt | Multi-target fixture SEA asset payload |
| pnpm-lock.yaml | Adds workspace importers for new exe fixtures (partial) |
| packages/core/src/types/utils.ts | Extends PkgJson typing to include bin |
| packages/core/src/types/config.ts | Adds SeaOptions, ExeTarget, ExeOptions, and lib.experiments.exe typing/docs |
| packages/core/src/index.ts | Exposes ExeOptions in public API type exports |
| packages/core/src/config.ts | Integrates composeExeConfig and disables externals/helpers when exe is enabled |
| packages/core/src/exe/index.ts | Normalizes exe targets, validates constraints, and composes Rsbuild config |
| packages/core/src/exe/plugin.ts | Builds SEA executables after environment compilation |
| packages/core/src/exe/build.ts | Writes SEA config and runs node --build-sea (+ optional mac signing) |
| packages/core/src/exe/download.ts | Resolves/downloads target Node binaries and enforces version constraints |
| packages/core/src/exe/utils.ts | Command runner, output path resolution, main bundle discovery, signing helper |
| packages/core/src/exe/version.ts | Node/runtime/platform/arch checks + cache dir helpers |
| packages/core/src/exe/types.ts | Internal exe-related type definitions |
| packages/core/tests/exe.test.ts | Unit coverage for version checks, target normalization, and path generation |
| package.json | Splits SEA integration tests into a separate script and excludes them from default integration |
| .nvmrc | Bumps dev Node version to 25.7.0 (SEA minimum) |
| .github/workflows/test.yml | Adds integration-exe job on Node 25.7.0 |
| .github/workflows/reusable-test.yml | Runs pnpm run test:integration:exe for the new CI task |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 98e566ce14
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
4a0fa8d to
58e3d6a
Compare
Summary
Add experimental
experiments.exesupport so Rslib can package bundled Node.js outputs as single executable applications.The new flow resolves target binaries, handles cross-platform target generation, and exposes configuration for file naming, output paths, targets, and SEA options.
Basic API shape
Basic usage
Related Links
Checklist