feat(vscode)!: support @rstest/core 0.12 public API - #61
Conversation
`@rstest/core@0.12.0` removed `initCli` and `createRstest` from the main entry; the programmatic API now lives at `@rstest/core/api` (`createRstest` -> `run` / `watch` / `listTests` / `context`). Port the upstream extension's move to that API into `stacks/test`, preserving the ten documented adaptations. - Worker: `loadConfig` + `mergeRstestConfig` + `createRstest`; one-shot runs through `run()`, continuous runs through `watch()` with a graceful `closeWatcher()`; flat `listTests()` results. - Master: resolve `@rstest/core` and `@rstest/core/api` from one package directory; graceful worker close with a 30 s SIGKILL fallback; exact file/case filters via quoted paths (`quoteFilter` vendored). - Tree: build the hierarchy from the flat `ListedTest[]` shape, first project wins for a file shared by several projects. - Support floor for `@rstest/core` raised to `>=0.12.0`; fixtures pinned to `@rstest/core@0.12.0` and `rstack@0.7.6`. - Tracks web-infra-dev/rstest `packages/vscode` through #1729, #1804, #1805, #1806 and #1807 (recorded in AGENTS.md).
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0be6414ff
ℹ️ 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".
`updateFromListedTests` skipped entries whose name was falsy, which dropped
`test('', ...)` / `describe('', ...)` and attached their children one level
up. File rows are already removed by `groupListedTestsByFile`, so only
`undefined` names need skipping.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f137793efa
ℹ️ 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".
Bridged `rstack.config.*` projects resolve `@rstest/core` from the rstack package directory, and 0.7.6 is the first rstack release pinning `@rstest/core ~0.12.0`. The floor stays uniform across lint, test and fmt.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6df6f3b957
ℹ️ 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".
A configured `rstestPackagePath` may point at a core outside any `node_modules/@rstest/core` directory; a bare-specifier lookup from that directory then fails while the main entry resolves fine. Anchor the api subpath on the core's own package.json via package self-reference, and advertise the 0.12.0 floor in the README support matrix.
Summary
@rstest/core@0.12.0removedinitCli/createRstestfrom the main entry; the programmatic API now lives at@rstest/core/api(createRstest→run/watch/listTests/context). This ports the upstream extension's move to that API intostacks/test, keeping the ten documented adaptations intact.loadConfig+mergeRstestConfig+createRstest; one-shot runs viarun(), continuous runs viawatch()with a gracefulcloseWatcher(); flatlistTests()results (declarations +filesOnlyrows so empty files stay in the tree).@rstest/coreand@rstest/core/apifrom one package directory; graceful worker close with a 30 s SIGKILL fallback; exact file/case filters via quoted paths (quoteFiltervendored intocoreInternals.ts). Version gating stays onSUPPORT_MATRIX+ status bar (no toast).ListedTest[]shape; first project wins for a file shared by several projects.@rstest/core >= 0.12.0(first release exporting./api). Fixtures pinned to@rstest/core@0.12.0andrstack@0.7.6(the first rstack release that pins@rstest/core ~0.12.0).stacks/testnow tracks web-infra-dev/rstestpackages/vscodethrough #1729, #1804, #1805, #1806, #1807 (recorded inpackages/vscode/AGENTS.md).Deliberate deviations from upstream, all inside existing adaptations: unsupported cores report
version mismatchthrough the shared status instead of a toast;Rstest/RstestController.dispose()stay synchronous so the shell's serialized restart queue is not blocked by the 30 s graceful close.Related Links
Checklist
Breaking change
BREAKING CHANGE: requires
@rstest/core >= 0.12.0(andrstack >= 0.7.6for bridgedrstack.config.*projects). Older cores no longer run; the status bar reports the version mismatch with the required version.