@atproto/lex-installer 0.0.4 → 0.0.6

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/CHANGELOG.md ADDED
@@ -0,0 +1,80 @@
1
+ # @atproto/lex-installer
2
+
3
+ ## 0.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`693784c`](https://github.com/bluesky-social/atproto/commit/693784c3a0dee4b6a29aa1e018fce682dcae148f), [`d551b0e`](https://github.com/bluesky-social/atproto/commit/d551b0e3527714c111c3ec6e4c90ad7f46369fab), [`e39ca11`](https://github.com/bluesky-social/atproto/commit/e39ca114accac65070dcdd424a181821aad6d99d), [`7e1d458`](https://github.com/bluesky-social/atproto/commit/7e1d45877bca0f615e7b1313cfcc66823b3de758)]:
8
+ - @atproto/lex-data@0.0.3
9
+ - @atproto/lex-document@0.0.5
10
+ - @atproto/lex-builder@0.0.6
11
+ - @atproto/lex-cbor@0.0.3
12
+ - @atproto/lex-resolver@0.0.5
13
+ - @atproto/lex-schema@0.0.4
14
+
15
+ ## 0.0.5
16
+
17
+ ### Patch Changes
18
+
19
+ - [#4390](https://github.com/bluesky-social/atproto/pull/4390) [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Rework object validation logic to work without `options` argument
20
+
21
+ - [#4384](https://github.com/bluesky-social/atproto/pull/4384) [`d396de0`](https://github.com/bluesky-social/atproto/commit/d396de016d1d55d08cfad1dabd3ffd9eaeea76ea) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Use the record CID in the lexicon manifest instead of the CID of the lexicon definition
22
+
23
+ - [#4385](https://github.com/bluesky-social/atproto/pull/4385) [`0f2fc65`](https://github.com/bluesky-social/atproto/commit/0f2fc6592f0c89d26ac7a2ef70b12cbd15a18d05) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Properly check for lexicon manifest changes by sorting lexicons before comparison
24
+
25
+ - [#4390](https://github.com/bluesky-social/atproto/pull/4390) [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Replace use of `CID` with `Cid`
26
+
27
+ - [#4389](https://github.com/bluesky-social/atproto/pull/4389) [`bcae2b7`](https://github.com/bluesky-social/atproto/commit/bcae2b77b68da6dc2ec202651c8bf41fd5769f69) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Use string formats from `@atproto/syntax`
28
+
29
+ - [#4397](https://github.com/bluesky-social/atproto/pull/4397) [`688f9d6`](https://github.com/bluesky-social/atproto/commit/688f9d67597ba96d6e9c4a4aec4d394d42f4cbf4) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Add `CHANGELOG.md` to npm package
30
+
31
+ - Updated dependencies [[`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`d396de0`](https://github.com/bluesky-social/atproto/commit/d396de016d1d55d08cfad1dabd3ffd9eaeea76ea), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`a487ab8`](https://github.com/bluesky-social/atproto/commit/a487ab8afe8f18d00662e666049be8d28de2b57e), [`a487ab8`](https://github.com/bluesky-social/atproto/commit/a487ab8afe8f18d00662e666049be8d28de2b57e), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`bcae2b7`](https://github.com/bluesky-social/atproto/commit/bcae2b77b68da6dc2ec202651c8bf41fd5769f69), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`a487ab8`](https://github.com/bluesky-social/atproto/commit/a487ab8afe8f18d00662e666049be8d28de2b57e), [`a487ab8`](https://github.com/bluesky-social/atproto/commit/a487ab8afe8f18d00662e666049be8d28de2b57e), [`bcae2b7`](https://github.com/bluesky-social/atproto/commit/bcae2b77b68da6dc2ec202651c8bf41fd5769f69), [`8012627`](https://github.com/bluesky-social/atproto/commit/8012627a1226cb2f1c753385ad2497b6b43ffd2e), [`8012627`](https://github.com/bluesky-social/atproto/commit/8012627a1226cb2f1c753385ad2497b6b43ffd2e), [`03a2a4b`](https://github.com/bluesky-social/atproto/commit/03a2a4bb3814ced7ad1d4fe6c94b5348a3bbc097), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`bcae2b7`](https://github.com/bluesky-social/atproto/commit/bcae2b77b68da6dc2ec202651c8bf41fd5769f69), [`bcae2b7`](https://github.com/bluesky-social/atproto/commit/bcae2b77b68da6dc2ec202651c8bf41fd5769f69), [`8012627`](https://github.com/bluesky-social/atproto/commit/8012627a1226cb2f1c753385ad2497b6b43ffd2e), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`a487ab8`](https://github.com/bluesky-social/atproto/commit/a487ab8afe8f18d00662e666049be8d28de2b57e), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`9f87ff3`](https://github.com/bluesky-social/atproto/commit/9f87ff3aa60090c8c38b6ce400cba6ceff5cd2e9), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`688f9d6`](https://github.com/bluesky-social/atproto/commit/688f9d67597ba96d6e9c4a4aec4d394d42f4cbf4), [`a17d2e8`](https://github.com/bluesky-social/atproto/commit/a17d2e8a59ceb00fa8197642e0767fcc776d5b70), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba), [`1d445af`](https://github.com/bluesky-social/atproto/commit/1d445af2a7fc27eca5a45869b29266e6a2a7f3ba)]:
32
+ - @atproto/lex-schema@0.0.3
33
+ - @atproto/lex-document@0.0.4
34
+ - @atproto/lex-builder@0.0.5
35
+ - @atproto/lex-resolver@0.0.4
36
+ - @atproto/lex-data@0.0.2
37
+ - @atproto/lex-cbor@0.0.2
38
+ - @atproto/syntax@0.4.2
39
+
40
+ ## 0.0.4
41
+
42
+ ### Patch Changes
43
+
44
+ - [#4380](https://github.com/bluesky-social/atproto/pull/4380) [`23c271f`](https://github.com/bluesky-social/atproto/commit/23c271fcac27f090727e2f835697d4733784bdb4) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Deterministically order lexicon manifest items
45
+
46
+ - Updated dependencies [[`23c271f`](https://github.com/bluesky-social/atproto/commit/23c271fcac27f090727e2f835697d4733784bdb4), [`23c271f`](https://github.com/bluesky-social/atproto/commit/23c271fcac27f090727e2f835697d4733784bdb4)]:
47
+ - @atproto/lex-schema@0.0.2
48
+ - @atproto/lex-builder@0.0.4
49
+ - @atproto/lex-document@0.0.3
50
+ - @atproto/lex-resolver@0.0.3
51
+
52
+ ## 0.0.3
53
+
54
+ ### Patch Changes
55
+
56
+ - Updated dependencies [[`5ffd612`](https://github.com/bluesky-social/atproto/commit/5ffd6129909071e979c30f31266119865ab582b6)]:
57
+ - @atproto/lex-document@0.0.2
58
+ - @atproto/lex-builder@0.0.3
59
+ - @atproto/lex-resolver@0.0.2
60
+
61
+ ## 0.0.2
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [[`7456f53`](https://github.com/bluesky-social/atproto/commit/7456f53e45fb3eef2f3bbdf2513da2d8ab078d80)]:
66
+ - @atproto/lex-builder@0.0.2
67
+
68
+ ## 0.0.1
69
+
70
+ ### Patch Changes
71
+
72
+ - [#4371](https://github.com/bluesky-social/atproto/pull/4371) [`46550d6`](https://github.com/bluesky-social/atproto/commit/46550d6c1ffb298f57d54eb1904067b2df5a40af) Thanks [@matthieusieben](https://github.com/matthieusieben)! - Release
73
+
74
+ - Updated dependencies [[`46550d6`](https://github.com/bluesky-social/atproto/commit/46550d6c1ffb298f57d54eb1904067b2df5a40af)]:
75
+ - @atproto/lex-builder@0.0.1
76
+ - @atproto/lex-cbor@0.0.1
77
+ - @atproto/lex-data@0.0.1
78
+ - @atproto/lex-document@0.0.1
79
+ - @atproto/lex-resolver@0.0.1
80
+ - @atproto/lex-schema@0.0.1
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ async function install(options) {
18
18
  const installer = tslib_1.__addDisposableResource(env_1, new lex_installer_js_1.LexInstaller(options), true);
19
19
  await installer.install({ additions, manifest });
20
20
  // Verify lockfile
21
- if (options.ci && (!manifest || !installer.matches(manifest))) {
21
+ if (options.ci && (!manifest || !installer.equals(manifest))) {
22
22
  throw new Error('Lexicons manifest is out of date');
23
23
  }
24
24
  // Save changes if requested
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAaA,0BA2BC;;AAxCD,mCAAqD;AACrD,yDAAsE;AACtE,iEAG+B;AAQxB,KAAK,UAAU,OAAO,CAAC,OAA0B;;;QACtD,MAAM,QAAQ,GAAiC,MAAM,IAAA,oBAAY,EAC/D,OAAO,CAAC,QAAQ,CACjB,CAAC,IAAI,CACJ,CAAC,IAAI,EAAE,EAAE,CAAC,6CAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,EAC5C,CAAC,KAAc,EAAE,EAAE;YACjB,IAAI,IAAA,qBAAa,EAAC,KAAK,CAAC;gBAAE,OAAO,SAAS,CAAA;YAC1C,MAAM,IAAI,KAAK,CAAC,kCAAkC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;QAChE,CAAC,CACF,CAAA;QAED,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QAEtC,iEAAiE;QACjE,MAAY,SAAS,0CAAG,IAAI,+BAAY,CAAC,OAAO,CAAC,OAAA,CAAA;QAEjD,MAAM,SAAS,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAA;QAEhD,kBAAkB;QAClB,IAAI,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;YAC9D,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAA;QACrD,CAAC;QAED,4BAA4B;QAC5B,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,MAAM,SAAS,CAAC,IAAI,EAAE,CAAA;QACxB,CAAC;;;;;;;;;;;CACF","sourcesContent":["import { isEnoentError, readJsonFile } from './fs.js'\nimport { LexInstaller, LexInstallerOptions } from './lex-installer.js'\nimport {\n LexiconsManifest,\n lexiconsManifestSchema,\n} from './lexicons-manifest.js'\n\nexport type LexInstallOptions = LexInstallerOptions & {\n add?: string[]\n save?: boolean\n ci?: boolean\n}\n\nexport async function install(options: LexInstallOptions) {\n const manifest: LexiconsManifest | undefined = await readJsonFile(\n options.manifest,\n ).then(\n (json) => lexiconsManifestSchema.parse(json),\n (cause: unknown) => {\n if (isEnoentError(cause)) return undefined\n throw new Error('Failed to read lexicons manifest', { cause })\n },\n )\n\n const additions = new Set(options.add)\n\n // Perform the installation using the existing manifest as \"hint\"\n await using installer = new LexInstaller(options)\n\n await installer.install({ additions, manifest })\n\n // Verify lockfile\n if (options.ci && (!manifest || !installer.matches(manifest))) {\n throw new Error('Lexicons manifest is out of date')\n }\n\n // Save changes if requested\n if (options.save) {\n await installer.save()\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAaA,0BA2BC;;AAxCD,mCAAqD;AACrD,yDAAsE;AACtE,iEAG+B;AAQxB,KAAK,UAAU,OAAO,CAAC,OAA0B;;;QACtD,MAAM,QAAQ,GAAiC,MAAM,IAAA,oBAAY,EAC/D,OAAO,CAAC,QAAQ,CACjB,CAAC,IAAI,CACJ,CAAC,IAAI,EAAE,EAAE,CAAC,6CAAsB,CAAC,KAAK,CAAC,IAAI,CAAC,EAC5C,CAAC,KAAc,EAAE,EAAE;YACjB,IAAI,IAAA,qBAAa,EAAC,KAAK,CAAC;gBAAE,OAAO,SAAS,CAAA;YAC1C,MAAM,IAAI,KAAK,CAAC,kCAAkC,EAAE,EAAE,KAAK,EAAE,CAAC,CAAA;QAChE,CAAC,CACF,CAAA;QAED,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QAEtC,iEAAiE;QACjE,MAAY,SAAS,0CAAG,IAAI,+BAAY,CAAC,OAAO,CAAC,OAAA,CAAA;QAEjD,MAAM,SAAS,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAA;QAEhD,kBAAkB;QAClB,IAAI,OAAO,CAAC,EAAE,IAAI,CAAC,CAAC,QAAQ,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC;YAC7D,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAA;QACrD,CAAC;QAED,4BAA4B;QAC5B,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACjB,MAAM,SAAS,CAAC,IAAI,EAAE,CAAA;QACxB,CAAC;;;;;;;;;;;CACF","sourcesContent":["import { isEnoentError, readJsonFile } from './fs.js'\nimport { LexInstaller, LexInstallerOptions } from './lex-installer.js'\nimport {\n LexiconsManifest,\n lexiconsManifestSchema,\n} from './lexicons-manifest.js'\n\nexport type LexInstallOptions = LexInstallerOptions & {\n add?: string[]\n save?: boolean\n ci?: boolean\n}\n\nexport async function install(options: LexInstallOptions) {\n const manifest: LexiconsManifest | undefined = await readJsonFile(\n options.manifest,\n ).then(\n (json) => lexiconsManifestSchema.parse(json),\n (cause: unknown) => {\n if (isEnoentError(cause)) return undefined\n throw new Error('Failed to read lexicons manifest', { cause })\n },\n )\n\n const additions = new Set(options.add)\n\n // Perform the installation using the existing manifest as \"hint\"\n await using installer = new LexInstaller(options)\n\n await installer.install({ additions, manifest })\n\n // Verify lockfile\n if (options.ci && (!manifest || !installer.equals(manifest))) {\n throw new Error('Lexicons manifest is out of date')\n }\n\n // Save changes if requested\n if (options.save) {\n await installer.save()\n }\n}\n"]}