@fgv/ts-utils-jest 5.0.0-25 → 5.0.0-27
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/eslint.config.js +16 -0
- package/lib/index.js +0 -3
- package/lib/matchers/toFailTest/index.js +1 -1
- package/lib/matchers/toFailTest/predicate.js +1 -1
- package/lib/matchers/toFailTestAndMatchSnapshot/index.js +1 -1
- package/lib/matchers/toFailTestAndMatchSnapshot/predicate.js +1 -1
- package/lib/matchers/toFailTestWith/predicate.js +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/lib/utils/colorHelpers.js +1 -1
- package/package.json +12 -12
package/eslint.config.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// ESLint 9 flat config
|
|
2
|
+
const nodeProfile = require('@rushstack/eslint-config/flat/profile/node');
|
|
3
|
+
const packletsPlugin = require('@rushstack/eslint-config/flat/mixins/packlets');
|
|
4
|
+
const tsdocPlugin = require('@rushstack/eslint-config/flat/mixins/tsdoc');
|
|
5
|
+
|
|
6
|
+
module.exports = [
|
|
7
|
+
...nodeProfile,
|
|
8
|
+
packletsPlugin,
|
|
9
|
+
...tsdocPlugin,
|
|
10
|
+
{
|
|
11
|
+
// Override specific rules if needed
|
|
12
|
+
rules: {
|
|
13
|
+
'@rushstack/packlets/mechanics': 'warn'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
];
|
package/lib/index.js
CHANGED
|
@@ -41,7 +41,6 @@ const matchers_1 = __importDefault(require("./matchers"));
|
|
|
41
41
|
require("./types");
|
|
42
42
|
const MockFs = __importStar(require("./helpers/fsHelpers"));
|
|
43
43
|
exports.MockFs = MockFs;
|
|
44
|
-
// eslint-disable-next-line no-undef
|
|
45
44
|
function isJestGlobal(g) {
|
|
46
45
|
return g.hasOwnProperty('expect');
|
|
47
46
|
}
|
|
@@ -50,11 +49,9 @@ if (isJestGlobal(global)) {
|
|
|
50
49
|
global.expect.extend(matchers_1.default);
|
|
51
50
|
}
|
|
52
51
|
else {
|
|
53
|
-
/* eslint-disable no-console */
|
|
54
52
|
console.error([
|
|
55
53
|
"Unable to find Jest's global expect",
|
|
56
54
|
'Please check that you have added ts-utils-jest correctly to your jest configuration.'
|
|
57
55
|
].join('\n'));
|
|
58
|
-
/* eslint-enable no-console */
|
|
59
56
|
}
|
|
60
57
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unused-vars
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
4
4
|
const predicate_1 = require("./predicate");
|
|
5
5
|
const jest_matcher_utils_1 = require("jest-matcher-utils");
|
|
6
6
|
const matcherHelpers_1 = require("../../utils/matcherHelpers");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.matcherName = void 0;
|
|
4
4
|
exports.predicate = predicate;
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-unused-vars
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6
6
|
const ts_utils_1 = require("../../ts-utils");
|
|
7
7
|
exports.matcherName = 'toFailTest';
|
|
8
8
|
function predicate(cb) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
/* eslint-disable @typescript-eslint/no-unused-vars
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
4
4
|
const jest_snapshot_1 = require("jest-snapshot");
|
|
5
5
|
const predicate_1 = require("./predicate");
|
|
6
6
|
const jest_matcher_utils_1 = require("jest-matcher-utils");
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.matcherName = void 0;
|
|
4
4
|
exports.predicate = predicate;
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-unused-vars
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6
6
|
const ts_utils_1 = require("../../ts-utils");
|
|
7
7
|
exports.matcherName = 'toFailTestAndMatchSnapshot';
|
|
8
8
|
function predicate(cb) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.matcherName = void 0;
|
|
4
4
|
exports.predicate = predicate;
|
|
5
|
-
/* eslint-disable @typescript-eslint/no-unused-vars
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6
6
|
const expect_utils_1 = require("@jest/expect-utils");
|
|
7
7
|
const jest_matcher_utils_1 = require("jest-matcher-utils");
|
|
8
8
|
const ts_utils_1 = require("../../ts-utils");
|
package/lib/tsdoc-metadata.json
CHANGED
|
@@ -24,7 +24,7 @@ exports.createColorStripWrapper = createColorStripWrapper;
|
|
|
24
24
|
* Using a pre-compiled regex literal to satisfy ESLint security requirements.
|
|
25
25
|
* We use the unicode escape sequence \\u001b instead of \\x1b to avoid control-regex warnings.
|
|
26
26
|
*/
|
|
27
|
-
// eslint-disable-next-line
|
|
27
|
+
// eslint-disable-next-line no-control-regex
|
|
28
28
|
const ANSI_COLOR_REGEX = /\u001b\[[0-9;]*[a-zA-Z]/g;
|
|
29
29
|
/**
|
|
30
30
|
* Strips ANSI color/style escape sequences from a string.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fgv/ts-utils-jest",
|
|
3
|
-
"version": "5.0.0-
|
|
3
|
+
"version": "5.0.0-27",
|
|
4
4
|
"description": "Custom matchers for ts-utils result class",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"keywords": [
|
|
@@ -23,29 +23,29 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/jest": "^29.5.14",
|
|
25
25
|
"@types/node": "^20.14.9",
|
|
26
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
27
|
-
"@typescript-eslint/parser": "^
|
|
28
|
-
"eslint": "^
|
|
26
|
+
"@typescript-eslint/eslint-plugin": "^8.42.0",
|
|
27
|
+
"@typescript-eslint/parser": "^8.42.0",
|
|
28
|
+
"eslint": "^9.35.0",
|
|
29
29
|
"eslint-plugin-import": "^2.32.0",
|
|
30
30
|
"eslint-plugin-node": "^11.1.0",
|
|
31
|
-
"eslint-plugin-promise": "^
|
|
31
|
+
"eslint-plugin-promise": "^7.2.1",
|
|
32
32
|
"jest": "^29.7.0",
|
|
33
33
|
"prettier": "^3.6.2",
|
|
34
|
-
"rimraf": "^
|
|
34
|
+
"rimraf": "^6.0.1",
|
|
35
35
|
"ts-jest": "^29.4.1",
|
|
36
36
|
"ts-node": "^10.9.2",
|
|
37
37
|
"typescript": "5.8.3",
|
|
38
|
-
"@rushstack/heft": "0.74.
|
|
38
|
+
"@rushstack/heft": "0.74.4",
|
|
39
39
|
"@rushstack/eslint-config": "4.4.0",
|
|
40
|
-
"@rushstack/heft-jest-plugin": "0.16.
|
|
41
|
-
"@rushstack/heft-node-rig": "2.9.
|
|
40
|
+
"@rushstack/heft-jest-plugin": "0.16.13",
|
|
41
|
+
"@rushstack/heft-node-rig": "2.9.5",
|
|
42
42
|
"@types/heft-jest": "1.0.6",
|
|
43
|
-
"eslint-plugin-n": "^
|
|
43
|
+
"eslint-plugin-n": "^17.21.3",
|
|
44
44
|
"eslint-plugin-tsdoc": "~0.4.0",
|
|
45
|
-
"@fgv/ts-utils": "5.0.0-
|
|
45
|
+
"@fgv/ts-utils": "5.0.0-27"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
|
-
"@fgv/ts-utils": "5.0.0-
|
|
48
|
+
"@fgv/ts-utils": "5.0.0-27"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"build": "heft build --clean",
|