-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
🦋 Changeset detectedLatest commit: e471646 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
const root: Argv = yargs.scriptName('bob').detectLocale(false).version(); | ||
const root: Argv = yargs(hideBin(process.argv)).scriptName('bob').detectLocale(false).version(); |
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.
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.
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)?
@enisdenjo default of what? now bob is bundled to ESM only, I test this alpha on graphql-eslint and graphql-config and everything works |
Node's runtime default if the extension is |
- name: Lint ESLint | ||
run: yarn lint |
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.
<3
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.
Don't worry I plan to switch to pnpm :)))
.changeset/nervous-carpets-shop.md
Outdated
@@ -0,0 +1,5 @@ | |||
--- | |||
'bob-the-bundler': minor |
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.
Isnt this a major release as it will break non esm supporting versions?
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.
sure
compilerOptions.module
to2020
.js
extensionsLint ESLint
ci actiomn