@sprucelabs/jest-jira-reporter 0.0.560 → 1.0.1

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.
@@ -3,7 +3,7 @@ import * as SpruceSchema from '@sprucelabs/schema';
3
3
  export declare namespace SpruceErrors.JestJiraReporter {
4
4
  interface TransitionNotFound {
5
5
  /** Transition. */
6
- 'transition': ("In Progress" | "Done");
6
+ transition: 'In Progress' | 'Done';
7
7
  }
8
8
  interface TransitionNotFoundSchema extends SpruceSchema.Schema {
9
9
  id: 'transitionNotFound';
@@ -11,18 +11,21 @@ export declare namespace SpruceErrors.JestJiraReporter {
11
11
  name: 'Transition not found';
12
12
  fields: {
13
13
  /** Transition. */
14
- 'transition': {
14
+ transition: {
15
15
  label: 'Transition';
16
16
  type: 'select';
17
17
  isRequired: true;
18
18
  options: {
19
- choices: [{
20
- "value": "In Progress";
21
- "label": "In Progress";
22
- }, {
23
- "value": "Done";
24
- "label": "Done";
25
- }];
19
+ choices: [
20
+ {
21
+ value: 'In Progress';
22
+ label: 'In Progress';
23
+ },
24
+ {
25
+ value: 'Done';
26
+ label: 'Done';
27
+ }
28
+ ];
26
29
  };
27
30
  };
28
31
  };
@@ -1,4 +1,2 @@
1
1
  "use strict";
2
- /* eslint-disable @typescript-eslint/no-namespace */
3
- /* eslint-disable no-redeclare */
4
2
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,13 +7,18 @@ const transitionNotFoundSchema = {
7
7
  name: 'Transition not found',
8
8
  fields: {
9
9
  /** Transition. */
10
- 'transition': {
10
+ transition: {
11
11
  label: 'Transition',
12
12
  type: 'select',
13
13
  isRequired: true,
14
- options: { choices: [{ "value": "In Progress", "label": "In Progress" }, { "value": "Done", "label": "Done" }], }
14
+ options: {
15
+ choices: [
16
+ { value: 'In Progress', label: 'In Progress' },
17
+ { value: 'Done', label: 'Done' },
18
+ ],
19
+ },
15
20
  },
16
- }
21
+ },
17
22
  };
18
23
  schema_1.SchemaRegistry.getInstance().trackSchema(transitionNotFoundSchema);
19
24
  exports.default = transitionNotFoundSchema;
@@ -1,5 +1,5 @@
1
- import { SpruceErrors } from "./errors.types";
2
- import { ErrorOptions as ISpruceErrorOptions } from "@sprucelabs/error";
1
+ import { ErrorOptions as ISpruceErrorOptions } from '@sprucelabs/error';
2
+ import { SpruceErrors } from './errors.types';
3
3
  export interface TransitionNotFoundErrorOptions extends SpruceErrors.JestJiraReporter.TransitionNotFound, ISpruceErrorOptions {
4
4
  code: 'TRANSITION_NOT_FOUND';
5
5
  }
@@ -1 +1 @@
1
- export { FieldDefinitions, FieldDefinitionMap, FieldValueTypeGeneratorMap, FieldMap } from '@sprucelabs/schema';
1
+ export { FieldDefinitions, FieldDefinitionMap, FieldValueTypeGeneratorMap, FieldMap, } from '@sprucelabs/schema';
@@ -7,14 +7,19 @@ const schema_1 = require("@sprucelabs/schema");
7
7
  const jira_client_1 = __importDefault(require("jira-client"));
8
8
  const SpruceError_1 = __importDefault(require("./errors/SpruceError"));
9
9
  class JestReporter {
10
+ client;
11
+ static JiraApi = jira_client_1.default;
12
+ testMap;
13
+ statusMap = {
14
+ passed: 'Done',
15
+ failed: 'In Progress',
16
+ };
17
+ transitions;
18
+ transitionLoadPromise;
10
19
  constructor(options) {
11
- this.statusMap = {
12
- passed: 'Done',
13
- failed: 'In Progress',
14
- };
15
20
  const username = process.env.JIRA_USERNAME;
16
21
  const password = process.env.JIRA_PASSWORD;
17
- const { protocol, host, apiVersion, strictSSL, testMap } = (0, schema_1.assertOptions)(Object.assign(Object.assign({}, options), { env: process.env }), [
22
+ const { protocol, host, apiVersion, strictSSL, testMap } = (0, schema_1.assertOptions)({ ...options, env: process.env }, [
18
23
  'host',
19
24
  'apiVersion',
20
25
  'testMap',
@@ -75,5 +80,4 @@ class JestReporter {
75
80
  return this.testMap[title];
76
81
  }
77
82
  }
78
- JestReporter.JiraApi = jira_client_1.default;
79
83
  exports.default = JestReporter;
@@ -1,5 +1,5 @@
1
1
  import BaseSpruceError from '@sprucelabs/error';
2
- import ErrorOptions from "./../.spruce/errors/options.types";
2
+ import ErrorOptions from './../.spruce/errors/options.types';
3
3
  export default class SpruceError extends BaseSpruceError<ErrorOptions> {
4
4
  /** an easy to understand version of the errors */
5
5
  friendlyMessage(): string;
@@ -9,7 +9,7 @@ class SpruceError extends error_1.default {
9
9
  friendlyMessage() {
10
10
  const { options } = this;
11
11
  let message;
12
- switch (options === null || options === void 0 ? void 0 : options.code) {
12
+ switch (options?.code) {
13
13
  case 'TRANSITION_NOT_FOUND':
14
14
  message = 'A Transition not found just happened!';
15
15
  break;
@@ -3,7 +3,7 @@ import * as SpruceSchema from '@sprucelabs/schema';
3
3
  export declare namespace SpruceErrors.JestJiraReporter {
4
4
  interface TransitionNotFound {
5
5
  /** Transition. */
6
- 'transition': ("In Progress" | "Done");
6
+ transition: 'In Progress' | 'Done';
7
7
  }
8
8
  interface TransitionNotFoundSchema extends SpruceSchema.Schema {
9
9
  id: 'transitionNotFound';
@@ -11,18 +11,21 @@ export declare namespace SpruceErrors.JestJiraReporter {
11
11
  name: 'Transition not found';
12
12
  fields: {
13
13
  /** Transition. */
14
- 'transition': {
14
+ transition: {
15
15
  label: 'Transition';
16
16
  type: 'select';
17
17
  isRequired: true;
18
18
  options: {
19
- choices: [{
20
- "value": "In Progress";
21
- "label": "In Progress";
22
- }, {
23
- "value": "Done";
24
- "label": "Done";
25
- }];
19
+ choices: [
20
+ {
21
+ value: 'In Progress';
22
+ label: 'In Progress';
23
+ },
24
+ {
25
+ value: 'Done';
26
+ label: 'Done';
27
+ }
28
+ ];
26
29
  };
27
30
  };
28
31
  };
@@ -1,3 +1 @@
1
- /* eslint-disable @typescript-eslint/no-namespace */
2
- /* eslint-disable no-redeclare */
3
1
  export {};
@@ -1,5 +1,5 @@
1
- import { SpruceErrors } from "./errors.types";
2
- import { ErrorOptions as ISpruceErrorOptions } from "@sprucelabs/error";
1
+ import { ErrorOptions as ISpruceErrorOptions } from '@sprucelabs/error';
2
+ import { SpruceErrors } from './errors.types';
3
3
  export interface TransitionNotFoundErrorOptions extends SpruceErrors.JestJiraReporter.TransitionNotFound, ISpruceErrorOptions {
4
4
  code: 'TRANSITION_NOT_FOUND';
5
5
  }
@@ -1,5 +1,5 @@
1
1
  import BaseSpruceError from '@sprucelabs/error';
2
- import ErrorOptions from "./../.spruce/errors/options.types";
2
+ import ErrorOptions from './../.spruce/errors/options.types';
3
3
  export default class SpruceError extends BaseSpruceError<ErrorOptions> {
4
4
  /** an easy to understand version of the errors */
5
5
  friendlyMessage(): string;
@@ -7,8 +7,7 @@ const reporter = new JestReporter({
7
7
  strictSSL: true,
8
8
  testMap: { test1: 'LTEST-1', test2: 'LTEST-2' },
9
9
  });
10
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
11
- reporter.onTestComplete({}, {
10
+ void reporter.onTestComplete({}, {
12
11
  testResults: [
13
12
  { title: 'test1', status: 'failed' },
14
13
  { title: 'test2', status: 'passed' },
@@ -12,8 +12,7 @@ const reporter = new JestReporter_1.default({
12
12
  strictSSL: true,
13
13
  testMap: { test1: 'LTEST-1', test2: 'LTEST-2' },
14
14
  });
15
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
16
- reporter.onTestComplete({}, {
15
+ void reporter.onTestComplete({}, {
17
16
  testResults: [
18
17
  { title: 'test1', status: 'failed' },
19
18
  { title: 'test2', status: 'passed' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sprucelabs/jest-jira-reporter",
3
- "version": "0.0.560",
3
+ "version": "1.0.1",
4
4
  "files": [
5
5
  "build"
6
6
  ],
@@ -16,57 +16,62 @@
16
16
  ],
17
17
  "license": "MIT",
18
18
  "skill": {
19
- "namespace": "jest-jira-reporter"
19
+ "namespace": "jest-jira-reporter",
20
+ "upgradeIgnoreList": [
21
+ "@sprucelabs/spruce-core-schemas",
22
+ "@sprucelabs/spruce-skill-utils",
23
+ "@sprucelabs/spruce-test-fixtures"
24
+ ]
20
25
  },
21
26
  "scripts": {
22
- "build.ci": "yarn build.tsc && yarn build.resolve-paths && yarn lint",
23
- "build.dev": "yarn build.tsc --sourceMap ; yarn resolve-paths.lint",
27
+ "build.ci": "yarn run build.tsc && yarn run build.resolve-paths && yarn run lint",
28
+ "build.dev": "yarn run build.tsc --sourceMap ; yarn run resolve-paths.lint",
24
29
  "build.dist": "tsc --project tsconfig.dist.json && yarn build.resolve-paths && mv build esm && yarn build.esm-postbuild && yarn build.tsc && yarn build.resolve-paths && mv esm build/ && yarn clean.dist",
25
30
  "build.copy-files": "mkdir -p build && rsync -avzq --exclude='*.ts' ./src/ ./build/",
26
31
  "build.esm-postbuild": "esm-postbuild --target esm --patterns '**/*.js'",
27
32
  "build.resolve-paths": "resolve-path-aliases --target build --patterns '**/*.js,**/*.d.ts'",
28
- "build.tsc": "yarn build.copy-files && tsc",
29
- "clean": "yarn clean.build",
30
- "clean.all": "yarn clean.dependencies && yarn clean.build",
33
+ "build.tsc": "yarn run build.copy-files && tsc",
34
+ "clean": "yarn run clean.build",
35
+ "clean.all": "yarn run clean.dependencies && yarn run clean.build",
31
36
  "clean.build": "rm -rf build/",
32
37
  "clean.dependencies": "rm -rf node_modules/ package-lock.json yarn.lock",
33
38
  "clean.dist": "rm -rf build/__tests__ build/esm/__tests__",
34
39
  "fix.lint": "eslint --fix --cache '**/*.ts'",
35
40
  "lint": "eslint --cache '**/*.ts'",
36
41
  "lint.tsc": "tsc -p . --noEmit",
37
- "post.watch.build": "yarn build.copy-files && yarn build.resolve-paths",
38
- "rebuild": "yarn clean.all && yarn && yarn build.dev",
42
+ "post.watch.build": "yarn run build.copy-files && yarn run build.resolve-paths",
43
+ "rebuild": "yarn run clean.all && yarn install && yarn run build.dev",
39
44
  "release": "semantic-release",
40
- "resolve-paths.lint": "yarn build.resolve-paths ; yarn lint",
45
+ "resolve-paths.lint": "yarn run build.resolve-paths ; yarn run lint",
41
46
  "test": "jest",
42
- "update.dependencies": "yarn clean.dependencies && yarn",
43
- "watch.build.dev": "tsc-watch --sourceMap --onCompilationComplete 'yarn post.watch.build'",
44
- "watch.lint": "concurrently 'yarn lint' \"chokidar 'src/**/*' -c 'yarn lint.tsc'\"",
45
- "watch.rebuild": "yarn clean.all && yarn && yarn watch.build.dev",
47
+ "update.dependencies": "yarn run clean.dependencies && yarn",
48
+ "watch.build.dev": "tsc-watch --sourceMap --onCompilationComplete 'yarn run post.watch.build'",
49
+ "watch.lint": "concurrently 'yarn run lint' \"chokidar 'src/**/*' -c 'yarn run lint.tsc'\"",
50
+ "watch.rebuild": "yarn run clean.all && yarn install && yarn run watch.build.dev",
46
51
  "watch.tsc": "tsc -w"
47
52
  },
48
53
  "devDependencies": {
49
- "@sprucelabs/esm-postbuild": "^5.0.200",
50
- "@sprucelabs/jest-json-reporter": "^7.0.207",
51
- "@sprucelabs/resolve-path-aliases": "^1.1.304",
52
- "@sprucelabs/semantic-release": "^4.0.8",
53
- "@sprucelabs/spruce-test-fixtures": "^61.1.33",
54
- "@sprucelabs/test": "^8.0.50",
55
- "@sprucelabs/test-utils": "^4.0.157",
54
+ "@sprucelabs/esm-postbuild": "^6.0.5",
55
+ "@sprucelabs/jest-json-reporter": "^8.0.4",
56
+ "@sprucelabs/resolve-path-aliases": "^2.0.7",
57
+ "@sprucelabs/semantic-release": "^5.0.1",
58
+ "@sprucelabs/spruce-test-fixtures": "^61.1.35",
59
+ "@sprucelabs/test": "^9.0.6",
60
+ "@sprucelabs/test-utils": "^5.0.5",
56
61
  "@types/jira-client": "^7.1.9",
57
- "@types/node": "^20.12.4",
62
+ "@types/node": "^20.12.7",
58
63
  "@types/photoshop": "^25.0.4",
59
64
  "chokidar-cli": "^3.0.0",
60
65
  "concurrently": "^8.2.2",
61
- "eslint": "^8.57.0",
62
- "eslint-config-spruce": "^10.13.6",
66
+ "eslint": "^9.1.1",
67
+ "eslint-config-spruce": "^11.2.12",
63
68
  "jest": "^29.7.0",
64
69
  "jest-circus": "^29.7.0",
65
70
  "prettier": "^3.2.5",
66
71
  "ts-node": "^10.9.2",
67
72
  "tsc-watch": "^6.2.0",
68
73
  "tsconfig-paths": "^4.2.0",
69
- "typescript": "^5.4.4"
74
+ "typescript": "^5.4.5"
70
75
  },
71
76
  "jest": {
72
77
  "testRunner": "jest-circus/runner",
@@ -87,8 +92,8 @@
87
92
  }
88
93
  },
89
94
  "dependencies": {
90
- "@sprucelabs/error": "^5.1.108",
91
- "@sprucelabs/schema": "^29.4.60",
95
+ "@sprucelabs/error": "^6.0.5",
96
+ "@sprucelabs/schema": "^30.0.6",
92
97
  "@sprucelabs/spruce-core-schemas": "^39.0.294",
93
98
  "@sprucelabs/spruce-skill-utils": "^30.4.29",
94
99
  "jira-client": "^8.2.2"