Skip to content

Commit 0badf55

Browse files
committed
Refresh vocab-tools codegen snapshots for the Temporal helpers
The Deno, Node, and Bun snapshots of `generateClasses()` still contained the old `instanceof Temporal.*` checks and lacked the `@fedify/vocab-runtime/temporal` import. Regenerate them so the class.test.ts suite matches the current codegen output. Refs #767. Assisted-by: Claude Code:claude-opus-4-7 Assisted-by: Codex:gpt-5.5
1 parent fd6833e commit 0badf55

3 files changed

Lines changed: 63 additions & 51 deletions

File tree

packages/vocab-tools/src/__snapshots__/class.test.ts.deno.snap

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ import {
1818
LanguageString,
1919
type RemoteDocument,
2020
} from \\"@fedify/vocab-runtime\\";
21+
import {
22+
isTemporalDuration,
23+
isTemporalInstant,
24+
} from \\"@fedify/vocab-runtime/temporal\\";
2125

2226

2327
/** Describes an object of any kind. The Object type serves as the base type for
@@ -388,7 +392,7 @@ proofs?: (DataIntegrityProof | URL)[];}
388392
}
389393

390394
if (\\"endTime\\" in values && values.endTime != null) {
391-
if (values.endTime instanceof Temporal.Instant) {
395+
if (isTemporalInstant(values.endTime)) {
392396
// @ts-ignore: type is checked above.
393397
this.#_219RwDanjScTv5tYCjwGZVCM7KZ9_endTime = [values.endTime];
394398

@@ -620,7 +624,7 @@ proofs?: (DataIntegrityProof | URL)[];}
620624
}
621625

622626
if (\\"published\\" in values && values.published != null) {
623-
if (values.published instanceof Temporal.Instant) {
627+
if (isTemporalInstant(values.published)) {
624628
// @ts-ignore: type is checked above.
625629
this.#_5e258TDXtuhaFRPZiGoDfEpjdMr_published = [values.published];
626630

@@ -685,7 +689,7 @@ proofs?: (DataIntegrityProof | URL)[];}
685689
}
686690

687691
if (\\"startTime\\" in values && values.startTime != null) {
688-
if (values.startTime instanceof Temporal.Instant) {
692+
if (isTemporalInstant(values.startTime)) {
689693
// @ts-ignore: type is checked above.
690694
this.#_2w3Jmue4up8iVDUA51WZqomEF438_startTime = [values.startTime];
691695

@@ -753,7 +757,7 @@ proofs?: (DataIntegrityProof | URL)[];}
753757
}
754758

755759
if (\\"updated\\" in values && values.updated != null) {
756-
if (values.updated instanceof Temporal.Instant) {
760+
if (isTemporalInstant(values.updated)) {
757761
// @ts-ignore: type is checked above.
758762
this.#_385aB7ySixcf5Un6z3VsWmThgCzQ_updated = [values.updated];
759763

@@ -975,7 +979,7 @@ proofs?: (DataIntegrityProof | URL)[];}
975979
}
976980

977981
if (\\"duration\\" in values && values.duration != null) {
978-
if (values.duration instanceof Temporal.Duration) {
982+
if (isTemporalDuration(values.duration)) {
979983
// @ts-ignore: type is checked above.
980984
this.#_3bNvLMBN1bCJETiTihM3wvi1B2JX_duration = [values.duration];
981985

@@ -1298,7 +1302,7 @@ proofs?: (DataIntegrityProof | URL)[];}
12981302
}
12991303
clone.#_219RwDanjScTv5tYCjwGZVCM7KZ9_endTime = this.#_219RwDanjScTv5tYCjwGZVCM7KZ9_endTime;
13001304
if (\\"endTime\\" in values && values.endTime != null) {
1301-
if (values.endTime instanceof Temporal.Instant) {
1305+
if (isTemporalInstant(values.endTime)) {
13021306
// @ts-ignore: type is checked above.
13031307
clone.#_219RwDanjScTv5tYCjwGZVCM7KZ9_endTime = [values.endTime];
13041308

@@ -1536,7 +1540,7 @@ proofs?: (DataIntegrityProof | URL)[];}
15361540
}
15371541
clone.#_5e258TDXtuhaFRPZiGoDfEpjdMr_published = this.#_5e258TDXtuhaFRPZiGoDfEpjdMr_published;
15381542
if (\\"published\\" in values && values.published != null) {
1539-
if (values.published instanceof Temporal.Instant) {
1543+
if (isTemporalInstant(values.published)) {
15401544
// @ts-ignore: type is checked above.
15411545
clone.#_5e258TDXtuhaFRPZiGoDfEpjdMr_published = [values.published];
15421546

@@ -1601,7 +1605,7 @@ proofs?: (DataIntegrityProof | URL)[];}
16011605
}
16021606
clone.#_2w3Jmue4up8iVDUA51WZqomEF438_startTime = this.#_2w3Jmue4up8iVDUA51WZqomEF438_startTime;
16031607
if (\\"startTime\\" in values && values.startTime != null) {
1604-
if (values.startTime instanceof Temporal.Instant) {
1608+
if (isTemporalInstant(values.startTime)) {
16051609
// @ts-ignore: type is checked above.
16061610
clone.#_2w3Jmue4up8iVDUA51WZqomEF438_startTime = [values.startTime];
16071611

@@ -1670,7 +1674,7 @@ proofs?: (DataIntegrityProof | URL)[];}
16701674
}
16711675
clone.#_385aB7ySixcf5Un6z3VsWmThgCzQ_updated = this.#_385aB7ySixcf5Un6z3VsWmThgCzQ_updated;
16721676
if (\\"updated\\" in values && values.updated != null) {
1673-
if (values.updated instanceof Temporal.Instant) {
1677+
if (isTemporalInstant(values.updated)) {
16741678
// @ts-ignore: type is checked above.
16751679
clone.#_385aB7ySixcf5Un6z3VsWmThgCzQ_updated = [values.updated];
16761680

@@ -1896,7 +1900,7 @@ proofs?: (DataIntegrityProof | URL)[];}
18961900
}
18971901
clone.#_3bNvLMBN1bCJETiTihM3wvi1B2JX_duration = this.#_3bNvLMBN1bCJETiTihM3wvi1B2JX_duration;
18981902
if (\\"duration\\" in values && values.duration != null) {
1899-
if (values.duration instanceof Temporal.Duration) {
1903+
if (isTemporalDuration(values.duration)) {
19001904
// @ts-ignore: type is checked above.
19011905
clone.#_3bNvLMBN1bCJETiTihM3wvi1B2JX_duration = [values.duration];
19021906

@@ -17191,7 +17195,7 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL |
1719117195
}
1719217196

1719317197
if (\\"created\\" in values && values.created != null) {
17194-
if (values.created instanceof Temporal.Instant) {
17198+
if (isTemporalInstant(values.created)) {
1719517199
// @ts-ignore: type is checked above.
1719617200
this.#_3qzP3ukEZoUziK5FEiA1RhU4aqac = [values.created];
1719717201

@@ -17292,7 +17296,7 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL |
1729217296
}
1729317297
clone.#_3qzP3ukEZoUziK5FEiA1RhU4aqac = this.#_3qzP3ukEZoUziK5FEiA1RhU4aqac;
1729417298
if (\\"created\\" in values && values.created != null) {
17295-
if (values.created instanceof Temporal.Instant) {
17299+
if (isTemporalInstant(values.created)) {
1729617300
// @ts-ignore: type is checked above.
1729717301
clone.#_3qzP3ukEZoUziK5FEiA1RhU4aqac = [values.created];
1729817302

@@ -67912,7 +67916,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti
6791267916
}
6791367917

6791467918
if (\\"closed\\" in values && values.closed != null) {
67915-
if (values.closed instanceof Temporal.Instant || typeof values.closed === \\"boolean\\") {
67919+
if (isTemporalInstant(values.closed) || typeof values.closed === \\"boolean\\") {
6791667920
// @ts-ignore: type is checked above.
6791767921
this.#_3KronwL8DiiKBRcJFKQPiEHm8xb6_closed = [values.closed];
6791867922

@@ -68041,7 +68045,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti
6804168045
}
6804268046
clone.#_3KronwL8DiiKBRcJFKQPiEHm8xb6_closed = this.#_3KronwL8DiiKBRcJFKQPiEHm8xb6_closed;
6804368047
if (\\"closed\\" in values && values.closed != null) {
68044-
if (values.closed instanceof Temporal.Instant || typeof values.closed === \\"boolean\\") {
68048+
if (isTemporalInstant(values.closed) || typeof values.closed === \\"boolean\\") {
6804568049
// @ts-ignore: type is checked above.
6804668050
clone.#_3KronwL8DiiKBRcJFKQPiEHm8xb6_closed = [values.closed];
6804768051

@@ -68648,7 +68652,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti
6864868652
array = [];
6864968653
for (const v of this.#_3KronwL8DiiKBRcJFKQPiEHm8xb6_closed) {
6865068654
const element = (
68651-
v instanceof Temporal.Instant ? {
68655+
isTemporalInstant(v) ? {
6865268656
\\"@type\\": \\"http://www.w3.org/2001/XMLSchema#dateTime\\",
6865368657
\\"@value\\": v.toString(),
6865468658
} : { \\"@value\\": v }
@@ -79727,7 +79731,7 @@ proofs?: (DataIntegrityProof | URL)[];deleted?: Temporal.Instant | null;}
7972779731
) {
7972879732
super(values, options);
7972979733
if (\\"deleted\\" in values && values.deleted != null) {
79730-
if (values.deleted instanceof Temporal.Instant) {
79734+
if (isTemporalInstant(values.deleted)) {
7973179735
// @ts-ignore: type is checked above.
7973279736
this.#_8g8g4LiVMhFTXskuDEqx4ascxUr_deleted = [values.deleted];
7973379737

@@ -79784,7 +79788,7 @@ proofs?: (DataIntegrityProof | URL)[];deleted?: Temporal.Instant | null;}
7978479788
}
7978579789
const clone = super.clone(values, options) as unknown as Tombstone;clone.#_8g8g4LiVMhFTXskuDEqx4ascxUr_deleted = this.#_8g8g4LiVMhFTXskuDEqx4ascxUr_deleted;
7978679790
if (\\"deleted\\" in values && values.deleted != null) {
79787-
if (values.deleted instanceof Temporal.Instant) {
79791+
if (isTemporalInstant(values.deleted)) {
7978879792
// @ts-ignore: type is checked above.
7978979793
clone.#_8g8g4LiVMhFTXskuDEqx4ascxUr_deleted = [values.deleted];
7979079794

packages/vocab-tools/src/__snapshots__/class.test.ts.node.snap

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ import {
1616
LanguageString,
1717
type RemoteDocument,
1818
} from \\"@fedify/vocab-runtime\\";
19+
import {
20+
isTemporalDuration,
21+
isTemporalInstant,
22+
} from \\"@fedify/vocab-runtime/temporal\\";
1923

2024

2125
/** Describes an object of any kind. The Object type serves as the base type for
@@ -386,7 +390,7 @@ proofs?: (DataIntegrityProof | URL)[];}
386390
}
387391

388392
if (\\"endTime\\" in values && values.endTime != null) {
389-
if (values.endTime instanceof Temporal.Instant) {
393+
if (isTemporalInstant(values.endTime)) {
390394
// @ts-ignore: type is checked above.
391395
this.#_219RwDanjScTv5tYCjwGZVCM7KZ9_endTime = [values.endTime];
392396

@@ -618,7 +622,7 @@ proofs?: (DataIntegrityProof | URL)[];}
618622
}
619623

620624
if (\\"published\\" in values && values.published != null) {
621-
if (values.published instanceof Temporal.Instant) {
625+
if (isTemporalInstant(values.published)) {
622626
// @ts-ignore: type is checked above.
623627
this.#_5e258TDXtuhaFRPZiGoDfEpjdMr_published = [values.published];
624628

@@ -683,7 +687,7 @@ proofs?: (DataIntegrityProof | URL)[];}
683687
}
684688

685689
if (\\"startTime\\" in values && values.startTime != null) {
686-
if (values.startTime instanceof Temporal.Instant) {
690+
if (isTemporalInstant(values.startTime)) {
687691
// @ts-ignore: type is checked above.
688692
this.#_2w3Jmue4up8iVDUA51WZqomEF438_startTime = [values.startTime];
689693

@@ -751,7 +755,7 @@ proofs?: (DataIntegrityProof | URL)[];}
751755
}
752756

753757
if (\\"updated\\" in values && values.updated != null) {
754-
if (values.updated instanceof Temporal.Instant) {
758+
if (isTemporalInstant(values.updated)) {
755759
// @ts-ignore: type is checked above.
756760
this.#_385aB7ySixcf5Un6z3VsWmThgCzQ_updated = [values.updated];
757761

@@ -973,7 +977,7 @@ proofs?: (DataIntegrityProof | URL)[];}
973977
}
974978

975979
if (\\"duration\\" in values && values.duration != null) {
976-
if (values.duration instanceof Temporal.Duration) {
980+
if (isTemporalDuration(values.duration)) {
977981
// @ts-ignore: type is checked above.
978982
this.#_3bNvLMBN1bCJETiTihM3wvi1B2JX_duration = [values.duration];
979983

@@ -1296,7 +1300,7 @@ proofs?: (DataIntegrityProof | URL)[];}
12961300
}
12971301
clone.#_219RwDanjScTv5tYCjwGZVCM7KZ9_endTime = this.#_219RwDanjScTv5tYCjwGZVCM7KZ9_endTime;
12981302
if (\\"endTime\\" in values && values.endTime != null) {
1299-
if (values.endTime instanceof Temporal.Instant) {
1303+
if (isTemporalInstant(values.endTime)) {
13001304
// @ts-ignore: type is checked above.
13011305
clone.#_219RwDanjScTv5tYCjwGZVCM7KZ9_endTime = [values.endTime];
13021306

@@ -1534,7 +1538,7 @@ proofs?: (DataIntegrityProof | URL)[];}
15341538
}
15351539
clone.#_5e258TDXtuhaFRPZiGoDfEpjdMr_published = this.#_5e258TDXtuhaFRPZiGoDfEpjdMr_published;
15361540
if (\\"published\\" in values && values.published != null) {
1537-
if (values.published instanceof Temporal.Instant) {
1541+
if (isTemporalInstant(values.published)) {
15381542
// @ts-ignore: type is checked above.
15391543
clone.#_5e258TDXtuhaFRPZiGoDfEpjdMr_published = [values.published];
15401544

@@ -1599,7 +1603,7 @@ proofs?: (DataIntegrityProof | URL)[];}
15991603
}
16001604
clone.#_2w3Jmue4up8iVDUA51WZqomEF438_startTime = this.#_2w3Jmue4up8iVDUA51WZqomEF438_startTime;
16011605
if (\\"startTime\\" in values && values.startTime != null) {
1602-
if (values.startTime instanceof Temporal.Instant) {
1606+
if (isTemporalInstant(values.startTime)) {
16031607
// @ts-ignore: type is checked above.
16041608
clone.#_2w3Jmue4up8iVDUA51WZqomEF438_startTime = [values.startTime];
16051609

@@ -1668,7 +1672,7 @@ proofs?: (DataIntegrityProof | URL)[];}
16681672
}
16691673
clone.#_385aB7ySixcf5Un6z3VsWmThgCzQ_updated = this.#_385aB7ySixcf5Un6z3VsWmThgCzQ_updated;
16701674
if (\\"updated\\" in values && values.updated != null) {
1671-
if (values.updated instanceof Temporal.Instant) {
1675+
if (isTemporalInstant(values.updated)) {
16721676
// @ts-ignore: type is checked above.
16731677
clone.#_385aB7ySixcf5Un6z3VsWmThgCzQ_updated = [values.updated];
16741678

@@ -1894,7 +1898,7 @@ proofs?: (DataIntegrityProof | URL)[];}
18941898
}
18951899
clone.#_3bNvLMBN1bCJETiTihM3wvi1B2JX_duration = this.#_3bNvLMBN1bCJETiTihM3wvi1B2JX_duration;
18961900
if (\\"duration\\" in values && values.duration != null) {
1897-
if (values.duration instanceof Temporal.Duration) {
1901+
if (isTemporalDuration(values.duration)) {
18981902
// @ts-ignore: type is checked above.
18991903
clone.#_3bNvLMBN1bCJETiTihM3wvi1B2JX_duration = [values.duration];
19001904

@@ -17189,7 +17193,7 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL |
1718917193
}
1719017194

1719117195
if (\\"created\\" in values && values.created != null) {
17192-
if (values.created instanceof Temporal.Instant) {
17196+
if (isTemporalInstant(values.created)) {
1719317197
// @ts-ignore: type is checked above.
1719417198
this.#_3qzP3ukEZoUziK5FEiA1RhU4aqac = [values.created];
1719517199

@@ -17290,7 +17294,7 @@ cryptosuite?: \\"eddsa-jcs-2022\\" | null;verificationMethod?: Multikey | URL |
1729017294
}
1729117295
clone.#_3qzP3ukEZoUziK5FEiA1RhU4aqac = this.#_3qzP3ukEZoUziK5FEiA1RhU4aqac;
1729217296
if (\\"created\\" in values && values.created != null) {
17293-
if (values.created instanceof Temporal.Instant) {
17297+
if (isTemporalInstant(values.created)) {
1729417298
// @ts-ignore: type is checked above.
1729517299
clone.#_3qzP3ukEZoUziK5FEiA1RhU4aqac = [values.created];
1729617300

@@ -67910,7 +67914,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti
6791067914
}
6791167915

6791267916
if (\\"closed\\" in values && values.closed != null) {
67913-
if (values.closed instanceof Temporal.Instant || typeof values.closed === \\"boolean\\") {
67917+
if (isTemporalInstant(values.closed) || typeof values.closed === \\"boolean\\") {
6791467918
// @ts-ignore: type is checked above.
6791567919
this.#_3KronwL8DiiKBRcJFKQPiEHm8xb6_closed = [values.closed];
6791667920

@@ -68039,7 +68043,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti
6803968043
}
6804068044
clone.#_3KronwL8DiiKBRcJFKQPiEHm8xb6_closed = this.#_3KronwL8DiiKBRcJFKQPiEHm8xb6_closed;
6804168045
if (\\"closed\\" in values && values.closed != null) {
68042-
if (values.closed instanceof Temporal.Instant || typeof values.closed === \\"boolean\\") {
68046+
if (isTemporalInstant(values.closed) || typeof values.closed === \\"boolean\\") {
6804368047
// @ts-ignore: type is checked above.
6804468048
clone.#_3KronwL8DiiKBRcJFKQPiEHm8xb6_closed = [values.closed];
6804568049

@@ -68646,7 +68650,7 @@ instruments?: (Object | URL)[];exclusiveOptions?: (Object | URL)[];inclusiveOpti
6864668650
array = [];
6864768651
for (const v of this.#_3KronwL8DiiKBRcJFKQPiEHm8xb6_closed) {
6864868652
const element = (
68649-
v instanceof Temporal.Instant ? {
68653+
isTemporalInstant(v) ? {
6865068654
\\"@type\\": \\"http://www.w3.org/2001/XMLSchema#dateTime\\",
6865168655
\\"@value\\": v.toString(),
6865268656
} : { \\"@value\\": v }
@@ -79725,7 +79729,7 @@ proofs?: (DataIntegrityProof | URL)[];deleted?: Temporal.Instant | null;}
7972579729
) {
7972679730
super(values, options);
7972779731
if (\\"deleted\\" in values && values.deleted != null) {
79728-
if (values.deleted instanceof Temporal.Instant) {
79732+
if (isTemporalInstant(values.deleted)) {
7972979733
// @ts-ignore: type is checked above.
7973079734
this.#_8g8g4LiVMhFTXskuDEqx4ascxUr_deleted = [values.deleted];
7973179735

@@ -79782,7 +79786,7 @@ proofs?: (DataIntegrityProof | URL)[];deleted?: Temporal.Instant | null;}
7978279786
}
7978379787
const clone = super.clone(values, options) as unknown as Tombstone;clone.#_8g8g4LiVMhFTXskuDEqx4ascxUr_deleted = this.#_8g8g4LiVMhFTXskuDEqx4ascxUr_deleted;
7978479788
if (\\"deleted\\" in values && values.deleted != null) {
79785-
if (values.deleted instanceof Temporal.Instant) {
79789+
if (isTemporalInstant(values.deleted)) {
7978679790
// @ts-ignore: type is checked above.
7978779791
clone.#_8g8g4LiVMhFTXskuDEqx4ascxUr_deleted = [values.deleted];
7978879792

0 commit comments

Comments
 (0)