@thi.ng/args 2.2.7 → 2.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +21 -21
  2. package/package.json +10 -10
  3. package/tools/test.js +0 -19
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-10-28T19:08:39Z
3
+ - **Last updated**: 2022-11-23T22:46:54Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -45,9 +45,9 @@ and/or version bumps of transitive dependencies.
45
45
 
46
46
  #### ♻️ Refactoring
47
47
 
48
- - update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
49
48
  - update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
50
49
  - add .js suffix for all relative imports
50
+ - update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
51
51
 
52
52
  # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@2.0.0) (2021-10-12)
53
53
 
@@ -68,9 +68,9 @@ and/or version bumps of transitive dependencies.
68
68
 
69
69
  #### ♻️ Refactoring
70
70
 
71
- - update imports ([890936b](https://github.com/thi-ng/umbrella/commit/890936b))
72
71
  - update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
73
72
  - update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
73
+ - update imports ([890936b](https://github.com/thi-ng/umbrella/commit/890936b))
74
74
 
75
75
  ### [1.1.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@1.1.1) (2021-09-03)
76
76
 
@@ -108,11 +108,11 @@ and/or version bumps of transitive dependencies.
108
108
 
109
109
  #### 🚀 Features
110
110
 
111
- - add vec() arg type ([f05cb2a](https://github.com/thi-ng/umbrella/commit/f05cb2a))
112
111
  - wordwrap usage prefix/suffix, defaults ([325b558](https://github.com/thi-ng/umbrella/commit/325b558))
113
112
  - update/revert default val handling in usage(), don't show null/false
114
113
  - minor other usage() refactoring
115
114
  - update doc strings
115
+ - add vec() arg type ([f05cb2a](https://github.com/thi-ng/umbrella/commit/f05cb2a))
116
116
 
117
117
  ### [0.4.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.4.1) (2021-03-24)
118
118
 
@@ -124,13 +124,13 @@ and/or version bumps of transitive dependencies.
124
124
 
125
125
  #### 🚀 Features
126
126
 
127
+ - support arbitrary length aliases ([1cfdf49](https://github.com/thi-ng/umbrella/commit/1cfdf49))
128
+ - update parseKey() to allow any length aliases
129
+ - add test
127
130
  - add arg groups, segment usage output ([ebf5197](https://github.com/thi-ng/umbrella/commit/ebf5197))
128
131
  - add `ArgSpecBase.group` to classify args
129
132
  - update arg factories to define default groups ("flags" & "main")
130
133
  - update usage() to output segmented & sorted groups of args
131
- - support arbitrary length aliases ([1cfdf49](https://github.com/thi-ng/umbrella/commit/1cfdf49))
132
- - update parseKey() to allow any length aliases
133
- - add test
134
134
 
135
135
  ### [0.3.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/args@0.3.1) (2021-03-21)
136
136
 
@@ -163,19 +163,7 @@ and/or version bumps of transitive dependencies.
163
163
 
164
164
  #### 🚀 Features
165
165
 
166
- - add tuple arg type support ([a05dde9](https://github.com/thi-ng/umbrella/commit/a05dde9))
167
- - update multi arg specs, parse ([dbdf913](https://github.com/thi-ng/umbrella/commit/dbdf913))
168
- - simplify Args conditionals (remove special casing for string(s))
169
- - replace spec.comma => spec.delim
170
- - update ParseResult
171
- - update parse() to stop at first non-arg value
172
- - add/update tests
173
- - add strict mode kvArgs()/coerceKV(), add docs ([b76c4f1](https://github.com/thi-ng/umbrella/commit/b76c4f1))
174
- - add kv args, callbacks, usage opts ([c306aba](https://github.com/thi-ng/umbrella/commit/c306aba))
175
- - add KVDict type, coerceKV(), kvPairs()
176
- - add optional `fn` arg spec callbacks
177
- - add `--help` built-in handling
178
- - add ColorTheme, update usage()
166
+ - import as new package ([af5d943](https://github.com/thi-ng/umbrella/commit/af5d943))
179
167
  - major general package update ([26ec49a](https://github.com/thi-ng/umbrella/commit/26ec49a))
180
168
  - use more mapped types to better infer & verify specs for optional args
181
169
  - add support for comma separated multi-args
@@ -187,4 +175,16 @@ and/or version bumps of transitive dependencies.
187
175
  - auto-usage on error
188
176
  - kebab -> camelCase names
189
177
  - update/rewrite usage(), add color support
190
- - import as new package ([af5d943](https://github.com/thi-ng/umbrella/commit/af5d943))
178
+ - add kv args, callbacks, usage opts ([c306aba](https://github.com/thi-ng/umbrella/commit/c306aba))
179
+ - add KVDict type, coerceKV(), kvPairs()
180
+ - add optional `fn` arg spec callbacks
181
+ - add `--help` built-in handling
182
+ - add ColorTheme, update usage()
183
+ - add strict mode kvArgs()/coerceKV(), add docs ([b76c4f1](https://github.com/thi-ng/umbrella/commit/b76c4f1))
184
+ - update multi arg specs, parse ([dbdf913](https://github.com/thi-ng/umbrella/commit/dbdf913))
185
+ - simplify Args conditionals (remove special casing for string(s))
186
+ - replace spec.comma => spec.delim
187
+ - update ParseResult
188
+ - update parse() to stop at first non-arg value
189
+ - add/update tests
190
+ - add tuple arg type support ([a05dde9](https://github.com/thi-ng/umbrella/commit/a05dde9))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/args",
3
- "version": "2.2.7",
3
+ "version": "2.2.9",
4
4
  "description": "Declarative, functional & typechecked CLI argument/options parser, value coercions etc.",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -34,17 +34,17 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.4.4",
38
- "@thi.ng/checks": "^3.3.2",
39
- "@thi.ng/errors": "^2.2.3",
40
- "@thi.ng/strings": "^3.3.15"
37
+ "@thi.ng/api": "^8.4.6",
38
+ "@thi.ng/checks": "^3.3.3",
39
+ "@thi.ng/errors": "^2.2.4",
40
+ "@thi.ng/strings": "^3.3.17"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@microsoft/api-extractor": "^7.33.5",
44
- "@thi.ng/testament": "^0.3.4",
44
+ "@thi.ng/testament": "^0.3.5",
45
45
  "rimraf": "^3.0.2",
46
46
  "tools": "^0.0.1",
47
- "typedoc": "^0.23.18",
47
+ "typedoc": "^0.23.20",
48
48
  "typescript": "^4.8.4"
49
49
  },
50
50
  "keywords": [
@@ -70,8 +70,8 @@
70
70
  "node": ">=12.7"
71
71
  },
72
72
  "files": [
73
- "*.js",
74
- "*.d.ts"
73
+ "./*.js",
74
+ "./*.d.ts"
75
75
  ],
76
76
  "exports": {
77
77
  ".": {
@@ -96,5 +96,5 @@
96
96
  "thi.ng": {
97
97
  "year": 2018
98
98
  },
99
- "gitHead": "41e59c7ad9bf24bb0230a5f60d05715e0fc1c1e6\n"
99
+ "gitHead": "044ee6a3895720fc78e115032d4d831b63510929\n"
100
100
  }
package/tools/test.js DELETED
@@ -1,19 +0,0 @@
1
- const args = require("@thi.ng/args");
2
- const { argFlag } = require("@thi.ng/args");
3
-
4
- const opts = args.parse(
5
- {
6
- help: {
7
- coerce: () => {
8
- throw new Error();
9
- },
10
- flag: true,
11
- desc: "Show this help",
12
- },
13
- optimize: argFlag({ alias: "o", desc: "optimize", default: false }),
14
- minify: argFlag({ alias: "m", desc: "minify", default: false }),
15
- },
16
- process.argv
17
- );
18
-
19
- console.log(opts);