@dev.fast/diffr 0.1.7 → 0.1.9

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/README.md CHANGED
@@ -16,6 +16,10 @@ Supports macOS arm64, macOS x64, Linux arm64, and Linux x64. `--check` verifies
16
16
  network access. Downloads warn on network failure unless `--required`; invalid
17
17
  hashes or archives always fail.
18
18
 
19
+ `--full` fetches the full edition, which adds the parsers lean builds omit (Apex,
20
+ Fortran, F#, Haskell, Julia, OCaml, QML, Verilog, VHDL). It requires full-edition
21
+ pins, which start with the next release.
22
+
19
23
  ## Wire changes
20
24
 
21
25
  Keep these files in sync:
@@ -30,8 +34,8 @@ Keep these files in sync:
30
34
  ## Release
31
35
 
32
36
  After tagging the matching Rust release and building with `cargo build --locked`,
33
- run from `diffr-ts`. New pins select the CLI-only release archives; older pins
34
- continue to use the full archives:
37
+ run from `diffr-ts`. New pins select the lean and full CLI-only release archives;
38
+ older pins continue to use the combined archives:
35
39
 
36
40
  ```sh
37
41
  bun install --frozen-lockfile
package/bin/fetch.mjs CHANGED
@@ -19,6 +19,7 @@ try {
19
19
  async function main() {
20
20
  const { values } = parseArgs({ options: {
21
21
  into: { type: "string" },
22
+ full: { type: "boolean", default: false },
22
23
  check: { type: "boolean" },
23
24
  required: { type: "boolean" },
24
25
  pins: { type: "string", default: join(root, "pins.json") },
@@ -30,7 +31,9 @@ async function main() {
30
31
  if (pins.version !== version) throw new Error(`pins.json is for ${pins.version}, package is ${version}; run \`npm run pin\``);
31
32
  const target = targets[`${process.platform}-${process.arch}`];
32
33
  if (!target) throw new Error(`no diffr release for ${process.platform}-${process.arch}`);
33
- const expected = pins.sha256?.[target];
34
+ const pin = values.full ? pins.full : pins;
35
+ if (!pin) throw new Error(`pins.json has no full edition for ${version}`);
36
+ const expected = pin.sha256?.[target];
34
37
  if (typeof expected !== "string" || !/^[a-f0-9]{64}$/.test(expected)) {
35
38
  throw new Error(`pins.json has no valid sha256 for ${target}`);
36
39
  }
@@ -41,7 +44,8 @@ async function main() {
41
44
  try {
42
45
  const stamp = JSON.parse(readFileSync(stampPath, "utf8"));
43
46
  const stat = lstatSync(binary);
44
- installed = stat.isFile() && (stat.mode & 0o111) !== 0 && stamp.version === version && stamp.target === target;
47
+ installed = stat.isFile() && (stat.mode & 0o111) !== 0 && stamp.version === version && stamp.target === target
48
+ && Boolean(stamp.full) === values.full;
45
49
  } catch { /* Missing or damaged installations are fetched again. */ }
46
50
  if (installed) {
47
51
  console.log(`diffr ${version} (${target}) already at ${binary}`);
@@ -49,8 +53,8 @@ async function main() {
49
53
  }
50
54
  if (values.check) throw new Error(`${binary} is missing or not diffr ${version} (${target})`);
51
55
 
52
- const artifact = pins.artifact ?? "diffr";
53
- if (!["diffr", "diffr-cli"].includes(artifact)) throw new Error(`unknown pinned artifact: ${artifact}`);
56
+ const artifact = values.full ? "diffr-cli-full" : pins.artifact ?? "diffr";
57
+ if (!["diffr", "diffr-cli", "diffr-cli-full"].includes(artifact)) throw new Error(`unknown pinned artifact: ${artifact}`);
54
58
  const asset = `${artifact}-${version}-${target}.tar.gz`;
55
59
  const url = `https://github.com/devdotfast/diffr/releases/download/${version}/${asset}`;
56
60
  let bytes;
@@ -78,7 +82,7 @@ async function main() {
78
82
  }
79
83
  chmodSync(extracted, 0o755);
80
84
  const stamp = join(staging, "stamp.json");
81
- writeFileSync(stamp, `${JSON.stringify({ version, target }, null, 2)}\n`);
85
+ writeFileSync(stamp, `${JSON.stringify({ version, target, ...(values.full && { full: true }) }, null, 2)}\n`);
82
86
  renameSync(extracted, binary);
83
87
  renameSync(stamp, stampPath);
84
88
  } finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev.fast/diffr",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "diffr's NDJSON wire contract, validators, and release binary fetcher",
5
5
  "repository": "https://github.com/devdotfast/diffr",
6
6
  "license": "MIT",
package/pins.json CHANGED
@@ -1,10 +1,18 @@
1
1
  {
2
- "version": "0.1.7",
2
+ "version": "0.1.9",
3
3
  "artifact": "diffr-cli",
4
4
  "sha256": {
5
- "aarch64-apple-darwin": "3666353d06864256b2a0e5bc12d52fae109e3fb53492ed14aff85886cfc214c2",
6
- "x86_64-apple-darwin": "c556881f30945ffc8aa629f3d91465badf20f61d4dd543cae4c73cac64177da3",
7
- "x86_64-unknown-linux-gnu": "0a4b93af38494c6c140105744868989c36c0426573308d5daf5219449547dd45",
8
- "aarch64-unknown-linux-gnu": "5ee9d48f9e7c1971505121787b2d185e2a9aa0425b2dcb6ee6bc04274f194b7f"
5
+ "aarch64-apple-darwin": "6a7073252550b22217c588215b99c5642eabedfadcb545e087f1bf0a76a9cfa0",
6
+ "x86_64-apple-darwin": "3c4ccef4daa952a9bd3cf0d4ac380c24595bca93f454e29b19ecf07fe16071dd",
7
+ "x86_64-unknown-linux-gnu": "cda36ae600cdb4172952b295c16b2e47ab26bf93eb6c3301e9a0ad6b1472ebf6",
8
+ "aarch64-unknown-linux-gnu": "33ed933688b4bca8f9e3f0177f5bc4520eef65077a39045a6aaab12629e3cc32"
9
+ },
10
+ "full": {
11
+ "sha256": {
12
+ "aarch64-apple-darwin": "7a2b743175f879fca2d7394391dde41cfa05e7149ddd600072ba59b63f1f7354",
13
+ "x86_64-apple-darwin": "9e0a4705097e7abfb0cabfbc48fcaf53b59cf41894fb99b60a35aa02f3cf1c9e",
14
+ "x86_64-unknown-linux-gnu": "604536dfaee9ccd3fceae4bfa7d2e7e834330572d86d8d8a3c8b300c2ef22739",
15
+ "aarch64-unknown-linux-gnu": "4858dfa3f53c377b6859769c1661e399e6615a633918953021bf37b4da048d5f"
16
+ }
9
17
  }
10
18
  }