diff --git a/packages/atproto-browser/lib/navigation.test.ts b/packages/atproto-browser/lib/navigation.test.ts index 75785ae0..177a47ee 100644 --- a/packages/atproto-browser/lib/navigation.test.ts +++ b/packages/atproto-browser/lib/navigation.test.ts @@ -126,7 +126,7 @@ test("valid http input without included at uri", async () => { test("lex input with invalid NSID", async () => { // Numbers in NSID are not allowed expect(await navigateAtUri("lex:com.example.invalid1")).toEqual({ - error: "Invalid NSID: com.example.invalid1", + error: "Could not resolve NSID(com.example.invalid1): NO_AUTHORITY", }); }); diff --git a/packages/atproto-browser/lib/navigation.ts b/packages/atproto-browser/lib/navigation.ts index 379ac6b7..de2af0d8 100644 --- a/packages/atproto-browser/lib/navigation.ts +++ b/packages/atproto-browser/lib/navigation.ts @@ -7,7 +7,7 @@ import { parse as parseHtml } from "node-html-parser"; import { parse as parseLinkHeader } from "http-link-header"; import { domainToASCII } from "url"; import { isDid } from "@atproto/did"; -import { getRegistry as getLexiconRegistry } from "@lpm/core"; +import { getCatalog } from "@lpm/core"; export async function navigateAtUri(input: string) { // Remove all zero-width characters and weird control codes from the input @@ -179,8 +179,8 @@ async function getAtUriFromLexUri( }; } const nsid = NSID.parse(uri.slice(4)); - const registry = getLexiconRegistry(); - const node = registry.get(nsid); + const catalog = getCatalog(); + const node = catalog.get(nsid); const resolution = await node.resolve(); if (!resolution.success) { return { diff --git a/packages/atproto-browser/package.json b/packages/atproto-browser/package.json index f8b80266..512b8520 100644 --- a/packages/atproto-browser/package.json +++ b/packages/atproto-browser/package.json @@ -14,10 +14,10 @@ "@atproto/api": "catalog:", "@atproto/did": "catalog:", "@atproto/identity": "catalog:", - "@atproto/lexicon": "^0.4.12", + "@atproto/lexicon": "catalog:", "@atproto/repo": "catalog:", "@atproto/syntax": "catalog:", - "@lpm/core": "npm:@jsr/lpm__core@^0.2.9", + "@lpm/core": "npm:@jsr/lpm__core@^0.3.2", "hls.js": "^1.6.7", "http-link-header": "^1.1.3", "multiformats": "^13.3.7", diff --git a/packages/frontpage-atproto-client/package.json b/packages/frontpage-atproto-client/package.json index dd78e082..4446422b 100644 --- a/packages/frontpage-atproto-client/package.json +++ b/packages/frontpage-atproto-client/package.json @@ -19,7 +19,7 @@ "build": "tsc" }, "dependencies": { - "@atproto/lexicon": "^0.4.12", + "@atproto/lexicon": "catalog:", "@atproto/xrpc": "^0.6.12", "multiformats": "^13.3.7" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e0179aa5..9cf055d0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,20 +7,23 @@ settings: catalogs: default: '@atproto/api': - specifier: ^0.18.0 - version: 0.18.0 + specifier: ^0.18.8 + version: 0.18.8 '@atproto/did': - specifier: ^0.2.1 - version: 0.2.1 + specifier: ^0.2.3 + version: 0.2.3 '@atproto/identity': - specifier: ^0.4.9 - version: 0.4.9 + specifier: ^0.4.10 + version: 0.4.10 + '@atproto/lexicon': + specifier: ^0.6.0 + version: 0.6.0 '@atproto/repo': - specifier: ^0.8.10 - version: 0.8.11 + specifier: ^0.8.12 + version: 0.8.12 '@atproto/syntax': - specifier: ^0.3.4 - version: 0.3.4 + specifier: ^0.4.2 + version: 0.4.2 '@next/eslint-plugin-next': specifier: ^16.0.9 version: 16.0.9 @@ -82,25 +85,25 @@ importers: dependencies: '@atproto/api': specifier: 'catalog:' - version: 0.18.0 + version: 0.18.8 '@atproto/did': specifier: 'catalog:' - version: 0.2.1 + version: 0.2.3 '@atproto/identity': specifier: 'catalog:' - version: 0.4.9 + version: 0.4.10 '@atproto/lexicon': - specifier: ^0.4.12 - version: 0.4.12 + specifier: 'catalog:' + version: 0.6.0 '@atproto/repo': specifier: 'catalog:' - version: 0.8.11 + version: 0.8.12 '@atproto/syntax': specifier: 'catalog:' - version: 0.3.4 + version: 0.4.2 '@lpm/core': - specifier: npm:@jsr/lpm__core@^0.2.9 - version: '@jsr/lpm__core@0.2.9' + specifier: npm:@jsr/lpm__core@^0.3.2 + version: '@jsr/lpm__core@0.3.2' hls.js: specifier: ^1.6.7 version: 1.6.7 @@ -236,7 +239,7 @@ importers: version: 0.1.5 '@atproto/syntax': specifier: 'catalog:' - version: 0.3.4 + version: 0.4.2 '@libsql/client': specifier: ^0.15.10 version: 0.15.15(bufferutil@4.0.8)(utf-8-validate@6.0.3) @@ -371,8 +374,8 @@ importers: packages/frontpage-atproto-client: dependencies: '@atproto/lexicon': - specifier: ^0.4.12 - version: 0.4.12 + specifier: 'catalog:' + version: 0.6.0 '@atproto/xrpc': specifier: ^0.6.12 version: 0.6.12 @@ -524,74 +527,72 @@ packages: '@asamuzakjp/css-color@3.2.0': resolution: {integrity: sha512-K1A6z8tS3XsmCMM86xoWdn7Fkdn9m6RSVtocUrJYIwZnFVkng/PvkEoWtOWmP+Scc6saYWHWZYbndEEXxl24jw==} - '@atproto/api@0.14.22': - resolution: {integrity: sha512-ziXPau+sUdFovObSnsoN7JbOmUw1C5e5L28/yXf3P8vbEnSS3HVVGD1jYcscBYY34xQqi4bVDpwMYx/4yRsTuQ==} - - '@atproto/api@0.18.0': - resolution: {integrity: sha512-2GxKPhhvMocDjRU7VpNj+cvCdmCHVAmRwyfNgRLMrJtPZvrosFoi9VATX+7eKN0FZvYvy8KdLSkCcpP2owH3IA==} + '@atproto/api@0.18.8': + resolution: {integrity: sha512-Qo3sGd1N5hdHTaEWUBgptvPkULt2SXnMcWRhveSyctSd/IQwTMyaIH6E62A1SU+8xBSN5QLpoUJNE7iSrYM2Zg==} '@atproto/common-web@0.3.2': resolution: {integrity: sha512-Vx0JtL1/CssJbFAb0UOdvTrkbUautsDfHNOXNTcX2vyPIxH9xOameSqLLunM1hZnOQbJwyjmQCt6TV+bhnanDg==} - '@atproto/common-web@0.4.6': - resolution: {integrity: sha512-+2mG/1oBcB/ZmYIU1ltrFMIiuy9aByKAkb2Fos/0eTdczcLBaH17k0KoxMGvhfsujN2r62XlanOAMzysa7lv1g==} + '@atproto/common-web@0.4.7': + resolution: {integrity: sha512-vjw2+81KPo2/SAbbARGn64Ln+6JTI0FTI4xk8if0ebBfDxFRmHb2oSN1y77hzNq/ybGHqA2mecfhS03pxC5+lg==} - '@atproto/common@0.5.2': - resolution: {integrity: sha512-7KdU8FcIfnwS2kmv7M86pKxtw/fLvPY2bSI1rXpG+AmA8O++IUGlSCujBGzbrPwnQvY/z++f6Le4rdBzu8bFaA==} + '@atproto/common@0.5.3': + resolution: {integrity: sha512-jMC9ikl8QbJcnh21upe9Gb9mIaSJWsdp8sgaelmntUtChWnxxvCC/pI3TBX11PT7XlHUE6UyuvY+S3hh6WZVEg==} engines: {node: '>=18.7.0'} '@atproto/crypto@0.4.4': resolution: {integrity: sha512-Yq9+crJ7WQl7sxStVpHgie5Z51R05etaK9DLWYG/7bR5T4bhdcIgF6IfklLShtZwLYdVVj+K15s0BqW9a8PSDA==} engines: {node: '>=18.7.0'} - '@atproto/did@0.2.1': - resolution: {integrity: sha512-1i5BTU2GnBaaeYWhxUOnuEKFVq9euT5+dQPFabHpa927BlJ54PmLGyBBaOI7/NbLmN5HWwBa18SBkMpg3jGZRA==} + '@atproto/crypto@0.4.5': + resolution: {integrity: sha512-n40aKkMoCatP0u9Yvhrdk6fXyOHFDDbkdm4h4HCyWW+KlKl8iXfD5iV+ECq+w5BM+QH25aIpt3/j6EUNerhLxw==} + engines: {node: '>=18.7.0'} + + '@atproto/did@0.2.3': + resolution: {integrity: sha512-VI8JJkSizvM2cHYJa37WlbzeCm5tWpojyc1/Zy8q8OOjyoy6X4S4BEfoP941oJcpxpMTObamibQIXQDo7tnIjg==} - '@atproto/identity@0.4.9': - resolution: {integrity: sha512-pRYCaeaEJMZ4vQlRQYYTrF3cMiRp21n/k/pUT1o7dgKby56zuLErDmFXkbKfKWPf7SgWRgamSaNmsGLqAOD7lQ==} + '@atproto/identity@0.4.10': + resolution: {integrity: sha512-nQbzDLXOhM8p/wo0cTh5DfMSOSHzj6jizpodX37LJ4S1TZzumSxAjHEZa5Rev3JaoD5uSWMVE0MmKEGWkPPvfQ==} engines: {node: '>=18.7.0'} '@atproto/jwk@0.1.1': resolution: {integrity: sha512-6h/bj1APUk7QcV9t/oA6+9DB5NZx9SZru9x+/pV5oHFI9Xz4ZuM5+dq1PfsJV54pZyqdnZ6W6M717cxoC7q7og==} - '@atproto/lex-cbor@0.0.2': - resolution: {integrity: sha512-sTr3UCL2SgxEoYVpzJGgWTnNl4TpngP5tMcRyaOvi21Se4m3oR4RDsoVDPz8AS6XphiteRwzwPstquN7aWWMbA==} + '@atproto/lex-cbor@0.0.3': + resolution: {integrity: sha512-N8lCV3kK5ZcjSOWxKLWqzlnaSpK4isjXRZ0EqApl/5y9KB64s78hQ/U3KIE5qnPRlBbW5kSH3YACoU27u9nTOA==} '@atproto/lex-cli@0.8.3': resolution: {integrity: sha512-QXqJl25obi74Cr0vp2RslZsbcsTV8Bq+5+kZnQgzIb2XH9/KJhoS32jKJNbrbKY097K4HOXyDsHi6j3+xCWJcQ==} engines: {node: '>=18.7.0'} hasBin: true - '@atproto/lex-data@0.0.2': - resolution: {integrity: sha512-euV2rDGi+coH8qvZOU+ieUOEbwPwff9ca6IiXIqjZJ76AvlIpj7vtAyIRCxHUW2BoU6h9yqyJgn9MKD2a7oIwg==} + '@atproto/lex-data@0.0.3': + resolution: {integrity: sha512-ivo1IpY/EX+RIpxPgCf4cPhQo5bfu4nrpa1vJCt8hCm9SfoonJkDFGa0n4SMw4JnXZoUcGcrJ46L+D8bH6GI2g==} - '@atproto/lex-json@0.0.2': - resolution: {integrity: sha512-Pd72lO+l2rhOTutnf11omh9ZkoB/elbzE3HSmn2wuZlyH1mRhTYvoH8BOGokWQwbZkCE8LL3nOqMT3gHCD2l7g==} + '@atproto/lex-json@0.0.3': + resolution: {integrity: sha512-ZVcY7XlRfdPYvQQ2WroKUepee0+NCovrSXgXURM3Xv+n5jflJCoczguROeRr8sN0xvT0ZbzMrDNHCUYKNnxcjw==} - '@atproto/lexicon@0.4.12': - resolution: {integrity: sha512-fcEvEQ1GpQYF5igZ4IZjPWEoWVpsEF22L9RexxLS3ptfySXLflEyH384e7HITzO/73McDeaJx3lqHIuqn9ulnw==} + '@atproto/lexicon@0.4.14': + resolution: {integrity: sha512-jiKpmH1QER3Gvc7JVY5brwrfo+etFoe57tKPQX/SmPwjvUsFnJAow5xLIryuBaJgFAhnTZViXKs41t//pahGHQ==} - '@atproto/lexicon@0.5.2': - resolution: {integrity: sha512-lRmJgMA8f5j7VB5Iu5cp188ald5FuI4FlmZ7nn6EBrk1dgOstWVrI5Ft6K3z2vjyLZRG6nzknlsw+tDP63p7bQ==} + '@atproto/lexicon@0.6.0': + resolution: {integrity: sha512-5veb8aD+J5M0qszLJ+73KSFsFrJBgAY/nM1TSAJvGY7fNc9ZAT+PSUlmIyrdye9YznAZ07yktalls/TwNV7cHQ==} '@atproto/oauth-types@0.1.5': resolution: {integrity: sha512-vNab/6BYUQCfmfhGc3G61EcatQxvh2d41FDWqR8CAYsblNXO6nOEVXn7cXdQUkb3K49LU0vy5Jf1+wFNcpY3IQ==} - '@atproto/repo@0.8.11': - resolution: {integrity: sha512-b/WCu5ITws4ILHoXiZz0XXB5U9C08fUVzkBQDwpnme62GXv8gUaAPL/ttG61OusW09ARwMMQm4vxoP0hTFg+zA==} + '@atproto/repo@0.8.12': + resolution: {integrity: sha512-QpVTVulgfz5PUiCTELlDBiRvnsnwrFWi+6CfY88VwXzrRHd9NE8GItK7sfxQ6U65vD/idH8ddCgFrlrsn1REPQ==} engines: {node: '>=18.7.0'} - '@atproto/syntax@0.3.4': - resolution: {integrity: sha512-8CNmi5DipOLaVeSMPggMe7FCksVag0aO6XZy9WflbduTKM4dFZVCs4686UeMLfGRXX+X966XgwECHoLYrovMMg==} - '@atproto/syntax@0.4.2': resolution: {integrity: sha512-X9XSRPinBy/0VQ677j8VXlBsYSsUXaiqxWVpGGxJYsAhugdQRb0jqaVKJFtm6RskeNkV6y9xclSUi9UYG/COrA==} '@atproto/xrpc@0.6.12': resolution: {integrity: sha512-Ut3iISNLujlmY9Gu8sNU+SPDJDvqlVzWddU8qUr0Yae5oD4SguaUFjjhireMGhQ3M5E0KljQgDbTmnBo1kIZ3w==} - '@atproto/xrpc@0.7.5': - resolution: {integrity: sha512-MUYNn5d2hv8yVegRL0ccHvTHAVj5JSnW07bkbiaz96UH45lvYNRVwt44z+yYVnb0/mvBzyD3/ZQ55TRGt7fHkA==} + '@atproto/xrpc@0.7.7': + resolution: {integrity: sha512-K1ZyO/BU8JNtXX5dmPp7b5UrkLMMqpsIa/Lrj5D3Su+j1Xwq1m6QJ2XJ1AgjEjkI1v4Muzm7klianLE6XGxtmA==} '@babel/code-frame@7.27.1': resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} @@ -1241,8 +1242,8 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} - '@jsr/lpm__core@0.2.9': - resolution: {integrity: sha512-K3Wrv70eBSGvOEIPNNAYtbGnUocGsiYlAU6gx6D0O5pTT0+aPe92Rvibuaf53cgVXWmrGnDtuQ6KL7Iq9bWkzg==, tarball: https://npm.jsr.io/~/11/@jsr/lpm__core/0.2.9.tgz} + '@jsr/lpm__core@0.3.2': + resolution: {integrity: sha512-DGjJLuultI3D9fWkYSGTdzXMQek0Fm7eND1+jJucx9eCLdOdqtZO7D7VWmbuePEXIvVPEtiqz9QTMMsDoYPxBw==, tarball: https://npm.jsr.io/~/11/@jsr/lpm__core/0.3.2.tgz} '@libsql/client@0.15.15': resolution: {integrity: sha512-twC0hQxPNHPKfeOv3sNT6u2pturQjLcI+CnpTM0SjRpocEGgfiZ7DWKXLNnsothjyJmDqEsBQJ5ztq9Wlu470w==} @@ -5074,23 +5075,12 @@ snapshots: '@csstools/css-tokenizer': 3.0.4 lru-cache: 10.4.3 - '@atproto/api@0.14.22': + '@atproto/api@0.18.8': dependencies: - '@atproto/common-web': 0.4.6 - '@atproto/lexicon': 0.4.12 + '@atproto/common-web': 0.4.7 + '@atproto/lexicon': 0.6.0 '@atproto/syntax': 0.4.2 - '@atproto/xrpc': 0.6.12 - await-lock: 2.2.2 - multiformats: 9.9.0 - tlds: 1.259.0 - zod: 3.25.76 - - '@atproto/api@0.18.0': - dependencies: - '@atproto/common-web': 0.4.6 - '@atproto/lexicon': 0.5.2 - '@atproto/syntax': 0.4.2 - '@atproto/xrpc': 0.7.5 + '@atproto/xrpc': 0.7.7 await-lock: 2.2.2 multiformats: 9.9.0 tlds: 1.259.0 @@ -5103,17 +5093,17 @@ snapshots: uint8arrays: 3.0.0 zod: 3.25.76 - '@atproto/common-web@0.4.6': + '@atproto/common-web@0.4.7': dependencies: - '@atproto/lex-data': 0.0.2 - '@atproto/lex-json': 0.0.2 + '@atproto/lex-data': 0.0.3 + '@atproto/lex-json': 0.0.3 zod: 3.25.76 - '@atproto/common@0.5.2': + '@atproto/common@0.5.3': dependencies: - '@atproto/common-web': 0.4.6 - '@atproto/lex-cbor': 0.0.2 - '@atproto/lex-data': 0.0.2 + '@atproto/common-web': 0.4.7 + '@atproto/lex-cbor': 0.0.3 + '@atproto/lex-data': 0.0.3 iso-datestring-validator: 2.2.2 multiformats: 9.9.0 pino: 8.21.0 @@ -5124,13 +5114,19 @@ snapshots: '@noble/hashes': 1.8.0 uint8arrays: 3.0.0 - '@atproto/did@0.2.1': + '@atproto/crypto@0.4.5': + dependencies: + '@noble/curves': 1.9.2 + '@noble/hashes': 1.8.0 + uint8arrays: 3.0.0 + + '@atproto/did@0.2.3': dependencies: zod: 3.25.76 - '@atproto/identity@0.4.9': + '@atproto/identity@0.4.10': dependencies: - '@atproto/common-web': 0.4.6 + '@atproto/common-web': 0.4.7 '@atproto/crypto': 0.4.4 '@atproto/jwk@0.1.1': @@ -5138,15 +5134,15 @@ snapshots: multiformats: 9.9.0 zod: 3.25.76 - '@atproto/lex-cbor@0.0.2': + '@atproto/lex-cbor@0.0.3': dependencies: - '@atproto/lex-data': 0.0.2 + '@atproto/lex-data': 0.0.3 multiformats: 9.9.0 tslib: 2.8.1 '@atproto/lex-cli@0.8.3': dependencies: - '@atproto/lexicon': 0.4.12 + '@atproto/lexicon': 0.4.14 '@atproto/syntax': 0.4.2 chalk: 4.1.2 commander: 9.5.0 @@ -5155,7 +5151,7 @@ snapshots: yesno: 0.4.0 zod: 3.25.76 - '@atproto/lex-data@0.0.2': + '@atproto/lex-data@0.0.3': dependencies: '@atproto/syntax': 0.4.2 multiformats: 9.9.0 @@ -5163,22 +5159,22 @@ snapshots: uint8arrays: 3.0.0 unicode-segmenter: 0.14.0 - '@atproto/lex-json@0.0.2': + '@atproto/lex-json@0.0.3': dependencies: - '@atproto/lex-data': 0.0.2 + '@atproto/lex-data': 0.0.3 tslib: 2.8.1 - '@atproto/lexicon@0.4.12': + '@atproto/lexicon@0.4.14': dependencies: - '@atproto/common-web': 0.4.6 + '@atproto/common-web': 0.4.7 '@atproto/syntax': 0.4.2 iso-datestring-validator: 2.2.2 multiformats: 9.9.0 zod: 3.25.76 - '@atproto/lexicon@0.5.2': + '@atproto/lexicon@0.6.0': dependencies: - '@atproto/common-web': 0.4.6 + '@atproto/common-web': 0.4.7 '@atproto/syntax': 0.4.2 iso-datestring-validator: 2.2.2 multiformats: 9.9.0 @@ -5189,30 +5185,28 @@ snapshots: '@atproto/jwk': 0.1.1 zod: 3.25.76 - '@atproto/repo@0.8.11': + '@atproto/repo@0.8.12': dependencies: - '@atproto/common': 0.5.2 - '@atproto/common-web': 0.4.6 - '@atproto/crypto': 0.4.4 - '@atproto/lexicon': 0.5.2 + '@atproto/common': 0.5.3 + '@atproto/common-web': 0.4.7 + '@atproto/crypto': 0.4.5 + '@atproto/lexicon': 0.6.0 '@ipld/dag-cbor': 7.0.3 multiformats: 9.9.0 uint8arrays: 3.0.0 varint: 6.0.0 zod: 3.25.76 - '@atproto/syntax@0.3.4': {} - '@atproto/syntax@0.4.2': {} '@atproto/xrpc@0.6.12': dependencies: - '@atproto/lexicon': 0.4.12 + '@atproto/lexicon': 0.4.14 zod: 3.25.76 - '@atproto/xrpc@0.7.5': + '@atproto/xrpc@0.7.7': dependencies: - '@atproto/lexicon': 0.5.2 + '@atproto/lexicon': 0.6.0 zod: 3.25.76 '@babel/code-frame@7.27.1': @@ -5723,12 +5717,12 @@ snapshots: '@jridgewell/resolve-uri': 3.1.2 '@jridgewell/sourcemap-codec': 1.5.5 - '@jsr/lpm__core@0.2.9': + '@jsr/lpm__core@0.3.2': dependencies: - '@atproto/api': 0.14.22 - '@atproto/identity': 0.4.9 - '@atproto/lexicon': 0.4.12 - '@atproto/syntax': 0.3.4 + '@atproto/api': 0.18.8 + '@atproto/identity': 0.4.10 + '@atproto/lexicon': 0.6.0 + '@atproto/syntax': 0.4.2 '@needle-di/core': 0.11.2 '@libsql/client@0.15.15(bufferutil@4.0.8)(utf-8-validate@6.0.3)': diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 2bd198ce..098a170c 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -16,11 +16,16 @@ catalog: '@vitejs/plugin-react': ^5.1.0 vite-tsconfig-paths: ^5.1.4 vitest: ^4.0.8 - '@atproto/repo': ^0.8.10 - '@atproto/syntax': ^0.3.4 - '@atproto/identity': ^0.4.9 - '@atproto/did': ^0.2.1 - '@atproto/api': ^0.18.0 + + # It's crucial that all atproto packages are major version bumped in unison + # to prevent compatibility issues between packages. + '@atproto/repo': ^0.8.12 + '@atproto/syntax': ^0.4.2 + '@atproto/identity': ^0.4.10 + '@atproto/did': ^0.2.3 + '@atproto/api': ^0.18.8 + '@atproto/lexicon': ^0.6.0 + '@atproto/xrpc': ^0.7.7 onlyBuiltDependencies: - '@vercel/speed-insights'