@thi.ng/args
Advanced tools
Comparing version 2.0.8 to 2.1.0
182
CHANGELOG.md
# Change Log | ||
Last updated: 2021-11-17T23:24:59Z | ||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines. | ||
## [2.0.8](https://github.com/thi-ng/umbrella/compare/@thi.ng/args@2.0.7...@thi.ng/args@2.0.8) (2021-11-10) | ||
**Note:** Unlisted _patch_ versions only involve non-code changes and/or | ||
version bumps of transitive dependencies. | ||
**Note:** Version bump only for package @thi.ng/args | ||
## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@2.1.0) (2021-11-17) | ||
#### 🚀 Features | ||
- Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404)) | ||
Improving the overall build ergonomics | ||
- introduced a tools workspaces | ||
- imported it in all needed packages/examples | ||
- inclusive project root | ||
#### ♻️ Refactoring | ||
- testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2)) | ||
this commit reverts (partly) changes made in: | ||
ef346d7a8753590dc9094108a3d861a8dbd5dd2c | ||
overall purpose is better testament ergonomics: | ||
instead of having to pass NODE_OPTIONS with every invocation | ||
having a binary to handle this for us. | ||
## [2.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/args@2.0.6...@thi.ng/args@2.0.7) (2021-11-03) | ||
### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@2.0.1) (2021-10-13) | ||
**Note:** Version bump only for package @thi.ng/args | ||
#### ♻️ Refactoring | ||
- update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591)) | ||
- update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f)) | ||
- add .js suffix for all relative imports | ||
# [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@2.0.0) (2021-10-12) | ||
#### 🛑 Breaking changes | ||
- major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea)) | ||
- BREAKING CHANGE: discontinue CommonJS & UMD versions | ||
- only ESM modules will be published from now on | ||
- CJS obsolete due to ESM support in recent versions of node: | ||
- i.e. launch NodeJS via: | ||
- `node --experimental-specifier-resolution=node --experimental-repl-await` | ||
- in the node REPL use `await import(...)` instead of `require()` | ||
- UMD obsolete due to widespread browser support for ESM | ||
Also: | ||
- normalize/restructure/reorg all package.json files | ||
- cleanup all build scripts, remove obsolete | ||
- switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests | ||
# [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/args@1.1.1...@thi.ng/args@2.0.0) (2021-10-12) | ||
#### ♻️ Refactoring | ||
- update imports ([890936b](https://github.com/thi-ng/umbrella/commit/890936b)) | ||
- update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc)) | ||
- update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) | ||
### Build System | ||
### [1.1.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@1.1.1) (2021-09-03) | ||
* major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6)) | ||
#### ♻️ Refactoring | ||
- fix up TS4.4 changes ([ba616db](https://github.com/thi-ng/umbrella/commit/ba616db)) | ||
### BREAKING CHANGES | ||
## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@1.1.0) (2021-08-19) | ||
* discontinue CommonJS & UMD versions | ||
#### 🚀 Features | ||
- only ESM modules will be published from now on | ||
- CJS obsolete due to ESM support in recent versions of node: | ||
- i.e. launch NodeJS via: | ||
- `node --experimental-specifier-resolution=node --experimental-repl-await` | ||
- in the node REPL use `await import(...)` instead of `require()` | ||
- UMD obsolete due to widespread browser support for ESM | ||
- capitalize usage section headings ([eaa0f23](https://github.com/thi-ng/umbrella/commit/eaa0f23)) | ||
Also: | ||
- normalize/restructure/reorg all package.json files | ||
- cleanup all build scripts, remove obsolete | ||
- switch from mocha to @thi.ng/testament for all tests | ||
### [0.7.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.7.1) (2021-07-29) | ||
#### 🩹 Bug fixes | ||
- omit empty groups from usage() ([a66c19a](https://github.com/thi-ng/umbrella/commit/a66c19a)) | ||
## [0.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.7.0) (2021-07-01) | ||
#### 🚀 Features | ||
- add showGroupNames option ([6917111](https://github.com/thi-ng/umbrella/commit/6917111)) | ||
# [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/args@1.0.4...@thi.ng/args@1.1.0) (2021-08-19) | ||
## [0.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.6.0) (2021-06-08) | ||
### Features | ||
#### 🚀 Features | ||
- **args:** capitalize usage section headings ([eaa0f23](https://github.com/thi-ng/umbrella/commit/eaa0f23a88cfb98da05b245b720a6fbb260ea7da)) | ||
- add kvPairsMulti(), update coerceKV() ([fd12f80](https://github.com/thi-ng/umbrella/commit/fd12f80)) | ||
- add KVMultiDict type alias | ||
- update tests | ||
## [0.7.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/args@0.7.0...@thi.ng/args@0.7.1) (2021-07-29) | ||
## [0.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.5.0) (2021-03-28) | ||
### Bug Fixes | ||
#### 🚀 Features | ||
- **args:** omit empty groups from usage() ([a66c19a](https://github.com/thi-ng/umbrella/commit/a66c19aa8d682a7f4b6ae5b3de51a26e806a02dc)) | ||
- add vec() arg type ([f05cb2a](https://github.com/thi-ng/umbrella/commit/f05cb2a)) | ||
- wordwrap usage prefix/suffix, defaults ([325b558](https://github.com/thi-ng/umbrella/commit/325b558)) | ||
- update/revert default val handling in usage(), don't show null/false | ||
- minor other usage() refactoring | ||
- update doc strings | ||
# [0.7.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/args@0.6.0...@thi.ng/args@0.7.0) (2021-07-01) | ||
### [0.4.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.4.1) (2021-03-24) | ||
### Features | ||
#### ♻️ Refactoring | ||
- **args:** add showGroupNames option ([6917111](https://github.com/thi-ng/umbrella/commit/6917111aa6f019cbc4622a30be65c7f43cf995f9)) | ||
- update wordwrapping in usage() ([4af3d41](https://github.com/thi-ng/umbrella/commit/4af3d41)) | ||
# [0.6.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/args@0.5.1...@thi.ng/args@0.6.0) (2021-06-08) | ||
## [0.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.4.0) (2021-03-22) | ||
### Features | ||
#### 🚀 Features | ||
- **args:** add kvPairsMulti(), update coerceKV() ([fd12f80](https://github.com/thi-ng/umbrella/commit/fd12f807dba2546133278a607c4b79dcf9a12b07)) | ||
- add arg groups, segment usage output ([ebf5197](https://github.com/thi-ng/umbrella/commit/ebf5197)) | ||
- add `ArgSpecBase.group` to classify args | ||
- update arg factories to define default groups ("flags" & "main") | ||
- update usage() to output segmented & sorted groups of args | ||
- support arbitrary length aliases ([1cfdf49](https://github.com/thi-ng/umbrella/commit/1cfdf49)) | ||
- update parseKey() to allow any length aliases | ||
- add test | ||
# [0.5.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/args@0.4.2...@thi.ng/args@0.5.0) (2021-03-28) | ||
### [0.3.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.3.1) (2021-03-21) | ||
### Features | ||
#### 🩹 Bug fixes | ||
- **args:** add vec() arg type ([f05cb2a](https://github.com/thi-ng/umbrella/commit/f05cb2a6d0798ef0558775a81dba2d834308747c)) | ||
- **args:** wordwrap usage prefix/suffix, defaults ([325b558](https://github.com/thi-ng/umbrella/commit/325b558f74f8dbfaa2c7de72c6800cdbc8c54acd)) | ||
- fix usage() show defaults logic ([ae31158](https://github.com/thi-ng/umbrella/commit/ae31158)) | ||
- show all default values (incl. zero, false), only skip undefined | ||
# [0.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/args@0.3.1...@thi.ng/args@0.4.0) (2021-03-22) | ||
## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.3.0) (2021-03-20) | ||
### Features | ||
#### 🚀 Features | ||
- **args:** add arg groups, segment usage output ([ebf5197](https://github.com/thi-ng/umbrella/commit/ebf51974e4e1e1d5288af9ad420d4211addd95ad)) | ||
- **args:** support arbitrary length aliases ([1cfdf49](https://github.com/thi-ng/umbrella/commit/1cfdf49a53cca2f80836caf428e220e90f687ad1)) | ||
- update ParseOpts, UsageOpts ([6577c80](https://github.com/thi-ng/umbrella/commit/6577c80)) | ||
- add `ParseOpts.help` to configure special `--help` option(s) | ||
- add `UsageOpts.prefix/suffix` strings | ||
## [0.3.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/args@0.3.0...@thi.ng/args@0.3.1) (2021-03-21) | ||
## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.2.0) (2021-01-13) | ||
### Bug Fixes | ||
#### 🚀 Features | ||
- **args:** fix usage() show defaults logic ([ae31158](https://github.com/thi-ng/umbrella/commit/ae31158c9496d7c116ee2b4a22ca843888d2bddd)) | ||
- add defaultHint opt, update usage() ([f8a4146](https://github.com/thi-ng/umbrella/commit/f8a4146)) | ||
- add UsageOpts.showDefaults to display arg default vals | ||
- add ArgSpecBase.defaultHint for default vals for display purposes | ||
# [0.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/args@0.2.7...@thi.ng/args@0.3.0) (2021-03-20) | ||
#### ♻️ Refactoring | ||
### Features | ||
- splitup parse() into smaller fns ([64be608](https://github.com/thi-ng/umbrella/commit/64be608)) | ||
- **args:** update ParseOpts, UsageOpts ([6577c80](https://github.com/thi-ng/umbrella/commit/6577c806e246ecf8244b1af6a2cefc400a7eb365)) | ||
## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.1.0) (2021-01-10) | ||
# [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/args@0.1.0...@thi.ng/args@0.2.0) (2021-01-13) | ||
#### 🚀 Features | ||
### Features | ||
- **args:** add defaultHint opt, update usage() ([f8a4146](https://github.com/thi-ng/umbrella/commit/f8a414605a0d5c93fcef83ab931911c6c2f39f7d)) | ||
# 0.1.0 (2021-01-10) | ||
### Features | ||
- **args:** add kv args, callbacks, usage opts ([c306aba](https://github.com/thi-ng/umbrella/commit/c306abac31dc03bb15a19c36192ee5c07afa1063)) | ||
- **args:** add strict mode kvArgs()/coerceKV(), add docs ([b76c4f1](https://github.com/thi-ng/umbrella/commit/b76c4f11ddbe3b7c1a195a93ceed3a953666ef5d)) | ||
- **args:** add tuple arg type support ([a05dde9](https://github.com/thi-ng/umbrella/commit/a05dde957be54ae7ed6aeab8233bff0d8573c675)) | ||
- **args:** import as new package ([af5d943](https://github.com/thi-ng/umbrella/commit/af5d943153b3012be04ed0e9a044ee944465d035)) | ||
- **args:** major general package update ([26ec49a](https://github.com/thi-ng/umbrella/commit/26ec49afc0fa389b7a2551b116a85d95df4aaeee)) | ||
- **args:** update multi arg specs, parse ([dbdf913](https://github.com/thi-ng/umbrella/commit/dbdf913b4ed730c2c07246c24ecbafb32d9dc37e)) | ||
- add tuple arg type support ([a05dde9](https://github.com/thi-ng/umbrella/commit/a05dde9)) | ||
- update multi arg specs, parse ([dbdf913](https://github.com/thi-ng/umbrella/commit/dbdf913)) | ||
- simplify Args conditionals (remove special casing for string(s)) | ||
- replace spec.comma => spec.delim | ||
- update ParseResult | ||
- update parse() to stop at first non-arg value | ||
- add/update tests | ||
- add strict mode kvArgs()/coerceKV(), add docs ([b76c4f1](https://github.com/thi-ng/umbrella/commit/b76c4f1)) | ||
- add kv args, callbacks, usage opts ([c306aba](https://github.com/thi-ng/umbrella/commit/c306aba)) | ||
- add KVDict type, coerceKV(), kvPairs() | ||
- add optional `fn` arg spec callbacks | ||
- add `--help` built-in handling | ||
- add ColorTheme, update usage() | ||
- major general package update ([26ec49a](https://github.com/thi-ng/umbrella/commit/26ec49a)) | ||
- use more mapped types to better infer & verify specs for optional args | ||
- add support for comma separated multi-args | ||
- add ParseOpts & UsageOpts | ||
- add/replace coercions | ||
- add arg spec factories | ||
- update parse() | ||
- add comma handling | ||
- auto-usage on error | ||
- kebab -> camelCase names | ||
- update/rewrite usage(), add color support | ||
- import as new package ([af5d943](https://github.com/thi-ng/umbrella/commit/af5d943)) |
181
package.json
{ | ||
"name": "@thi.ng/args", | ||
"version": "2.0.8", | ||
"description": "Declarative, functional & typechecked CLI argument/options parser, value coercions etc.", | ||
"type": "module", | ||
"module": "./index.js", | ||
"typings": "./index.d.ts", | ||
"sideEffects": false, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/thi-ng/umbrella.git" | ||
"name": "@thi.ng/args", | ||
"version": "2.1.0", | ||
"description": "Declarative, functional & typechecked CLI argument/options parser, value coercions etc.", | ||
"type": "module", | ||
"module": "./index.js", | ||
"typings": "./index.d.ts", | ||
"sideEffects": false, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/thi-ng/umbrella.git" | ||
}, | ||
"homepage": "https://github.com/thi-ng/umbrella/tree/master/packages/args#readme", | ||
"funding": [ | ||
{ | ||
"type": "github", | ||
"url": "https://github.com/sponsors/postspectacular" | ||
}, | ||
"homepage": "https://github.com/thi-ng/umbrella/tree/master/packages/args#readme", | ||
"funding": [ | ||
{ | ||
"type": "github", | ||
"url": "https://github.com/sponsors/postspectacular" | ||
}, | ||
{ | ||
"type": "patreon", | ||
"url": "https://patreon.com/thing_umbrella" | ||
} | ||
], | ||
"author": "Karsten Schmidt <k+npm@thi.ng>", | ||
"license": "Apache-2.0", | ||
"scripts": { | ||
"build": "yarn clean && tsc --declaration", | ||
"clean": "rimraf *.js *.d.ts *.map doc", | ||
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts", | ||
"doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose", | ||
"doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts", | ||
"doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts", | ||
"pub": "yarn build && yarn publish --access public", | ||
"test": "testament test" | ||
{ | ||
"type": "patreon", | ||
"url": "https://patreon.com/thing_umbrella" | ||
} | ||
], | ||
"author": "Karsten Schmidt <k+npm@thi.ng>", | ||
"license": "Apache-2.0", | ||
"scripts": { | ||
"build": "yarn clean && tsc --declaration", | ||
"clean": "rimraf '*.js' '*.d.ts' '*.map' doc", | ||
"doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts", | ||
"doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose", | ||
"doc:readme": "yarn doc:stats && tools:readme", | ||
"doc:stats": "tools:module-stats", | ||
"pub": "yarn build && yarn npm publish --access public", | ||
"test": "testament test" | ||
}, | ||
"dependencies": { | ||
"@thi.ng/api": "^8.3.0", | ||
"@thi.ng/checks": "^3.1.0", | ||
"@thi.ng/errors": "^2.1.0", | ||
"@thi.ng/strings": "^3.2.0" | ||
}, | ||
"devDependencies": { | ||
"@microsoft/api-extractor": "^7.18.19", | ||
"@thi.ng/testament": "^0.2.0", | ||
"rimraf": "^3.0.2", | ||
"tools": "^0.0.1", | ||
"typedoc": "^0.22.8", | ||
"typescript": "^4.4.4" | ||
}, | ||
"keywords": [ | ||
"argument", | ||
"ansi", | ||
"cli", | ||
"coerce", | ||
"color", | ||
"conversion", | ||
"declarative", | ||
"functional", | ||
"hex", | ||
"node", | ||
"parser", | ||
"tuple", | ||
"typescript", | ||
"validate" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"engines": { | ||
"node": ">=12.7" | ||
}, | ||
"files": [ | ||
"*.js", | ||
"*.d.ts" | ||
], | ||
"exports": { | ||
".": { | ||
"import": "./index.js" | ||
}, | ||
"dependencies": { | ||
"@thi.ng/api": "^8.2.0", | ||
"@thi.ng/checks": "^3.0.7", | ||
"@thi.ng/errors": "^2.0.6", | ||
"@thi.ng/strings": "^3.1.4" | ||
"./api": { | ||
"import": "./api.js" | ||
}, | ||
"devDependencies": { | ||
"@thi.ng/testament": "^0.1.6" | ||
"./args": { | ||
"import": "./args.js" | ||
}, | ||
"keywords": [ | ||
"argument", | ||
"ansi", | ||
"cli", | ||
"coerce", | ||
"color", | ||
"conversion", | ||
"declarative", | ||
"functional", | ||
"hex", | ||
"node", | ||
"parser", | ||
"tuple", | ||
"typescript", | ||
"validate" | ||
], | ||
"publishConfig": { | ||
"access": "public" | ||
"./coerce": { | ||
"import": "./coerce.js" | ||
}, | ||
"engines": { | ||
"node": ">=12.7" | ||
"./parse": { | ||
"import": "./parse.js" | ||
}, | ||
"files": [ | ||
"*.js", | ||
"*.d.ts" | ||
], | ||
"exports": { | ||
".": { | ||
"import": "./index.js" | ||
}, | ||
"./api": { | ||
"import": "./api.js" | ||
}, | ||
"./args": { | ||
"import": "./args.js" | ||
}, | ||
"./coerce": { | ||
"import": "./coerce.js" | ||
}, | ||
"./parse": { | ||
"import": "./parse.js" | ||
}, | ||
"./usage": { | ||
"import": "./usage.js" | ||
} | ||
}, | ||
"thi.ng": { | ||
"year": 2018 | ||
}, | ||
"gitHead": "5fe52419af63984ebe53032201b2a6174b9cb159" | ||
} | ||
"./usage": { | ||
"import": "./usage.js" | ||
} | ||
}, | ||
"thi.ng": { | ||
"year": 2018 | ||
}, | ||
"gitHead": "519eedf95c076202f3429eb8e46ccff275bfe446\n" | ||
} |
118265
19
1149
6
Updated@thi.ng/api@^8.3.0
Updated@thi.ng/checks@^3.1.0
Updated@thi.ng/errors@^2.1.0
Updated@thi.ng/strings@^3.2.0