Repository navigation
v2.0.0
Major Changes
-
#270
b2cc1f3Thanks @kristoferlund! - The package root now exports lex-compatible schemas and TypeScript types for the modern@atproto/lexclient, generated from the lexicons in lex's own layout: the NSID namespace tree (app,com,org,pub), so records are used as in the@atproto/lexdocumentation,client.create(org.hypercerts.claim.activity, …)with the typeorg.hypercerts.claim.activity.Main. Every lexicon except permission sets is also available as a module at@hypercerts-org/lexicon/<nsid path>. The root is published as ESM and needs@atproto/lex^0.4.2, now a required peer dependency; the range follows the@atproto/lexversion the schemas are generated with. Like@atproto/lex, the package now requires Node.js 22 or later (engines).Breaking: the 1.x API (the
@atproto/lex-clitypes and validators,validate(), the*_NSIDconstants, the lexicon documents and the mapping objects) moves unchanged to@hypercerts-org/lexicon/legacy. To keep using it, changefrom "@hypercerts-org/lexicon"tofrom "@hypercerts-org/lexicon/legacy"; names and behaviour are the same, and/legacystill supportsrequire()./legacyis deprecated and will be removed in a later major version; the README's "Migrating from 1.x" section shows how the old names map to the new ones. Note that the new schemas'$safeParserequires the record's$type, whichvalidate()did not. The lexicons and the/lexiconsentry point do not change. The@atproto/xrpcpeer dependency is removed: the published entry points do not import it.