Skip to content

Conversation

@mrginglymus
Copy link
Contributor

@mrginglymus mrginglymus commented Nov 28, 2025

What I did

Special case for storybook/theming types not working under new build system on windows. Use pathe, now it is :)

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
    • Updated internal dependencies for improved build process efficiency.

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

@nx-cloud
Copy link

nx-cloud bot commented Nov 28, 2025

View your CI Pipeline Execution ↗ for commit 86e674d

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

☁️ Nx Cloud last updated this comment at 2025-12-01 14:03:10 UTC

@valentinpalkovic valentinpalkovic self-assigned this Dec 1, 2025
@valentinpalkovic valentinpalkovic added the build Internal-facing build tooling & test updates label Dec 1, 2025
@valentinpalkovic valentinpalkovic changed the title Fix build on windows Build: Fix build on windows Dec 1, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

📝 Walkthrough

Walkthrough

The import statement for join in scripts/build/utils/modify-core-theme-types.ts is updated from node:path to pathe. This is a module source replacement with no change to the function's behavior or usage.

Changes

Cohort / File(s) Change Summary
Import replacement
scripts/build/utils/modify-core-theme-types.ts
Replace join import from node:path to pathe

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a381c7d and 2d6c366.

📒 Files selected for processing (1)
  • scripts/build/utils/modify-core-theme-types.ts (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{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/build/utils/modify-core-theme-types.ts
**/*.{ts,tsx}

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

Enable TypeScript strict mode

Files:

  • scripts/build/utils/modify-core-theme-types.ts
🧠 Learnings (1)
📚 Learning: 2025-10-01T15:24:01.060Z
Learnt from: Sidnioulz
Repo: storybookjs/storybook PR: 32594
File: code/core/src/components/components/Popover/WithPopover.tsx:7-9
Timestamp: 2025-10-01T15:24:01.060Z
Learning: In the Storybook repository, "react-aria-components/patched-dist/*" (e.g., "react-aria-components/patched-dist/Dialog", "react-aria-components/patched-dist/Popover", "react-aria-components/patched-dist/Tooltip") are valid import paths created by a patch applied to the react-aria-components package. These imports should not be flagged as broken or invalid until a maintainer explicitly states they are no longer acceptable.

Applied to files:

  • scripts/build/utils/modify-core-theme-types.ts
⏰ 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). (2)
  • GitHub Check: normal
  • GitHub Check: nx
🔇 Additional comments (1)
scripts/build/utils/modify-core-theme-types.ts (1)

3-21: Switching to pathe for join is appropriate for cross‑platform builds

Using join from pathe here is consistent with its goal as a drop‑in replacement for Node’s path that normalizes paths to forward slashes across platforms, which should help the cwd !== CORE_ROOT_DIR check behave the same on Windows as on POSIX and avoid the theming types path mismatch.(github.com)

Please just double‑check that:

  • pathe is declared in the appropriate package.json (dependencies or devDependencies) for whatever package owns this script, and
  • any callers passing cwd are also using the same normalization strategy (e.g., pathe or otherwise forward‑slash‑normalized paths), so the string comparison remains reliable.

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

@valentinpalkovic valentinpalkovic merged commit 354e26d into storybookjs:next Dec 1, 2025
59 checks passed
@github-actions github-actions bot mentioned this pull request Dec 2, 2025
18 tasks
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.

2 participants