@thi.ng/args 2.2.10 → 2.2.12

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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2022-11-23T22:46:54Z
3
+ - **Last updated**: 2022-12-16T12:52:25Z
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.
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
 
3
- # ![args](https://media.thi.ng/umbrella/banners-20220914/thing-args.svg?2466633e)
3
+ # ![@thi.ng/args](https://media.thi.ng/umbrella/banners-20220914/thing-args.svg?2466633e)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/args.svg)](https://www.npmjs.com/package/@thi.ng/args)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/args.svg)
7
- [![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella)
7
+ [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  This project is part of the
10
10
  [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
@@ -22,7 +22,7 @@ This project is part of the
22
22
 
23
23
  ## About
24
24
 
25
- Declarative, functional & typechecked CLI argument/options parser, value coercions etc..
25
+ Declarative, functional & typechecked CLI argument/options parser, value coercions etc.
26
26
 
27
27
  Includes built-in support for the following argument types (of course custom arg types are supported too):
28
28
 
@@ -64,14 +64,11 @@ ES module import:
64
64
 
65
65
  For Node.js REPL:
66
66
 
67
- ```text
68
- # with flag only for < v16
69
- node --experimental-repl-await
70
-
71
- > const args = await import("@thi.ng/args");
67
+ ```js
68
+ const args = await import("@thi.ng/args");
72
69
  ```
73
70
 
74
- Package sizes (gzipped, pre-treeshake): ESM: 2.49 KB
71
+ Package sizes (brotli'd, pre-treeshake): ESM: 2.29 KB
75
72
 
76
73
  ## Dependencies
77
74
 
@@ -218,7 +215,7 @@ ts-node index.ts \
218
215
 
219
216
  ## Authors
220
217
 
221
- Karsten Schmidt
218
+ - [Karsten Schmidt](https://thi.ng)
222
219
 
223
220
  If this project contributes to an academic publication, please cite it as:
224
221
 
@@ -233,4 +230,4 @@ If this project contributes to an academic publication, please cite it as:
233
230
 
234
231
  ## License
235
232
 
236
- &copy; 2018 - 2022 Karsten Schmidt // Apache Software License 2.0
233
+ &copy; 2018 - 2022 Karsten Schmidt // Apache License 2.0
package/api.d.ts CHANGED
@@ -29,13 +29,13 @@ export interface ArgSpecBase {
29
29
  */
30
30
  group?: string;
31
31
  }
32
- export declare type ArgSpecRestrict<T> = undefined extends T ? {} : {
32
+ export type ArgSpecRestrict<T> = undefined extends T ? {} : {
33
33
  optional: false;
34
34
  } | {
35
35
  default: T;
36
36
  };
37
- export declare type ArgSpec<T> = ArgSpecBase & ArgSpecRestrict<T>;
38
- export declare type ArgSpecExt = ArgSpec<any> & {
37
+ export type ArgSpec<T> = ArgSpecBase & ArgSpecRestrict<T>;
38
+ export type ArgSpecExt = ArgSpec<any> & {
39
39
  coerce?: Fn<any, any>;
40
40
  delim?: string;
41
41
  default?: any;
@@ -44,7 +44,7 @@ export declare type ArgSpecExt = ArgSpec<any> & {
44
44
  multi?: boolean;
45
45
  optional?: any;
46
46
  };
47
- export declare type Args<T extends IObjectOf<any>> = {
47
+ export type Args<T extends IObjectOf<any>> = {
48
48
  [id in keyof T]: boolean extends T[id] ? ArgSpec<T[id]> & {
49
49
  flag: true;
50
50
  } : any[] extends T[id] ? ArgSpec<T[id]> & {
@@ -61,8 +61,8 @@ export declare type Args<T extends IObjectOf<any>> = {
61
61
  coerce: Fn<string, Exclude<T[id], undefined>>;
62
62
  };
63
63
  };
64
- export declare type KVDict = IObjectOf<string>;
65
- export declare type KVMultiDict = IObjectOf<string[]>;
64
+ export type KVDict = IObjectOf<string>;
65
+ export type KVMultiDict = IObjectOf<string[]>;
66
66
  export interface ParseResult<T> {
67
67
  result: T;
68
68
  index: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/args",
3
- "version": "2.2.10",
3
+ "version": "2.2.12",
4
4
  "description": "Declarative, functional & typechecked CLI argument/options parser, value coercions etc.",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -10,7 +10,7 @@
10
10
  "type": "git",
11
11
  "url": "https://github.com/thi-ng/umbrella.git"
12
12
  },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/master/packages/args#readme",
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/args#readme",
14
14
  "funding": [
15
15
  {
16
16
  "type": "github",
@@ -21,7 +21,7 @@
21
21
  "url": "https://patreon.com/thing_umbrella"
22
22
  }
23
23
  ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
24
+ "author": "Karsten Schmidt (https://thi.ng)",
25
25
  "license": "Apache-2.0",
26
26
  "scripts": {
27
27
  "build": "yarn clean && tsc --declaration",
@@ -34,18 +34,18 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.5.0",
38
- "@thi.ng/checks": "^3.3.3",
39
- "@thi.ng/errors": "^2.2.4",
40
- "@thi.ng/strings": "^3.3.18"
37
+ "@thi.ng/api": "^8.6.0",
38
+ "@thi.ng/checks": "^3.3.5",
39
+ "@thi.ng/errors": "^2.2.6",
40
+ "@thi.ng/strings": "^3.3.20"
41
41
  },
42
42
  "devDependencies": {
43
- "@microsoft/api-extractor": "^7.33.5",
44
- "@thi.ng/testament": "^0.3.5",
43
+ "@microsoft/api-extractor": "^7.33.7",
44
+ "@thi.ng/testament": "^0.3.7",
45
45
  "rimraf": "^3.0.2",
46
46
  "tools": "^0.0.1",
47
- "typedoc": "^0.23.20",
48
- "typescript": "^4.8.4"
47
+ "typedoc": "^0.23.22",
48
+ "typescript": "^4.9.4"
49
49
  },
50
50
  "keywords": [
51
51
  "argument",
@@ -96,5 +96,5 @@
96
96
  "thi.ng": {
97
97
  "year": 2018
98
98
  },
99
- "gitHead": "75ec32ff7f1b7b5e72e7a04ace24732cd5d6c774\n"
99
+ "gitHead": "f445a9cc8022bcdebbf6ff91fd66ced016d72f01\n"
100
100
  }