Skip to content

feat(core): auto install missing runtime dependencies#1252

Merged
9aoy merged 9 commits into
mainfrom
9aoy/auto-install-missing-deps
May 14, 2026
Merged

feat(core): auto install missing runtime dependencies#1252
9aoy merged 9 commits into
mainfrom
9aoy/auto-install-missing-deps

Conversation

@9aoy

@9aoy 9aoy commented May 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Background

Missing optional runtime packages can fail late when coverage providers or DOM test environments are loaded from worker or merge paths.

Implementation

  • Add a main-process dependency preflight for coverage providers and DOM environments.
  • Prompt to install @rstest/coverage-istanbul, jsdom, and happy-dom without pinning them to the Rstest version.
  • Move coverage install helpers into coverage/install.ts so coverage/index.ts only resolves and loads providers.

User Impact

Users can accept an interactive prompt to install missing coverage or DOM environment packages before tests run.

image

Related Links

None

Checklist

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

Comment thread packages/core/tests/core/envDependencies.test.ts Fixed
@github-actions

github-actions Bot commented May 13, 2026

Copy link
Copy Markdown

Rsdoctor Bundle Diff Analysis

Found 12 projects in monorepo, 1 project with changes.

📊 Quick Summary
Project Total Size Change
adapter-rsbuild 3.6 KB 0
adapter-rslib 24.6 KB 0
adapter-rspack 7.7 KB 0
browser 2.0 MB 0
browser-react 3.7 KB 0
browser-ui 803.5 KB 0
coverage-istanbul 9.6 KB 0
core/browser 970.0 KB 0
core/loaders 869.0 B 0
core/main 1.7 MB 📈 +26.5 KB (+1.6%)
vscode/extension 26.9 MB 0
vscode/worker 14.4 KB 0
📋 Detailed Reports (Click to expand)

📁 core/main

Path: packages/core/.rsdoctor/main/rsdoctor-data.json

📌 Baseline Commit: fc59ef660d | PR: #1254

Metric Current Baseline Change
📊 Total Size 1.7 MB 1.6 MB +26.5 KB (+1.6%)
📄 JavaScript 1.6 MB 1.6 MB +24.1 KB (+1.5%)
🎨 CSS 0 B 0 B 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 81.6 KB 79.2 KB +2.4 KB (+3.1%)

📦 Download Diff Report: core/main Bundle Diff

Generated by Rsdoctor GitHub Action

9aoy and others added 2 commits May 13, 2026 14:40
…tion or class'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
@9aoy

9aoy commented May 13, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@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: 98352d19d7

ℹ️ 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/core/src/utils/packageInstaller.ts Outdated
@9aoy 9aoy requested a review from fi3ework May 14, 2026 03:16
Comment thread packages/core/src/core/envDependencies.ts

@fi3ework fi3ework left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Bare-name install resolves to latest. Since @rstest/core and @rstest/coverage-istanbul version independently with a workspace:~ peer, latest may pull a provider that doesn't satisfy the installed core's peer range. Aligning the two packages to the same version with a workspace:* peer would make auto-installing latest always safe.

This is a change in release strategy; perhaps we can keep all packages in the current repository on the same version.

@9aoy 9aoy mentioned this pull request May 14, 2026
2 tasks
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 14, 2026

Copy link
Copy Markdown

Deploying rstest with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5b9b2fb
Status: ✅  Deploy successful!
Preview URL: https://96feb207.rstest.pages.dev
Branch Preview URL: https://9aoy-auto-install-missing-de.rstest.pages.dev

View logs

@9aoy 9aoy requested a review from fi3ework May 14, 2026 08:39
@9aoy 9aoy merged commit a541fa3 into main May 14, 2026
13 checks passed
@9aoy 9aoy deleted the 9aoy/auto-install-missing-deps branch May 14, 2026 09:14
@9aoy 9aoy mentioned this pull request May 18, 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.

2 participants