Socket
Socket
Sign inDemoInstall

@jest/reporters

Package Overview
Dependencies
Maintainers
7
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jest/reporters - npm Package Compare versions

Comparing version 25.4.0 to 25.5.0

37

build/coverage_reporter.js

@@ -19,3 +19,3 @@ 'use strict';

function fs() {
const data = _interopRequireWildcard(require('fs'));
const data = _interopRequireWildcard(require('graceful-fs'));

@@ -228,25 +228,2 @@ fs = function () {

}
const sourceMaps = testResult.sourceMaps;
if (sourceMaps) {
Object.keys(sourceMaps).forEach(sourcePath => {
let inputSourceMap;
try {
const coverage = this._coverageMap.fileCoverageFor(sourcePath);
inputSourceMap = coverage.toJSON().inputSourceMap;
} finally {
if (inputSourceMap) {
this._sourceMapStore.registerMap(sourcePath, inputSourceMap);
} else {
this._sourceMapStore.registerURL(
sourcePath,
sourceMaps[sourcePath]
);
}
}
});
}
}

@@ -363,3 +340,6 @@

this._options.changedFiles &&
Array.from(this._options.changedFiles)
Array.from(this._options.changedFiles),
sourcesRelatedToTestsInChangedFiles:
this._options.sourcesRelatedToTestsInChangedFiles &&
Array.from(this._options.sourcesRelatedToTestsInChangedFiles)
},

@@ -379,9 +359,2 @@ path: filename

this._coverageMap.addFileCoverage(result.coverage);
if (result.sourceMapPath) {
this._sourceMapStore.registerURL(
filename,
result.sourceMapPath
);
}
}

@@ -388,0 +361,0 @@ }

9

build/coverage_worker.js

@@ -9,3 +9,3 @@ 'use strict';

function fs() {
const data = _interopRequireWildcard(require('fs'));
const data = _interopRequireWildcard(require('graceful-fs'));

@@ -97,4 +97,9 @@ fs = function () {

config,
options && options.changedFiles && new Set(options.changedFiles)
(options === null || options === void 0 ? void 0 : options.changedFiles) &&
new Set(options.changedFiles),
(options === null || options === void 0
? void 0
: options.sourcesRelatedToTestsInChangedFiles) &&
new Set(options.sourcesRelatedToTestsInChangedFiles)
);
}

@@ -14,3 +14,2 @@ /**

coverage: FileCoverage;
sourceMapPath?: string | null;
} | {

@@ -20,3 +19,3 @@ kind: 'V8Coverage';

};
export default function (source: string, filename: Config.Path, globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, changedFiles?: Set<Config.Path>): CoverageWorkerResult | null;
export default function (source: string, filename: Config.Path, globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, changedFiles?: Set<Config.Path>, sourcesRelatedToTestsInChangedFiles?: Set<Config.Path>): CoverageWorkerResult | null;
export {};

@@ -9,3 +9,3 @@ 'use strict';

function fs() {
const data = _interopRequireWildcard(require('fs'));
const data = _interopRequireWildcard(require('graceful-fs'));

@@ -97,3 +97,10 @@ fs = function () {

*/
function _default(source, filename, globalConfig, config, changedFiles) {
function _default(
source,
filename,
globalConfig,
config,
changedFiles,
sourcesRelatedToTestsInChangedFiles
) {
const coverageOptions = {

@@ -104,3 +111,4 @@ changedFiles,

collectCoverageOnlyFrom: globalConfig.collectCoverageOnlyFrom,
coverageProvider: globalConfig.coverageProvider
coverageProvider: globalConfig.coverageProvider,
sourcesRelatedToTestsInChangedFiles
};

@@ -134,7 +142,3 @@ let coverageWorkerResult = null;

const {
code,
mapCoverage,
sourceMapPath
} = new (_transform().ScriptTransformer)(config).transformSource(
const {code} = new (_transform().ScriptTransformer)(config).transformSource(
filename,

@@ -152,4 +156,3 @@ source,

),
kind: 'BabelCoverage',
sourceMapPath: mapCoverage ? sourceMapPath : null
kind: 'BabelCoverage'
};

@@ -156,0 +159,0 @@ }

@@ -14,3 +14,2 @@ /**

coverage: FileCoverage;
sourceMapPath?: string | null;
} | {

@@ -20,3 +19,3 @@ kind: 'V8Coverage';

};
export default function (source: string, filename: Config.Path, globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, changedFiles?: Set<Config.Path>): CoverageWorkerResult | null;
export default function (source: string, filename: Config.Path, globalConfig: Config.GlobalConfig, config: Config.ProjectConfig, changedFiles?: Set<Config.Path>, sourcesRelatedToTestsInChangedFiles?: Set<Config.Path>): CoverageWorkerResult | null;
export {};

@@ -32,5 +32,7 @@ /**

changedFiles?: Set<Config.Path>;
sourcesRelatedToTestsInChangedFiles?: Set<Config.Path>;
};
export declare type CoverageReporterSerializedOptions = {
changedFiles?: Array<Config.Path>;
sourcesRelatedToTestsInChangedFiles?: Array<Config.Path>;
};

@@ -37,0 +39,0 @@ export declare type OnTestStart = (test: Test) => Promise<void>;

@@ -32,5 +32,7 @@ /**

changedFiles?: Set<Config.Path>;
sourcesRelatedToTestsInChangedFiles?: Set<Config.Path>;
};
export declare type CoverageReporterSerializedOptions = {
changedFiles?: Array<Config.Path>;
sourcesRelatedToTestsInChangedFiles?: Array<Config.Path>;
};

@@ -37,0 +39,0 @@ export declare type OnTestStart = (test: Test) => Promise<void>;

{
"name": "@jest/reporters",
"description": "Jest's reporters",
"version": "25.4.0",
"version": "25.5.0",
"main": "build/index.js",

@@ -16,6 +16,6 @@ "types": "build/index.d.ts",

"@bcoe/v8-coverage": "^0.2.3",
"@jest/console": "^25.4.0",
"@jest/test-result": "^25.4.0",
"@jest/transform": "^25.4.0",
"@jest/types": "^25.4.0",
"@jest/console": "^25.5.0",
"@jest/test-result": "^25.5.0",
"@jest/transform": "^25.5.0",
"@jest/types": "^25.5.0",
"chalk": "^3.0.0",

@@ -25,2 +25,3 @@ "collect-v8-coverage": "^1.0.0",

"glob": "^7.1.2",
"graceful-fs": "^4.2.4",
"istanbul-lib-coverage": "^3.0.0",

@@ -31,6 +32,6 @@ "istanbul-lib-instrument": "^4.0.0",

"istanbul-reports": "^3.0.2",
"jest-haste-map": "^25.4.0",
"jest-resolve": "^25.4.0",
"jest-util": "^25.4.0",
"jest-worker": "^25.4.0",
"jest-haste-map": "^25.5.0",
"jest-resolve": "^25.5.0",
"jest-util": "^25.5.0",
"jest-worker": "^25.5.0",
"slash": "^3.0.0",

@@ -45,2 +46,3 @@ "source-map": "^0.6.0",

"@types/glob": "^7.1.1",
"@types/graceful-fs": "^4.1.3",
"@types/istanbul-lib-coverage": "^2.0.0",

@@ -74,3 +76,3 @@ "@types/istanbul-lib-instrument": "^1.7.2",

},
"gitHead": "5b129d714cadb818be28afbe313cbeae8fbb1dde"
"gitHead": "ddd73d18adfb982b9b0d94bad7d41c9f78567ca7"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc