Skip to content

feat(vscode)!: support @rstest/core 0.12 public API - #61

Merged
fi3ework merged 4 commits into
mainfrom
worktree-mossy-riding-seal
Sep 20, 2026
Merged

fi3ework merged 4 commits into
mainfrom
worktree-mossy-riding-seal

Conversation

@fi3ework

@fi3ework fi3ework commented Sep 20, 2026

Copy link
Copy Markdown
Member

Summary

@rstest/core@0.12.0 removed initCli / createRstest from the main entry; the programmatic API now lives at @rstest/core/api (createRstestrun / watch / listTests / context). This ports the upstream extension's move to that API into stacks/test, keeping the ten documented adaptations intact.

  • Worker: loadConfig + mergeRstestConfig + createRstest; one-shot runs via run(), continuous runs via watch() with a graceful closeWatcher(); flat listTests() results (declarations + filesOnly rows so empty files stay in the tree).
  • Master: resolves @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 into coreInternals.ts). Version gating stays on SUPPORT_MATRIX + status bar (no toast).
  • Tree: hierarchy built from the flat ListedTest[] shape; first project wins for a file shared by several projects.
  • Floor: @rstest/core >= 0.12.0 (first release exporting ./api). Fixtures pinned to @rstest/core@0.12.0 and rstack@0.7.6 (the first rstack release that pins @rstest/core ~0.12.0).
  • stacks/test now tracks web-infra-dev/rstest packages/vscode through #1729, #1804, #1805, #1806, #1807 (recorded in packages/vscode/AGENTS.md).

Deliberate deviations from upstream, all inside existing adaptations: unsupported cores report version mismatch through 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

  • Tests updated (or not required).
  • Documentation updated (or not required).

Breaking change

BREAKING CHANGE: requires @rstest/core >= 0.12.0 (and rstack >= 0.7.6 for bridged rstack.config.* projects). Older cores no longer run; the status bar reports the version mismatch with the required version.

`@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).
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 20, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-20T05:55:50.758255Z 8575e20 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/vscode/src/stacks/test/testTree.ts Outdated
`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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/vscode/src/stacks/test/testTree.ts
@fi3ework fi3ework changed the title feat(vscode): support @rstest/core 0.12 public API feat(vscode)!: support @rstest/core 0.12 public API Sep 20, 2026
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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread packages/vscode/src/stacks/test/worker/index.ts
Comment thread packages/vscode/src/stacks/test/master.ts Outdated
Comment thread packages/vscode/src/shared/versionCheck.ts
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.
@fi3ework
fi3ework merged commit a989514 into main Sep 20, 2026
3 checks passed
@fi3ework
fi3ework deleted the worktree-mossy-riding-seal branch September 20, 2026 09:06
@fi3ework fi3ework mentioned this pull request Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant