@sprucelabs/jest-json-reporter 7.0.207 → 7.0.208

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,22 +1,22 @@
1
1
  import { AggregatedResult, TestContext, Reporter, Test, TestResult } from '@jest/reporters';
2
2
  export declare type Milliseconds = number;
3
3
  export declare type TestStatus = 'passed' | 'failed' | 'skipped' | 'pending' | 'todo' | 'disabled' | 'focused';
4
- declare type CallSite = {
4
+ declare interface CallSite {
5
5
  column: number;
6
6
  line: number;
7
- };
8
- export declare type AssertionResult = {
9
- ancestorTitles: Array<string>;
7
+ }
8
+ export declare interface AssertionResult {
9
+ ancestorTitles: string[];
10
10
  duration?: Milliseconds | null;
11
- failureDetails: Array<unknown>;
12
- failureMessages: Array<string>;
11
+ failureDetails: unknown[];
12
+ failureMessages: string[];
13
13
  fullName: string;
14
14
  invocations?: number;
15
15
  location?: CallSite | null;
16
16
  numPassingAsserts: number;
17
17
  status: TestStatus;
18
18
  title: string;
19
- };
19
+ }
20
20
  export declare const START_DIVIDER = "***************************START_JSON_DIVIDER***************************";
21
21
  export declare const END_DIVIDER = "***************************END_JSON_DIVIDER***************************";
22
22
  export default class JsonReporter implements Reporter {
@@ -44,7 +44,10 @@ class StringifyTest extends test_1.default {
44
44
  const lastLogged = reporter.render(obj);
45
45
  const parsed = JSON.parse(
46
46
  //@ts-ignore
47
- lastLogged.replace(JsonReporter_1.START_DIVIDER, '').replace(JsonReporter_1.END_DIVIDER, '').trim());
47
+ lastLogged
48
+ .replace(JsonReporter_1.START_DIVIDER, '')
49
+ .replace(JsonReporter_1.END_DIVIDER, '')
50
+ .trim());
48
51
  test_1.assert.isEqualDeep(parsed, {
49
52
  go: 'team',
50
53
  around: true,
package/build/cycle.js CHANGED
@@ -1,6 +1,4 @@
1
1
  "use strict";
2
- /* eslint-disable no-useless-escape */
3
- /* eslint-disable no-control-regex */
4
2
  /*
5
3
  Cycle.js
6
4
  2018-05-15
@@ -44,7 +42,7 @@ const cycle = function (object, replacer) {
44
42
  let objects = new WeakMap(); // object to path mappings
45
43
  return (function derez(value, path) {
46
44
  // The derez function recurses through the object, producing the deep copy.
47
- let old_path; // The path of an earlier occurance of value
45
+ let oldPath; // The path of an earlier occurance of value
48
46
  let nu; // The new object or array
49
47
  // If a replacer function was provided, then call it to get a replacement value.
50
48
  if (replacer !== undefined) {
@@ -62,9 +60,9 @@ const cycle = function (object, replacer) {
62
60
  // If the value is an object or array, look to see if we have already
63
61
  // encountered it. If so, return a {"$ref":PATH} object. This uses an
64
62
  // ES6 WeakMap.
65
- old_path = objects.get(value);
66
- if (old_path !== undefined) {
67
- return { $ref: old_path };
63
+ oldPath = objects.get(value);
64
+ if (oldPath !== undefined) {
65
+ return { $ref: oldPath };
68
66
  }
69
67
  // Otherwise, accumulate the unique value and its path.
70
68
  objects.set(value, path);
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "files": [
7
7
  "build"
8
8
  ],
9
- "version": "7.0.207",
9
+ "version": "7.0.208",
10
10
  "skill": {
11
11
  "namespace": "jest-json-reporter",
12
12
  "upgradeIgnoreList": [
@@ -35,9 +35,9 @@
35
35
  "clean.all": "yarn clean.dependencies && yarn clean.build",
36
36
  "clean.build": "rm -rf build/",
37
37
  "clean.dependencies": "rm -rf node_modules/ package-lock.json yarn.lock",
38
- "fix.lint": "eslint --fix --cache '**/*.ts'",
39
- "lint": "eslint --cache '**/*.ts'",
40
- "rebuild": "yarn clean.all && yarn && yarn build.dev",
38
+ "fix.lint": "eslint --fix --cache",
39
+ "lint": "eslint --cache",
40
+ "rebuild": "yarn clean.all && yarn install && yarn build.dev",
41
41
  "release": "semantic-release",
42
42
  "test": "jest",
43
43
  "update.dependencies": "yarn clean.dependencies && yarn",
@@ -52,26 +52,26 @@
52
52
  "post.watch.build": "yarn build.copy-files && yarn build.resolve-paths",
53
53
  "resolve-paths.lint": "yarn build.resolve-paths ; yarn lint",
54
54
  "watch.lint": "concurrently 'yarn lint' \"chokidar 'src/**/*' -c 'yarn lint.tsc'\"",
55
- "watch.rebuild": "yarn clean.all && yarn && yarn watch.build.dev",
55
+ "watch.rebuild": "yarn clean.all && yarn install && yarn watch.build.dev",
56
56
  "watch.tsc": "tsc -w"
57
57
  },
58
58
  "dependencies": {},
59
59
  "devDependencies": {
60
60
  "@jest/reporters": "^29.7.0",
61
- "@sprucelabs/resolve-path-aliases": "^1.1.304",
62
- "@sprucelabs/semantic-release": "^4.0.8",
63
- "@sprucelabs/test": "^8.0.50",
64
- "@types/node": "^20.12.4",
61
+ "@sprucelabs/resolve-path-aliases": "^2.0.3",
62
+ "@sprucelabs/semantic-release": "^5.0.1",
63
+ "@sprucelabs/test": "^9.0.3",
64
+ "@types/node": "^20.12.7",
65
65
  "chokidar-cli": "^3.0.0",
66
66
  "concurrently": "^8.2.2",
67
- "eslint": "^8.57.0",
68
- "eslint-config-spruce": "^10.13.6",
67
+ "eslint": "^9.0.0",
68
+ "eslint-config-spruce": "^11.2.7",
69
69
  "jest": "^29.7.0",
70
70
  "prettier": "^3.2.5",
71
71
  "ts-node": "^10.9.2",
72
72
  "tsc-watch": "^6.2.0",
73
73
  "tsconfig-paths": "^4.2.0",
74
- "typescript": "^5.4.4"
74
+ "typescript": "^5.4.5"
75
75
  },
76
76
  "jest": {
77
77
  "maxWorkers": 4,