@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 +2 -2
- package/package.json +2 -2
- package/scripts/scaffold.sh +22 -0
- package/templates/README.md +1 -1
package/lib/source.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/cli",
|
|
3
|
-
"version": "7.
|
|
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.
|
|
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",
|
package/scripts/scaffold.sh
CHANGED
|
@@ -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
|