@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 CHANGED
@@ -43,7 +43,7 @@ program
43
43
  fromHead: opts.fromHead,
44
44
  ref: opts.ref,
45
45
  allowDirty: opts.allowDirty,
46
- noPush: opts.noPush,
46
+ noPush: opts.push === false,
47
47
  });
48
48
  }
49
49
  catch (err) {
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
- const installArgs = pm === "pnpm" ? ["install", "--config.dangerouslyAllowAllBuilds=true"] : ["install"];
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
- const installArgs = pm === "pnpm" ? ["install", "--config.dangerouslyAllowAllBuilds=true"] : ["install"];
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.0",
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)",