@multiplatform.one/cli 7.19.0 → 7.21.0

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/lib/source.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "cliVersion": "7.19.0",
2
+ "cliVersion": "7.21.0",
3
3
  "url": "https://git.corp.bitspur.com/multiplatform.one/mpo.git",
4
- "sha": "396e99107b6367574b89d04ada8ed5c2913264a1"
4
+ "sha": "da3dc5447b2449eaf8ec736a232ad24c60f50727"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/cli",
3
- "version": "7.19.0",
3
+ "version": "7.21.0",
4
4
  "description": "multiplatform.one cli — mpo init clones and prunes the monorepo, mpo update merges it back",
5
5
  "keywords": [
6
6
  "create-multiplatform-app",
@@ -56,7 +56,7 @@
56
56
  "access": "public"
57
57
  },
58
58
  "dependencies": {
59
- "@multiplatform.one/utils": "7.19.0",
59
+ "@multiplatform.one/utils": "7.21.0",
60
60
  "commander": "^14.0.3",
61
61
  "inquirer": "^13.4.2",
62
62
  "nano-spawn": "^2.1.0",
@@ -817,6 +817,28 @@ if (pruned.includes("public") && pkg.pnpm?.patchedDependencies) {
817
817
  fs.writeFileSync(file, `${JSON.stringify(pkg, null, 2)}\n`);
818
818
  NODE
819
819
 
820
+ # From MPO-367 (pnpm 11) the patches live in pnpm-workspace.yaml, which gets
821
+ # the same two edits the package.json `pnpm` field gets above.
822
+ if [ -f "$TREE/pnpm-workspace.yaml" ]; then
823
+ node - "$TREE/pnpm-workspace.yaml" "$(printf '%s' "$REMOVED" | tr ' ' ',')" <<'NODE'
824
+ const fs = require("node:fs");
825
+ const [file, prunedCsv] = process.argv.slice(2);
826
+ const pruned = prunedCsv ? prunedCsv.split(",") : [];
827
+ const lines = fs.readFileSync(file, "utf8").split("\n");
828
+ const start = lines.findIndex((line) => /^patchedDependencies:\s*$/.test(line));
829
+ if (start < 0) process.exit(0);
830
+ let end = start + 1;
831
+ while (end < lines.length && /^\s+\S/.test(lines[end])) end++;
832
+ const entries = lines
833
+ .slice(start + 1, end)
834
+ .filter((line) => !(pruned.includes("public") && /:\s*["']?patches\/public\//.test(line)));
835
+ const block = entries.length ? ["patchedDependencies:", ...entries] : [];
836
+ if (!lines.some((line) => /^allowUnusedPatches:/.test(line))) block.unshift("allowUnusedPatches: true");
837
+ lines.splice(start, end - start, ...block);
838
+ fs.writeFileSync(file, lines.join("\n"));
839
+ NODE
840
+ fi
841
+
820
842
  # ── 5. the published packages come from the registry now ─────────────────
821
843
 
822
844
  # workspace:* / workspace:^ / workspace:~ on @multiplatform.one/* become the
@@ -19,7 +19,7 @@ The `@multiplatform.one/*` packages come from the registry.
19
19
 
20
20
  ## Getting started
21
21
 
22
- Prerequisites: Node 20+, pnpm 10+ and git.
22
+ Prerequisites: Node 22.13+, pnpm 11+ and git.
23
23
 
24
24
  ```sh
25
25
  pnpm install