@stryker-mutator/dashboard-data-access 0.15.1-pr-897.1 → 0.15.1-pr-897.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.
@@ -1,6 +1,6 @@
1
1
  import { aggregateResultsByModule, calculateMetrics } from 'mutation-testing-metrics';
2
2
  import { MutationTestingResultMapper } from '../mappers/MutationTestingResultMapper.js';
3
- import { createMutationTestingReportMapper, DashboardQuery, } from '../mappers/index.js';
3
+ import { createMutationTestingReportMapper, DashboardQuery } from '../mappers/index.js';
4
4
  import { isMutationTestResult, } from '@stryker-mutator/dashboard-common';
5
5
  import { MutationTestingReport } from '../models/index.js';
6
6
  import { OptimisticConcurrencyError } from '../errors/index.js';
@@ -97,10 +97,7 @@ export class MutationTestingReportService {
97
97
  await this.resultMapper.delete(id);
98
98
  }
99
99
  async insertOrMergeReport(id, report, result) {
100
- await Promise.all([
101
- this.resultMapper.insertOrReplace(id, result),
102
- this.mutationScoreMapper.insertOrMerge(report),
103
- ]);
100
+ await Promise.all([this.resultMapper.insertOrReplace(id, result), this.mutationScoreMapper.insertOrMerge(report)]);
104
101
  }
105
102
  calculateMutationScore(result) {
106
103
  if (isMutationTestResult(result)) {
package/dist/src/utils.js CHANGED
@@ -13,14 +13,10 @@ export function hasErrorCode(err, code) {
13
13
  return false;
14
14
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
15
  const details = err.details;
16
- return (typeof details === 'object' &&
17
- details !== null &&
18
- (details.errorCode === code || details.odataError?.code === code));
16
+ return (typeof details === 'object' && details !== null && (details.errorCode === code || details.odataError?.code === code));
19
17
  }
20
18
  export function toBlobName({ projectName, version, moduleName, realTime }) {
21
- const slug = [projectName, version, moduleName, realTime ? 'real-time' : realTime]
22
- .filter(Boolean)
23
- .join('/');
19
+ const slug = [projectName, version, moduleName, realTime ? 'real-time' : realTime].filter(Boolean).join('/');
24
20
  return encodeKey(slug);
25
21
  }
26
22
  //# sourceMappingURL=utils.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryker-mutator/dashboard-data-access",
3
- "version": "0.15.1-pr-897.1",
3
+ "version": "0.15.1-pr-897.2",
4
4
  "type": "module",
5
5
  "description": "This package contains the data access layer of the stryker dashboard application.",
6
6
  "scripts": {
@@ -24,9 +24,9 @@
24
24
  "dependencies": {
25
25
  "@azure/data-tables": "13.2.2",
26
26
  "@azure/storage-blob": "12.24.0",
27
- "@stryker-mutator/dashboard-common": "0.15.1-pr-897.1",
27
+ "@stryker-mutator/dashboard-common": "0.15.1-pr-897.2",
28
28
  "mutation-testing-metrics": "3.2.0",
29
29
  "mutation-testing-report-schema": "3.1.1"
30
30
  },
31
- "gitHead": "cfa49eff05eb4ed4b7ac4c473f18f8f64b2c6a10"
31
+ "gitHead": "246b54a147a103b4f9b1f313bfe3dd9123de8f05"
32
32
  }