@atproto/lex 0.3.6 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +18 -0
  3. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @atproto/lex
2
2
 
3
+ ## 0.3.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`ec29fcd`](https://github.com/bluesky-social/atproto/commit/ec29fcdb4e0ce098fb1473feebe876a94b1c8e33)]:
8
+ - @atproto/lex-client@0.3.5
9
+ - @atproto/lex-installer@0.1.17
10
+
11
+ ## 0.3.7
12
+
13
+ ### Patch Changes
14
+
15
+ - [#5439](https://github.com/bluesky-social/atproto/pull/5439) [`79d911f`](https://github.com/bluesky-social/atproto/commit/79d911fc2bd7c6d9b1a6810e00e81d964b72a4ab) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Generate "token" as string values (in addition to the type)
16
+
17
+ - Updated dependencies [[`79d911f`](https://github.com/bluesky-social/atproto/commit/79d911fc2bd7c6d9b1a6810e00e81d964b72a4ab), [`79d911f`](https://github.com/bluesky-social/atproto/commit/79d911fc2bd7c6d9b1a6810e00e81d964b72a4ab)]:
18
+ - @atproto/lex-builder@0.1.13
19
+ - @atproto/lex-client@0.3.4
20
+ - @atproto/lex-installer@0.1.16
21
+ - @atproto/lex-schema@0.2.6
22
+
3
23
  ## 0.3.6
4
24
 
5
25
  ### Patch Changes
package/README.md CHANGED
@@ -264,6 +264,24 @@ function renderPost(p: app.bsky.feed.post.Main) {
264
264
  }
265
265
  ```
266
266
 
267
+ Token definitions also export their string value in PascalCase, using the same
268
+ name as their string literal type. The token's camelCase export remains the
269
+ runtime schema:
270
+
271
+ ```typescript
272
+ import * as app from './lexicons/app.js'
273
+
274
+ const requestLess = app.bsky.feed.defs.RequestLess
275
+ // 'app.bsky.feed.defs#requestLess'
276
+
277
+ type RequestLess = app.bsky.feed.defs.RequestLess
278
+
279
+ app.bsky.feed.defs.requestLess // TokenSchema
280
+ app.bsky.feed.defs.requestLess.$validate('foo') // throws
281
+ app.bsky.feed.defs.requestLess.$safeValidate('foo') // ValidationFailure
282
+ app.bsky.feed.defs.requestLess.$token === requestLess // true
283
+ ```
284
+
267
285
  ### Building data
268
286
 
269
287
  It is recommended to use the generated builders to create data that conforms to the schema. TypeScript ensures that all required fields are present at compile time.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/lex",
3
- "version": "0.3.6",
3
+ "version": "0.3.8",
4
4
  "license": "MIT",
5
5
  "description": "Lexicon tooling for AT",
6
6
  "keywords": [
@@ -38,12 +38,12 @@
38
38
  "dependencies": {
39
39
  "tslib": "^2.8.1",
40
40
  "yargs": "^18.0.0",
41
- "@atproto/lex-json": "^0.1.6",
42
- "@atproto/lex-builder": "^0.1.12",
41
+ "@atproto/lex-builder": "^0.1.13",
43
42
  "@atproto/lex-data": "^0.1.7",
44
- "@atproto/lex-schema": "^0.2.5",
45
- "@atproto/lex-client": "^0.3.3",
46
- "@atproto/lex-installer": "^0.1.15"
43
+ "@atproto/lex-installer": "^0.1.17",
44
+ "@atproto/lex-json": "^0.1.6",
45
+ "@atproto/lex-schema": "^0.2.6",
46
+ "@atproto/lex-client": "^0.3.5"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/yargs": "^17.0.33",