-
Notifications
You must be signed in to change notification settings - Fork 48
fix: Windows compatibility - bun as optional dep, cross-env for examples #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+555
−158
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
9473a62
fix: Windows compatibility for npm scripts and cross-platform CI
ochafik 9801093
fix: remove bun npm package from all workspaces
ochafik 8ebae92
fix: skip examples:build on Windows (uses Unix-only INPUT=... syntax)
ochafik 0ed1542
fix: force LF line endings for cross-platform prettier consistency
ochafik f882958
ci: add test for git-based npm install (cross-platform)
ochafik f6c9b99
ci: add Linux ARM64 and Windows ARM64 to CI matrix
ochafik 85a30fa
ci: disable Windows ARM64 (Bun lacks stable ARM64 binaries)
ochafik 600de0b
ci: add Windows WSL build test
ochafik b7b8f75
ci: fix WSL build - install unzip for Bun installer
ochafik 765736f
ci: add setup-bun to publish.yml workflow
ochafik b3527af
ci: enable Windows ARM64 with x64-baseline Bun (via emulation)
ochafik 9cbb4dc
ci: remove macOS x64 (macos-13 runner retired)
ochafik f80b167
docs: add Bun installation instructions per platform
ochafik 93f7d98
docs: note Bun requirement in README examples section
ochafik 48fd911
feat: add bun as optional dependency (no global install required)
ochafik c10ed54
chore: add debug logging to setup-bun script
ochafik e81518d
chore: force stdout flush in setup-bun for CI debugging
ochafik a539ae4
chore: add more debugging to setup-bun
ochafik 4535606
chore: remove accidental test artifacts
ochafik ea668b3
chore: run setup-bun in prepare script (before build)
ochafik 372b580
feat: use cross-env for Windows-compatible example builds
ochafik e60adf6
chore: remove unused imports in setup-bun.mjs
ochafik 69b8eba
fix: use run-bun.mjs wrapper for prepare hook compatibility
ochafik 181384a
ci: restore setup-bun action for build jobs
ochafik aebc13b
fix: remove bun devDep, add libc detection for Linux ARM64
ochafik db41042
ci: simplify WSL build - let setup-bun.mjs handle bun installation
ochafik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,5 @@ | ||
| # Force LF line endings for all text files (for consistent prettier formatting) | ||
| * text=auto eol=lf | ||
|
|
||
| package-lock.json linguist-generated=true | ||
| src/generated/** linguist-generated=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this dependency causing a problem on Windows?
In 9f8d00e, I explicitly added
bunas a dependency to the examples in order to improve on-ramping (users only have to runnpm install).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I see the
postinstallscript added topackage.json, but I'm still unclear on the problem that this dependency is causing.)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
bunnpm package was removed from examples' devDependencies (in the parent branch #144) because it was causingnpm installto fail on Windows ARM64 - there's no native ARM64 binary for Bun on Windows yet, so the package's postinstall script throws "Unsupported platform: win32 arm64".This PR takes a different approach: instead of relying on the
bunnpm package in each workspace, we add Bun's platform-specific packages (@oven/bun-darwin-aarch64,@oven/bun-linux-x64, etc.) as optionalDependencies in the rootpackage.json. This has several benefits:setup-bun.mjsscript handles this by downloading the x64-baseline binary, which runs via emulationnpm install: Users still just runnpm install- the prepare script sets up bun automaticallyThe user experience is the same (or better) -
npm installjust works on all platforms including Windows ARM64.