@thi.ng/errors 2.0.3 → 2.1.1

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,100 +1,124 @@
1
1
  # Change Log
2
2
 
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [2.0.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/errors@2.0.2...@thi.ng/errors@2.0.3) (2021-10-15)
7
-
8
- **Note:** Version bump only for package @thi.ng/errors
9
-
10
-
11
-
12
-
3
+ - **Last updated**: 2021-11-19T07:59:50Z
4
+ - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
13
5
 
14
- ## [2.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/errors@2.0.1...@thi.ng/errors@2.0.2) (2021-10-15)
15
-
16
- **Note:** Version bump only for package @thi.ng/errors
17
-
18
-
19
-
20
-
21
-
22
- ## [2.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/errors@2.0.0...@thi.ng/errors@2.0.1) (2021-10-13)
6
+ All notable changes to this project will be documented in this file.
7
+ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
23
8
 
24
- **Note:** Version bump only for package @thi.ng/errors
9
+ **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
+ and/or version bumps of transitive dependencies.
25
11
 
12
+ ## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/errors@2.1.0) (2021-11-17)
26
13
 
14
+ #### 🚀 Features
27
15
 
16
+ - Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
17
+ Improving the overall build ergonomics
18
+ - introduced a tools workspaces
19
+ - imported it in all needed packages/examples
20
+ - inclusive project root
28
21
 
22
+ #### ♻️ Refactoring
29
23
 
30
- # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/errors@1.3.4...@thi.ng/errors@2.0.0) (2021-10-12)
24
+ - testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
25
+ this commit reverts (partly) changes made in:
26
+ ef346d7a8753590dc9094108a3d861a8dbd5dd2c
27
+ overall purpose is better testament ergonomics:
28
+ instead of having to pass NODE_OPTIONS with every invocation
29
+ having a binary to handle this for us.
31
30
 
31
+ ### [2.0.4](https://github.com/thi-ng/umbrella/tree/@thi.ng/errors@2.0.4) (2021-10-25)
32
32
 
33
- ### Build System
33
+ #### 🩹 Bug fixes
34
34
 
35
- * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
35
+ - [#324](https://github.com/thi-ng/umbrella/issues/324) update snowpack issue workaround ([6dfbf71](https://github.com/thi-ng/umbrella/commit/6dfbf71))
36
+ - switch to another temp workaround until snowpack team
37
+ fixes snowpackjs/snowpack[#3621](https://github.com/thi-ng/umbrella/issues/3621)
36
38
 
39
+ ### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/errors@2.0.1) (2021-10-13)
37
40
 
38
- ### Features
41
+ #### ♻️ Refactoring
39
42
 
40
- * **errors:** add snowpack env var support for assert ([52822b1](https://github.com/thi-ng/umbrella/commit/52822b18160949a0a1eefa82e5e667cd0811cd89))
41
- * **errors:** migrate assert() from thi.ng/api ([7030a6a](https://github.com/thi-ng/umbrella/commit/7030a6aecd50367cbc08bccb13e05b3af41f4eca))
43
+ - update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
44
+ - update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
45
+ - add .js suffix for all relative imports
42
46
 
47
+ # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/errors@2.0.0) (2021-10-12)
43
48
 
44
- ### BREAKING CHANGES
49
+ #### 🛑 Breaking changes
45
50
 
46
- * discontinue CommonJS & UMD versions
51
+ - major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
52
+ - BREAKING CHANGE: discontinue CommonJS & UMD versions
53
+ - only ESM modules will be published from now on
54
+ - CJS obsolete due to ESM support in recent versions of node:
55
+ - i.e. launch NodeJS via:
56
+ - `node --experimental-specifier-resolution=node --experimental-repl-await`
57
+ - in the node REPL use `await import(...)` instead of `require()`
58
+ - UMD obsolete due to widespread browser support for ESM
59
+ Also:
60
+ - normalize/restructure/reorg all package.json files
61
+ - cleanup all build scripts, remove obsolete
62
+ - switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
47
63
 
48
- - only ESM modules will be published from now on
49
- - CJS obsolete due to ESM support in recent versions of node:
50
- - i.e. launch NodeJS via:
51
- - `node --experimental-specifier-resolution=node --experimental-repl-await`
52
- - in the node REPL use `await import(...)` instead of `require()`
53
- - UMD obsolete due to widespread browser support for ESM
64
+ #### 🚀 Features
54
65
 
55
- Also:
56
- - normalize/restructure/reorg all package.json files
57
- - cleanup all build scripts, remove obsolete
58
- - switch from mocha to @thi.ng/testament for all tests
66
+ - add snowpack env var support for assert ([52822b1](https://github.com/thi-ng/umbrella/commit/52822b1))
67
+ - migrate assert() from [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/main/packages/api) ([7030a6a](https://github.com/thi-ng/umbrella/commit/7030a6a))
68
+ - add existing assert() fn from api pkg
69
+ - add AssertionError class
70
+ - update pkg
59
71
 
72
+ #### ♻️ Refactoring
60
73
 
74
+ - set string as default generic ([936a9d7](https://github.com/thi-ng/umbrella/commit/936a9d7))
75
+ - update all test stubs ([f2d6d53](https://github.com/thi-ng/umbrella/commit/f2d6d53))
76
+ - update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
77
+ - update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
61
78
 
79
+ ## [1.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/errors@1.3.0) (2021-03-17)
62
80
 
81
+ #### 🚀 Features
63
82
 
83
+ - add ensureIndex2(), update outOfBounds() arg type ([ab007d6](https://github.com/thi-ng/umbrella/commit/ab007d6))
84
+ - add outOfBounds(), ensureIndex() ([fb5ca0a](https://github.com/thi-ng/umbrella/commit/fb5ca0a))
64
85
 
65
- # [1.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/errors@1.2.32...@thi.ng/errors@1.3.0) (2021-03-17)
86
+ ## [1.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/errors@1.2.0) (2019-08-21)
66
87
 
67
- ### Features
88
+ #### 🚀 Features
68
89
 
69
- - **errors:** add ensureIndex2(), update outOfBounds() arg type ([ab007d6](https://github.com/thi-ng/umbrella/commit/ab007d6b502c3d1650c7e9cf50da05f0ac042ef3))
70
- - **errors:** add outOfBounds(), ensureIndex() ([fb5ca0a](https://github.com/thi-ng/umbrella/commit/fb5ca0a7f8a4a6648d3c8485a9108e9154ee4400))
90
+ - add defError(), refactor all existing, update readme ([ded89c2](https://github.com/thi-ng/umbrella/commit/ded89c2))
71
91
 
72
- # [1.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/errors@1.1.2...@thi.ng/errors@1.2.0) (2019-08-21)
92
+ ## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/errors@1.1.0) (2019-07-07)
73
93
 
74
- ### Features
94
+ #### 🚀 Features
75
95
 
76
- - **errors:** add defError(), refactor all existing, update readme ([ded89c2](https://github.com/thi-ng/umbrella/commit/ded89c2))
96
+ - enable TS strict compiler flags (refactor) ([8460aea](https://github.com/thi-ng/umbrella/commit/8460aea))
77
97
 
78
- # [1.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/errors@1.0.6...@thi.ng/errors@1.1.0) (2019-07-07)
98
+ # [1.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/errors@1.0.0) (2019-01-21)
79
99
 
80
- ### Features
100
+ #### 🛑 Breaking changes
81
101
 
82
- - **errors:** enable TS strict compiler flags (refactor) ([8460aea](https://github.com/thi-ng/umbrella/commit/8460aea))
102
+ - update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
103
+ - BREAKING CHANGE: enabled multi-outputs (ES6 modules, CJS, UMD)
104
+ - build scripts now first build ES6 modules in package root, then call
105
+ `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
106
+ - all imports MUST be updated to only refer to package level
107
+ (not individual files anymore). tree shaking in user land will get rid of
108
+ all unused imported symbols.
83
109
 
84
- # [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/errors@0.1.12...@thi.ng/errors@1.0.0) (2019-01-21)
110
+ #### ♻️ Refactoring
85
111
 
86
- ### Build System
112
+ - use arrow fns ([d9f4bd3](https://github.com/thi-ng/umbrella/commit/d9f4bd3))
87
113
 
88
- - update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
114
+ ### [0.1.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/errors@0.1.1) (2018-05-10)
89
115
 
90
- ### BREAKING CHANGES
116
+ #### ♻️ Refactoring
91
117
 
92
- - enabled multi-outputs (ES6 modules, CJS, UMD)
93
- - build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
94
- - all imports MUST be updated to only refer to package level (not individual files anymore). tree shaking in user land will get rid of all unused imported symbols.
118
+ - update return types (`never`) ([5227dd1](https://github.com/thi-ng/umbrella/commit/5227dd1))
95
119
 
96
- # 0.1.0 (2018-05-10)
120
+ ## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/errors@0.1.0) (2018-05-10)
97
121
 
98
- ### Features
122
+ #### 🚀 Features
99
123
 
100
- - **errors:** add new package [@thi](https://github.com/thi).ng/errors ([1e97856](https://github.com/thi-ng/umbrella/commit/1e97856))
124
+ - add new package [@thi.ng/errors](https://github.com/thi-ng/umbrella/tree/main/packages/errors) ([1e97856](https://github.com/thi-ng/umbrella/commit/1e97856))
package/README.md CHANGED
@@ -63,7 +63,7 @@ node --experimental-repl-await
63
63
  > const errors = await import("@thi.ng/errors");
64
64
  ```
65
65
 
66
- Package sizes (gzipped, pre-treeshake): ESM: 538 bytes
66
+ Package sizes (gzipped, pre-treeshake): ESM: 554 bytes
67
67
 
68
68
  ## Dependencies
69
69
 
package/assert.js CHANGED
@@ -1,6 +1,4 @@
1
1
  import { defError } from "./deferror.js";
2
- // FIXME https://github.com/snowpackjs/snowpack/issues/3621#issuecomment-907731004
3
- import.meta.hot;
4
2
  export const AssertionError = defError(() => "Assertion failed");
5
3
  /**
6
4
  * Takes a `test` result or predicate function without args and throws
package/package.json CHANGED
@@ -1,88 +1,94 @@
1
1
  {
2
- "name": "@thi.ng/errors",
3
- "version": "2.0.3",
4
- "description": "Custom error types and error factory functions",
5
- "type": "module",
6
- "module": "./index.js",
7
- "typings": "./index.d.ts",
8
- "sideEffects": false,
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thi-ng/umbrella.git"
2
+ "name": "@thi.ng/errors",
3
+ "version": "2.1.1",
4
+ "description": "Custom error types and error factory functions",
5
+ "type": "module",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thi-ng/umbrella.git"
12
+ },
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/errors#readme",
14
+ "funding": [
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/postspectacular"
12
18
  },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/errors#readme",
14
- "funding": [
15
- {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/postspectacular"
18
- },
19
- {
20
- "type": "patreon",
21
- "url": "https://patreon.com/thing_umbrella"
22
- }
23
- ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
25
- "license": "Apache-2.0",
26
- "scripts": {
27
- "build": "yarn clean && tsc --declaration",
28
- "clean": "rimraf *.js *.d.ts *.map doc",
29
- "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
- "doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
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"
19
+ {
20
+ "type": "patreon",
21
+ "url": "https://patreon.com/thing_umbrella"
22
+ }
23
+ ],
24
+ "author": "Karsten Schmidt <k+npm@thi.ng>",
25
+ "license": "Apache-2.0",
26
+ "scripts": {
27
+ "build": "yarn clean && tsc --declaration",
28
+ "clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
29
+ "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
+ "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
+ "doc:readme": "yarn doc:stats && tools:readme",
32
+ "doc:stats": "tools:module-stats",
33
+ "pub": "yarn npm publish --access public",
34
+ "test": "testament test"
35
+ },
36
+ "devDependencies": {
37
+ "@microsoft/api-extractor": "^7.18.19",
38
+ "@thi.ng/testament": "^0.2.1",
39
+ "@types/node": "^16.11.7",
40
+ "rimraf": "^3.0.2",
41
+ "tools": "^0.0.1",
42
+ "typedoc": "^0.22.9",
43
+ "typescript": "^4.5.2"
44
+ },
45
+ "keywords": [
46
+ "assert",
47
+ "error",
48
+ "typescript"
49
+ ],
50
+ "publishConfig": {
51
+ "access": "public"
52
+ },
53
+ "browser": {
54
+ "process": false,
55
+ "setTimeout": false
56
+ },
57
+ "engines": {
58
+ "node": ">=12.7"
59
+ },
60
+ "files": [
61
+ "*.js",
62
+ "*.d.ts"
63
+ ],
64
+ "exports": {
65
+ ".": {
66
+ "import": "./index.js"
35
67
  },
36
- "devDependencies": {
37
- "@thi.ng/testament": "^0.1.3"
68
+ "./assert": {
69
+ "import": "./assert.js"
38
70
  },
39
- "keywords": [
40
- "assert",
41
- "error",
42
- "typescript"
43
- ],
44
- "publishConfig": {
45
- "access": "public"
71
+ "./deferror": {
72
+ "import": "./deferror.js"
46
73
  },
47
- "browser": {
48
- "process": false,
49
- "setTimeout": false
74
+ "./illegal-arguments": {
75
+ "import": "./illegal-arguments.js"
50
76
  },
51
- "engines": {
52
- "node": ">=12.7"
77
+ "./illegal-arity": {
78
+ "import": "./illegal-arity.js"
53
79
  },
54
- "files": [
55
- "*.js",
56
- "*.d.ts"
57
- ],
58
- "exports": {
59
- ".": {
60
- "import": "./index.js"
61
- },
62
- "./assert": {
63
- "import": "./assert.js"
64
- },
65
- "./deferror": {
66
- "import": "./deferror.js"
67
- },
68
- "./illegal-arguments": {
69
- "import": "./illegal-arguments.js"
70
- },
71
- "./illegal-arity": {
72
- "import": "./illegal-arity.js"
73
- },
74
- "./illegal-state": {
75
- "import": "./illegal-state.js"
76
- },
77
- "./out-of-bounds": {
78
- "import": "./out-of-bounds.js"
79
- },
80
- "./unsupported": {
81
- "import": "./unsupported.js"
82
- }
80
+ "./illegal-state": {
81
+ "import": "./illegal-state.js"
83
82
  },
84
- "thi.ng": {
85
- "year": 2018
83
+ "./out-of-bounds": {
84
+ "import": "./out-of-bounds.js"
86
85
  },
87
- "gitHead": "1fb38cac74d6c009d96855c28784a267a81badf1"
88
- }
86
+ "./unsupported": {
87
+ "import": "./unsupported.js"
88
+ }
89
+ },
90
+ "thi.ng": {
91
+ "year": 2018
92
+ },
93
+ "gitHead": "8bd27c8bde0b770e7c001943f11c951cd345d668\n"
94
+ }