Skip to content

Commit 5e53ea7

Browse files
chore: publish package(s)
1 parent a234c35 commit 5e53ea7

File tree

15 files changed

+234
-91
lines changed

15 files changed

+234
-91
lines changed

.changeset/chatty-chefs-sing.md

Lines changed: 0 additions & 51 deletions
This file was deleted.

.changeset/fluffy-mirrors-open.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/wise-seals-turn.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

packages/json/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# @traversable/json
2+
3+
## 0.0.1
4+
5+
### Patch Changes
6+
7+
- [#4](https://github.com/traversable/schema/pull/4) [`0955462`](https://github.com/traversable/schema/commit/095546256004bd978cbb29c28fc506fa9ea43666) Thanks [@ahrjarrett](https://github.com/ahrjarrett)! - feat: adds package `schema-zod-adapter`
8+
9+
- Updated dependencies [[`951abe1`](https://github.com/traversable/schema/commit/951abe1ec8024e76fcc84723f982db916ecf83f9), [`0955462`](https://github.com/traversable/schema/commit/095546256004bd978cbb29c28fc506fa9ea43666)]:
10+
- @traversable/registry@0.0.1

packages/json/package.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@traversable/json",
33
"type": "module",
4-
"version": "0.0.0",
4+
"version": "0.0.1",
55
"private": false,
66
"description": "",
77
"repository": {
@@ -14,8 +14,16 @@
1414
"email": "ahrjarrett@gmail.com"
1515
},
1616
"@traversable": {
17-
"generateExports": { "include": ["**/*.ts"] },
18-
"generateIndex": { "include": ["**/*.ts"] }
17+
"generateExports": {
18+
"include": [
19+
"**/*.ts"
20+
]
21+
},
22+
"generateIndex": {
23+
"include": [
24+
"**/*.ts"
25+
]
26+
}
1927
},
2028
"publishConfig": {
2129
"directory": "dist",
@@ -40,6 +48,8 @@
4048
"@traversable/registry": "workspace:^"
4149
},
4250
"peerDependenciesMeta": {
43-
"@traversable/registry": { "optional": false }
51+
"@traversable/registry": {
52+
"optional": false
53+
}
4454
}
4555
}

packages/json/src/__generated__/__manifest__.ts

Lines changed: 10 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/registry/CHANGELOG.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# @traversable/registry
2+
3+
## 0.0.1
4+
5+
### Patch Changes
6+
7+
- [#6](https://github.com/traversable/schema/pull/6) [`951abe1`](https://github.com/traversable/schema/commit/951abe1ec8024e76fcc84723f982db916ecf83f9) Thanks [@ahrjarrett](https://github.com/ahrjarrett)! - ### new features
8+
9+
Added for interop with JSON Schema's `const` keyword. Adapter to/from zod should be working, but still
10+
experimental as I haven't written property tests for it yet.
11+
12+
When adapting to/from zod, the passed value is converted into a zod schema. For example:
13+
14+
```typescript
15+
t.object({ root: t.eq({ a: 1, b: [2, 3] }) });
16+
```
17+
18+
becomes:
19+
20+
```typescript
21+
z.object({
22+
root: z.object({
23+
a: z.literal(1),
24+
b: z.tuple([z.literal(2), z.literal(3)]),
25+
}),
26+
});
27+
```
28+
29+
Example usage:
30+
31+
```typescript
32+
import { t } from "@traversable/schema";
33+
34+
const isZero = t.eq(0);
35+
// ^? const isZero: t.eq<0>
36+
37+
console.log(isZero(0)); // true
38+
console.log(isZero([1, 2, 3])); // false
39+
40+
const isJanet = t.eq({ firstName: "Janet" });
41+
// ^? const isJanet: t.eq<{ firstName: 'Janet' }>
42+
43+
console.log(isJanet({ firstName: "Bill" })); // => false
44+
console.log(isJanet({ firstName: "Janet" })); // => true
45+
console.log(isJanet([1, 2, 3])); // => false
46+
```
47+
48+
- [#4](https://github.com/traversable/schema/pull/4) [`0955462`](https://github.com/traversable/schema/commit/095546256004bd978cbb29c28fc506fa9ea43666) Thanks [@ahrjarrett](https://github.com/ahrjarrett)! - feat: adds package `schema-zod-adapter`

packages/registry/package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@traversable/registry",
33
"type": "module",
4-
"version": "0.0.0",
4+
"version": "0.0.1",
55
"private": false,
66
"description": "",
77
"repository": {
@@ -14,8 +14,16 @@
1414
"email": "ahrjarrett@gmail.com"
1515
},
1616
"@traversable": {
17-
"generateExports": { "include": ["**/*.ts"] },
18-
"generateIndex": { "include": ["**/*.ts"] }
17+
"generateExports": {
18+
"include": [
19+
"**/*.ts"
20+
]
21+
},
22+
"generateIndex": {
23+
"include": [
24+
"**/*.ts"
25+
]
26+
}
1927
},
2028
"publishConfig": {
2129
"directory": "dist",

packages/registry/src/__generated__/__manifest__.ts

Lines changed: 7 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# @traversable/schema-zod-adapter
2+
3+
## 0.0.1
4+
5+
### Patch Changes
6+
7+
- [#6](https://github.com/traversable/schema/pull/6) [`951abe1`](https://github.com/traversable/schema/commit/951abe1ec8024e76fcc84723f982db916ecf83f9) Thanks [@ahrjarrett](https://github.com/ahrjarrett)! - ### new features
8+
9+
Added for interop with JSON Schema's `const` keyword. Adapter to/from zod should be working, but still
10+
experimental as I haven't written property tests for it yet.
11+
12+
When adapting to/from zod, the passed value is converted into a zod schema. For example:
13+
14+
```typescript
15+
t.object({ root: t.eq({ a: 1, b: [2, 3] }) });
16+
```
17+
18+
becomes:
19+
20+
```typescript
21+
z.object({
22+
root: z.object({
23+
a: z.literal(1),
24+
b: z.tuple([z.literal(2), z.literal(3)]),
25+
}),
26+
});
27+
```
28+
29+
Example usage:
30+
31+
```typescript
32+
import { t } from "@traversable/schema";
33+
34+
const isZero = t.eq(0);
35+
// ^? const isZero: t.eq<0>
36+
37+
console.log(isZero(0)); // true
38+
console.log(isZero([1, 2, 3])); // false
39+
40+
const isJanet = t.eq({ firstName: "Janet" });
41+
// ^? const isJanet: t.eq<{ firstName: 'Janet' }>
42+
43+
console.log(isJanet({ firstName: "Bill" })); // => false
44+
console.log(isJanet({ firstName: "Janet" })); // => true
45+
console.log(isJanet([1, 2, 3])); // => false
46+
```
47+
48+
- [#8](https://github.com/traversable/schema/pull/8) [`b95cfef`](https://github.com/traversable/schema/commit/b95cfef422bad84a72166bd7927ca56730a15d34) Thanks [@ahrjarrett](https://github.com/ahrjarrett)! - chore(schema,zod): prep work for breaking out `schema-core`
49+
50+
- [#4](https://github.com/traversable/schema/pull/4) [`0955462`](https://github.com/traversable/schema/commit/095546256004bd978cbb29c28fc506fa9ea43666) Thanks [@ahrjarrett](https://github.com/ahrjarrett)! - feat: adds package `schema-zod-adapter`
51+
52+
- Updated dependencies [[`951abe1`](https://github.com/traversable/schema/commit/951abe1ec8024e76fcc84723f982db916ecf83f9), [`0955462`](https://github.com/traversable/schema/commit/095546256004bd978cbb29c28fc506fa9ea43666)]:
53+
- @traversable/registry@0.0.1

0 commit comments

Comments
 (0)