@atproto/lexicon 0.3.0 → 0.3.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/lexicon",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "license": "MIT",
5
5
  "description": "atproto Lexicon schema language library",
6
6
  "keywords": [
@@ -19,7 +19,7 @@
19
19
  "multiformats": "^9.9.0",
20
20
  "zod": "^3.21.4",
21
21
  "@atproto/common-web": "^0.2.3",
22
- "@atproto/syntax": "^0.1.4"
22
+ "@atproto/syntax": "^0.1.5"
23
23
  },
24
24
  "scripts": {
25
25
  "test": "jest",
@@ -18,7 +18,7 @@ export function datetime(path: string, value: string): ValidationResult {
18
18
  return {
19
19
  success: false,
20
20
  error: new ValidationError(
21
- `${path} must be an iso8601 formatted datetime`,
21
+ `${path} must be an valid atproto datetime (both RFC-3339 and ISO-8601)`,
22
22
  ),
23
23
  }
24
24
  }
@@ -659,7 +659,9 @@ describe('Record validation', () => {
659
659
  $type: 'com.example.datetime',
660
660
  datetime: 'bad date',
661
661
  }),
662
- ).toThrow('Record/datetime must be an iso8601 formatted datetime')
662
+ ).toThrow(
663
+ 'Record/datetime must be an valid atproto datetime (both RFC-3339 and ISO-8601)',
664
+ )
663
665
  })
664
666
 
665
667
  it('Applies uri formatting constraint', () => {