Commit 0402205
authored
chore: upgrade template to Rspack 2.0 rc.1 (#75)
### Summary
This PR updates `rspack-binding-template` to be compatible with Rspack
2.0 (rc.1), including Rust workspace dependency bumps, regenerated
binding typings, and Node.js engine requirements aligned with Rspack
2.0.
### Key changes
- **Deps/Tooling**
- Rust workspace: edition **2024**, deps bumped to `=0.100.0-rc.1`,
`napi` updated, toolchain refreshed and add `rust-src`.
- JS: upgrade to `@rspack/core@2.0.0-rc.1`; update lockfile accordingly.
- **Runtime compatibility**
- Add `engines.node: ">=20.19.0 <21 || >=22.12.0"` (root + binding
package) and update README note.
- Update index.js to correctly load `@rspack/core` when the callable
export is `default`, while preserving named exports via `Object.assign`.
- **Bindings**
- Regenerate index.d.ts / index.js to match upstream API changes
(notably `JsSource` types, new plugin/tap kinds, `JsCoordinator`, etc.).
- **Rust plugin**
- Use `RawStringSource` for banner injection to match updated
`rspack_sources`.
### Notes
- This is a template upgrade; downstream projects should also move to
Node **20.19+ / 22.12+** when adopting Rspack 2.0.1 parent c83f633 commit 0402205
File tree
15 files changed
+1591
-1224
lines changed- .github/workflows
- crates/binding
- src
- lib
15 files changed
+1591
-1224
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
0 commit comments