Socket
Socket
Sign inDemoInstall

@arktype/attest

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@arktype/attest - npm Package Compare versions

Comparing version 0.7.10 to 0.8.0

out/index.d.ts

4

out/bench/baseline.d.ts

@@ -1,5 +0,5 @@

import type { BenchAssertionContext, BenchContext } from "./bench.js";
import type { BenchContext } from "./bench.js";
import { type MarkMeasure, type Measure, type MeasureComparison } from "./measure.js";
export declare const queueBaselineUpdateIfNeeded: (updated: Measure | MarkMeasure, baseline: Measure | MarkMeasure | undefined, ctx: BenchAssertionContext) => void;
export declare const queueBaselineUpdateIfNeeded: (updated: Measure | MarkMeasure, baseline: Measure | MarkMeasure | undefined, ctx: BenchContext) => void;
/** Pretty print comparison and set the process.exitCode to 1 if delta threshold is exceeded */
export declare const compareToBaseline: (result: MeasureComparison, ctx: BenchContext) => void;
import { snapshot } from "@arktype/util";
import { AssertionError } from "node:assert";
import process from "node:process";

@@ -43,7 +44,12 @@ import { queueSnapshotUpdate, writeSnapshotUpdatesOnExit } from "../cache/snapshots.js";

if (ctx.cfg.benchErrorOnThresholdExceeded) {
process.exitCode = 1;
// Summarize failures at the end of output
process.on("exit", () => {
console.error(`❌ ${message}`);
});
const errorSummary = `❌ ${message}`;
if (ctx.kind === "instantiations")
throw new AssertionError({ message: errorSummary });
else {
process.exitCode = 1;
// Summarize failures at the end of output
process.on("exit", () => {
console.error(errorSummary);
});
}
}

@@ -50,0 +56,0 @@ };

@@ -54,4 +54,2 @@ import { type SourcePosition } from "@arktype/fs";

isAsync: boolean;
};
export type BenchAssertionContext = BenchContext & {
kind: TimeAssertionName | "types" | "instantiations";

@@ -58,0 +56,0 @@ };

import type { TypeRelationship } from "../cache/writeAssertionCache.js";
import type { BenchAssertionContext, BenchContext } from "./bench.js";
import type { BenchContext } from "./bench.js";
import { type Measure, type TypeUnit } from "./measure.js";

@@ -16,2 +16,2 @@ export type BenchTypeAssertions = {

};
export declare const instantiationDataHandler: (ctx: BenchAssertionContext, args?: Measure<TypeUnit>, isBenchFunction?: boolean) => void;
export declare const instantiationDataHandler: (ctx: BenchContext, args?: Measure<TypeUnit>, isBenchFunction?: boolean) => void;

@@ -76,3 +76,3 @@ import { flatMorph } from "@arktype/util";

}
return flatMorph(completions, (prefix, entries) => entries.length >= 1 ? [prefix, entries] : []);
return flatMorph(completions, (prefix, entries) => entries.length >= 1 ? [prefix, entries.sort()] : []);
};

@@ -79,0 +79,0 @@ export const getDiagnosticsByFile = () => {

@@ -14,5 +14,5 @@ import { ensureDir, fromCwd } from "@arktype/fs";

benchPercentThreshold: 20,
benchErrorOnThresholdExceeded: false,
benchErrorOnThresholdExceeded: true,
filter: undefined,
testDeclarationAliases: ["bench", "it"],
testDeclarationAliases: ["bench", "it", "test"],
formatter: `npm exec --no -- prettier --write`,

@@ -19,0 +19,0 @@ shouldFormat: true

{
"name": "@arktype/attest",
"version": "0.7.10",
"version": "0.8.0",
"author": {

@@ -10,6 +10,6 @@ "name": "David Blass",

"type": "module",
"main": "./out/api.js",
"types": "./out/api.d.ts",
"main": "./out/index.js",
"types": "./out/index.d.ts",
"exports": {
".": "./out/api.js",
".": "./out/index.js",
"./internal/*": "./out/*"

@@ -25,6 +25,6 @@ },

"arktype": "latest",
"@typescript/vfs": "1.5.0",
"@typescript/vfs": "1.5.3",
"@typescript/analyze-trace": "0.10.1",
"@arktype/fs": "0.0.20",
"@arktype/util": "0.0.48"
"@arktype/util": "0.0.49"
},

@@ -31,0 +31,0 @@ "devDependencies": {

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