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

@best/runtime

Package Overview
Dependencies
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@best/runtime - npm Package Compare versions

Comparing version 7.0.1 to 8.0.0

8

dist/constants.js

@@ -6,3 +6,3 @@ /*

* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
*/
const BEFORE_ALL = 'beforeAll';

@@ -23,6 +23,6 @@ const BEFORE = 'before';

export const PRIMITIVE_NODE_TYPES = {
GROUP: "group",
BENCHMARK: "benchmark",
RUN: "run"
GROUP: 'group',
BENCHMARK: 'benchmark',
RUN: 'run',
};
//# sourceMappingURL=constants.js.map

@@ -6,3 +6,3 @@ /*

* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
*/
import { initializeBenchmarkConfig, getBenckmarkState } from './state';

@@ -9,0 +9,0 @@ import { runBenchmark as _runBenchmark } from './runner';

@@ -6,3 +6,3 @@ /*

* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
*/
import { makeDescribe, makeBenchmark, makeBenchmarkRun } from './utils/primitives-nodes';

@@ -33,3 +33,3 @@ const handler = (event, state) => {

}
if (currentDescribeBlock.type === "benchmark" && !currentDescribeBlock.run) {
if (currentDescribeBlock.type === 'benchmark' && !currentDescribeBlock.run) {
throw new Error(`Benchmark "${currentDescribeBlock.name}" must have a 'run()' function or contain benchmarks inside.`);

@@ -36,0 +36,0 @@ }

@@ -6,3 +6,3 @@ /*

* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
*/
import { dispatch } from './state';

@@ -9,0 +9,0 @@ import { HOOKS, RUN_BENCHMARK, MODES } from './constants';

@@ -6,3 +6,3 @@ /*

* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
*/
export function normalizeResults(benchmarkState) {

@@ -9,0 +9,0 @@ const { benchmarkName, executedIterations, executedTime: aggregate, results } = benchmarkState;

@@ -6,3 +6,3 @@ /*

* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
*/
import { raf, time, nextTick, withMacroTask, formatTime } from './utils/timers';

@@ -9,0 +9,0 @@ import { HOOKS } from './constants';

@@ -6,7 +6,7 @@ /*

* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
*/
import { getBenchmarkRootNode } from './state';
import { runBenchmarkIteration } from './run_iteration';
import { normalizeResults } from './results';
import { validateState } from "./utils/validate";
import { validateState } from './utils/validate';
function collectNodeResults(node) {

@@ -13,0 +13,0 @@ const { name, aggregate, startedAt, run, children } = node;

@@ -6,7 +6,7 @@ /*

* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
*/
import primitivesHandler from './primitives-handler';
import { makeDescribe } from './utils/primitives-nodes';
import DEFAULT_STATE from './utils/default-state';
import cloneState from "./utils/clone-state";
import cloneState from './utils/clone-state';
const eventHandlers = [primitivesHandler];

@@ -13,0 +13,0 @@ const ROOT_DESCRIBE_BLOCK_NAME = typeof BEST_CONFIG !== 'undefined' ? BEST_CONFIG.benchmarkName : 'ROOT_DESCRIBE_BLOCK';

@@ -6,3 +6,3 @@ /*

* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
*/
export default function cloneState(obj) {

@@ -9,0 +9,0 @@ const stateClone = Object.assign({}, obj);

@@ -6,5 +6,5 @@ /*

* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
*/
export default Object.freeze({
benchmarkName: "",
benchmarkName: '',
useMacroTaskAfterBenchmark: true,

@@ -11,0 +11,0 @@ maxDuration: 1000 * 20,

@@ -6,6 +6,6 @@ /*

* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
*/
import { RUN_BENCHMARK } from '../constants';
export const makeDescribe = (name, parent, mode) => ({
type: "group",
type: 'group',
mode: parent && !mode ? parent.mode : mode,

@@ -20,3 +20,3 @@ children: [],

export const makeBenchmark = (name, parent, mode) => ({
type: "benchmark",
type: 'benchmark',
mode: parent && !mode ? parent.mode : mode,

@@ -30,3 +30,3 @@ hooks: [],

export const makeBenchmarkRun = (fn, parent) => ({
type: "run",
type: 'run',
fn,

@@ -38,4 +38,4 @@ name: RUN_BENCHMARK,

hooks: [],
aggregate: 0
aggregate: 0,
});
//# sourceMappingURL=primitives-nodes.js.map

@@ -6,3 +6,3 @@ /*

* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
*/
/*

@@ -108,5 +108,7 @@ * This code is a slight modification of VueJS next-tick

}
return cb ? null : new Promise(resolve => {
_resolve = resolve;
});
return cb
? null
: new Promise((resolve) => {
_resolve = resolve;
});
}

@@ -113,0 +115,0 @@ export const time = window.performance.now.bind(window.performance);

@@ -6,3 +6,3 @@ /*

* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
*/
*/
export function validateState(benchmarkState) {

@@ -9,0 +9,0 @@ const { rootDescribeBlock, currentDescribeBlock, benchmarkDefinitionError } = benchmarkState;

@@ -18,3 +18,3 @@ {

},
"version": "7.0.1"
"version": "8.0.0"
}
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