@thi.ng/api 7.2.0 → 8.0.0

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 (99) hide show
  1. package/CHANGELOG.md +179 -198
  2. package/README.md +15 -25
  3. package/{constants.d.ts → api.d.ts} +1 -1
  4. package/{constants.js → api.js} +0 -0
  5. package/{api/assoc.d.ts → assoc.d.ts} +0 -0
  6. package/{api/assoc.js → assoc.js} +0 -0
  7. package/{api/bind.d.ts → bind.d.ts} +0 -0
  8. package/{api/bind.js → bind.js} +0 -0
  9. package/{api/buffered.d.ts → buffered.d.ts} +0 -0
  10. package/{api/buffered.js → buffered.js} +0 -0
  11. package/{api/clear.d.ts → clear.d.ts} +0 -0
  12. package/{api/clear.js → clear.js} +0 -0
  13. package/{api/compare.d.ts → compare.d.ts} +0 -0
  14. package/{api/compare.js → compare.js} +0 -0
  15. package/{api/contains.d.ts → contains.d.ts} +0 -0
  16. package/{api/contains.js → contains.js} +0 -0
  17. package/{api/copy.d.ts → copy.d.ts} +0 -0
  18. package/{api/copy.js → copy.js} +0 -0
  19. package/decorators/deprecated.js +3 -2
  20. package/{api/deref.d.ts → deref.d.ts} +0 -0
  21. package/{api/deref.js → deref.js} +0 -0
  22. package/{api/dissoc.d.ts → dissoc.d.ts} +0 -0
  23. package/{api/dissoc.js → dissoc.js} +0 -0
  24. package/{api/empty.d.ts → empty.d.ts} +0 -0
  25. package/{api/empty.js → empty.js} +0 -0
  26. package/{api/enable.d.ts → enable.d.ts} +0 -0
  27. package/{api/enable.js → enable.js} +0 -0
  28. package/{api/equiv.d.ts → equiv.d.ts} +0 -0
  29. package/{api/equiv.js → equiv.js} +0 -0
  30. package/{api/event.d.ts → event.d.ts} +0 -0
  31. package/{api/event.js → event.js} +0 -0
  32. package/{api/fn.d.ts → fn.d.ts} +0 -0
  33. package/{api/fn.js → fn.js} +0 -0
  34. package/{api/get.d.ts → get.d.ts} +0 -0
  35. package/{api/get.js → get.js} +0 -0
  36. package/{api/hash.d.ts → hash.d.ts} +0 -0
  37. package/{api/hash.js → hash.js} +0 -0
  38. package/{api/hiccup.d.ts → hiccup.d.ts} +0 -0
  39. package/{api/hiccup.js → hiccup.js} +0 -0
  40. package/{api/id.d.ts → id.d.ts} +0 -0
  41. package/{api/id.js → id.js} +0 -0
  42. package/index.d.ts +39 -43
  43. package/index.js +39 -43
  44. package/{api/indexed.d.ts → indexed.d.ts} +0 -0
  45. package/{api/indexed.js → indexed.js} +0 -0
  46. package/{api/into.d.ts → into.d.ts} +0 -0
  47. package/{api/into.js → into.js} +0 -0
  48. package/{api/keyval.d.ts → keyval.d.ts} +0 -0
  49. package/{api/keyval.js → keyval.js} +0 -0
  50. package/{api/length.d.ts → length.d.ts} +0 -0
  51. package/{api/length.js → length.js} +0 -0
  52. package/{api/meta.d.ts → meta.d.ts} +0 -0
  53. package/{api/meta.js → meta.js} +0 -0
  54. package/mixins/ienable.js +1 -1
  55. package/mixins/inotify.d.ts +1 -1
  56. package/mixins/inotify.js +1 -1
  57. package/{api/null.d.ts → null.d.ts} +0 -0
  58. package/{api/null.js → null.js} +0 -0
  59. package/{api/object.d.ts → object.d.ts} +0 -0
  60. package/{api/object.js → object.js} +0 -0
  61. package/package.json +169 -24
  62. package/{api/path.d.ts → path.d.ts} +0 -0
  63. package/{api/path.js → path.js} +0 -0
  64. package/{api/predicate.d.ts → predicate.d.ts} +0 -0
  65. package/{api/predicate.js → predicate.js} +0 -0
  66. package/{api/prim.d.ts → prim.d.ts} +0 -0
  67. package/{api/prim.js → prim.js} +0 -0
  68. package/{api/range.d.ts → range.d.ts} +0 -0
  69. package/{api/range.js → range.js} +0 -0
  70. package/{api/release.d.ts → release.d.ts} +0 -0
  71. package/{api/release.js → release.js} +0 -0
  72. package/{api/reset.d.ts → reset.d.ts} +0 -0
  73. package/{api/reset.js → reset.js} +0 -0
  74. package/{api/select.d.ts → select.d.ts} +0 -0
  75. package/{api/select.js → select.js} +0 -0
  76. package/{api/seq.d.ts → seq.d.ts} +0 -0
  77. package/{api/seq.js → seq.js} +0 -0
  78. package/{api/set.d.ts → set.d.ts} +0 -0
  79. package/{api/set.js → set.js} +0 -0
  80. package/{api/stack.d.ts → stack.d.ts} +0 -0
  81. package/{api/stack.js → stack.js} +0 -0
  82. package/{api/tuple.d.ts → tuple.d.ts} +0 -0
  83. package/{api/tuple.js → tuple.js} +0 -0
  84. package/{api/typedarray.d.ts → typedarray.d.ts} +0 -0
  85. package/{api/typedarray.js → typedarray.js} +5 -1
  86. package/{api/watch.d.ts → watch.d.ts} +0 -0
  87. package/{api/watch.js → watch.js} +0 -0
  88. package/api/logger.d.ts +0 -21
  89. package/api/logger.js +0 -9
  90. package/assert.d.ts +0 -11
  91. package/assert.js +0 -23
  92. package/expose.d.ts +0 -11
  93. package/expose.js +0 -28
  94. package/lib/index.js +0 -382
  95. package/lib/index.js.map +0 -1
  96. package/lib/index.umd.js +0 -1
  97. package/lib/index.umd.js.map +0 -1
  98. package/logger.d.ts +0 -15
  99. package/logger.js +0 -33
@@ -15,4 +15,4 @@ export declare const NO_OP: () => void;
15
15
  export declare const EVENT_ALL = "*";
16
16
  export declare const EVENT_ENABLE = "enable";
17
17
  export declare const EVENT_DISABLE = "disable";
18
- //# sourceMappingURL=constants.d.ts.map
18
+ //# sourceMappingURL=api.d.ts.map
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,4 +1,3 @@
1
- import { assert } from "../assert";
2
1
  /**
3
2
  * Method property decorator factory. Augments original method with
4
3
  * deprecation message (via console), shown when method is invoked.
@@ -10,7 +9,9 @@ import { assert } from "../assert";
10
9
  export const deprecated = (msg, log = console.log) => function (target, prop, descriptor) {
11
10
  const signature = `${target.constructor.name}#${prop.toString()}`;
12
11
  const fn = descriptor.value;
13
- assert(typeof fn === "function", `${signature} is not a function`);
12
+ if (typeof fn !== "function") {
13
+ throw new Error(`${signature} is not a function`);
14
+ }
14
15
  descriptor.value = function () {
15
16
  log(`DEPRECATED ${signature}: ${msg || "will be removed soon"}`);
16
17
  return fn.apply(this, arguments);
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/index.d.ts CHANGED
@@ -1,46 +1,42 @@
1
- export * from "./api/assoc";
2
- export * from "./api/bind";
3
- export * from "./api/buffered";
4
- export * from "./api/clear";
5
- export * from "./api/compare";
6
- export * from "./api/contains";
7
- export * from "./api/copy";
8
- export * from "./api/deref";
9
- export * from "./api/dissoc";
10
- export * from "./api/empty";
11
- export * from "./api/enable";
12
- export * from "./api/equiv";
13
- export * from "./api/event";
14
- export * from "./api/fn";
15
- export * from "./api/get";
16
- export * from "./api/hash";
17
- export * from "./api/hiccup";
18
- export * from "./api/id";
19
- export * from "./api/indexed";
20
- export * from "./api/into";
21
- export * from "./api/keyval";
22
- export * from "./api/length";
23
- export * from "./api/logger";
24
- export * from "./api/meta";
25
- export * from "./api/null";
26
- export * from "./api/object";
27
- export * from "./api/path";
28
- export * from "./api/predicate";
29
- export * from "./api/prim";
30
- export * from "./api/range";
31
- export * from "./api/release";
32
- export * from "./api/reset";
33
- export * from "./api/select";
34
- export * from "./api/seq";
35
- export * from "./api/set";
36
- export * from "./api/stack";
37
- export * from "./api/tuple";
38
- export * from "./api/typedarray";
39
- export * from "./api/watch";
40
- export * from "./assert";
41
- export * from "./constants";
42
- export * from "./expose";
43
- export * from "./logger";
1
+ export * from "./assoc";
2
+ export * from "./bind";
3
+ export * from "./buffered";
4
+ export * from "./clear";
5
+ export * from "./compare";
6
+ export * from "./contains";
7
+ export * from "./copy";
8
+ export * from "./deref";
9
+ export * from "./dissoc";
10
+ export * from "./empty";
11
+ export * from "./enable";
12
+ export * from "./equiv";
13
+ export * from "./event";
14
+ export * from "./fn";
15
+ export * from "./get";
16
+ export * from "./hash";
17
+ export * from "./hiccup";
18
+ export * from "./id";
19
+ export * from "./indexed";
20
+ export * from "./into";
21
+ export * from "./keyval";
22
+ export * from "./length";
23
+ export * from "./meta";
24
+ export * from "./null";
25
+ export * from "./object";
26
+ export * from "./path";
27
+ export * from "./predicate";
28
+ export * from "./prim";
29
+ export * from "./range";
30
+ export * from "./release";
31
+ export * from "./reset";
32
+ export * from "./select";
33
+ export * from "./seq";
34
+ export * from "./set";
35
+ export * from "./stack";
36
+ export * from "./tuple";
37
+ export * from "./typedarray";
38
+ export * from "./watch";
39
+ export * from "./api";
44
40
  export * from "./mixin";
45
41
  export * from "./decorators/configurable";
46
42
  export * from "./decorators/deprecated";
package/index.js CHANGED
@@ -1,46 +1,42 @@
1
- export * from "./api/assoc";
2
- export * from "./api/bind";
3
- export * from "./api/buffered";
4
- export * from "./api/clear";
5
- export * from "./api/compare";
6
- export * from "./api/contains";
7
- export * from "./api/copy";
8
- export * from "./api/deref";
9
- export * from "./api/dissoc";
10
- export * from "./api/empty";
11
- export * from "./api/enable";
12
- export * from "./api/equiv";
13
- export * from "./api/event";
14
- export * from "./api/fn";
15
- export * from "./api/get";
16
- export * from "./api/hash";
17
- export * from "./api/hiccup";
18
- export * from "./api/id";
19
- export * from "./api/indexed";
20
- export * from "./api/into";
21
- export * from "./api/keyval";
22
- export * from "./api/length";
23
- export * from "./api/logger";
24
- export * from "./api/meta";
25
- export * from "./api/null";
26
- export * from "./api/object";
27
- export * from "./api/path";
28
- export * from "./api/predicate";
29
- export * from "./api/prim";
30
- export * from "./api/range";
31
- export * from "./api/release";
32
- export * from "./api/reset";
33
- export * from "./api/select";
34
- export * from "./api/seq";
35
- export * from "./api/set";
36
- export * from "./api/stack";
37
- export * from "./api/tuple";
38
- export * from "./api/typedarray";
39
- export * from "./api/watch";
40
- export * from "./assert";
41
- export * from "./constants";
42
- export * from "./expose";
43
- export * from "./logger";
1
+ export * from "./assoc";
2
+ export * from "./bind";
3
+ export * from "./buffered";
4
+ export * from "./clear";
5
+ export * from "./compare";
6
+ export * from "./contains";
7
+ export * from "./copy";
8
+ export * from "./deref";
9
+ export * from "./dissoc";
10
+ export * from "./empty";
11
+ export * from "./enable";
12
+ export * from "./equiv";
13
+ export * from "./event";
14
+ export * from "./fn";
15
+ export * from "./get";
16
+ export * from "./hash";
17
+ export * from "./hiccup";
18
+ export * from "./id";
19
+ export * from "./indexed";
20
+ export * from "./into";
21
+ export * from "./keyval";
22
+ export * from "./length";
23
+ export * from "./meta";
24
+ export * from "./null";
25
+ export * from "./object";
26
+ export * from "./path";
27
+ export * from "./predicate";
28
+ export * from "./prim";
29
+ export * from "./range";
30
+ export * from "./release";
31
+ export * from "./reset";
32
+ export * from "./select";
33
+ export * from "./seq";
34
+ export * from "./set";
35
+ export * from "./stack";
36
+ export * from "./tuple";
37
+ export * from "./typedarray";
38
+ export * from "./watch";
39
+ export * from "./api";
44
40
  export * from "./mixin";
45
41
  export * from "./decorators/configurable";
46
42
  export * from "./decorators/deprecated";
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/mixins/ienable.js CHANGED
@@ -1,4 +1,4 @@
1
- import { EVENT_DISABLE, EVENT_ENABLE } from "../constants";
1
+ import { EVENT_DISABLE, EVENT_ENABLE } from "../api";
2
2
  import { mixin } from "../mixin";
3
3
  /**
4
4
  * Mixin class decorator, injects IEnable default implementation, incl.
@@ -1,4 +1,4 @@
1
- import type { Event } from "../api/event";
1
+ import type { Event } from "../event";
2
2
  export declare const inotify_dispatch: (listeners: any[][], e: Event) => void;
3
3
  /**
4
4
  * Mixin class decorator, injects INotify default implementation, incl.
package/mixins/inotify.js CHANGED
@@ -1,4 +1,4 @@
1
- import { EVENT_ALL } from "../constants";
1
+ import { EVENT_ALL } from "../api";
2
2
  import { mixin } from "../mixin";
3
3
  export const inotify_dispatch = (listeners, e) => {
4
4
  if (!listeners)
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@thi.ng/api",
3
- "version": "7.2.0",
3
+ "version": "8.0.0",
4
4
  "description": "Common, generic types, interfaces & mixins",
5
+ "type": "module",
5
6
  "module": "./index.js",
6
- "main": "./lib/index.js",
7
- "umd:main": "./lib/index.umd.js",
8
7
  "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "https://github.com/thi-ng/umbrella.git"
@@ -24,27 +24,18 @@
24
24
  "author": "Karsten Schmidt <k+npm@thi.ng>",
25
25
  "license": "Apache-2.0",
26
26
  "scripts": {
27
- "build": "yarn clean && yarn build:es6 && node ../../scripts/bundle-module",
28
- "build:release": "yarn clean && yarn build:es6 && node ../../scripts/bundle-module all",
29
- "build:es6": "tsc --declaration",
30
- "build:test": "rimraf build && tsc -p test/tsconfig.json",
31
- "build:check": "tsc --isolatedModules --noEmit",
32
- "test": "mocha test",
33
- "cover": "nyc mocha test && nyc report --reporter=lcov",
34
- "clean": "rimraf *.js *.d.ts *.map .nyc_output build coverage doc lib api decorators mixins",
35
- "doc:readme": "ts-node -P ../../tools/tsconfig.json ../../tools/src/readme.ts",
36
- "doc": "typedoc --excludePrivate --out doc --theme ../../tools/doc/typedoc-theme src/index.ts",
27
+ "build": "yarn clean && tsc --declaration",
28
+ "clean": "rimraf *.js *.d.ts *.map doc api decorators mixins",
29
+ "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
37
30
  "doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
38
- "pub": "yarn build:release && yarn publish --access public"
31
+ "doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
32
+ "doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
33
+ "pub": "yarn build && yarn publish --access public",
34
+ "test": "testament test"
35
+ },
36
+ "devDependencies": {
37
+ "@thi.ng/testament": "^0.1.0"
39
38
  },
40
- "files": [
41
- "*.js",
42
- "*.d.ts",
43
- "lib",
44
- "api",
45
- "decorators",
46
- "mixins"
47
- ],
48
39
  "keywords": [
49
40
  "assert",
50
41
  "constants",
@@ -62,6 +53,160 @@
62
53
  "process": false,
63
54
  "setTimeout": false
64
55
  },
65
- "sideEffects": false,
66
- "gitHead": "d971cb3f9b215a95483f78f1a8614015e331146f"
56
+ "files": [
57
+ "*.js",
58
+ "*.d.ts",
59
+ "decorators",
60
+ "mixins"
61
+ ],
62
+ "exports": {
63
+ ".": {
64
+ "import": "./index.js"
65
+ },
66
+ "./api": {
67
+ "import": "./api.js"
68
+ },
69
+ "./assoc": {
70
+ "import": "./assoc.js"
71
+ },
72
+ "./bind": {
73
+ "import": "./bind.js"
74
+ },
75
+ "./buffered": {
76
+ "import": "./buffered.js"
77
+ },
78
+ "./clear": {
79
+ "import": "./clear.js"
80
+ },
81
+ "./compare": {
82
+ "import": "./compare.js"
83
+ },
84
+ "./contains": {
85
+ "import": "./contains.js"
86
+ },
87
+ "./copy": {
88
+ "import": "./copy.js"
89
+ },
90
+ "./decorators/configurable": {
91
+ "import": "./decorators/configurable.js"
92
+ },
93
+ "./decorators/deprecated": {
94
+ "import": "./decorators/deprecated.js"
95
+ },
96
+ "./decorators/nomixin": {
97
+ "import": "./decorators/nomixin.js"
98
+ },
99
+ "./decorators/sealed": {
100
+ "import": "./decorators/sealed.js"
101
+ },
102
+ "./deref": {
103
+ "import": "./deref.js"
104
+ },
105
+ "./dissoc": {
106
+ "import": "./dissoc.js"
107
+ },
108
+ "./empty": {
109
+ "import": "./empty.js"
110
+ },
111
+ "./enable": {
112
+ "import": "./enable.js"
113
+ },
114
+ "./equiv": {
115
+ "import": "./equiv.js"
116
+ },
117
+ "./event": {
118
+ "import": "./event.js"
119
+ },
120
+ "./fn": {
121
+ "import": "./fn.js"
122
+ },
123
+ "./get": {
124
+ "import": "./get.js"
125
+ },
126
+ "./hash": {
127
+ "import": "./hash.js"
128
+ },
129
+ "./hiccup": {
130
+ "import": "./hiccup.js"
131
+ },
132
+ "./id": {
133
+ "import": "./id.js"
134
+ },
135
+ "./indexed": {
136
+ "import": "./indexed.js"
137
+ },
138
+ "./into": {
139
+ "import": "./into.js"
140
+ },
141
+ "./keyval": {
142
+ "import": "./keyval.js"
143
+ },
144
+ "./length": {
145
+ "import": "./length.js"
146
+ },
147
+ "./meta": {
148
+ "import": "./meta.js"
149
+ },
150
+ "./mixin": {
151
+ "import": "./mixin.js"
152
+ },
153
+ "./mixins/ienable": {
154
+ "import": "./mixins/ienable.js"
155
+ },
156
+ "./mixins/inotify": {
157
+ "import": "./mixins/inotify.js"
158
+ },
159
+ "./mixins/iterable": {
160
+ "import": "./mixins/iterable.js"
161
+ },
162
+ "./mixins/iwatch": {
163
+ "import": "./mixins/iwatch.js"
164
+ },
165
+ "./null": {
166
+ "import": "./null.js"
167
+ },
168
+ "./object": {
169
+ "import": "./object.js"
170
+ },
171
+ "./path": {
172
+ "import": "./path.js"
173
+ },
174
+ "./predicate": {
175
+ "import": "./predicate.js"
176
+ },
177
+ "./prim": {
178
+ "import": "./prim.js"
179
+ },
180
+ "./range": {
181
+ "import": "./range.js"
182
+ },
183
+ "./release": {
184
+ "import": "./release.js"
185
+ },
186
+ "./reset": {
187
+ "import": "./reset.js"
188
+ },
189
+ "./select": {
190
+ "import": "./select.js"
191
+ },
192
+ "./seq": {
193
+ "import": "./seq.js"
194
+ },
195
+ "./set": {
196
+ "import": "./set.js"
197
+ },
198
+ "./stack": {
199
+ "import": "./stack.js"
200
+ },
201
+ "./tuple": {
202
+ "import": "./tuple.js"
203
+ },
204
+ "./typedarray": {
205
+ "import": "./typedarray.js"
206
+ },
207
+ "./watch": {
208
+ "import": "./watch.js"
209
+ }
210
+ },
211
+ "gitHead": "9ac1344b38b565eb894306fbf72233b6c0b2d115"
67
212
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -75,7 +75,11 @@ export const UINT_ARRAY_CTORS = {
75
75
  u16: Uint16Array,
76
76
  u32: Uint32Array,
77
77
  };
78
- export const TYPEDARRAY_CTORS = Object.assign(Object.assign(Object.assign({}, FLOAT_ARRAY_CTORS), INT_ARRAY_CTORS), UINT_ARRAY_CTORS);
78
+ export const TYPEDARRAY_CTORS = {
79
+ ...FLOAT_ARRAY_CTORS,
80
+ ...INT_ARRAY_CTORS,
81
+ ...UINT_ARRAY_CTORS,
82
+ };
79
83
  /**
80
84
  * Returns canonical {@link Type} value of `type` by first
81
85
  * attempting to resolve it as {@link GLType} enum.
File without changes