@battis/typescript-tricks 0.7.1 → 0.7.2

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,11 @@
1
1
  # @battis/typescript-tricks
2
2
 
3
+ ## 0.7.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 66ec81d: CoerceError without losing stack
8
+
3
9
  ## 0.7.1
4
10
 
5
11
  ### Patch Changes
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Coerce = Coerce;
4
- function FailedCoercion(u) {
4
+ function FailedCoercion() {
5
5
  throw new TypeError('Attempted coercion to a non-matching type');
6
6
  }
7
7
  function Coerce(u, isT, toT = (FailedCoercion)) {
@@ -12,5 +12,5 @@ function isError(error) {
12
12
  typeof error.message === 'string');
13
13
  }
14
14
  function CoerceError(error) {
15
- return (0, Coerce_js_1.Coerce)(error, isError, (e) => new Error(String(e)));
15
+ return (0, Coerce_js_1.Coerce)(error, isError, (e) => e);
16
16
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@battis/typescript-tricks",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "A handful of useful types and operators",
5
- "homepage": "https://github.com/battis/typescript-config/tree/main/packages/tricks#readme",
5
+ "homepage": "https://github.com/battis/typescript-config/tree/main/packages/typescript-tricks#readme",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "https://github.com/battis/typescript-config.git",
9
- "directory": "packages/tricks"
9
+ "directory": "packages/typescript-tricks"
10
10
  },
11
11
  "license": "GPL-3.0",
12
12
  "author": {