Skip to content

Conversation

@JReinhold
Copy link
Contributor

@JReinhold JReinhold commented Dec 4, 2025

Follow-up to #33270

What I did

  • Changed the way resolutions are handled in ecosystem CI. We were copying over all resolutions to the sandbox, which caused issues with mismatching React versions, luckily caught by our tests. Now we only copy the resolutions over that ecosystem CI injects, using a hardcoded list. We also have a test that ensures that list is always up-to-date with our own list of resolutions, so it doesn't regress.
  • Moved scripts to shell files, so they are easier to read and can have comments
  • removed test-runner from ecosystem-ci, relying solely on the vitest instead.
  • Build: Fix sandbox path in ecosystem CI #33270 incorrectly moved the sandboxes into the repo root. that was invalid as it causes the wrong dependencies to be picked up. instead that original issue with yarn refusing to install in a sibling-dir, is now solved by creating a package.json that has { "packageManager": "yarn@xyz" }, so Yarn plays nice again.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

Summary by CodeRabbit

  • Chores
    • Refactored CI ecosystem testing infrastructure by modularizing build and test scripts into dedicated shell scripts for improved maintainability and cleaner command invocations in package.json.
    • Enhanced dependency resolution handling to exclude internal packages from sandbox environments during testing.

✏️ Tip: You can customize this high-level summary in your review settings.

@nx-cloud
Copy link

nx-cloud bot commented Dec 4, 2025

View your CI Pipeline Execution ↗ for commit e0a00da

Command Status Duration Result
nx run-many -t compile --parallel=3 ✅ Succeeded 47s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-04 19:23:41 UTC

@JReinhold JReinhold self-assigned this Dec 4, 2025
@JReinhold JReinhold added build Internal-facing build tooling & test updates ci:normal labels Dec 4, 2025
@JReinhold JReinhold marked this pull request as ready for review December 4, 2025 12:15
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 4, 2025

📝 Walkthrough

Walkthrough

The changes refactor ecosystem CI tasks in package.json from inline node-based commands to dedicated shell script invocations. New shell scripts (before-test.sh, build.sh, test.sh) abstract the CI workflow phases. The before-test.js helper is updated to use ESM imports and filter internal resolutions from root package.json before propagating to sandbox. A new EXISTING_RESOLUTIONS constant tracks packages to exclude, verified by a new test.

Changes

Cohort / File(s) Summary
Script definitions refactored
package.json
Six ecosystem CI script entries updated: svelte-ecosystem-ci:before-test, svelte-ecosystem-ci:build, svelte-ecosystem-ci:test, vite-ecosystem-ci:before-test, vite-ecosystem-ci:build, vite-ecosystem-ci:test. Replaced inline node command chains with shell script invocations passing template and renderer names.
Ecosystem CI shell scripts (new)
scripts/ecosystem-ci/before-test.sh, scripts/ecosystem-ci/build.sh, scripts/ecosystem-ci/test.sh
Three new bash scripts introduced. before-test.sh derives sandbox name from template, runs Node helper, installs sandbox dependencies. build.sh validates inputs, installs deps, optionally builds renderer, creates storybook-sandboxes directory, runs yarn task build. test.sh validates template and executes Vitest integration tests. All enforce strict error handling (set -e).
Ecosystem CI helpers updated
scripts/ecosystem-ci/before-test.js
Modified to use ESM imports for JSON file reading instead of direct file I/O. Introduces filtering via new EXISTING_RESOLUTIONS constant to exclude internal packages when propagating resolutions to sandbox package.json. Adds Yarn commands to install and configure Playwright in sandbox directory.
Resolution exclusion list (new)
scripts/ecosystem-ci/existing-resolutions.js
New module exporting EXISTING_RESOLUTIONS Set constant containing internal package names (e.g., @types/*, testing libraries, Playwright, React, TypeScript) to exclude from sandbox resolution propagation.
Resolution alignment test (new)
scripts/ecosystem-ci/existing-resolutions.test.ts
New test file verifying EXISTING_RESOLUTIONS set matches all keys in root package.json resolutions by computing symmetric difference and asserting it is empty.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review shell script logic and error handling across three new scripts; verify correct argument parsing and invocation sequencing
  • Examine ESM import changes in before-test.js and confirm resolution filtering logic correctly excludes internal packages
  • Verify EXISTING_RESOLUTIONS constant is complete and kept in sync with root package.json resolutions
  • Confirm test coverage for resolution alignment adequately validates the filtering list

Possibly related PRs

✨ Finishing touches
  • 📝 Generate docstrings

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
scripts/ecosystem-ci/before-test.sh (1)

10-12: Consider adding directory existence check.

While set -e will catch the failure, a missing sandbox directory will produce a generic "No such file or directory" error. An explicit check would provide clearer feedback.

Consider adding:

 # Install dependencies in the sandbox
+if [ ! -d "../storybook-sandboxes/$SANDBOX_NAME" ]; then
+  echo "Error: Sandbox directory not found: ../storybook-sandboxes/$SANDBOX_NAME"
+  exit 1
+fi
 cd "../storybook-sandboxes/$SANDBOX_NAME"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7bd55eb and 94747c7.

📒 Files selected for processing (7)
  • package.json (1 hunks)
  • scripts/ecosystem-ci/before-test.js (1 hunks)
  • scripts/ecosystem-ci/before-test.sh (1 hunks)
  • scripts/ecosystem-ci/before-test.test.ts (1 hunks)
  • scripts/ecosystem-ci/build.sh (1 hunks)
  • scripts/ecosystem-ci/existing-resolutions.js (1 hunks)
  • scripts/ecosystem-ci/test.sh (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{js,jsx,json,html,ts,tsx,mjs}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use ESLint and Prettier configurations that are enforced in the codebase

Files:

  • scripts/ecosystem-ci/existing-resolutions.js
  • scripts/ecosystem-ci/before-test.js
  • scripts/ecosystem-ci/before-test.test.ts
  • package.json
**/*.{test,spec}.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{test,spec}.{ts,tsx}: Test files should follow the naming pattern *.test.ts, *.test.tsx, *.spec.ts, or *.spec.tsx
Follow the spy mocking rules defined in .cursor/rules/spy-mocking.mdc for consistent mocking patterns with Vitest

Files:

  • scripts/ecosystem-ci/before-test.test.ts
**/*.test.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/spy-mocking.mdc)

**/*.test.{ts,tsx,js,jsx}: Use vi.mock() with the spy: true option for all package and file mocks in Vitest tests
Place all mocks at the top of the test file before any test cases
Use vi.mocked() to type and access the mocked functions in Vitest tests
Implement mock behaviors in beforeEach blocks in Vitest tests
Mock all required dependencies that the test subject uses
Each mock implementation should return a Promise for async functions in Vitest
Mock implementations should match the expected return type of the original function
Mock all required properties and methods that the test subject uses in Vitest tests
Avoid direct function mocking without vi.mocked() in Vitest tests
Avoid mock implementations outside of beforeEach blocks in Vitest tests
Avoid mocking without the spy: true option in Vitest tests
Avoid inline mock implementations within test cases in Vitest tests
Avoid mocking only a subset of required dependencies in Vitest tests
Mock at the highest level of abstraction needed in Vitest tests
Keep mock implementations simple and focused in Vitest tests
Use type-safe mocking with vi.mocked() in Vitest tests
Document complex mock behaviors in Vitest tests
Group related mocks together in Vitest tests

Files:

  • scripts/ecosystem-ci/before-test.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Enable TypeScript strict mode

Files:

  • scripts/ecosystem-ci/before-test.test.ts
🧠 Learnings (17)
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Avoid inline mock implementations within test cases in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/test.sh
  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Document complex mock behaviors in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/test.sh
  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Keep mock implementations simple and focused in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/test.sh
  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Avoid mocking only a subset of required dependencies in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/test.sh
  • scripts/ecosystem-ci/existing-resolutions.js
  • scripts/ecosystem-ci/before-test.js
  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-09-17T07:31:04.432Z
Learnt from: ndelangen
Repo: storybookjs/storybook PR: 32484
File: code/core/package.json:326-326
Timestamp: 2025-09-17T07:31:04.432Z
Learning: In Storybook's core package, dependencies like `open` are bundled into the final distribution during the build process, so they should remain in devDependencies rather than being moved to dependencies. End users don't need these packages as separate runtime dependencies since they're included in the bundled code.

Applied to files:

  • scripts/ecosystem-ci/existing-resolutions.js
📚 Learning: 2025-11-28T14:50:24.889Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.889Z
Learning: Applies to code/**/*.{test,spec}.{ts,tsx,js,jsx} : Mock external dependencies using vi.mock() for file system, loggers, and other external dependencies in tests

Applied to files:

  • scripts/ecosystem-ci/before-test.js
  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-11-24T17:49:31.838Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T17:49:31.838Z
Learning: Applies to code/vitest.workspace.ts : Vitest configuration is centralized in `code/vitest.workspace.ts` for workspace setup

Applied to files:

  • scripts/ecosystem-ci/before-test.js
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Mock all required properties and methods that the test subject uses in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/before-test.js
  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Avoid mock implementations outside of `beforeEach` blocks in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Implement mock behaviors in `beforeEach` blocks in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-11-28T14:50:24.889Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.889Z
Learning: Applies to code/**/*.{test,spec}.{ts,tsx,js,jsx} : Write meaningful unit tests that actually import and call the functions being tested

Applied to files:

  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-11-24T17:49:31.838Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T17:49:31.838Z
Learning: Applies to **/*.{test,spec}.{ts,tsx} : Test files should follow the naming pattern `*.test.ts`, `*.test.tsx`, `*.spec.ts`, or `*.spec.tsx`

Applied to files:

  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Mock all required dependencies that the test subject uses

Applied to files:

  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Group related mocks together in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Each mock implementation should return a Promise for async functions in Vitest

Applied to files:

  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Mock at the highest level of abstraction needed in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/before-test.test.ts
📚 Learning: 2025-10-02T09:22:13.215Z
Learnt from: JReinhold
Repo: storybookjs/storybook PR: 32607
File: code/package.json:243-243
Timestamp: 2025-10-02T09:22:13.215Z
Learning: The Storybook repository uses Yarn v^4 (any 4.x version) as the package manager, configured via .yarnrc.yml and package.json packageManager field. Specific patch versions within v4 can be upgraded as needed.

Applied to files:

  • package.json
🧬 Code graph analysis (3)
scripts/ecosystem-ci/before-test.js (1)
scripts/ecosystem-ci/existing-resolutions.js (2)
  • EXISTING_RESOLUTIONS (9-29)
  • EXISTING_RESOLUTIONS (9-29)
scripts/ecosystem-ci/build.sh (2)
scripts/check-dependencies.js (1)
  • task (23-27)
scripts/tasks/sandbox-parts.ts (1)
  • install (121-169)
scripts/ecosystem-ci/before-test.sh (1)
scripts/tasks/sandbox-parts.ts (1)
  • install (121-169)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: normal
  • GitHub Check: nx
  • GitHub Check: nx
  • GitHub Check: Core Unit Tests, windows-latest
🔇 Additional comments (15)
scripts/ecosystem-ci/build.sh (3)

1-5: LGTM: Proper error handling and input validation.

The script enforces strict error handling with set -e and validates required arguments with clear usage messages.


18-19: Verify yarn availability before use.

The command yarn -v is executed without checking if yarn is available. If yarn is not in PATH, this will fail with a cryptic error.

Consider adding a check at the beginning of the script:

+# Verify required commands are available
+command -v yarn >/dev/null 2>&1 || { echo "Error: yarn is not installed or not in PATH"; exit 1; }
+
 TEMPLATE=${1:?Usage: $0 <template> [renderer]}

7-21: LGTM: Build workflow is well-structured.

The script properly installs dependencies, conditionally builds the renderer, sets up the sandbox environment, and invokes the build task with appropriate flags.

scripts/ecosystem-ci/test.sh (1)

1-7: LGTM: Clean and focused test runner.

The script follows the same pattern as build.sh with proper validation and error handling. The command is well-documented.

scripts/ecosystem-ci/before-test.test.ts (2)

1-15: LGTM: Excellent test documentation.

The explanatory comment clearly describes the test's purpose and provides actionable guidance for developers when the test fails.


16-23: LGTM: Appropriate use of modern Set API.

The test correctly uses symmetricDifference to detect mismatches. This API is available in Node 22+, which aligns with the repository's engine requirement.

scripts/ecosystem-ci/before-test.sh (1)

1-8: LGTM: Proper setup and delegation to Node.js helper.

The sandbox name derivation correctly transforms the template path, and the script appropriately delegates complex logic to the Node.js helper.

scripts/ecosystem-ci/existing-resolutions.js (2)

1-8: LGTM: Clear documentation of module purpose.

The comment effectively explains why this module exists and how to maintain it, including a reference to the validation test.


9-29: LGTM: Resolution set matches root package.json.

The hardcoded list correctly captures all resolutions from the root package.json, as validated by the accompanying test.

scripts/ecosystem-ci/before-test.js (4)

1-19: LGTM: Proper ES module setup.

The imports and initialization correctly use ES module patterns with proper __dirname derivation and sensible defaults.


31-42: LGTM: Correct resolution filtering logic.

The implementation properly filters out Storybook's internal resolutions while preserving ecosystem-ci injected resolutions, with a clear comment explaining the rationale.


44-48: LGTM: Package update and Playwright setup are well-structured.

The code correctly writes the updated package.json with formatting and properly installs Playwright dependencies in the sandbox directory.


21-29: No issues found. The import assertions syntax (with: { type: 'json' }) is compatible with the required Node.js version (>=22.0.0), and the path resolution correctly aligns with the sandbox directory structure established by build.sh, which creates the ../storybook-sandboxes directory at the repository's parent level.

package.json (2)

29-31: LGTM: Clean refactoring of Svelte ecosystem CI scripts.

The scripts now invoke dedicated shell scripts instead of complex inline commands, improving maintainability and readability. The renderer argument for the build script is correctly passed.


36-38: LGTM: Clean refactoring of Vite ecosystem CI scripts.

The Vite CI scripts follow the same pattern as Svelte, providing consistency across ecosystem CI workflows.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
scripts/ecosystem-ci/existing-resolutions.test.ts (1)

18-18: Consider adding a defensive check for resolutions field.

If rootPkgJson.resolutions is undefined or missing, Object.keys() will throw a cryptic error. Consider adding a check or using optional chaining with a fallback to improve the error message when the field is missing.

-    const actualKeys = new Set(Object.keys(rootPkgJson.resolutions));
+    const actualKeys = new Set(Object.keys(rootPkgJson.resolutions ?? {}));
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 94747c7 and e0a00da.

📒 Files selected for processing (1)
  • scripts/ecosystem-ci/existing-resolutions.test.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{test,spec}.{ts,tsx}

📄 CodeRabbit inference engine (.cursorrules)

**/*.{test,spec}.{ts,tsx}: Test files should follow the naming pattern *.test.ts, *.test.tsx, *.spec.ts, or *.spec.tsx
Follow the spy mocking rules defined in .cursor/rules/spy-mocking.mdc for consistent mocking patterns with Vitest

Files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
**/*.test.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/spy-mocking.mdc)

**/*.test.{ts,tsx,js,jsx}: Use vi.mock() with the spy: true option for all package and file mocks in Vitest tests
Place all mocks at the top of the test file before any test cases
Use vi.mocked() to type and access the mocked functions in Vitest tests
Implement mock behaviors in beforeEach blocks in Vitest tests
Mock all required dependencies that the test subject uses
Each mock implementation should return a Promise for async functions in Vitest
Mock implementations should match the expected return type of the original function
Mock all required properties and methods that the test subject uses in Vitest tests
Avoid direct function mocking without vi.mocked() in Vitest tests
Avoid mock implementations outside of beforeEach blocks in Vitest tests
Avoid mocking without the spy: true option in Vitest tests
Avoid inline mock implementations within test cases in Vitest tests
Avoid mocking only a subset of required dependencies in Vitest tests
Mock at the highest level of abstraction needed in Vitest tests
Keep mock implementations simple and focused in Vitest tests
Use type-safe mocking with vi.mocked() in Vitest tests
Document complex mock behaviors in Vitest tests
Group related mocks together in Vitest tests

Files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
**/*.{js,jsx,json,html,ts,tsx,mjs}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Use ESLint and Prettier configurations that are enforced in the codebase

Files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Enable TypeScript strict mode

Files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
🧠 Learnings (12)
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Avoid mocking only a subset of required dependencies in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
📚 Learning: 2025-11-24T17:49:31.838Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T17:49:31.838Z
Learning: Applies to **/*.{test,spec}.{ts,tsx} : Test files should follow the naming pattern `*.test.ts`, `*.test.tsx`, `*.spec.ts`, or `*.spec.tsx`

Applied to files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
📚 Learning: 2025-11-28T14:50:24.889Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-28T14:50:24.889Z
Learning: Applies to code/**/*.{test,spec}.{ts,tsx,js,jsx} : Write meaningful unit tests that actually import and call the functions being tested

Applied to files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Avoid mock implementations outside of `beforeEach` blocks in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Document complex mock behaviors in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Keep mock implementations simple and focused in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Group related mocks together in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Implement mock behaviors in `beforeEach` blocks in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Avoid inline mock implementations within test cases in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Mock all required properties and methods that the test subject uses in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Mock at the highest level of abstraction needed in Vitest tests

Applied to files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
📚 Learning: 2025-11-24T17:49:59.279Z
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Each mock implementation should return a Promise for async functions in Vitest

Applied to files:

  • scripts/ecosystem-ci/existing-resolutions.test.ts
🧬 Code graph analysis (1)
scripts/ecosystem-ci/existing-resolutions.test.ts (1)
scripts/ecosystem-ci/before-test.js (1)
  • rootPkgJson (26-26)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: normal
  • GitHub Check: nx
  • GitHub Check: Core Unit Tests, windows-latest
🔇 Additional comments (1)
scripts/ecosystem-ci/existing-resolutions.test.ts (1)

6-14: Update file extension in comment.

Line 9 references scripts/ecosystem-ci/existing-resolutions.ts, but based on the AI summary, the actual file is existing-resolutions.js. Please update the comment to reference the correct filename to avoid confusion.

-in the root package.json, but you have not updated the EXISTING_RESOLUTIONS set in
-scripts/ecosystem-ci/existing-resolutions.ts.
+in the root package.json, but you have not updated the EXISTING_RESOLUTIONS set in
+scripts/ecosystem-ci/existing-resolutions.js.
⛔ Skipped due to learnings
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursorrules:0-0
Timestamp: 2025-11-24T17:49:31.838Z
Learning: Applies to **/*.{test,spec}.{ts,tsx} : Test files should follow the naming pattern `*.test.ts`, `*.test.tsx`, `*.spec.ts`, or `*.spec.tsx`
Learnt from: CR
Repo: storybookjs/storybook PR: 0
File: .cursor/rules/spy-mocking.mdc:0-0
Timestamp: 2025-11-24T17:49:59.279Z
Learning: Applies to **/*.test.{ts,tsx,js,jsx} : Avoid mocking only a subset of required dependencies in Vitest tests

@JReinhold JReinhold merged commit de619c1 into next Dec 4, 2025
67 of 68 checks passed
@JReinhold JReinhold deleted the disable-ecosystem-ci-test-runner branch December 4, 2025 19:33
@ghengeveld ghengeveld changed the title CI: Fix ecosystem CI resolution handling Build: Fix ecosystem CI resolution handling Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Internal-facing build tooling & test updates ci:normal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants