@warpgogol/repo-extract 1.4.0 → 1.4.2
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/dist/cli.js +1 -1
- package/dist/extract.js +12 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
package/dist/extract.js
CHANGED
|
@@ -352,7 +352,13 @@ async function exportMonorepo(root, dest, config, logger, emit) {
|
|
|
352
352
|
// 13. Generate lockfile
|
|
353
353
|
logger.log(`Generating ${pm} lockfile...`);
|
|
354
354
|
const installBin = pm === "pnpm" ? "pnpm" : pm === "yarn" ? "yarn" : "npm";
|
|
355
|
-
|
|
355
|
+
// --ignore-workspace: when the dest dir sits inside another pnpm workspace
|
|
356
|
+
// (e.g. pipelines self-export under packages/packages/), plain `install`
|
|
357
|
+
// resolves the ancestor workspace root and writes the lockfile THERE —
|
|
358
|
+
// dest ships without a lockfile and CI's --frozen-lockfile fails.
|
|
359
|
+
const installArgs = pm === "pnpm"
|
|
360
|
+
? ["install", "--ignore-workspace", "--config.dangerouslyAllowAllBuilds=true"]
|
|
361
|
+
: ["install"];
|
|
356
362
|
try {
|
|
357
363
|
execFileSync(installBin, installArgs, { cwd: dest, stdio: "pipe" });
|
|
358
364
|
logger.log(` generated ${pm} lockfile`);
|
|
@@ -483,7 +489,11 @@ async function exportStandalonePackage(root, dest, config, logger, emit) {
|
|
|
483
489
|
// 4d. Generate lockfile
|
|
484
490
|
logger.log(`Generating ${pm} lockfile...`);
|
|
485
491
|
const installBin = pm === "pnpm" ? "pnpm" : pm === "yarn" ? "yarn" : "npm";
|
|
486
|
-
|
|
492
|
+
// --ignore-workspace: see step 13 above — dest inside an ancestor workspace
|
|
493
|
+
// would otherwise route the install to the root and ship no lockfile.
|
|
494
|
+
const installArgs = pm === "pnpm"
|
|
495
|
+
? ["install", "--ignore-workspace", "--config.dangerouslyAllowAllBuilds=true"]
|
|
496
|
+
: ["install"];
|
|
487
497
|
try {
|
|
488
498
|
execFileSync(installBin, installArgs, { cwd: dest, stdio: "pipe" });
|
|
489
499
|
logger.log(` generated ${pm} lockfile`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warpgogol/repo-extract",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Extract apps and packages from a TurboRepo monorepo into standalone public repositories",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Andrii Syrokomskyi <andrii@syrokomskyi.com> (https://syrokomskyi.com)",
|