@ark/attest 0.22.0 → 0.24.0
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.
package/out/assert/attest.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { type AttestConfig } from "../config.ts";
|
|
|
6
6
|
import { ChainableAssertions, type AssertionKind, type rootAssertions } from "./chainableAssertions.ts";
|
|
7
7
|
export type AttestFn = {
|
|
8
8
|
<expected, actual extends expected = never>(...args: actual extends never ? [
|
|
9
|
-
ErrorMessage<"Type-only assertion requires two explicit
|
|
9
|
+
ErrorMessage<"Type-only assertion requires two explicit generic params, e.g. attest<expected, actual>">
|
|
10
10
|
] : []): void;
|
|
11
11
|
<expected>(actual: expected): rootAssertions<expected, AssertionKind>;
|
|
12
12
|
instantiations: (count?: Measure<"instantiations"> | undefined) => void;
|
|
@@ -28,7 +28,7 @@ export declare class ChainableAssertions implements AssertionRecord {
|
|
|
28
28
|
}
|
|
29
29
|
export type AssertionKind = "value" | "type";
|
|
30
30
|
export type rootAssertions<t, kind extends AssertionKind> = valueAssertions<t, kind> & TypeAssertionsRoot;
|
|
31
|
-
export type valueAssertions<t, kind extends AssertionKind> = comparableValueAssertion<t, kind> & (t extends () => unknown ? functionAssertions<kind> : {});
|
|
31
|
+
export type valueAssertions<t, kind extends AssertionKind> = comparableValueAssertion<t, kind> & ([t] extends [() => unknown] ? functionAssertions<kind> : {});
|
|
32
32
|
export type nextAssertions<kind extends AssertionKind> = "type" extends kind ? TypeAssertionsRoot : {};
|
|
33
33
|
export type inferredAssertions<argsType extends [value: any, ...rest: any[]], kind extends AssertionKind, chained = argsType[0]> = rootAssertions<chained, kind> & (<Args extends argsType | [] = []>(...args: Args) => nextAssertions<kind>);
|
|
34
34
|
export type ChainContext = {
|
package/out/tsVersioning.js
CHANGED
|
@@ -23,6 +23,8 @@ export const forTypeScriptVersions = (versions, fn) => {
|
|
|
23
23
|
const nodeModules = join(assertPackageRoot(process.cwd()), "node_modules");
|
|
24
24
|
const tsPrimaryPath = join(nodeModules, "typescript");
|
|
25
25
|
const tsTemporaryPath = join(nodeModules, "typescript-temp");
|
|
26
|
+
if (existsSync(tsTemporaryPath))
|
|
27
|
+
unlinkSync(tsTemporaryPath);
|
|
26
28
|
if (existsSync(tsPrimaryPath))
|
|
27
29
|
renameSync(tsPrimaryPath, tsTemporaryPath);
|
|
28
30
|
try {
|
|
@@ -32,7 +34,7 @@ export const forTypeScriptVersions = (versions, fn) => {
|
|
|
32
34
|
try {
|
|
33
35
|
if (existsSync(tsPrimaryPath))
|
|
34
36
|
unlinkSync(tsPrimaryPath);
|
|
35
|
-
symlinkSync(targetPath, tsPrimaryPath);
|
|
37
|
+
symlinkSync(targetPath, tsPrimaryPath, "junction");
|
|
36
38
|
fn(version);
|
|
37
39
|
passedVersions.push(version);
|
|
38
40
|
}
|
|
@@ -53,6 +55,7 @@ export const forTypeScriptVersions = (versions, fn) => {
|
|
|
53
55
|
finally {
|
|
54
56
|
if (existsSync(tsTemporaryPath)) {
|
|
55
57
|
console.log(`⏮️ Restoring your original TypeScript version...`);
|
|
58
|
+
unlinkSync(tsPrimaryPath);
|
|
56
59
|
renameSync(tsTemporaryPath, tsPrimaryPath);
|
|
57
60
|
}
|
|
58
61
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ark/attest",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "David Blass",
|
|
6
6
|
"email": "david@arktype.io",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"@typescript/analyze-trace": "0.10.1",
|
|
36
36
|
"prettier": "3.3.3",
|
|
37
37
|
"@prettier/sync": "0.5.2",
|
|
38
|
-
"
|
|
39
|
-
"@ark/util": "0.
|
|
40
|
-
"
|
|
38
|
+
"@ark/fs": "0.19.0",
|
|
39
|
+
"@ark/util": "0.19.0",
|
|
40
|
+
"arktype": "2.0.0-rc.18"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"typescript": "5.7.0-
|
|
43
|
+
"typescript": "5.7.0-beta"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"typescript": "*"
|