Skip to content

chore: release 3.0.0-beta.0 - #1728

Merged
ssalbdivad merged 4046 commits into
mainfrom
release/3.0.0-beta.0
Nov 18, 2026
Merged

ssalbdivad merged 4046 commits into
mainfrom
release/3.0.0-beta.0

Conversation

@ssalbdivad

@ssalbdivad ssalbdivad commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Publishes the first 3.0 beta from featherduster as of 8599524, the latest featherduster commit whose pr workflow passed every job. Work after that point keeps landing on featherduster (#1685). Merges main, with 2.2.10 (#1729), so this changelog sits on top of it.

Every package takes a prerelease version, so on merge publish.yml publishes each one under npm's next dist-tag and latest keeps resolving to arktype 2.2.10:

package version
arktype 3.0.0-beta.0
@ark/schema, @ark/util, @ark/fs 0.57.0-beta.0
@ark/attest 0.59.0-beta.0
@ark/json-schema 0.0.15-beta.0
@ark/fast-check 0.0.22-beta.0
arkregex 0.0.16-beta.0
@ark/aot, arksets 0.0.1-beta.0

3.0 docs at arktype.io/3

While arktype is a prerelease, update-gh-pages builds this commit's docs with NEXT_PUBLIC_BASE_PATH=/3. It also rebuilds the root from the latest stable arktype@* tag, and deploys both in one Pages artifact. A stable release builds the root alone, as before.

Next prefixes the base path only to next/link and router navigations. ark/docs/lib/basePath.ts adds it everywhere else: plain anchors, the search index and Markdown fetches, both Workers, onigasm.wasm, the favicon, and the redirect stand-ins. The error squiggle is inlined into CSS. Canonical links, og:url, llms.txt and the Markdown point at /3, and /3 pages are noindex.

Checked against a local copy of the combined site, with the arktype@2.2.9 tag's docs at the root and this build at /3. linkinator finds no broken links in either, and headless Chrome loads the search index, wasm, favicon and hash redirects under /3 with no failed requests or console errors.

Before merging:

  • Confirm @ark/aot and arksets have this repo's publish.yml set up as a trusted publisher on npm. Their 0.0.0 placeholders were published by hand.
  • Once merged, main is the 3.0 line, so npx skills add arktypeio/arktype and the README serve 3.0.
  • When 3.0.0 ships stable, the root becomes the 3.0 docs and /3 stops being deployed, so links into /3 will need redirects then.

Every app shipped `summary`, `throw`, `toJSON`, `toString` and TraversalError,
over 100 B gzipped on each row, though the usual handler reads `.issues` past an
`instanceof` test and nothing else. A class's members can't be tree-shaken, so
ArkErrors is now chosen from tiers by two new flags: `readsErrors` for anything
that may reach the object itself, and `readsSummary` for `.summary` alone.

The usage analysis now follows a call's result: a const holding it, read for
`issues`, `count` or `summary`, or past a test it has failed (the other arm of
`out instanceof type.errors`, or anything after `if (out instanceof type.errors)
return`). Reads of the class itself are followed too, as `instanceof`'s right
side only. Anything else may hold the errors, so keeps them whole, as do `assert`,
`from`, a second argument, a callback's ctx, code the analysis hands off to the
readers, a failed default's message and any other export of arktype. A hoisted
function isn't past a test textually before it, as it can run first.

A bundler keeps a class that extends another and anything a dead branch names,
which is why each tier is a class expression inside its flag's branch and not a
named class selected by it: esbuild folds the flag at link time, after it has
decided what's used. TraversalError is written the same way for the same reason.

Rows, esbuild min gz: 11 2744 to 2643, 11n 2861 to 2764, 46 5580 to 5488, 46n
5699 to 5603, 92 6644 to 6551, 92n 6837 to 6745, 230 9137 to 9038, 230n 9601 to
9499.
Reporting a union is what lists its branches: splitting alternatives out of each
issue's text, grouping them by subject and joining them. That is about 190 B
gzipped on a row whose only union is `string.ip`, whose branches, one for each
format, all fail with the same words, so its listing is the message of either.

A union's issue is now always named at its site, `listedIssue` or the new
`alikeIssue` the build writes where each branch is an intersection of checks with
the one description and no text of its own. So a program reaches the listing only
through a union that needs it. The issue is the same one, marker included, and
what writes a union's text again at a new path still lists it, so a piped or
Standard Schema read is unchanged, which the new test compares to the default build.

Rows, esbuild min gz: 46 5488 to 5310, 46n 5603 to 5419, 92 6551 to 6367, 92n
6745 to 6564, 230 9038 to 8850, 230n 9499 to 9307. 11 and 11n hold no union:
2643 to 2647 and 2764 to 2765, from the order bundling writes modules in.
`type` in a standalone build is a frozen object holding only the errors class, so
each `out instanceof type.errors` reads a property of an object a program ships for
nothing else. A precompiled module now names the class, leaving `type` unread and
out of the bundle wherever a module's sites were its only other reads. A read inside
a site is its factory's, whose text moves, so it's left. So is a write or an optional
read, which the object answers differently than the class's name would.

Rows, esbuild min gz: 11 2647 to 2613, 11n 2765 to 2737, 46 5310 to 5279, 46n 5419 to
5391, 92 6367 to 6334, 92n 6564 to 6535, 230 8850 to 8813, 230n 9307 to 9270.
A narrow the build proved reads only data wrote its failure's site apart from its
checker, which no other reader needs: only an intersection holds it, whose brief
says what a missing key expects. As its own site it's the text of `check` but for a
line, which gzip all but erases: 11n 2737 to 2719, level at 46n and 92n, where a
compiled structure still calls `siteOf`.
`string | null` was the only union most apps write that `domains` serves, and to
serve it `domains` looks a case up by the name of data's domain and carries what
any case's transform would need. A nullable's checker is one comparison and a
typeof, and only object domains, where typeof and arktype's domain differ, or a
branch that transforms, still go through `domains`. So it's no longer a shape: it
pays on every row, at any number of calls, unlike the shapes left, and is also two
branches on the hot path in place of a call and a lookup.

Rows, esbuild min gz: 11 2613 to 2578, 11n 2719 to 2683, 46 5279 to 5230, 46n 5393
to 5343, 92 6334 to 6272, 92n 6538 to 6476, 230 8813 to 8742, 230n 9268 to 9201.
A production webpack build of a package with `"sideEffects": false` dropped
the validators it wrote into re-exports. The build was clean and the app threw
`(0 , types_namespaceObject.U) is not a function` at its first call, however
the module was imported: directly, through a barrel, a star, a namespace.

The cause is webpack's lazy barrels meeting the as-built read (e3ae633), not
its side-effects optimization moving targets. webpack leaves a side-effect-free
module's re-exports unbuilt until a module asks for their names, and
LazyBarrels.classify forgets what was asked of a module with nothing to defer.
Raw, `export const U = type(...)` is a local export, so its names are forgotten.
The read then writes it as `import { create as U } from "~arktype/..."` and
`export { U }`, a re-export, which the rebuild's classify defers under no names
at all. What asked for U was built long ago and won't ask again, so the unit is
never built, U is flagged unprovided and the module comes out empty. Only a
rebuild can do this: `prune: false` writes the re-export on the first build,
where classify replays the names it was asked. `preset: "smallest"` keeps a
local export, and Rspack builds what's asked for itself.

So the names are asked again ahead of the rebuild, through webpack's own
compilation._lazyBarrels.request. Forcing the module not to be lazy instead
would build a re-export the raw build left alone, after the read, which fails
as a module the read missed. That member is private, so at seal an asked-for
re-export of a written module left unbuilt now fails the build: nothing else
would say so, and a webpack that changes how it defers them must not ship a
validator that's undefined. Rspack isn't checked, as its re-exports have no
such name, and a module handle read once rebuilt throws there.

Pinned on both compilers, each shape concatenating and not, with the case the
fix must not widen: a re-export nothing asks for stays unbuilt. 16 of them fail
on webpack without the fix, none on Rspack.
The gate's incremental fuzz stayed red past naming a bound copy by its original, at
`ARK_INCREMENTAL=1:242057:17`, on `type("string.date.parse").or("null")`. The other
number a process counts reached the same name through meta: `contentKeyOf` hashed
`node.metaJson`, which writes an object or function as what it's registered by, so
`$ark.object` in a new process and `$ark.object$2` after a build that registered
another. A keyword's `jsonSchema` was enough.

Meta is now read as inner is, so what's compared by identity prints alike, whichever
was registered first. Registered names told apart what nothing else in the name
does, so each case keeps its answer. A function reaches a validator's holes, which
compare it at runtime, or the build refuses it. An object in meta already kept a Type
from being named, but only among its references, and `declaredIn` and `declaredOut`
aren't references: that's how `string.date.parse` holding one got a name at all.
The name now reads, and refuses, exactly the nodes contentKeyOf reads, so a Type
declaring an object stays its own, as does `string.date.parse` until keywords' meta
objects are told apart from a program's.

identity.test.ts pins a declared object apart, which merges if the walk stops at
references, a function held the same way, and one a root holds shared. The settings'
validators are written again, as the names they intern by changed.
…gate writes

testCache writes a precompiled unit for every root a test finalizes, as `runtime:
"arktype"` would. A test running a standalone Precompiler in its own thread finalizes
roots there too, and a narrow that build proved only returns its reports compiles
reading `silentCtx`, a value no unit binds. So the gate read those roots as unbound, or as
two units for one key.

Only a standalone build proves it: interpreter.ts passes `runtime !== "arktype"` to
`proveFunction`, so a build writing units holds no such root. The hook now leaves them
alone rather than checking a pairing no build makes.
…head of its config

`configFirstOf` makes a size build's module load the config module ahead of its
validators, as those are created as their module loads, earlier than a site would run.
In a read program it did so for any module, wherever the program loaded the config. So a
module whose sites run as it loads, imported ahead of the config, ran fine where arktype
throws `configure() must be called before any Type is created`. The build's own check, R3,
catches that order, but not through an import it can't read, as `./m1.ts?v=1`: cells fuzz
found it, 2 of 40 apps, and it reproduces from 8ae3b00 on.

Such a module doesn't need the config first. A site running as its module loads runs as
early either way, so either the program loaded the config ahead of it, and nothing moves,
or arktype throws too. Only two kinds still need it: a module whose own imports load the
config, as its site would run after them, and one with a site in a function, which runs
once any module may have loaded it. Everything else is left to `fixConfigured` to throw.
…d now

Dynamic vs Precompiled still listed webpack and Rspack among the builds reading each
module alone, which they no longer are in production, and left out `prune: false` and
`--emit`, which are. It also said reading the whole program gives one value for
`type("unknown")` and `type.pipe()`. It's the other way round: a production bundle keeps
them apart as arktype does, and a build reading each module alone is what makes them one.

Checked on 20 builds, each of esbuild, Vite, webpack and Rspack as default, `smallest`,
`prune: false` and both, plus Node development, Node production and `--emit`. The new
identity row pins both differences on esbuild and the Node driver.
…undler keeps

Moving a union's text out of its issue's methods so they could tree-shake with
their readers had readers name what writes it. esbuild decides what's used before
it folds a build's flags, so those names kept the whole listing in any program
reading `~standard`, even with no union: login 1349 to 1567 B gz, moltar 1426 to
1635, shop 3725 to 3861, each of which exports its validators.

So readers call `_m` and `_r` again, as they did, and name nothing. Those two exist
only where a new `rewritesUnions` flag leaves them, written in its flag's branch,
which is true for Standard Schema or wherever errors reach code the build can't
follow. Each writer of a union's text, `listedIssue` and `alikeIssue`, gets its own
class of them, so a program with only alike unions doesn't name the listing either.
`_r` is written by what wrote the issue, from its branches' issues at a shorter
path, so neither writer takes a depth. The test comparing a union's issue to the
default build's covers both, through a pipe's reader and Standard Schema.
# Conflicts:
#	ark/aot/precompile.ts
#	ark/aot/usage.ts
… crash

F9 escaped the fuzzers, none of which set "sideEffects": false, and the graph read
had three barrels on one compiler. Each of 17 ways of reaching a validator through
a side-effect-free module now runs under a stripped source, TypeScript to ESM and
to CommonJS, and Rspack's swc to each, concatenating modules and not.

A pruned build matching its whole one counted as sound, including where both
crashed: the CommonJS barrels' ReferenceError passed on Rspack that way, and so
did this harness's own `library` scenario, whose runner kept a type annotation and
never ran. A crash they share now fails the run under its own count. A scenario
filter takes a prefix, as these names are long.
… both

5bc7eb8 went in without its gate, and exactOptionalPropertyTypes refuses an
explicit undefined for Scenario's only. pnpm lint and typecheckRepo exit 0 here.
F9 dropped a validator only under "sideEffects": false, which neither fuzzer ever
wrote, so hundreds of their webpack apps said nothing about it. With
ARK_FUZZ_SIDE_EFFECTS_FREE=1, an app's own package and its dependency declare it.
It's a flag for a round rather than a drawn dimension, so the seeds in the notes
still draw the same apps.

Members seed 4500 with it, 60 apps on esbuild, Vite, prune:false, webpack, Rspack
and the Node drivers: 0 unsound.
# Conflicts:
#	ark/aot/settingsValidators.ts
…n as built

`import { use } from "-!loader!./reader.ts"` runs only the loader it names, so
the plugin's own never reaches that module. The read took it as transformed
because of its file's name, and answered as it would for any other: a read of
`U.expression` in it is folded where the module is written, so U need not bake
it. Nothing could write the module, so the read stayed as it was and found
undefined on webpack and Rspack, on both default and smallest. A build keeping
every member throws there, as the same module is missed one at a time.

What decides is whether the module actually runs through the plugin's loader,
which each compiler says in its `loaders`, a persistent cache included. One that
doesn't is read as it was built, like what another plugin leaves: what it reads
is baked into the validators it reads, so the read gets the value arktype
returns rather than the throw of a whole build. This beats a refusal, since
nothing about the module is hidden from the read.

The same file built both ways is refused as being from two codes, even with
one text, or the first one read would decide for the other.
…oduction

The options and dynamic-vs-precompiled pages still listed them among the builds
reading one module at a time, which the as-built read ended for a production
build. Where they don't prune, in development or under `prune: false`, they do
read that way, so each page says that rather than dropping them. A probe of equal
definitions across two modules, cycles and scopes included, compares the same on
esbuild, webpack and Rspack in production.
…flag

A blanket "sideEffects": false had every bundler drop `import "./config.ts"`, so
all 12 configured apps of seed 61200 crashed on all 4 hosts, whole and pruned,
with "types0.ts creates a Type before configure() runs". That's the program's
mistake and the build saying so, and it hid what the flag is for in those apps, so
they now list that module as having one, as a project would. Seed 61200 with it:
0 unsound on esbuild, Vite, webpack and Rspack.
# Conflicts:
#	ark/aot/settingsValidators.ts
What a program reads of its errors decides how much of the errors class ships:
`summary` alone, or `throw`, `toJSON`, `toString` and TraversalError too. The
analysis read `type.errors` and `ArkErrors` only where a module imported them
from arktype itself. A module re-exporting them, as a shared package's barrel
does (`export { ArkErrors, type } from "arktype"`), handed them to importers the
analysis never read, so a program printing or constructing the class through
one shipped neither tier and found `summary` undefined.

Each export a module re-exports from arktype is now followed through the
import graph to the bindings importing it, which are read as a direct import
is: so an `instanceof` test through a barrel still counts as a test, and any
other read ships the whole class. A namespace, a factory input or code outside
the bundle reading it isn't followed and ships it whole, as does `export *` or
`export * as` from arktype, whose names it can't tell apart from the module's
own. import(), require() and `import =` of arktype are refused already.
This was referenced Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done (merged or closed)

Development

Successfully merging this pull request may close these issues.

1 participant