-
Notifications
You must be signed in to change notification settings - Fork 122
feat!: yargs is now ESM first #503
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
83235a7
feat!: yargs is now ESM first
shadowspawn 8427af6
Bumps node versions for using in CI
shadowspawn 9e43ed0
chose: update lint enough to at least get installing
shadowspawn a622773
Update SKIP_DOWNLOAD ENV
shadowspawn f8d3cee
Suppress lint on yargs-parser-types.ts for now as throws errors
shadowspawn e6a5df9
Update dependencies. Experiment with switching from standardx to gts …
shadowspawn 602aeb3
chore: working towards lint running (prettier temporarily ignoring fi…
shadowspawn 4cc6e5f
Switch from babel to @typescript-esling parsing to avoid crash on (ne…
shadowspawn b849c88
chore: remove stale tscc test
shadowspawn fe7928b
chore: disable sandbox for browser tests
shadowspawn 477e620
chore: switch run-script fix to call gts fix
shadowspawn d05080b
chore: bump ci tests to include Node.js 24 rather than 23
shadowspawn 84f00a6
chore: add unqualified default export for CommonJS
shadowspawn File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| build/ | ||
| test/tscc/ |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "parser": "@typescript-eslint/parser", | ||
| "extends": "./node_modules/gts/", | ||
| "parserOptions": { | ||
| "ecmaVersion": 2020, | ||
| "sourceType": "module" | ||
| }, | ||
| "overrides": [ | ||
| { | ||
| "files": ["**/*.ts", "**/*.tsx"], | ||
| "rules": { | ||
| "@typescript-eslint/no-var-requires": "off", | ||
| "@typescript-eslint/no-unused-vars": "off", | ||
| "@typescript-eslint/no-explicit-any": "off", | ||
| "@typescript-eslint/no-unsafe-function-type": "off", | ||
| "@typescript-eslint/no-empty-object-type": "off" | ||
| } | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| module.exports = { | ||
| ...require('gts/.prettierrc.json') | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,14 +2,13 @@ | |
| "name": "yargs-parser", | ||
| "version": "21.1.1", | ||
| "description": "the mighty option parser used by yargs", | ||
| "main": "build/index.cjs", | ||
| "main": "build/lib/index.js", | ||
| "exports": { | ||
| ".": [ | ||
| { | ||
| "import": "./build/lib/index.js", | ||
| "require": "./build/index.cjs" | ||
| "import": "./build/lib/index.js" | ||
| }, | ||
| "./build/index.cjs" | ||
| "./build/lib/index.js" | ||
| ], | ||
| "./browser": [ | ||
| "./browser.js" | ||
|
|
@@ -18,19 +17,16 @@ | |
| "type": "module", | ||
| "module": "./build/lib/index.js", | ||
| "scripts": { | ||
| "check": "standardx '**/*.ts' && standardx '**/*.js' && standardx '**/*.cjs'", | ||
| "fix": "standardx --fix '**/*.ts' && standardx --fix '**/*.js' && standardx --fix '**/*.cjs'", | ||
| "pretest": "rimraf build && tsc -p tsconfig.test.json && cross-env NODE_ENV=test npm run build:cjs", | ||
| "test": "c8 --reporter=text --reporter=html mocha test/*.cjs", | ||
| "test:esm": "c8 --reporter=text --reporter=html mocha test/*.mjs", | ||
| "check": "gts lint", | ||
| "fix": "gts fix", | ||
| "pretest": "rimraf build && tsc -p tsconfig.test.json", | ||
| "test": "c8 --reporter=text --reporter=html mocha test/*.mjs", | ||
| "test:browser": "start-server-and-test 'serve ./ -p 8080' http://127.0.0.1:8080/package.json 'node ./test/browser/yargs-test.cjs'", | ||
| "pretest:typescript": "npm run pretest", | ||
| "test:typescript": "c8 mocha ./build/test/typescript/*.js", | ||
| "coverage": "c8 report --check-coverage", | ||
| "precompile": "rimraf build", | ||
| "compile": "tsc", | ||
| "postcompile": "npm run build:cjs", | ||
| "build:cjs": "rollup -c", | ||
| "prepare": "npm run compile" | ||
| }, | ||
| "repository": { | ||
|
|
@@ -51,29 +47,24 @@ | |
| "author": "Ben Coe <[email protected]>", | ||
| "license": "ISC", | ||
| "devDependencies": { | ||
| "@types/chai": "^4.2.11", | ||
| "@types/mocha": "^9.0.0", | ||
| "@types/node": "^16.11.4", | ||
| "@typescript-eslint/eslint-plugin": "^3.10.1", | ||
| "@typescript-eslint/parser": "^3.10.1", | ||
| "c8": "^7.3.0", | ||
| "chai": "^4.2.0", | ||
| "@babel/eslint-parser": "^7.27.1", | ||
| "@babel/preset-typescript": "^7.27.1", | ||
| "@types/chai": "^5.2.1", | ||
| "@types/mocha": "^10.0.10", | ||
| "@types/node": "^22.15.3", | ||
| "@typescript-eslint/eslint-plugin": "^8.29.1", | ||
| "@typescript-eslint/parser": "^8.31.1", | ||
| "c8": "^10.1.3", | ||
| "chai": "^5.2.0", | ||
| "cross-env": "^7.0.2", | ||
| "eslint": "^7.0.0", | ||
| "eslint-plugin-import": "^2.20.1", | ||
| "eslint-plugin-node": "^11.0.0", | ||
| "gts": "^3.0.0", | ||
| "mocha": "^10.0.0", | ||
| "puppeteer": "^16.0.0", | ||
| "rimraf": "^3.0.2", | ||
| "rollup": "^2.22.1", | ||
| "rollup-plugin-cleanup": "^3.1.1", | ||
| "rollup-plugin-ts": "^3.0.2", | ||
| "eslint": "^8.57.1", | ||
| "gts": "^5.3.1", | ||
| "mocha": "^11.1.0", | ||
| "puppeteer": "^24.6.1", | ||
| "rimraf": "^6.0.1", | ||
| "serve": "^14.0.0", | ||
| "standardx": "^7.0.0", | ||
| "start-server-and-test": "^1.11.2", | ||
| "ts-transform-default-export": "^1.0.2", | ||
| "typescript": "^4.0.0" | ||
| "start-server-and-test": "^2.0.11", | ||
| "typescript": "^5.8.3" | ||
| }, | ||
| "files": [ | ||
| "browser.js", | ||
|
|
@@ -82,11 +73,6 @@ | |
| "!*.d.cts" | ||
| ], | ||
| "engines": { | ||
| "node": ">=12" | ||
| }, | ||
| "standardx": { | ||
| "ignore": [ | ||
| "build" | ||
| ] | ||
| "node": "^20.19.0 || ^22.12.0 || >=23" | ||
| } | ||
| } | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
24 is out right, perhaps drop 23 in favour of 24?
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.
Good suggestion, done