@simbo/user-facing-error 1.0.2 → 2.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @simbo/user-facing-error
2
2
 
3
+ ## 2.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 2ded9ff: Require Node.js ^22.22.2 || ^24.15.0 || >=26.0.0 across all packages
8
+ to align with the runtime requirements of the updated dependencies. Node.js
9
+ 20, 21, 23 and 25, as well as earlier Node.js 22 and 24 releases, are no
10
+ longer supported. Upgrade to a supported Node.js version before updating these
11
+ packages.
12
+
13
+ ### Patch Changes
14
+
15
+ - 2ded9ff: Update documentation links from `simbo.codes` to `simbo.de`,
16
+ including the package READMEs and generated package list.
17
+ - 2ded9ff: Document the shared Node.js requirements and updated peer
18
+ dependencies. Correct API documentation links, installation and usage
19
+ examples, and repository development instructions. Clarify string count
20
+ conversion, literal replacements and import metadata fallbacks.
21
+ - Updated dependencies [2ded9ff]
22
+ - Updated dependencies [2ded9ff]
23
+ - Updated dependencies [2ded9ff]
24
+ - @simbo/stringify-error@2.0.0
25
+
3
26
  ## 1.0.2
4
27
 
5
28
  ### Patch Changes
package/README.md CHANGED
@@ -20,6 +20,10 @@ maintaining full compatibility with standard JavaScript `Error` behavior.
20
20
  - One dependency
21
21
  ([`@simbo/stringify-error`](https://npmjs.com/package/@simbo/stringify-error))
22
22
 
23
+ ## Requirements
24
+
25
+ Requires Node.js `^22.22.2 || ^24.15.0 || >=26.0.0`.
26
+
23
27
  ## Installation
24
28
 
25
29
  Install `@simbo/user-facing-error` from the npm registry:
@@ -31,7 +35,7 @@ npm i [-D] @simbo/user-facing-error
31
35
  ## Usage
32
36
 
33
37
  For a complete API reference, see the
34
- [documentation](https://simbo.codes/packages/modules/_simbo_user-facing-error/).
38
+ [documentation](https://simbo.de/packages/modules/_simbo_user-facing-error/).
35
39
 
36
40
  ### Examples
37
41
 
@@ -22,6 +22,7 @@ export class UserFacingError extends Error {
22
22
  * @param options - Optional hint or ErrorOptions.
23
23
  */
24
24
  constructor(message, options) {
25
+ // eslint-disable-next-line unicorn/custom-error-definition -- The public API also accepts a hint instead of ErrorOptions.
25
26
  super(message, typeof options === 'object' ? options : undefined);
26
27
  this.hint = this.#getHintValue(options);
27
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"user-facing-error.js","sourceRoot":"","sources":["../src/user-facing-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAIxD;;;;;;;;;;;;GAYG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACf,IAAI,GAAG,iBAAiB,CAAC;IAClC,IAAI,CAAO;IAE3B;;;;;OAKG;IACH,YAAmB,OAAe,EAAE,OAAqB;QACvD,KAAK,CAAC,OAAO,EAAE,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QAClE,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;OAQG;IACI,MAAM,CAAC,IAAI,CAAC,KAAc,EAAE,OAAe,EAAE,OAAqB;QACvE,MAAM,WAAW,GAAgB;YAC/B,GAAG,CAAC,OAAO,OAAO,KAAK,QAAQ,IAAK,OAAmB,KAAK,IAAI;gBAC9D,CAAC,CAAC,OAAO;gBACT,CAAC,CAAC;oBACE,IAAI,EAAE,OAAe;iBACtB,CAAC;YACN,KAAK,EAAE,KAAK;SACb,CAAC;QACF,OAAO,IAAI,eAAe,CAAC,GAAG,OAAO,KAAK,cAAc,CAAC,KAAK,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;IACnF,CAAC;IAED;;;;;OAKG;IACH,aAAa,CAAC,OAAqB;QACjC,OAAO,OAAO,KAAK,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ;YACpD,CA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AK,IAAI,IAAI,OAAO,OAAO,KAAK,QAAQ;YACpD,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,OAAO,OAAO,KAAK,QAAQ;gBACxB,OAAmB,KAAK,IAAI;gBAC7B,CAAC,OAAO,CAAC,IAAI,KAAK,IAAI,IAAI,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ,CAAC;gBAC7D,CAAC,CAAC,OAAO,CAAC,IAAI;gBACd,CAAC,CAAC,SAAS,CAAC;IAClB,CAAC;CACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@simbo/user-facing-error",
3
3
  "description": "A custom Error class for creating user-facing error messages with an optional hint to guide users toward resolving issues.",
4
- "version": "1.0.2",
4
+ "version": "2.0.0",
5
5
  "keywords": [
6
6
  "error",
7
7
  "error-handling",
@@ -18,10 +18,13 @@
18
18
  "author": "Simon Lepel <simbo@simbo.de> (https://simbo.de/)",
19
19
  "license": "MIT",
20
20
  "homepage": "http://github.com/simbo/packages/tree/main/packages/user-facing-error",
21
- "repository": "github:simbo/packages",
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "github:simbo/packages"
24
+ },
22
25
  "bugs": "https://github.com/simbo/packages/issues",
23
26
  "engines": {
24
- "node": ">=20"
27
+ "node": "^22.22.2 || ^24.15.0 || >=26.0.0"
25
28
  },
26
29
  "type": "module",
27
30
  "exports": {
@@ -34,29 +37,34 @@
34
37
  "README.md"
35
38
  ],
36
39
  "dependencies": {
37
- "@simbo/stringify-error": "1.0.2"
40
+ "@simbo/stringify-error": "2.0.0"
38
41
  },
39
42
  "devDependencies": {
40
- "@ianvs/prettier-plugin-sort-imports": "^4.6.2",
41
- "@types/node": "^20.19.11",
42
- "@vitest/coverage-v8": "^3.2.4",
43
- "@vitest/ui": "^3.2.4",
44
- "eslint": "^9.34.0",
45
- "jiti": "^2.5.1",
46
- "prettier": "^3.6.2",
47
- "prettier-plugin-organize-attributes": "^1.0.0",
48
- "typescript": "^5.9.2",
49
- "vitest": "^3.2.4",
50
- "@simbo/eslint-config": "1.0.3",
51
- "@simbo/prettier-config": "1.0.4",
52
- "@simbo/tsconfig": "1.0.4"
43
+ "@ianvs/prettier-plugin-sort-imports": "^4.7.1",
44
+ "@simbo/eslint-config": "3.0.0",
45
+ "@simbo/prettier-config": "3.0.0",
46
+ "@simbo/tsconfig": "2.0.0",
47
+ "@types/node": "^24.13.6",
48
+ "@vitest/coverage-v8": "^5.0.1",
49
+ "@vitest/ui": "^5.0.1",
50
+ "baseline-browser-mapping": "^2.11.25",
51
+ "eslint": "^10.11.0",
52
+ "jiti": "^2.7.0",
53
+ "prettier": "^3.9.8",
54
+ "typescript": "^6.0.3",
55
+ "vitest": "^5.0.1"
53
56
  },
54
57
  "scripts": {
55
58
  "build": "tsc --project tsconfig.build.json",
59
+ "check": "pnpm run check:eslint && pnpm run check:format && pnpm run check:types",
56
60
  "check:eslint": "eslint --config ./eslint.config.ts --max-warnings 0",
57
61
  "check:format": "prettier --check .",
58
62
  "check:types": "tsc --noEmit",
63
+ "clean": "pnpm run clean:dist && pnpm run clean:coverage && pnpm run clean:turbo && pnpm run clean:node_modules",
59
64
  "clean:dist": "rm -rf dist",
65
+ "clean:node_modules": "rm -rf node_modules",
66
+ "clean:turbo": "rm -rf .turbo",
67
+ "clean:coverage": "rm -rf coverage",
60
68
  "fix:eslint": "pnpm run check:eslint --fix",
61
69
  "fix:format": "prettier --write .",
62
70
  "test": "vitest run --coverage",