assertron 9.2.1 → 9.2.4

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.
@@ -1,2 +1,2 @@
1
- export declare function rejects(promise: Promise<any>): Promise<any>;
1
+ export declare function rejects<R = any>(promise: Promise<any>): Promise<R>;
2
2
  //# sourceMappingURL=rejects.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rejects.d.ts","sourceRoot":"","sources":["../../ts/assertron/rejects.ts"],"names":[],"mappings":"AAGA,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,gBAK5C"}
1
+ {"version":3,"file":"rejects.d.ts","sourceRoot":"","sources":["../../ts/assertron/rejects.ts"],"names":[],"mappings":"AAGA,wBAAgB,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAKlE"}
@@ -1 +1 @@
1
- {"version":3,"file":"rejects.js","sourceRoot":"","sources":["../../ts/assertron/rejects.ts"],"names":[],"mappings":";;;AAAA,0CAA6C;AAC7C,8CAAsD;AAEtD,SAAgB,OAAO,CAAC,OAAqB;IAC3C,OAAO,OAAO,CAAC,IAAI,CACjB,UAAA,KAAK,IAAM,MAAM,IAAI,0BAAc,CAAC,IAAA,6BAAkB,EAAC,KAAK,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAA,CAAC,CAAC,EAClF,UAAA,GAAG,IAAI,OAAA,GAAG,EAAH,CAAG,CACX,CAAA;AACH,CAAC;AALD,0BAKC"}
1
+ {"version":3,"file":"rejects.js","sourceRoot":"","sources":["../../ts/assertron/rejects.ts"],"names":[],"mappings":";;;AAAA,0CAA6C;AAC7C,8CAAsD;AAEtD,SAAgB,OAAO,CAAU,OAAqB;IACpD,OAAO,OAAO,CAAC,IAAI,CACjB,UAAA,KAAK,IAAM,MAAM,IAAI,0BAAc,CAAC,IAAA,6BAAkB,EAAC,KAAK,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAA,CAAC,CAAC,EAClF,UAAA,GAAG,IAAI,OAAA,GAAG,EAAH,CAAG,CACX,CAAA;AACH,CAAC;AALD,0BAKC"}
@@ -1,2 +1,2 @@
1
- export declare function rejects(promise: Promise<any>): Promise<any>;
1
+ export declare function rejects<R = any>(promise: Promise<any>): Promise<R>;
2
2
  //# sourceMappingURL=rejects.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rejects.d.ts","sourceRoot":"","sources":["../../ts/assertron/rejects.ts"],"names":[],"mappings":"AAGA,wBAAgB,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,gBAK5C"}
1
+ {"version":3,"file":"rejects.d.ts","sourceRoot":"","sources":["../../ts/assertron/rejects.ts"],"names":[],"mappings":"AAGA,wBAAgB,OAAO,CAAC,CAAC,GAAG,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAKlE"}
@@ -1 +1 @@
1
- {"version":3,"file":"rejects.js","sourceRoot":"","sources":["../../ts/assertron/rejects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD,MAAM,UAAU,OAAO,CAAC,OAAqB;IAC3C,OAAO,OAAO,CAAC,IAAI,CACjB,KAAK,CAAC,EAAE,GAAG,MAAM,IAAI,cAAc,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAA,CAAC,CAAC,EAClF,GAAG,CAAC,EAAE,CAAC,GAAG,CACX,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"rejects.js","sourceRoot":"","sources":["../../ts/assertron/rejects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAEtD,MAAM,UAAU,OAAO,CAAU,OAAqB;IACpD,OAAO,OAAO,CAAC,IAAI,CACjB,KAAK,CAAC,EAAE,GAAG,MAAM,IAAI,cAAc,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,CAAA,CAAC,CAAC,EAClF,GAAG,CAAC,EAAE,CAAC,GAAG,CACX,CAAA;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "assertron",
3
- "version": "9.2.1",
3
+ "version": "9.2.4",
4
4
  "description": "A supplementary assertion library",
5
5
  "homepage": "https://github.com/unional/assertron",
6
6
  "bugs": {
@@ -33,9 +33,10 @@
33
33
  "!ts/**/*.spec.ts"
34
34
  ],
35
35
  "scripts": {
36
- "build": "run-p build:cjs build:esm",
36
+ "build": "run-p build:cjs build:esm build:tslib",
37
37
  "build:cjs": "tsc -p tsconfig.cjs.json",
38
38
  "build:esm": "tsc -p tsconfig.esm.json",
39
+ "build:tslib": "tsc -p tsconfig.tslib.json",
39
40
  "build:watch": "tsc --watch",
40
41
  "clean": "rimraf cjs esm coverage lib libm",
41
42
  "coverage": "jest --coverage",
@@ -48,37 +49,37 @@
48
49
  "size": "size-limit",
49
50
  "test": "jest",
50
51
  "test:watch": "jest --watch",
51
- "verify": "npm-run-all clean -p build depcheck lint -p coverage size",
52
+ "test:type": "tsc",
53
+ "verify": "npm-run-all clean -p build test:type depcheck lint coverage -p size",
52
54
  "watch": "yarn test:watch"
53
55
  },
54
56
  "dependencies": {
55
57
  "is-node": "^1.0.2",
56
58
  "is-promise": "^4.0.0",
57
- "iso-error": "^4.3.3",
58
- "path-equal": "^1.1.3",
59
- "satisfier": "^5.1.4",
60
- "tersify": "^3.8.4",
61
- "type-plus": "^4.9.1"
59
+ "iso-error": "^4.3.5",
60
+ "path-equal": "^1.2.1",
61
+ "satisfier": "^5.2.1",
62
+ "tersify": "^3.10.1",
63
+ "type-plus": "^4.10.0"
62
64
  },
63
65
  "devDependencies": {
64
- "@commitlint/cli": "^17.0.0",
65
- "@commitlint/config-conventional": "^17.0.0",
66
+ "@commitlint/cli": "^17.0.2",
67
+ "@commitlint/config-conventional": "^17.0.2",
66
68
  "@semantic-release/changelog": "^6.0.1",
67
69
  "@semantic-release/git": "^10.0.1",
68
70
  "@semantic-release/github": "^8.0.4",
69
71
  "@size-limit/preset-small-lib": "^7.0.8",
70
- "@types/jest": "^27.4.1",
71
- "@types/lodash": "^4.14.180",
72
- "@types/node": "^17.0.21",
73
- "@typescript-eslint/eslint-plugin": "^5.23.0",
74
- "@typescript-eslint/parser": "^5.23.0",
72
+ "@types/jest": "^28.1.1",
73
+ "@types/lodash": "^4.14.182",
74
+ "@types/node": "^14.18.21",
75
+ "@typescript-eslint/eslint-plugin": "^5.27.1",
75
76
  "depcheck": "^1.4.3",
76
- "eslint": "^8.16.0",
77
+ "eslint": "^8.17.0",
77
78
  "eslint-config-prettier": "^8.5.0",
78
79
  "eslint-plugin-harmony": "^7.1.0",
79
80
  "husky": "^8.0.1",
80
- "jest": "^28.1.0",
81
- "jest-validate": "^28.1.0",
81
+ "jest": "^28.1.1",
82
+ "jest-validate": "^28.1.1",
82
83
  "jest-watch-suspend": "^1.1.2",
83
84
  "jest-watch-toggle-config": "^2.0.1",
84
85
  "jest-watch-typeahead": "^1.1.0",
@@ -86,16 +87,25 @@
86
87
  "npm-run-all": "^4.1.5",
87
88
  "pinst": "^3.0.0",
88
89
  "rimraf": "^3.0.2",
89
- "semantic-release": "^19.0.2",
90
+ "semantic-release": "^19.0.3",
90
91
  "size-limit": "^7.0.8",
91
- "ts-jest": "^28.0.3",
92
- "typescript": "^4.7.2"
92
+ "ts-jest": "^28.0.4",
93
+ "tslib": "^2.4.0",
94
+ "typescript": "^4.7.3"
93
95
  },
94
96
  "packageManager": "yarn@3.2.1",
95
97
  "size-limit": [
98
+ {
99
+ "path": "./cjs/index.js",
100
+ "limit": "15 KB"
101
+ },
96
102
  {
97
103
  "path": "./esm/index.js",
98
104
  "limit": "10 KB"
105
+ },
106
+ {
107
+ "path": "./tslib/index.js",
108
+ "limit": "15 KB"
99
109
  }
100
110
  ]
101
111
  }
@@ -1,7 +1,7 @@
1
1
  import { AssertionError } from '../errors.js'
2
2
  import { notRejectedMessage } from '../utils/index.js'
3
3
 
4
- export function rejects(promise: Promise<any>) {
4
+ export function rejects<R = any>(promise: Promise<any>): Promise<R> {
5
5
  return promise.then(
6
6
  value => { throw new AssertionError(notRejectedMessage(value), { ssf: rejects }) },
7
7
  err => err