Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: iterate on docs publishing #937

Merged
merged 2,570 commits into from
Apr 28, 2024
Merged
Changes from 1 commit
Commits
Show all changes
2570 commits
Select commit Hold shift + click to select a range
9c9e782
rely on ambient for Ark
ssalbdivad Apr 3, 2024
b1b7391
TypeNode=>SchemaNode
ssalbdivad Apr 3, 2024
0565a00
more schema rename
ssalbdivad Apr 3, 2024
7555fa3
more schema=>def
ssalbdivad Apr 3, 2024
ba59ea3
continuuu
ssalbdivad Apr 3, 2024
154969a
fix
ssalbdivad Apr 3, 2024
77bee77
continuuu
ssalbdivad Apr 4, 2024
f5eee9e
comment out crashing test
ssalbdivad Apr 4, 2024
3854650
fix generic instantiation
ssalbdivad Apr 4, 2024
1aac790
module to class
ssalbdivad Apr 4, 2024
9363f5a
continuuu
ssalbdivad Apr 4, 2024
f613e37
begin node unification
ssalbdivad Apr 4, 2024
1055d08
decouple node implementations
ssalbdivad Apr 4, 2024
5f129f1
work on static proto
ssalbdivad Apr 4, 2024
a28428c
ja
ssalbdivad Apr 4, 2024
a3480cf
switch to biome
ssalbdivad Apr 4, 2024
6bbebe6
=>biome
ssalbdivad Apr 4, 2024
b2f720a
full static proto
ssalbdivad Apr 4, 2024
01c2744
continuu
ssalbdivad Apr 4, 2024
90afe79
implement bases straiciassdfdls
ssalbdivad Apr 4, 2024
7c9ebe7
fix fix mixmix
ssalbdivad Apr 4, 2024
4373295
cbtrtre
ssalbdivad Apr 4, 2024
a9ce706
moarmoarmoarmoar
ssalbdivad Apr 4, 2024
3c7d687
continuu
ssalbdivad Apr 5, 2024
d15e731
more to attachments, remove base constraints
ssalbdivad Apr 5, 2024
20c5a30
remove UnknownNode
ssalbdivad Apr 5, 2024
22665f4
convert remaining subclasses
ssalbdivad Apr 5, 2024
88d4e41
fix more integrate more blah
ssalbdivad Apr 5, 2024
97804b0
continuuuu
ssalbdivad Apr 5, 2024
2707349
continuuu
ssalbdivad Apr 5, 2024
185a7f7
schema/constraint kind
ssalbdivad Apr 5, 2024
02cb5da
Revert "continuuu"
ssalbdivad Apr 5, 2024
f89ccda
continuuuu
ssalbdivad Apr 5, 2024
5c08934
switch back to declaration input for baseschema
ssalbdivad Apr 5, 2024
7b7b5ec
begin integrating type and schema update deps
ssalbdivad Apr 5, 2024
9df2bea
remove root
ssalbdivad Apr 6, 2024
628ba33
continuu
ssalbdivad Apr 6, 2024
2b463bd
continuuu
ssalbdivad Apr 6, 2024
c332f78
almost fix all schema ereorsjeorsoi
ssalbdivad Apr 6, 2024
220aaf0
work on wrapped schema
ssalbdivad Apr 6, 2024
a5c0c21
rename out param
ssalbdivad Apr 6, 2024
e282a81
fix perf
ssalbdivad Apr 6, 2024
58993b6
continuu
ssalbdivad Apr 6, 2024
c7a8129
moar
ssalbdivad Apr 6, 2024
06efb1e
maybe fixoio
ssalbdivad Apr 6, 2024
6746467
ok
ssalbdivad Apr 6, 2024
291d81f
mmm
ssalbdivad Apr 6, 2024
1676e79
hkt.key=>args
ssalbdivad Apr 6, 2024
c53bfe9
moar
ssalbdivad Apr 6, 2024
4f4aa26
apply scope
ssalbdivad Apr 7, 2024
9c17980
keep going
ssalbdivad Apr 7, 2024
e562527
cntnurntusd
ssalbdivad Apr 7, 2024
fbaabe8
continuu
ssalbdivad Apr 7, 2024
3205e75
more
ssalbdivad Apr 7, 2024
206b845
continuu
ssalbdivad Apr 7, 2024
ec3fc3c
merge args with $
ssalbdivad Apr 7, 2024
d0bf2fb
Revert "merge args with $"
ssalbdivad Apr 7, 2024
9780d94
work
ssalbdivad Apr 7, 2024
e45e5aa
continuuu
ssalbdivad Apr 7, 2024
1a95fab
initial wrappable
ssalbdivad Apr 7, 2024
e26aee2
reduce errors
ssalbdivad Apr 7, 2024
fbe577d
continnuuuuu
ssalbdivad Apr 7, 2024
8b1ac9f
continuuu
ssalbdivad Apr 7, 2024
a06a6fe
continue
ssalbdivad Apr 7, 2024
c304224
ez 26
ssalbdivad Apr 7, 2024
c891fb8
16
ssalbdivad Apr 7, 2024
e711bf0
continuu
ssalbdivad Apr 9, 2024
edc00e4
continu
ssalbdivad Apr 9, 2024
f036b53
Merge branch '2.0' of github.com:arktypeio/arktype into 2.0
ssalbdivad Apr 9, 2024
d000f90
Revert "continu"
ssalbdivad Apr 9, 2024
eddeeca
remove morphNode perf is trash
ssalbdivad Apr 9, 2024
e97e489
bifixoio
ssalbdivad Apr 9, 2024
7dabc4a
Revert "bifixoio"
ssalbdivad Apr 9, 2024
4068411
ok
ssalbdivad Apr 9, 2024
83ffd82
super continuu
ssalbdivad Apr 9, 2024
ddb42db
remove morph out validator for now
ssalbdivad Apr 9, 2024
3184b0f
ctndsafionsdaoi
ssalbdivad Apr 9, 2024
c544fd9
huh
ssalbdivad Apr 9, 2024
591130d
bad
ssalbdivad Apr 9, 2024
3c5f73a
Revert "bad"
ssalbdivad Apr 9, 2024
7edc596
Revert "huh"
ssalbdivad Apr 9, 2024
06caae7
Revert "ctndsafionsdaoi"
ssalbdivad Apr 9, 2024
15523ab
Revert "remove morph out validator for now"
ssalbdivad Apr 9, 2024
5ea4c42
figure stfasdfhio
ssalbdivad Apr 9, 2024
1c5334f
continuuuu
ssalbdivad Apr 10, 2024
e6cfdaa
moar
ssalbdivad Apr 10, 2024
282bad8
remove args param
ssalbdivad Apr 10, 2024
34d609d
Revert "remove args param"
ssalbdivad Apr 10, 2024
acdc521
down to 1
ssalbdivad Apr 10, 2024
7b90a03
ambient & $
ssalbdivad Apr 10, 2024
3ad2416
fix last type error
ssalbdivad Apr 10, 2024
1a52b74
continuuu
ssalbdivad Apr 10, 2024
9fdc85f
more
ssalbdivad Apr 10, 2024
08fba74
moar
ssalbdivad Apr 10, 2024
93e166e
continuu
ssalbdivad Apr 10, 2024
fd55c60
0=>527 errors, begin splitting schema implementation from types
ssalbdivad Apr 10, 2024
5bf6a03
continue
ssalbdivad Apr 10, 2024
1e0e6b8
continuu
ssalbdivad Apr 10, 2024
9547ba6
fix
ssalbdivad Apr 10, 2024
7fcdb9f
begin working on api layer
ssalbdivad Apr 10, 2024
ac41557
continueuuuewu ooof
ssalbdivad Apr 10, 2024
aa35b9d
whoops
ssalbdivad Apr 10, 2024
2e82110
who knows
ssalbdivad Apr 11, 2024
46293b6
more raws
ssalbdivad Apr 11, 2024
712fc06
171
ssalbdivad Apr 11, 2024
0d86b8f
69
ssalbdivad Apr 11, 2024
aa86c37
47
ssalbdivad Apr 11, 2024
c9e10a3
44
ssalbdivad Apr 11, 2024
7acaf85
flattenni
ssalbdivad Apr 11, 2024
3098a9d
17
ssalbdivad Apr 11, 2024
d1940ff
5
ssalbdivad Apr 11, 2024
90aefbb
evaluate => show
ssalbdivad Apr 11, 2024
73697be
0
ssalbdivad Apr 11, 2024
9e12a05
work on cyclic imports
ssalbdivad Apr 11, 2024
5c18cfe
cnfidsnfsna
ssalbdivad Apr 12, 2024
2ca2244
continuuu
ssalbdivad Apr 12, 2024
b9bafe4
attachments cleanup
ssalbdivad Apr 12, 2024
ebfe7ed
amdfoidsnosaifhoifadshfosia
ssalbdivad Apr 12, 2024
7e45c76
try reintegrating scope-attached keywords
ssalbdivad Apr 12, 2024
d6cad16
migrate back to eslint/prettier
ssalbdivad Apr 12, 2024
82b1cdf
apply prettier experimental ternaries
ssalbdivad Apr 12, 2024
9e34b18
👋 cycli c imports
ssalbdivad Apr 12, 2024
700770b
???????????????
ssalbdivad Apr 12, 2024
c7dab60
more import fixes
ssalbdivad Apr 12, 2024
d6cddca
fix naming
ssalbdivad Apr 12, 2024
9cdea3a
continuuu
ssalbdivad Apr 12, 2024
4fc7255
fix more stuff
ssalbdivad Apr 12, 2024
ed0109f
continue new parsing
ssalbdivad Apr 13, 2024
30e9237
bump versions
ssalbdivad Apr 13, 2024
dd9bf33
bump versions again
ssalbdivad Apr 13, 2024
cbc6bce
remove numeric/integer literal
ssalbdivad Apr 16, 2024
a019fa9
try to simplify error contexts
ssalbdivad Apr 16, 2024
5c6e262
tests run
ssalbdivad Apr 16, 2024
b7b2789
uncomment generic test
ssalbdivad Apr 16, 2024
dff443b
migrate some changes over from node:test
ssalbdivad Apr 16, 2024
d773b82
moar
ssalbdivad Apr 16, 2024
39ae50d
continuuuu
ssalbdivad Apr 17, 2024
0789f4b
migrate to vitest
ssalbdivad Apr 17, 2024
2fbe73d
all schema test passing
ssalbdivad Apr 17, 2024
f1dbcbb
430
ssalbdivad Apr 17, 2024
ccbde7d
Merge branch 'schema-split' into vitest
ssalbdivad Apr 17, 2024
cec76d5
remove redundant top-level describes
ssalbdivad Apr 17, 2024
f020f35
iterate on vitest configs
ssalbdivad Apr 17, 2024
79b38e1
fix schema build
ssalbdivad Apr 17, 2024
6b9ea76
489
ssalbdivad Apr 17, 2024
f057f49
511
ssalbdivad Apr 17, 2024
7c61629
fix vitest extension config
ssalbdivad Apr 17, 2024
058fa5f
add spread tuple test case
ssalbdivad Apr 17, 2024
872b2a2
allow mocha for test explorer
ssalbdivad Apr 17, 2024
4130cf5
fix some scope binding
ssalbdivad Apr 18, 2024
bb3a123
merge vitest
ssalbdivad Apr 18, 2024
54ae2ad
fix some test names
ssalbdivad Apr 18, 2024
a0652aa
continuuuu
ssalbdivad Apr 18, 2024
193df13
fix some self-owns
ssalbdivad Apr 18, 2024
0a05412
496
ssalbdivad Apr 18, 2024
c9403ac
mocha mocha
ssalbdivad Apr 18, 2024
5495420
yeah ok good
ssalbdivad Apr 18, 2024
331018d
24
ssalbdivad Apr 18, 2024
ba4f896
add + begin integrating contextualize blocks
ssalbdivad Apr 18, 2024
ecdbbc6
finish contextualizing
ssalbdivad Apr 18, 2024
bbefa4f
fix proto round-trip
ssalbdivad Apr 18, 2024
53a27db
temporarily disable some tests
ssalbdivad Apr 18, 2024
dac3e01
add attest assert and narrow APIs, update arkdark
ssalbdivad Apr 18, 2024
217babb
lint ignore scratch file
ssalbdivad Apr 18, 2024
34311a4
fix cerals
ssalbdivad Apr 18, 2024
f38f7b3
mori scori
ssalbdivad Apr 18, 2024
e751ca6
iterate on attest + at asserts
ssalbdivad Apr 18, 2024
52d53df
fix .narrow
ssalbdivad Apr 18, 2024
8c7f7e5
fix submodules
ssalbdivad Apr 18, 2024
a4eb6b4
496
ssalbdivad Apr 18, 2024
441098b
add $ prefix for local implementation, begin decoupling cache from $
ssalbdivad Apr 18, 2024
95e2e58
FIX ALL TESTS 🎊🎊🎊
ssalbdivad Apr 18, 2024
ee4c44a
add t for extracting inner type
ssalbdivad Apr 18, 2024
d106401
clarify error path test example
ssalbdivad Apr 18, 2024
2a32f93
bump versions
ssalbdivad Apr 18, 2024
63527f8
bump version
ssalbdivad Apr 19, 2024
2a0862c
begin brainstorming pipe
ssalbdivad Apr 19, 2024
fb73d02
more pipe brainstorming
ssalbdivad Apr 19, 2024
b8c26bf
undiscriminate
ssalbdivad Apr 20, 2024
3054d8e
remove Type overloads for and/or
ssalbdivad Apr 20, 2024
9c64c8c
fix some type errors
ssalbdivad Apr 21, 2024
04d635a
continu
ssalbdivad Apr 21, 2024
b96b706
add missing annotation
ssalbdivad Apr 21, 2024
5e7c9c7
begin decoupling type/schema types
ssalbdivad Apr 21, 2024
38fe6fc
intersection type cleanup
ssalbdivad Apr 21, 2024
e918cbc
comment
ssalbdivad Apr 21, 2024
8c66f51
initial cachce
ssalbdivad Apr 21, 2024
4a1f2eb
Revert "initial cachce"
ssalbdivad Apr 21, 2024
d644c2f
workaround match
ssalbdivad Apr 21, 2024
6effe73
raw type parser
ssalbdivad Apr 21, 2024
e45b628
bind more exported methods
ssalbdivad Apr 21, 2024
c9843bc
fix error structure for morphs
ssalbdivad Apr 21, 2024
949ad0c
add intersection context for pipe
ssalbdivad Apr 22, 2024
c87f505
initial pipe implementation
ssalbdivad Apr 22, 2024
8f7eda5
fix out
ssalbdivad Apr 22, 2024
ac721a7
in/out nodes=>to/from on morphs, simplify attachments
ssalbdivad Apr 22, 2024
26bae58
more piping
ssalbdivad Apr 22, 2024
d7ac7af
fix any/never ops
ssalbdivad Apr 22, 2024
767df56
reintegrate JIT
ssalbdivad Apr 22, 2024
11cd078
schema classes
ssalbdivad Apr 23, 2024
eb85356
constraint classes?
ssalbdivad Apr 23, 2024
f9e9f9c
fix tests for non-compiled
ssalbdivad Apr 23, 2024
4f92ab1
remove old attachments, fix most compiled tests
ssalbdivad Apr 23, 2024
b1b2eb8
fix all tests with JIT on/off
ssalbdivad Apr 23, 2024
e51b104
fix deopt
ssalbdivad Apr 23, 2024
e637ba2
fix lint errors, remove docgen
ssalbdivad Apr 23, 2024
f3a245b
avoid arrow parens
ssalbdivad Apr 23, 2024
0fe0d2b
private => _
ssalbdivad Apr 23, 2024
56bbdc6
fix union error flattening
ssalbdivad Apr 23, 2024
21eee01
Revert "fix union error flattening"
ssalbdivad Apr 23, 2024
51afdac
reintegrate missing prop error
ssalbdivad Apr 23, 2024
77815b8
refine morphs/pipes
ssalbdivad Apr 24, 2024
82c01c1
iterate on piping
ssalbdivad Apr 24, 2024
90b021a
new pipe API
ssalbdivad Apr 24, 2024
ceabbc7
begin cyclci
ssalbdivad Apr 24, 2024
fb7d29f
Revert "begin cyclci"
ssalbdivad Apr 24, 2024
96f992b
ff
ssalbdivad Apr 24, 2024
77ab3ff
bump versions
ssalbdivad Apr 24, 2024
d92a533
add latest script
ssalbdivad Apr 25, 2024
8c1df93
add cyclic tests
ssalbdivad Apr 25, 2024
f1db377
pre cyclic schema
ssalbdivad Apr 25, 2024
f5db640
more cycling
ssalbdivad Apr 25, 2024
af0ec9a
more work on cycles
ssalbdivad Apr 26, 2024
f15fbf8
begin working on alias node
ssalbdivad Apr 26, 2024
4a7925e
begin alias node
ssalbdivad Apr 26, 2024
b3f43ef
continue refining alias node
ssalbdivad Apr 26, 2024
50aea26
iniital cyclic implementation, non-compiled
ssalbdivad Apr 26, 2024
97ffef7
jit cyclic
ssalbdivad Apr 26, 2024
d0569a1
begin working on cyclic intersection/union
ssalbdivad Apr 26, 2024
eec8133
baseName=>id,innerId/typeId=>hash
ssalbdivad Apr 26, 2024
5d624f0
unsure
ssalbdivad Apr 26, 2024
b48e6c3
refactor node parsing between scope=
ssalbdivad Apr 26, 2024
3341082
fix errors other than cyclic intersection
ssalbdivad Apr 26, 2024
07aeb6b
move unknown union out of scope initialization
ssalbdivad Apr 26, 2024
04c3917
fix cyclic intersections
ssalbdivad Apr 26, 2024
5ff14db
fix cyclic unions, intersections
ssalbdivad Apr 26, 2024
7721645
work on index
ssalbdivad Apr 27, 2024
147db26
fix index traversal
ssalbdivad Apr 27, 2024
1a120e2
more index signature fixes
ssalbdivad Apr 27, 2024
7f44dfb
add jitless config option
ssalbdivad Apr 27, 2024
521dfc7
ehh
ssalbdivad Apr 27, 2024
5247946
remove declaration map
ssalbdivad Apr 28, 2024
5bdd7aa
cherry pick scope name fix
ssalbdivad Apr 28, 2024
674ead2
add some basic intro docs
ssalbdivad Apr 28, 2024
71a07c2
publish
ssalbdivad Apr 28, 2024
7e1ee24
revert to ws versions
ssalbdivad Apr 28, 2024
9b6a5aa
last one
ssalbdivad Apr 28, 2024
613f2a1
ci iter
ssalbdivad Apr 28, 2024
8043886
try docs again
ssalbdivad Apr 28, 2024
ccc5def
merge main
ssalbdivad Apr 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
continuuu
  • Loading branch information
ssalbdivad committed Apr 7, 2024
commit e45e5aa75743102b8258a9e2364df461774441c9
7 changes: 5 additions & 2 deletions ark/schema/module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { DynamicBase, type isAny } from "@arktype/util"
import { DynamicBase, type Hkt, type isAny } from "@arktype/util"
import type { Schema } from "./base.js"
import type { GenericSchema } from "./generic.js"
import type { BaseSchema, arkKind } from "./main.js"
import type { exportedNameOf } from "./scope.js"

export type PreparsedNodeResolution = GenericSchema | SchemaModule
@@ -15,4 +16,6 @@ export type exportScope<$ = any> = {
: Schema<$[k], $>
}

export class SchemaModule<$ = any> extends DynamicBase<exportScope<$>> {}
export class SchemaModule<$ = any> extends DynamicBase<exportScope<$>> {
declare readonly [arkKind]: "module"
}
36 changes: 26 additions & 10 deletions ark/schema/scope.ts
Original file line number Diff line number Diff line change
@@ -8,7 +8,6 @@ import {
type evaluate,
flatMorph,
type flattenListable,
type instantiate,
isThunk,
type requireKeys,
throwParseError
@@ -149,12 +148,24 @@ export type exportedNameOf<$> = Exclude<keyof $ & string, PrivateDeclaration>

export type PrivateDeclaration<key extends string = string> = `#${key}`

export type instantiate<
scope extends SchemaScope,
kind extends "hkt" | "module" | "generic",
args
> = ReturnType<
(scope & {
readonly [Hkt.args]: args
})[kind]
>

export class SchemaScope<$ = any> implements Hkt.Kind {
declare $: $
declare infer: distillOut<$>
declare inferIn: distillIn<$>
declare [Hkt.args]: unknown
declare hkt: (t: this[Hkt.args]) => BaseSchema<typeof t, $>
declare module: (t: this[Hkt.args]) => SchemaModule<typeof t>
declare generic: (t: this[Hkt.args]) => GenericSchema<string[]>

readonly config: ArkConfig
readonly resolvedConfig: ResolvedArkConfig
@@ -201,7 +212,7 @@ export class SchemaScope<$ = any> implements Hkt.Kind {
schema<const def extends SchemaDef>(
def: def,
opts?: NodeParseOptions
): instantiate<this, inferSchema<def, $>> {
): instantiate<this, "hkt", inferSchema<def, $>> {
return parseNode(schemaKindOf(def), def, this, opts) as never
}

@@ -212,7 +223,7 @@ export class SchemaScope<$ = any> implements Hkt.Kind {
units<const branches extends array>(
values: branches,
opts?: NodeParseOptions
): instantiate<this, branches[number]> {
): instantiate<this, "hkt", branches[number]> {
{
const uniqueValues: unknown[] = []
for (const value of values) {
@@ -292,7 +303,9 @@ export class SchemaScope<$ = any> implements Hkt.Kind {

import<names extends exportedNameOf<$>[]>(
...names: names
): SchemaModule<
): instantiate<
this,
"module",
destructuredImportContext<
$,
names extends [] ? exportedNameOf<$> : names[number]
@@ -310,10 +323,13 @@ export class SchemaScope<$ = any> implements Hkt.Kind {
#exportCache: SchemaExportCache | undefined
export<names extends exportedNameOf<$>[]>(
...names: names
): SchemaModule<
names extends []
? exportedNameOf<$>
: destructuredExportContext<$, names[number]>
): instantiate<
this,
"module",
destructuredExportContext<
$,
names extends [] ? exportedNameOf<$> : names[number]
>
> {
if (!this.#exportCache) {
this.#exportCache = {}
@@ -366,11 +382,11 @@ export class SchemaScope<$ = any> implements Hkt.Kind {

export type destructuredExportContext<$, name extends exportedNameOf<$>> = {
[k in name]: $[k]
}
} & unknown

export type destructuredImportContext<$, name extends exportedNameOf<$>> = {
[k in name as `#${k & string}`]: $[k]
}
} & unknown

export type SchemaExportCache = Record<
string,
3 changes: 2 additions & 1 deletion ark/type/scope.ts
Original file line number Diff line number Diff line change
@@ -146,7 +146,7 @@ export type tryInferSubmoduleReference<$, token> =
: never
: never

export class Module<$ = any> extends SchemaModule<Scope<$>> {}
export class Module<$ = any> extends SchemaModule<$> {}

export interface ParseContext extends NodeParseOptions {
$: Scope
@@ -165,6 +165,7 @@ export class Scope<$ = any> extends SchemaScope<$> {
private parseCache: Record<string, Schema> = {}

declare hkt: (t: this[Hkt.args]) => Type<typeof t, $>
declare module: (t: this[Hkt.args]) => Module<typeof t>

constructor(def: Record<string, unknown>, config?: ArkConfig) {
const aliases: Record<string, unknown> = {}
9 changes: 0 additions & 9 deletions ark/util/hkt.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import type { conform } from "./generics.js"

export type instantiate<
hkt extends Hkt.Kind,
args extends Parameters<hkt["hkt"]>[0]
> = ReturnType<
(hkt & {
readonly [Hkt.args]: args
})["hkt"]
>

/** A small set of HKT utility types based on https://github.com/poteat/hkt-toolbelt */
export namespace Hkt {
export declare const args: unique symbol