Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@betterer/betterer

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@betterer/betterer - npm Package Compare versions

Comparing version 5.1.6 to 5.1.7

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

## [5.1.7](https://github.com/phenomnomnominal/betterer/compare/v5.1.6...v5.1.7) (2022-03-21)
### Bug Fixes
* **betterer 🐛:** ci mode should work when running an already completed test ([#971](https://github.com/phenomnomnominal/betterer/issues/971)) ([9d56186](https://github.com/phenomnomnominal/betterer/commit/9d56186b2066bea1b4e75e8a3f0d5531cda22d2c))
* **betterer 🐛:** normalise issue text before creating issue ([#991](https://github.com/phenomnomnominal/betterer/issues/991)) ([6294c20](https://github.com/phenomnomnominal/betterer/commit/6294c201d4418d1f5e742f74940eea93af88282c))
## [5.1.6](https://github.com/phenomnomnominal/betterer/compare/v5.1.5...v5.1.6) (2022-02-09)

@@ -8,0 +20,0 @@

4

dist/betterer.js

@@ -24,3 +24,3 @@ "use strict";

const runner = await runner_1.BettererRunnerΩ.create(options);
return runner.run();
return await runner.run();
}

@@ -44,3 +44,3 @@ exports.betterer = betterer;

const merger = await results_1.BettererMergerΩ.create(options);
return merger.merge();
return await merger.merge();
}

@@ -47,0 +47,0 @@ exports.merge = merge;

@@ -49,3 +49,3 @@ "use strict";

const runs = await Promise.all(testNames.map(async (testName) => {
return run_1.BettererRunΩ.create(this._runWorkerPool, testName, workerRunConfig, filePaths, this._versionControl);
return await run_1.BettererRunΩ.create(this._runWorkerPool, testName, workerRunConfig, filePaths, this._versionControl);
}));

@@ -52,0 +52,0 @@ const suite = new suite_1.BettererSuiteΩ(this.config, this._resultsFile, filePaths, runs);

@@ -42,3 +42,3 @@ "use strict";

(0, assert_1.default)(this._cache);
return this._cache.enableCache(cachePath);
return await this._cache.enableCache(cachePath);
}

@@ -68,3 +68,3 @@ updateCache(testName, filePaths) {

if (this._syncing) {
return this._syncing;
return await this._syncing;
}

@@ -71,0 +71,0 @@ this._syncing = this._sync();

@@ -38,3 +38,3 @@ "use strict";

try {
return (0, require_1.requireText)(contents);
return await (0, require_1.requireText)(contents);
}

@@ -41,0 +41,0 @@ catch (_a) {

@@ -27,3 +27,5 @@ "use strict";

.map((runSummary) => runSummary.name);
const newRuns = runSummaries.filter((runSummary) => runSummary.isNew).map((runSummary) => runSummary.name);
const newRuns = runSummaries
.filter((runSummary) => runSummary.isNew && !runSummary.isComplete)
.map((runSummary) => runSummary.name);
const worseRuns = runSummaries.filter((runSummary) => runSummary.isWorse).map((runSummary) => runSummary.name);

@@ -30,0 +32,0 @@ return [...missingRuns, ...changedRuns, ...newRuns, ...worseRuns];

@@ -5,2 +5,3 @@ "use strict";

const results_1 = require("../results");
const utils_1 = require("../utils");
class BettererRunΩ {

@@ -34,3 +35,3 @@ constructor(name, _workerHandle, testMeta, baseline, expected, filePaths) {

this._workerHandle.claim();
const timestamp = Date.now();
const timestamp = (0, utils_1.getTime)();
const summary = await this._workerHandle.worker.run(this.name, this.filePaths, isSkipped, timestamp);

@@ -37,0 +38,0 @@ this._workerHandle.release();

@@ -75,10 +75,10 @@ "use strict";

if (isSkipped) {
return running.skipped();
return await running.skipped();
}
try {
const result = new results_1.BettererResultΩ(await this.test.test(this));
return running.done(result);
return await running.done(result);
}
catch (error) {
return running.failed(error);
return await running.failed(error);
}

@@ -135,20 +135,20 @@ }

if (this.isNew) {
return end(run_summary_1.BettererRunStatus.new, result);
return await end(run_summary_1.BettererRunStatus.new, result);
}
const comparison = await this.test.constraint(result.value, this.expected.value);
if (comparison === constraints_1.BettererConstraintResult.same) {
return end(run_summary_1.BettererRunStatus.same, result);
return await end(run_summary_1.BettererRunStatus.same, result);
}
const diff = this.test.differ(this.expected.value, result.value);
if (comparison === constraints_1.BettererConstraintResult.better) {
return end(run_summary_1.BettererRunStatus.better, result, diff);
return await end(run_summary_1.BettererRunStatus.better, result, diff);
}
const status = config.update ? run_summary_1.BettererRunStatus.update : run_summary_1.BettererRunStatus.worse;
return end(status, result, diff);
return await end(status, result, diff);
},
failed: async (error) => {
return end(run_summary_1.BettererRunStatus.failed, null, null, error);
return await end(run_summary_1.BettererRunStatus.failed, null, null, error);
},
skipped: async () => {
return end(run_summary_1.BettererRunStatus.skipped);
return await end(run_summary_1.BettererRunStatus.skipped);
}

@@ -155,0 +155,0 @@ };

@@ -56,3 +56,3 @@ "use strict";

}
return this._context.stop();
return await this._context.stop();
}

@@ -59,0 +59,0 @@ catch (error) {

@@ -24,3 +24,3 @@ "use strict";

get new() {
return this.runSummaries.filter((runSummary) => runSummary.isNew && !(runSummary.isSkipped || runSummary.isFailed));
return this.runSummaries.filter((runSummary) => runSummary.isNew && !(runSummary.isSkipped || runSummary.isFailed || runSummary.isComplete));
}

@@ -27,0 +27,0 @@ get ran() {

@@ -51,3 +51,3 @@ "use strict";

const { filters } = this._config;
return Promise.all(runsΩ.map(async (runΩ, index) => {
return await Promise.all(runsΩ.map(async (runΩ, index) => {
const lifecycle = runLifecycles[index];

@@ -54,0 +54,0 @@ // This is all a bit backwards because "filters" is named badly.

@@ -40,4 +40,6 @@ "use strict";

const start = lc.indexForLocation({ line, column }) || 0;
const hash = overrideHash || (0, hasher_1.createHash)(fileText.substr(start, length));
return { line, column, length, message, hash };
const issueText = fileText.substring(start, start + length);
const normalisedText = (0, utils_1.normaliseNewlines)(issueText);
const hash = overrideHash || (0, hasher_1.createHash)(normalisedText);
return { line, column, length: normalisedText.length, message, hash };
}

@@ -44,0 +46,0 @@ }

@@ -18,3 +18,4 @@ export declare function isBoolean(value: unknown): value is boolean;

export declare function flatten<T>(toFlatten: ReadonlyArray<T | ReadonlyArray<T>>): Array<T>;
export declare function getTime(): number;
export {};
//# sourceMappingURL=utils.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.flatten = exports.normaliseNewlines = exports.defer = exports.normalisedPath = exports.isUndefined = exports.isRegExp = exports.isString = exports.isNumber = exports.isFunction = exports.isBoolean = void 0;
exports.getTime = exports.flatten = exports.normaliseNewlines = exports.defer = exports.normalisedPath = exports.isUndefined = exports.isRegExp = exports.isString = exports.isNumber = exports.isFunction = exports.isBoolean = void 0;
const tslib_1 = require("tslib");

@@ -71,2 +71,6 @@ const assert_1 = (0, tslib_1.__importDefault)(require("assert"));

}
function getTime() {
return Date.now();
}
exports.getTime = getTime;
//# sourceMappingURL=utils.js.map
{
"name": "@betterer/betterer",
"description": "Main engine for runing betterer tests",
"version": "5.1.6",
"version": "5.1.7",
"license": "MIT",

@@ -34,3 +34,3 @@ "publishConfig": {

"@betterer/logger": "^5.1.5",
"@betterer/reporter": "^5.1.6",
"@betterer/reporter": "^5.1.7",
"@phenomnomnominal/debug": "^0.2.5",

@@ -44,3 +44,3 @@ "@phenomnomnominal/worker-require": "^0.0.34",

"prettier": "^2.3.2",
"simple-git": "^2.44.0",
"simple-git": "^3.1.1",
"ts-node": "^10.2.1",

@@ -55,3 +55,3 @@ "tslib": "^2.3.1"

},
"gitHead": "1dda5c9255a578649ede3d6d5a7a748a5087991f"
"gitHead": "fdf5420104494eb24734f661178b19338c4452e8"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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