-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hi @nojaf,
Following up on the forum discussion, I've created a working ReScript 12 monorepo example that demonstrates the current workarounds needed for Bun 1.3.x compatibility. You can find it here: https://github.com/joakin/rescript-bun-monorepo
Like I mentioned in the post, there are a couple of workarounds I implemented:
- Bun Isolated Dependencies Fix
- I added workspace packages to root package.json dependencies to force symlinks in node_modules
- This allows ReScript's rewatch to find the packages since Bun 1.3.x uses isolated installs by default
- Test Discovery Workaround
- I'm using .res.js suffix (as recommended in docs and the create-rescript-app thingy)
- I added explicit test scripts with glob patterns since Bun doesn't auto-discover .res.js test files and as far as I could see it is not configurable for now
test: bun test ./packages/*/src/**/*_test.res.js,
test:watch: bun test --watch ./packages/*/src/**/*_test.res.js
Before I submit this as an end-to-end test case, I'd appreciate your thoughts on:
- Is that repo enough for you to make something useful in this one, or do you want me to submit it?
- Should I keep the current .res.js suffix with the test script workaround, or switch to .js as you mentioned in the end-to-end repo? Not sure if I'm supposed to submit the default or the workaround fixed.
- Is the workspace dependency approach acceptable for the end-to-end tests, or would you prefer a different solution (like configuring Bun with linker = "hoisted" in bunfig.toml)? Or leave it broken without the package.json dependencies on the packages/*?
What do you think?
Metadata
Metadata
Assignees
Labels
No labels