-
Notifications
You must be signed in to change notification settings - Fork 13
bundle bob in esm instead cjs #167
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
Changes from 4 commits
2fe221d
30ccf03
dd89cf0
400e326
8db0e86
e471646
4c92727
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| 'bob-the-bundler': minor | ||
dimaMachina marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| --- | ||
|
|
||
| bundle bob in esm instead cjs | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| module.exports = { | ||
| root: true, | ||
| parser: '@typescript-eslint/parser', | ||
| parserOptions: { | ||
| ecmaVersion: 2020, | ||
| }, | ||
| overrides: [ | ||
| { | ||
| files: 'src/**/*.ts', | ||
| excludedFiles: ['*.spec.ts'], | ||
| plugins: ['import'], | ||
| rules: { | ||
| 'import/extensions': ['error', 'ignorePackages'], | ||
| }, | ||
| }, | ||
| ], | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,3 +39,5 @@ jobs: | |
| run: yarn test:ts | ||
| - name: Lint Prettier | ||
| run: yarn lint:prettier | ||
| - name: Lint ESLint | ||
| run: yarn lint | ||
|
Comment on lines
+42
to
+43
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. <3
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Don't worry I plan to switch to pnpm :))) |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| { | ||
| "name": "bob-the-bundler", | ||
| "version": "4.1.1", | ||
| "type": "module", | ||
| "description": "Bob The Bundler!", | ||
| "repository": { | ||
| "url": "[email protected]:kamilkisiela/bob.git", | ||
|
|
@@ -23,6 +24,7 @@ | |
| ], | ||
| "scripts": { | ||
| "build": "rimraf dist && tsc", | ||
| "lint": "eslint --cache --cache-location node_modules/.cache/.eslintcache --ignore-path .gitignore .", | ||
| "lint:prettier": "prettier --cache --check .", | ||
| "prepublish": "yarn build", | ||
| "prerelease": "yarn build", | ||
|
|
@@ -38,30 +40,33 @@ | |
| "@vercel/ncc": "^0.36.0", | ||
| "consola": "^2.15.3", | ||
| "dependency-graph": "^0.11.0", | ||
| "execa": "5.1.1", | ||
| "execa": "6.1.0", | ||
| "fs-extra": "^11.1.0", | ||
| "globby": "^11.0.0", | ||
| "globby": "^13.1.3", | ||
| "js-yaml": "^4.1.0", | ||
| "lodash.get": "^4.4.2", | ||
| "mkdirp": "^1.0.4", | ||
| "p-limit": "^3.1.0", | ||
| "p-limit": "^4.0.0", | ||
| "resolve.exports": "^1.1.0", | ||
| "tslib": "^2.0.0", | ||
| "tsup": "^6.5.0", | ||
| "yargs": "^17.5.1", | ||
| "zod": "^3.17.3" | ||
| "yargs": "^17.6.2", | ||
| "zod": "^3.20.2" | ||
| }, | ||
| "devDependencies": { | ||
| "@actions/core": "1.10.0", | ||
| "@changesets/changelog-github": "0.4.8", | ||
| "@changesets/cli": "2.24.4", | ||
| "@changesets/cli": "2.26.0", | ||
| "@theguild/prettier-config": "1.0.0", | ||
| "@types/fs-extra": "9.0.13", | ||
| "@types/js-yaml": "4.0.5", | ||
| "@types/lodash.get": "4.4.7", | ||
| "@types/mkdirp": "1.0.2", | ||
| "@types/node": "16.18.10", | ||
| "@types/node": "18.11.17", | ||
| "@types/yargs": "17.0.17", | ||
| "@typescript-eslint/parser": "5.47.0", | ||
| "eslint": "8.30.0", | ||
| "eslint-plugin-import": "2.26.0", | ||
| "jest-snapshot-serializer-raw": "1.2.0", | ||
| "prettier": "2.8.1", | ||
| "rimraf": "3.0.2", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,15 @@ | ||
| #!/usr/bin/env node | ||
| import yargs, { Argv } from 'yargs'; | ||
| import { hideBin } from 'yargs/helpers'; | ||
| import consola from 'consola'; | ||
| import { CommandFactory } from './command'; | ||
| import { buildCommand } from './commands/build'; | ||
| import { runifyCommand } from './commands/runify'; | ||
| import { bootstrapCommand } from './commands/bootstrap'; | ||
| import { checkCommand } from './commands/check'; | ||
| import { CommandFactory } from './command.js'; | ||
| import { buildCommand } from './commands/build.js'; | ||
| import { runifyCommand } from './commands/runify.js'; | ||
| import { bootstrapCommand } from './commands/bootstrap.js'; | ||
| import { checkCommand } from './commands/check.js'; | ||
|
|
||
| async function main() { | ||
| const root: Argv = yargs.scriptName('bob').detectLocale(false).version(); | ||
| const root: Argv = yargs(hideBin(process.argv)).scriptName('bob').detectLocale(false).version(); | ||
|
Comment on lines
-11
to
+12
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| const commands: CommandFactory<any, any>[] = [ | ||
| buildCommand, | ||
|
|
||
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