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

bundle bob in esm instead cjs #167

Merged
merged 7 commits into from Jan 9, 2023
Merged

bundle bob in esm instead cjs #167

merged 7 commits into from Jan 9, 2023

Conversation

dimaMachina
Copy link
Collaborator

@dimaMachina dimaMachina commented Dec 22, 2022

  • set compilerOptions.module to 2020
  • add ESLint and lint .js extensions
  • fix yargs singleton in esm
  • update all dependencies
  • add Lint ESLint ci actiomn

@changeset-bot
Copy link

changeset-bot bot commented Dec 22, 2022

🦋 Changeset detected

Latest commit: e471646

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
bob-the-bundler Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Comment on lines -11 to +12
const root: Argv = yargs.scriptName('bob').detectLocale(false).version();
const root: Argv = yargs(hideBin(process.argv)).scriptName('bob').detectLocale(false).version();
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2022

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
bob-the-bundler 4.2.0-alpha-20230109120841-67f064d npm ↗︎ unpkg ↗︎

@dimaMachina dimaMachina requested review from enisdenjo and n1ru4l and removed request for n1ru4l January 5, 2023 17:07
Copy link
Collaborator

@enisdenjo enisdenjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the package.json type is module, there shouldn't be any problems for Node to run this as a binary right (given that CJS is still the default)?

@dimaMachina
Copy link
Collaborator Author

dimaMachina commented Jan 9, 2023

given that CJS is still the default

@enisdenjo default of what? now bob is bundled to ESM only, I test this alpha on graphql-eslint and graphql-config and everything works

@enisdenjo
Copy link
Collaborator

Node's runtime default if the extension is .js. Just wondering about the binary. But, I guess all is good. 👍

Comment on lines +42 to +43
- name: Lint ESLint
run: yarn lint
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<3

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't worry I plan to switch to pnpm :)))

@@ -0,0 +1,5 @@
---
'bob-the-bundler': minor
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isnt this a major release as it will break non esm supporting versions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@dimaMachina dimaMachina merged commit d095697 into master Jan 9, 2023
@dimaMachina dimaMachina deleted the bobesm branch January 9, 2023 12:13
This was referenced Jan 9, 2023
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.

None yet

3 participants