Skip to content

Commit 395784e

Browse files
authored
chore: latest Rstack toolchain everywhere, exact fixture pins, Renovate bumps fixtures too (#46)
* test(vscode): bump the rstack E2E fixture to 0.7.2 rslint#1851 changed the explicit-config path base in @rslint/core 0.8.2. rstack 0.6.1's shim has no basePath; rstack 0.7.2 sets basePath=process.cwd() via @rslint/core 0.9.0. * test(vscode): freeze fixture lockfiles and let Renovate bump them * chore: move the repo and E2E fixtures to the latest Rstack toolchain * test(vscode): give each fixture a pnpm-workspace.yaml so Renovate updates its lockfile * test(vscode): pin fixture toolchain versions exactly instead of committing lockfiles * fix(vscode): keep the @rstest/core floor at 0.6.0 * fix(vscode): set the rstack floor to the first fixed release, 0.7.0 * fix(vscode): keep the @rslint/core floor at 0.8.0 and separate floors from tested releases in AGENTS.md The floor is reverted because the worker reads the discovery protocol from the selected core and forwards payloads unchanged, so 0.8.x keeps working; bridged projects are already held to 0.9.0 by rstack >=0.7.0; AGENTS.md now distinguishes tested-latest from evidence-based floors. * fix(vscode): align the User Node runtime range with rstack 0.7 engines
1 parent 758be28 commit 395784e

31 files changed

Lines changed: 452 additions & 717 deletions

‎.github/renovate.json5‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
'schedule:weekly',
77
'helpers:pinGitHubActionDigests',
88
],
9-
// E2E fixtures deliberately pin the published toolchain versions the suites
10-
// run against; bumping them is a manual, E2E-verified decision.
11-
ignorePaths: ['**/node_modules/**', 'packages/vscode/e2e/**'],
9+
// E2E fixtures pin exact published versions; their Rstack dependencies are
10+
// updated by the `rstack toolchain` group below.
11+
ignorePaths: ['**/node_modules/**'],
1212
packageRules: [
1313
// Use chore as semantic commit type for commit messages
1414
{
@@ -32,10 +32,11 @@
3232
// waiver list staying in sync. Listed after `all-patch` so these land in
3333
// their own PR instead of the weekly patch roll-up.
3434
//
35-
// This includes `@rslint/core`, `@rstest/core` and `rstack`, whose ranges
36-
// sit alongside the runtime `SUPPORT_MATRIX` (shared/versionCheck.ts).
37-
// That matrix is a floor, not a pin: raising a devDependency does not move
38-
// it. Lowering the floor stays a deliberate, separate edit.
35+
// This includes `@rslint/core`, `@rstest/core` and `rstack`, which appear as
36+
// root/development ranges and exact fixture pins. The runtime
37+
// `SUPPORT_MATRIX` (shared/versionCheck.ts) is a floor, not a pin: raising a
38+
// dependency does not move it. Lowering the floor stays a deliberate,
39+
// separate edit.
3940
{
4041
groupName: 'rstack toolchain',
4142
groupSlug: 'rstack',

‎.gitignore‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ tests-dist/
150150
# F5 playground's materialized Node (see .vscode/tasks.json "playground node")
151151
packages/vscode/.playground/
152152

153-
# E2E fixtures install published npm versions on demand; only
154-
# their manifests and configs are tracked.
153+
# E2E fixtures pin exact published versions and install them fresh;
154+
# their generated node_modules directories and lockfiles stay disposable.
155155
packages/vscode/e2e/fixtures/*/node_modules/
156156
packages/vscode/e2e/fixtures/*/pnpm-lock.yaml
157157
packages/vscode/e2e/lint/fixtures/pnpm-lock.yaml

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Thanks for your interest in contributing to Rstack Editor!
44

55
## Setup
66

7-
- Node.js: the version is pinned in [`.nvmrc`](./.nvmrc) (`nvm use` / `fnm use`). Node >= 22.12 is required.
7+
- Node.js: the version is pinned in [`.nvmrc`](./.nvmrc) (`nvm use` / `fnm use`). Node `^22.18.0 || >=24.3.0` is required.
88
- pnpm: pinned via the `packageManager` field — run `corepack enable pnpm` once and the right version is used automatically.
99

1010
```bash
@@ -19,9 +19,9 @@ pnpm install # also installs the git hooks (rs hooks)
1919
| `pnpm lint` | Lint + type check (`rs lint --type-check`) |
2020
| `pnpm fmt` | Format the repo (`rs fmt`) |
2121
| `pnpm test:unit` | Unit tests |
22-
| `pnpm test:e2e` | Full E2E chain (installs fixtures, launches a real VS Code) |
22+
| `pnpm test:e2e` | Full E2E chain (fresh-installs exactly pinned fixtures, launches a real VS Code) |
2323

24-
To try the extension: press F5 in VS Code at the repo root — the playground launch config starts a watch build, lets you pick a fixture project, and opens an Extension Development Host on it. Run `pnpm --filter rstack test:e2e:fixtures` once beforehand to install the fixture dependencies.
24+
To try the extension: press F5 in VS Code at the repo root — the playground launch config starts a watch build, lets you pick a fixture project, and opens an Extension Development Host on it. Run `pnpm --filter rstack test:e2e:fixtures` once beforehand to install the exactly pinned fixture dependencies.
2525

2626
## Submitting changes
2727

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The extension resolves the tools from your project's `node_modules` and checks t
3030
| -------------- | --------- |
3131
| `@rslint/core` | `>=0.8.0` |
3232
| `@rstest/core` | `>=0.6.0` |
33-
| `rstack` | `>=0.6.1` |
33+
| `rstack` | `>=0.7.0` |
3434

3535
## Documentation
3636

‎docs/adr/0001-node-runtime-selection.md‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
# Node runtime selection
22

3-
The Node.js a test worker runs on is a **User Node runtime** — chosen by the extension from the user's own environment, the PATH `node` first and then the `node` the user's interactive shell would give them — and it must satisfy a uniform floor, `^22.18.0 || >=23.6.0`. The **VS Code Node runtime** is never a candidate. When nothing satisfies the floor, the test stack reports a status and runs nothing.
3+
The Node.js a test worker runs on is a **User Node runtime** — chosen by the extension from the user's own environment, the PATH `node` first and then the `node` the user's interactive shell would give them — and it must satisfy a uniform floor, `^22.18.0 || >=24.3.0`. The **VS Code Node runtime** is never a candidate. When nothing satisfies the floor, the test stack reports a status and runs nothing.
44

5-
## Why the floor is `^22.18.0 || >=23.6.0`
5+
## Why the floor is `^22.18.0 || >=24.3.0`
66

7-
The strictest thing a worker does is load an `rstack.config.*`, which rstack's shipped shim loads through `@rstackjs/load-config` with `loader: 'native'`. That path rethrows with no jiti fallback (`rstack-cli` `packages/rstack/src/config.ts:174`, bundled verbatim into `rstack@0.4.0`'s `dist/687.js`), and `native` never consults `process.features.typescript` — it calls `import()` directly. So the worker needs Node's native TypeScript stripping, which was unflagged in 23.6.0 and backported to the LTS line in 22.18.0. That release history is why the floor is a disjunction rather than a single version: 23.0–23.5 compare above 22.18.0 yet predate the unflagging, and `^22.18.0 || >=23.6.0` names exactly the versions that strip by default.
7+
The strictest thing a worker does is load an `rstack.config.*`, which rstack's shipped shim loads through `@rstackjs/load-config` with `loader: 'native'`. That path rethrows with no jiti fallback (`rstack-cli` `packages/rstack/src/config.ts:174`, bundled verbatim into `rstack@0.4.0`'s `dist/687.js`), and `native` never consults `process.features.typescript` — it calls `import()` directly. So the worker needs Node's native TypeScript stripping, which was unflagged in 23.6.0 and backported to the LTS line in 22.18.0; that is the type-stripping lower bound.
88

9-
Native type stripping is the _only_ thing on the worker's path that needs more than the declared `engines` of the packages involved: `@rstest/core` 0.11.6 and `@rsbuild/core` declare `^20.19.0 || >=22.12.0`, `rstack` 0.4.0 declares `>=22.12.0`, and `Module.registerHooks` (used by rstack's `freshImport`, added in 22.15) has a three-level fallback.
9+
The supported rstack line adds a narrower declared contract. Since rstack 0.7.0, `engines.node` is `^22.18.0 || >=24.3.0`: Node 23 is unsupported, and Node 24.0–24.2 still emits the experimental type-stripping warning that 24.3.0 removes ([rstackjs/rstack-cli#427](https://github.com/rstackjs/rstack-cli/pull/427)). The extension therefore intersects native type-stripping availability with rstack's declared engines rather than accepting a runtime the supported toolchain rejects. The range follows those engines as that contract changes.
10+
11+
Other packages on the worker path allow older runtimes: `@rstest/core` and `@rsbuild/core` declare `^20.19.0 || >=22.12.0`, and `Module.registerHooks` (used by rstack's `freshImport`, added in 22.15) has a three-level fallback.
1012

1113
## Considered options
1214

13-
**A per-project floor** — 22.18.0 only for projects driven by an `rstack.config.*`, 22.12.0 for a native `rstest.config.*`. Rejected: it buys back Node 20.19–22.17 at the cost of a second code path through every call site. Node 20 left support on 2026-04-30, so the users it genuinely serves are those on Node 22.12–22.17 — a supported LTS line, needing only a patch-level update within 22.x. That is a low-friction ask, and one uniform floor is a support contract the README and the status bar can each state in one sentence.
15+
**A per-project floor** — the full rstack floor only for projects driven by an `rstack.config.*`, with looser floors where package contracts allow. Rejected: it buys back Node 20.19–22.17, Node 23 and Node 24.0–24.2 at the cost of a second code path through every call site. Node 20 is out of support; Node 23 is an unsupported odd-numbered line; and users on Node 22 or 24 need only a patch-level update within that line. That is a low-friction ask, and one uniform floor is a support contract the README and the status bar can each state in one sentence.
1416

1517
**A capability probe instead of a version check** — asking each candidate for `process.features.typescript` rather than comparing semver. Rejected: `process.features.typescript` is itself Stability 1.2 (release candidate) and its value set has moved (`"transform"` existed on 22.18–25.1, removed in 26.0.0). More decisively, `loader: 'native'` never reads it, so the probe would not be testing the condition that actually fails. A floor is a contract; contracts are declared, not sniffed.
1618

‎docs/adr/0002-fmt-lsp-on-user-node-runtime.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Formatting through the `rs fmt` language server
22

3-
Document formatting is served by **`rs fmt --lsp`** — one language server per detected workspace folder, spawned with its cwd at the folder root, running on a **User Node runtime** that satisfies the floor ADR 0001 sets (`^22.18.0 || >=23.6.0`). It replaces a spawn-per-request `rs fmt --stdin-filepath` MVP that ran on the VS Code Node runtime and kept one pre-spawned process warm for the active editor. The floor for the project's `rstack` rises to `>=0.5.2`, the first release that ships `--lsp`; older releases surface as `version mismatch` and format nothing. The raise is **toolchain-wide by decision**, not fmt-scoped: `SUPPORT_MATRIX.rstack` is one entry and the Rstest bridge gates on the same one, so a project on `rstack` 0.3.5–0.5.1 also stops running tests until it upgrades. A per-stack floor was considered and rejected — "which rstack does the extension support?" should have one answer, and the mismatch status names the required version.
3+
Document formatting is served by **`rs fmt --lsp`** — one language server per detected workspace folder, spawned with its cwd at the folder root, running on a **User Node runtime** that satisfies the floor ADR 0001 sets. It replaces a spawn-per-request `rs fmt --stdin-filepath` MVP that ran on the VS Code Node runtime and kept one pre-spawned process warm for the active editor. The floor for the project's `rstack` rises to `>=0.5.2`, the first release that ships `--lsp`; older releases surface as `version mismatch` and format nothing. The raise is **toolchain-wide by decision**, not fmt-scoped: `SUPPORT_MATRIX.rstack` is one entry and the Rstest bridge gates on the same one, so a project on `rstack` 0.3.5–0.5.1 also stops running tests until it upgrades. A per-stack floor was considered and rejected — "which rstack does the extension support?" should have one answer, and the mismatch status names the required version.
44

55
## Why a server rather than a process per request
66

0 commit comments

Comments
 (0)