@ark/attest 0.59.0-beta.0 → 0.59.0-beta.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,4 +1,4 @@
1
- import { constructorNameOf, expressionOf, printable, throwInternalError } from "@ark/util";
1
+ import { constructorNameOf, expressionOf, printable, throwInternalError } from "arktype/util";
2
2
  import * as assert from "node:assert/strict";
3
3
  import { isDeepStrictEqual } from "node:util";
4
4
  export const throwAssertionError = ({ stack, ...errorArgs }) => {
@@ -125,10 +125,7 @@ const unversionedAssertEquals = (expected, actual, ctx) => {
125
125
  throwUnequal("Expected values to be strictly deep-equal:", expected, actual);
126
126
  }
127
127
  }
128
- else if (typeof expected === "object" ||
129
- typeof expected === "function" ||
130
- typeof actual === "function" ||
131
- typeof actual === "function") {
128
+ else if (isReference(expected) || isReference(actual)) {
132
129
  throwUnequal("Assertion including at least one function or object was not between reference equal items", expected, actual);
133
130
  // guaranteed to be two primitives at this point
134
131
  }
@@ -1,5 +1,5 @@
1
1
  import { type SourcePosition } from "@ark/fs";
2
- import type { ErrorMessage } from "@ark/util";
2
+ import type { ErrorMessage } from "arktype/util";
3
3
  import type { Measure } from "../bench/measure.ts";
4
4
  import { type TypeAssertionData } from "../cache/getCachedAssertions.ts";
5
5
  import { type AttestConfig } from "../config.ts";
@@ -1,4 +1,4 @@
1
- import { snapshot, type Constructor, type ErrorType, type isDisjoint } from "@ark/util";
1
+ import { snapshot, type Constructor, type ErrorType, type isDisjoint } from "arktype/util";
2
2
  import { type } from "arktype";
3
3
  import type { Completions } from "../cache/getCachedAssertions.ts";
4
4
  import type { AssertionContext } from "./attest.ts";
@@ -1,5 +1,5 @@
1
1
  import { caller, positionToString } from "@ark/fs";
2
- import { printable, snapshot } from "@ark/util";
2
+ import { printable, snapshot } from "arktype/util";
3
3
  import prettier from "@prettier/sync";
4
4
  import { type } from "arktype";
5
5
  import { isDeepStrictEqual } from "node:util";
@@ -1,4 +1,4 @@
1
- import { snapshot, throwInternalError } from "@ark/util";
1
+ import { snapshot, throwInternalError } from "arktype/util";
2
2
  import process from "node:process";
3
3
  import { throwAssertionError } from "../assert/assertions.js";
4
4
  import { queueSnapshotUpdate, writeSnapshotUpdatesOnExit } from "../cache/snapshots.js";
package/out/bench/type.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { caller } from "@ark/fs";
2
- import { throwInternalError } from "@ark/util";
2
+ import { throwInternalError } from "arktype/util";
3
3
  import ts from "typescript";
4
4
  import { getBenchAssertionAtPosition } from "../cache/getCachedAssertions.js";
5
5
  import { TsServer, getAbsolutePosition, getAncestors, getDescendants, nearestCallExpressionChild } from "../cache/ts.js";
@@ -1,5 +1,5 @@
1
1
  import { filePath, positionToString, readFile, readJson, shell, writeFile, writeJson } from "@ark/fs";
2
- import { throwInternalError } from "@ark/util";
2
+ import { throwInternalError } from "arktype/util";
3
3
  import { existsSync } from "node:fs";
4
4
  import { basename, dirname, isAbsolute, join } from "node:path";
5
5
  import { getConfig } from "../config.js";
package/out/cache/ts.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { fromCwd, readFile } from "@ark/fs";
2
- import { printable, throwError, throwInternalError } from "@ark/util";
2
+ import { printable, throwError, throwInternalError } from "arktype/util";
3
3
  import * as tsvfs from "@typescript/vfs";
4
4
  import { readFileSync } from "node:fs";
5
5
  import { resolve, dirname, join } from "node:path";
@@ -1,5 +1,5 @@
1
1
  import { filePath } from "@ark/fs";
2
- import { throwInternalError } from "@ark/util";
2
+ import { throwInternalError } from "arktype/util";
3
3
  import * as tsvfs from "@typescript/vfs";
4
4
  import ts from "typescript";
5
5
  import { getConfig } from "../config.js";
@@ -1,4 +1,4 @@
1
- import { flatMorph } from "@ark/util";
1
+ import { flatMorph } from "arktype/util";
2
2
  import ts from "typescript";
3
3
  import { getConfig } from "../config.js";
4
4
  import { getFileKey } from "../utils.js";
package/out/config.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type JsonObject } from "@ark/util";
1
+ import { type JsonObject } from "arktype/util";
2
2
  import type * as prettier from "prettier";
3
3
  /** tsjs is TypeScript's JS API, tsgo its native port and tsrs a Rust port */
4
4
  export type Checker = "tsjs" | "tsgo" | "tsrs";
package/out/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ensureDir, fromCwd } from "@ark/fs";
2
- import { tryParseNumber } from "@ark/util";
2
+ import { tryParseNumber } from "arktype/util";
3
3
  import { existsSync } from "node:fs";
4
4
  import { join, resolve } from "node:path";
5
5
  export const getDefaultAttestConfig = () => ({
@@ -1,4 +1,4 @@
1
- import { flatMorph, throwInternalError } from "@ark/util";
1
+ import { flatMorph, throwInternalError } from "arktype/util";
2
2
  import { getConfig } from "../config.js";
3
3
  import { getFileKey } from "../utils.js";
4
4
  import { getInstantiationsContributedByNodes } from "./instantiations.js";
@@ -1,4 +1,4 @@
1
- import { throwError } from "@ark/util";
1
+ import { throwError } from "arktype/util";
2
2
  import { execFileSync } from "node:child_process";
3
3
  import { basename, dirname, extname, join } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
@@ -1,4 +1,4 @@
1
- import { type JsonObject } from "@ark/util";
1
+ import { type JsonObject } from "arktype/util";
2
2
  import type * as tsgoAst from "typescript/ast";
3
3
  import type * as tsgoApi from "typescript/sync";
4
4
  import type { LinePositionRange } from "../cache/getCachedAssertions.ts";
package/out/ts7/server.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { fromCwd } from "@ark/fs";
2
- import { throwError, throwInternalError } from "@ark/util";
2
+ import { throwError, throwInternalError } from "arktype/util";
3
3
  import { existsSync } from "node:fs";
4
4
  import { createRequire } from "node:module";
5
5
  import { dirname, join, resolve } from "node:path";
@@ -1,5 +1,5 @@
1
1
  import { positionToString } from "@ark/fs";
2
- import { throwInternalError } from "@ark/util";
2
+ import { throwInternalError } from "arktype/util";
3
3
  import { TsgoServer, ast, getDescendants } from "./server.js";
4
4
  export const getSnapCallArgs = (position, functionName) => {
5
5
  const file = TsgoServer.instance.getSourceFileOrThrow(position.file);
package/out/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { caller } from "@ark/fs";
2
- import { throwError } from "@ark/util";
2
+ import { throwError } from "arktype/util";
3
3
  import { existsSync } from "node:fs";
4
4
  import { basename, relative, resolve } from "node:path";
5
5
  import ts from "typescript";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ark/attest",
3
- "version": "0.59.0-beta.0",
3
+ "version": "0.59.0-beta.2",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "David Blass",
@@ -40,20 +40,19 @@
40
40
  "@typescript/analyze-trace": "0.10.1",
41
41
  "@typescript/vfs": "1.6.1",
42
42
  "prettier": "3.6.2",
43
- "@ark/fs": "0.57.0-beta.0",
44
- "@ark/schema": "0.57.0-beta.0",
45
- "@ark/util": "0.57.0-beta.0",
46
- "arktype": "3.0.0-beta.0"
43
+ "@ark/fs": "0.57.0-beta.2"
47
44
  },
48
45
  "devDependencies": {
49
46
  "tsrs": "0.18.0-ts7.1.0-dev.20260929",
50
47
  "typescript": "7.1.0-beta",
51
48
  "typescript-6": "npm:typescript@6.0.3",
52
- "typescript-7": "npm:typescript@7.1.0-beta"
49
+ "typescript-7": "npm:typescript@7.1.0-beta",
50
+ "arktype": "3.0.0-beta.2"
53
51
  },
54
52
  "peerDependencies": {
55
53
  "typescript": "*",
56
- "tsrs": "*"
54
+ "tsrs": "*",
55
+ "arktype": "^3.0.0-beta.2"
57
56
  },
58
57
  "peerDependenciesMeta": {
59
58
  "tsrs": {