Skip to content

Commit 8e49a4d

Browse files
Merge branch 'main' into json-schema-type-inference-v1
2 parents 2e82c3c + 6d0639b commit 8e49a4d

89 files changed

Lines changed: 1828 additions & 423 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pullfrog.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# PULLFROG ACTION — DO NOT EDIT EXCEPT WHERE INDICATED
2+
name: Pullfrog
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
prompt:
7+
type: string
8+
description: Agent prompt
9+
workflow_call:
10+
inputs:
11+
prompt:
12+
description: Agent prompt
13+
type: string
14+
secrets: inherit
15+
16+
permissions:
17+
id-token: write
18+
19+
jobs:
20+
agent:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
25+
- name: Run agent
26+
uses: pullfrog/action@main
27+
with:
28+
prompt: ${{ inputs.prompt }}
29+
env:
30+
# Feel free to comment out any you won't use
31+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
32+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
33+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
34+
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
35+
CURSOR_API_KEY: ${{ secrets.CURSOR_API_KEY }}

ark/attest/__tests__/assertions.test.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { attest } from "@ark/attest"
22
import { MissingSnapshotError } from "@ark/attest/internal/assert/assertions.ts"
33
import { attestInternal } from "@ark/attest/internal/assert/attest.ts"
4+
import { registeredReference } from "@ark/schema"
5+
import { register } from "@ark/util"
46
import { type } from "arktype"
57
import * as assert from "node:assert/strict"
68

@@ -168,11 +170,14 @@ describe("type assertions", () => {
168170
})
169171

170172
it("does not boom on Type comparison", () => {
173+
const expectedRef = register(type.number)
174+
const actualRef = register(type.string)
175+
171176
// @ts-expect-error
172177
attest(() => attest(type.string).equals(type.number)).throws
173-
.snap(`AssertionError [ERR_ASSERTION]: Assertion including at least one function or object was not between reference equal items
174-
Expected: Function(fn10)
175-
Actual: Function(fn11)`)
178+
.equals(`AssertionError [ERR_ASSERTION]: Assertion including at least one function or object was not between reference equal items
179+
Expected: Function(${expectedRef})
180+
Actual: Function(${actualRef})`)
176181
})
177182

178183
it("doesn't boom on ArkErrors vs plain object", () => {

ark/attest/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ark/attest",
3-
"version": "0.54.0",
3+
"version": "0.56.0",
44
"license": "MIT",
55
"author": {
66
"name": "David Blass",
@@ -46,6 +46,7 @@
4646
"@typescript/analyze-trace": "0.10.1",
4747
"@typescript/vfs": "1.6.1",
4848
"arktype": "workspace:*",
49+
"@ark/schema": "workspace:*",
4950
"prettier": "3.6.2"
5051
},
5152
"devDependencies": {

ark/docs/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import "app/global.css"
21
import "fumadocs-twoslash/twoslash.css"
32
import { RootProvider } from "fumadocs-ui/provider"
43
import { Atkinson_Hyperlegible, Raleway } from "next/font/google"
54
import type { ReactNode } from "react"
65
import { ReleaseBanner } from "../components/ReleaseBanner.tsx"
6+
import "./global.css"
77
import { defineMetadata } from "./metadata.ts"
88
import { CSPostHogProvider } from "./providers.tsx"
99

ark/docs/components/dts/regex.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

ark/docs/components/dts/schema.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

ark/docs/components/dts/type.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

ark/docs/components/dts/util.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

ark/docs/content/docs/expressions/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ Add a type-only symbol to an existing type so that the only values that satisfy
213213
const Even = type("(number % 2)#even")
214214
type Even = typeof Even.infer
215215

216-
const good: Even = even.assert(2)
216+
const good: Even = Even.assert(2)
217217
// TypeScript: Type 'number' is not assignable to type 'Brand<number, "even">'
218218
const bad: Even = 5
219219
```
@@ -224,10 +224,10 @@ const bad: Even = 5
224224

225225
```ts
226226
// @noErrors
227-
const even = type.number.divisibleBy(2).brand("even")
227+
const Even = type.number.divisibleBy(2).brand("even")
228228
type Even = typeof Even.infer
229229

230-
const good: Even = even.assert(2)
230+
const good: Even = Even.assert(2)
231231
// TypeScript: Type 'number' is not assignable to type 'Brand<number, "even">'
232232
const bad: Even = 5
233233
```

ark/docs/next.config.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
11
import { createMDX } from "fumadocs-mdx/next"
22
import type { NextConfig } from "next"
3+
import { mkdtempSync } from "node:fs"
4+
import { tmpdir } from "node:os"
5+
import { join } from "node:path"
36
import { writeLlmsTxt } from "./lib/writeLlmsTxt.ts"
47
import { updateSnippetsEntrypoint } from "./lib/writeSnippetsEntrypoint.ts"
58

9+
// workaround for a bug in Node 25 that creates localStorage as an empty proxy,
10+
// leading to @typescript/vfs eventually throwing when it sees that it is not
11+
// undefined and tries to call `getItem`:
12+
13+
// https://github.com/nodejs/node/issues/60303
14+
15+
// this can be removed once the bug is addressed in Node
16+
if (!globalThis.localStorage?.getItem)
17+
globalThis.localStorage = undefined as never
18+
19+
// also set the --localstorage-file env var so subprocesses don't run into the same issue
20+
process.env.NODE_OPTIONS ??= ""
21+
const tmpDir = mkdtempSync(join(tmpdir(), "ark-localstorage-"))
22+
process.env.NODE_OPTIONS = `${process.env.NODE_OPTIONS} --localstorage-file=${join(tmpDir, "localstorage")}`
23+
624
updateSnippetsEntrypoint()
725
writeLlmsTxt()
826

0 commit comments

Comments
 (0)