Skip to content

chore: fix build script on windows#204

Merged
pi0 merged 4 commits intounjs:mainfrom
beeequeue:fix-windows-build
Mar 16, 2026
Merged

chore: fix build script on windows#204
pi0 merged 4 commits intounjs:mainfrom
beeequeue:fix-windows-build

Conversation

@beeequeue
Copy link
Copy Markdown
Contributor

@beeequeue beeequeue commented Jan 4, 2026

currently trying to run pnpm build on windows will result in it failing due to the different path slashes, this pr fixes it and makes sure that it always produces forward slashes in the generated file

Summary by CodeRabbit

  • Chores
    • Updated development dependencies and internal build scripts for improved cross-platform reliability.

Comment thread scripts/gen-connectors.ts Outdated
@pi0 pi0 changed the title fix: gen-connectors failing with windows paths chore: fix build script on windows Jan 5, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 16, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

Added pathe as a development dependency and refactored the connector generation script to use pathe for path resolution instead of Node's built-in utilities, improving cross-platform consistency through standardized path handling.

Changes

Cohort / File(s) Summary
Dependency Addition
package.json
Added pathe v2.0.3 as a dev dependency.
Path Resolution Refactor
scripts/gen-connectors.ts
Replaced Node's path/url helpers with pathe's resolve function; updated path extraction to use slice instead of replace; normalized path separator handling with character class [/\\]; updated imports accordingly.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hops with paths so bright,
From Node's old ways to pathe's light,
Cross-platform roads now smooth and clean,
Separators normalized, seen and unseen!
Connectors dance on unified ground. 🌍✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title directly addresses the main change: fixing Windows build compatibility by switching to cross-platform path utilities (pathe) to handle path separators correctly.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@pi0 pi0 merged commit 54dedf7 into unjs:main Mar 16, 2026
2 of 3 checks passed
@beeequeue beeequeue deleted the fix-windows-build branch March 16, 2026 19:28
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