Skip to content
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

Migrate from pnpm to bun #806

Closed
wants to merge 1 commit into from
Closed

Migrate from pnpm to bun #806

wants to merge 1 commit into from

Conversation

joepio
Copy link
Member

@joepio joepio commented Jan 16, 2024

Make sure bun is used in:

  • Earthly
  • All package json
  • build.rs script
  • Make sure workspaces work

Roadblocks:

Recursive calling / package.json scripts

bun does not suppoort -r or --workspace. I want to call bun run only once from the top project, instead of repeating it in each folder. I could fix this by writing a custom script... But after trying a script I made it still doesn't work:

eslint ./src --ext .js,.jsx,.ts,.tsx

Oops! Something went wrong! :(

ESLint: 8.23.0

Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/joep/dev/github/atomicdata-dev/atomic-server/browser/node_modules/.pnpm/[email protected]/node_modules/yocto-queue/index.js from /Users/joep/dev/github/atomicdata-dev/atomic-server/browser/node_modules/.pnpm/[email protected]/node_modules/eslint/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/index.js not supported.
Instead change the require of /Users/joep/dev/github/atomicdata-dev/atomic-server/browser/node_modules/.pnpm/[email protected]/node_modules/yocto-queue/index.js in /Users/joep/dev/github/atomicdata-dev/atomic-server/browser/node_modules/.pnpm/[email protected]/node_modules/eslint/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Users/joep/dev/github/atomicdata-dev/atomic-server/browser/node_modules/.pnpm/[email protected]/node_modules/eslint/node_modules/find-up/node_modules/locate-path/node_modules/p-locate/node_modules/p-limit/index.js:2:15)

Maybe because eslintrc is ignored, because it's in the parent directory.

Still using vite build and tsc

One of the advantages of bun is that it has a server and compiler in one. I should be able to ditch vite and tsc.

PR Checklist:

@joepio joepio changed the title Bun get tests working Migrate from pnpm to bun Jan 16, 2024
@joepio joepio self-assigned this Jan 16, 2024
@joepio joepio marked this pull request as draft January 17, 2024 12:49
@joepio
Copy link
Member Author

joepio commented Jan 17, 2024

I think I won't explore this further, at least for now. Bun seems a bit too young to migrate to, and it isn't as trivial as I hoped.

@joepio joepio closed this Jan 17, 2024
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.

Minimize impact of pnpm in build scripts
1 participant