@icebreakers/monorepo 0.7.11 → 1.0.1

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.
@@ -3,7 +3,7 @@
3
3
  "type": "module",
4
4
  "version": "0.0.0",
5
5
  "private": true,
6
- "packageManager": "pnpm@10.8.1",
6
+ "packageManager": "pnpm@10.11.0",
7
7
  "author": "ice breaker <1324318532@qq.com>",
8
8
  "repository": {
9
9
  "type": "git",
@@ -33,38 +33,38 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@changesets/changelog-github": "^0.5.1",
36
- "@changesets/cli": "^2.29.2",
36
+ "@changesets/cli": "^2.29.4",
37
37
  "@commitlint/cli": "^19.8.0",
38
38
  "@commitlint/config-conventional": "^19.8.0",
39
39
  "@commitlint/prompt-cli": "^19.8.0",
40
40
  "@commitlint/types": "^19.8.0",
41
- "@icebreakers/eslint-config": "^1.1.1",
41
+ "@icebreakers/eslint-config": "^1.1.5",
42
42
  "@icebreakers/monorepo": "workspace:*",
43
- "@icebreakers/stylelint-config": "^1.0.0",
43
+ "@icebreakers/stylelint-config": "^1.0.1",
44
44
  "@types/fs-extra": "^11.0.4",
45
- "@types/node": "^22.15.2",
46
- "@vitest/coverage-v8": "~3.1.1",
45
+ "@types/node": "^22.15.18",
46
+ "@vitest/coverage-v8": "~3.1.4",
47
47
  "ci-info": "^4.2.0",
48
48
  "cross-env": "^7.0.3",
49
49
  "defu": "^6.1.4",
50
- "es-toolkit": "^1.34.1",
51
- "eslint": "^9.25.1",
50
+ "es-toolkit": "^1.38.0",
51
+ "eslint": "^9.27.0",
52
52
  "execa": "^9.5.2",
53
53
  "fs-extra": "^11.3.0",
54
54
  "husky": "^9.1.6",
55
- "lint-staged": "^15.5.1",
55
+ "lint-staged": "^16.0.0",
56
56
  "only-allow": "^1.2.1",
57
57
  "pathe": "^2.0.3",
58
58
  "pkg-types": "^2.1.0",
59
59
  "rimraf": "^6.0.1",
60
60
  "tslib": "^2.8.0",
61
- "tsup": "^8.3.6",
62
- "tsx": "^4.19.3",
61
+ "tsup": "^8.5.0",
62
+ "tsx": "^4.19.4",
63
63
  "turbo": "^2.5.2",
64
64
  "typescript": "^5.8.2",
65
65
  "unbuild": "^3.5.0",
66
- "vitest": "~3.1.1",
67
- "yaml": "^2.7.0"
66
+ "vitest": "~3.1.4",
67
+ "yaml": "^2.8.0"
68
68
  },
69
69
  "publishConfig": {
70
70
  "access": "public",
@@ -27,9 +27,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
27
27
  mod
28
28
  ));
29
29
 
30
- // ../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.3_yaml@2.7.1/node_modules/tsup/assets/esm_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.23__jiti@2.4.2_postcss@8.5_b914d2c7671fefba2a17179d863c3344/node_modules/tsup/assets/esm_shims.js
31
+ import path from "path";
32
+ import { fileURLToPath } from "url";
31
33
  var init_esm_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.4.0_jiti@2.4.2_postcss@8.5.3_tsx@4.19.3_typescript@5.8.3_yaml@2.7.1/node_modules/tsup/assets/esm_shims.js"() {
34
+ "../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@22.15.23__jiti@2.4.2_postcss@8.5_b914d2c7671fefba2a17179d863c3344/node_modules/tsup/assets/esm_shims.js"() {
33
35
  "use strict";
34
36
  }
35
37
  });
@@ -181,9 +183,9 @@ var require_set_value = __commonJS({
181
183
  }
182
184
  return obj;
183
185
  };
184
- var setValue = (target, path9, value, options) => {
185
- if (!path9 || !isObject2(target)) return target;
186
- const keys = split2(path9, options);
186
+ var setValue = (target, path11, value, options) => {
187
+ if (!path11 || !isObject2(target)) return target;
188
+ const keys = split2(path11, options);
187
189
  let obj = target;
188
190
  for (let i = 0; i < keys.length; i++) {
189
191
  const key = keys[i];
@@ -217,7 +219,7 @@ var require_set_value = __commonJS({
217
219
  init_esm_shims();
218
220
  import { parse, stringify } from "comment-json";
219
221
  import fs from "fs-extra";
220
- import path from "pathe";
222
+ import path2 from "pathe";
221
223
 
222
224
  // src/monorepo/mirror/sources.ts
223
225
  init_esm_shims();
@@ -265,7 +267,7 @@ function setMirror(obj) {
265
267
 
266
268
  // src/monorepo/binaryMirror.ts
267
269
  async function setVscodeBinaryMirror(cwd) {
268
- const targetJsonPath = path.resolve(cwd, ".vscode/settings.json");
270
+ const targetJsonPath = path2.resolve(cwd, ".vscode/settings.json");
269
271
  await fs.ensureFile(targetJsonPath);
270
272
  const json = parse(await fs.readFile(targetJsonPath, "utf8"), void 0, false);
271
273
  json && typeof json === "object" && setMirror(json);
@@ -277,17 +279,19 @@ async function setVscodeBinaryMirror(cwd) {
277
279
  init_esm_shims();
278
280
  var import_set_value2 = __toESM(require_set_value(), 1);
279
281
  import fs2 from "fs-extra";
280
- import path2 from "pathe";
281
- var dirs = [
282
+ import path3 from "pathe";
283
+ var cleanDirs = [
282
284
  "packages/monorepo",
283
- "packages/foo",
285
+ "packages/bar",
286
+ "packages/ui",
287
+ // 'packages/foo',
284
288
  // 'apps/cli',
285
289
  // 'apps/website',
286
290
  "apps"
287
291
  ];
288
292
  async function cleanProjects(cwd) {
289
- for (const dir of dirs.map((x) => {
290
- return path2.resolve(cwd, x);
293
+ for (const dir of cleanDirs.map((x) => {
294
+ return path3.resolve(cwd, x);
291
295
  })) {
292
296
  await fs2.remove(dir);
293
297
  }
@@ -313,11 +317,11 @@ var join = /* @__PURE__ */ __name((segs, joinChar, options) => {
313
317
  }
314
318
  return segs[0] + joinChar + segs[1];
315
319
  }, "join");
316
- var split = /* @__PURE__ */ __name((path9, splitChar, options) => {
320
+ var split = /* @__PURE__ */ __name((path11, splitChar, options) => {
317
321
  if (typeof options.split === "function") {
318
- return options.split(path9);
322
+ return options.split(path11);
319
323
  }
320
- return path9.split(splitChar);
324
+ return path11.split(splitChar);
321
325
  }, "split");
322
326
  var isValid = /* @__PURE__ */ __name((key, target = {}, options) => {
323
327
  if (typeof options?.isValid === "function") {
@@ -328,27 +332,27 @@ var isValid = /* @__PURE__ */ __name((key, target = {}, options) => {
328
332
  var isValidObject = /* @__PURE__ */ __name((v) => {
329
333
  return isObject(v) || typeof v === "function";
330
334
  }, "isValidObject");
331
- var getValue = /* @__PURE__ */ __name((target, path9, options = {}) => {
335
+ var getValue = /* @__PURE__ */ __name((target, path11, options = {}) => {
332
336
  if (!isObject(options)) {
333
337
  options = { default: options };
334
338
  }
335
339
  if (!isValidObject(target)) {
336
340
  return typeof options.default !== "undefined" ? options.default : target;
337
341
  }
338
- if (typeof path9 === "number") {
339
- path9 = String(path9);
342
+ if (typeof path11 === "number") {
343
+ path11 = String(path11);
340
344
  }
341
- const pathIsArray = Array.isArray(path9);
342
- const pathIsString = typeof path9 === "string";
345
+ const pathIsArray = Array.isArray(path11);
346
+ const pathIsString = typeof path11 === "string";
343
347
  const splitChar = options.separator || ".";
344
348
  const joinChar = options.joinChar || (typeof splitChar === "string" ? splitChar : ".");
345
349
  if (!pathIsString && !pathIsArray) {
346
350
  return target;
347
351
  }
348
- if (target[path9] !== void 0) {
349
- return isValid(path9, target, options) ? target[path9] : options.default;
352
+ if (target[path11] !== void 0) {
353
+ return isValid(path11, target, options) ? target[path11] : options.default;
350
354
  }
351
- const segs = pathIsArray ? path9 : split(path9, splitChar, options);
355
+ const segs = pathIsArray ? path11 : split(path11, splitChar, options);
352
356
  const len = segs.length;
353
357
  let idx = 0;
354
358
  do {
@@ -512,9 +516,9 @@ var defuArrayFn = createDefu((object, key, currentValue) => {
512
516
  });
513
517
 
514
518
  // src/monorepo/workspace.ts
515
- import path3 from "pathe";
519
+ import path4 from "pathe";
516
520
  async function getWorkspacePackages(cwd, options) {
517
- const posixCwd = path3.normalize(cwd);
521
+ const posixCwd = path4.normalize(cwd);
518
522
  const { ignoreRootPackage, ignorePrivatePackage, patterns } = defu(options, {
519
523
  ignoreRootPackage: true,
520
524
  ignorePrivatePackage: true
@@ -528,7 +532,7 @@ async function getWorkspacePackages(cwd, options) {
528
532
  }
529
533
  return true;
530
534
  }).map((project) => {
531
- const pkgJsonPath = path3.resolve(project.rootDir, "package.json");
535
+ const pkgJsonPath = path4.resolve(project.rootDir, "package.json");
532
536
  return {
533
537
  ...project,
534
538
  pkgJsonPath
@@ -536,7 +540,7 @@ async function getWorkspacePackages(cwd, options) {
536
540
  });
537
541
  if (ignoreRootPackage) {
538
542
  pkgs = pkgs.filter((x) => {
539
- return path3.normalize(
543
+ return path4.normalize(
540
544
  x.rootDir
541
545
  ) !== posixCwd;
542
546
  });
@@ -549,11 +553,11 @@ init_esm_shims();
549
553
 
550
554
  // src/monorepo/context.ts
551
555
  init_esm_shims();
552
- import path4 from "pathe";
556
+ import path5 from "pathe";
553
557
  import "@pnpm/types";
554
558
  async function createContext(cwd) {
555
559
  const git = new GitClient();
556
- const workspaceFilepath = path4.resolve(cwd, "pnpm-workspace.yaml");
560
+ const workspaceFilepath = path5.resolve(cwd, "pnpm-workspace.yaml");
557
561
  const projects = await getWorkspacePackages(cwd);
558
562
  const gitUrl = await git.getGitUrl();
559
563
  const gitUser = await git.getUser();
@@ -567,18 +571,39 @@ async function createContext(cwd) {
567
571
  };
568
572
  }
569
573
 
570
- // src/monorepo/setPkgJson.ts
574
+ // src/monorepo/setChangeset.ts
571
575
  init_esm_shims();
572
576
  var import_set_value3 = __toESM(require_set_value(), 1);
573
577
  import fs3 from "fs-extra";
574
- import path5 from "pathe";
578
+ import path6 from "pathe";
579
+ async function setChangeset_default(ctx) {
580
+ const { gitUrl, workspaceFilepath } = ctx;
581
+ if (gitUrl && await fs3.exists(workspaceFilepath)) {
582
+ const changesetConfigPath = path6.resolve(path6.dirname(workspaceFilepath), ".changeset/config.json");
583
+ if (await fs3.exists(changesetConfigPath)) {
584
+ const changesetConfig = await fs3.readJson(
585
+ changesetConfigPath
586
+ );
587
+ if (gitUrl.full_name) {
588
+ (0, import_set_value3.default)(changesetConfig, "changelog.1.repo", gitUrl.full_name);
589
+ await fs3.outputJson(changesetConfigPath, changesetConfig, { spaces: 2 });
590
+ }
591
+ }
592
+ }
593
+ }
594
+
595
+ // src/monorepo/setPkgJson.ts
596
+ init_esm_shims();
597
+ var import_set_value4 = __toESM(require_set_value(), 1);
598
+ import fs4 from "fs-extra";
599
+ import path7 from "pathe";
575
600
  async function setPkgJson_default(ctx) {
576
601
  const { gitUrl, gitUser, projects, cwd, workspaceFilepath } = ctx;
577
- if (gitUrl && await fs3.exists(workspaceFilepath)) {
602
+ if (gitUrl && await fs4.exists(workspaceFilepath)) {
578
603
  for (const project of projects) {
579
604
  const pkgJson = project.manifest;
580
- const directory = path5.relative(cwd, project.rootDir);
581
- (0, import_set_value3.default)(pkgJson, "bugs.url", `https://github.com/${gitUrl.full_name}/issues`);
605
+ const directory = path7.relative(cwd, project.rootDir);
606
+ (0, import_set_value4.default)(pkgJson, "bugs.url", `https://github.com/${gitUrl.full_name}/issues`);
582
607
  const repository = {
583
608
  type: "git",
584
609
  url: `git+https://github.com/${gitUrl.full_name}.git`
@@ -586,11 +611,11 @@ async function setPkgJson_default(ctx) {
586
611
  if (directory) {
587
612
  repository.directory = directory;
588
613
  }
589
- (0, import_set_value3.default)(pkgJson, "repository", repository);
614
+ (0, import_set_value4.default)(pkgJson, "repository", repository);
590
615
  if (gitUser) {
591
- (0, import_set_value3.default)(pkgJson, "author", `${gitUser.name} <${gitUser.email}>`);
616
+ (0, import_set_value4.default)(pkgJson, "author", `${gitUser.name} <${gitUser.email}>`);
592
617
  }
593
- await fs3.writeJSON(project.pkgJsonPath, pkgJson, {
618
+ await fs4.writeJSON(project.pkgJsonPath, pkgJson, {
594
619
  spaces: 2
595
620
  });
596
621
  }
@@ -599,8 +624,8 @@ async function setPkgJson_default(ctx) {
599
624
 
600
625
  // src/monorepo/setReadme.ts
601
626
  init_esm_shims();
602
- import fs4 from "fs-extra";
603
- import path6 from "pathe";
627
+ import fs5 from "fs-extra";
628
+ import path8 from "pathe";
604
629
  async function getRows(ctx) {
605
630
  const { projects, git, cwd } = ctx;
606
631
  const gitUrl = await git.getGitUrl();
@@ -612,7 +637,7 @@ async function getRows(ctx) {
612
637
  }
613
638
  rows.push("## Projects\n");
614
639
  for (const project of projects) {
615
- const p = path6.relative(cwd, project.rootDirRealPath);
640
+ const p = path8.relative(cwd, project.rootDirRealPath);
616
641
  if (p) {
617
642
  const description = project.manifest.description ? `- ${project.manifest.description}` : "";
618
643
  rows.push(`- [${project.manifest.name}](${p}) ${description}`);
@@ -640,23 +665,24 @@ async function getRows(ctx) {
640
665
  }
641
666
  async function setReadme_default(ctx) {
642
667
  const rows = await getRows(ctx);
643
- await fs4.writeFile(path6.resolve(ctx.cwd, "README.md"), `${rows.join("\n")}
668
+ await fs5.writeFile(path8.resolve(ctx.cwd, "README.md"), `${rows.join("\n")}
644
669
  `);
645
670
  }
646
671
 
647
672
  // src/monorepo/init.ts
648
673
  async function init(cwd) {
649
674
  const ctx = await createContext(cwd);
675
+ await setChangeset_default(ctx);
650
676
  await setPkgJson_default(ctx);
651
677
  await setReadme_default(ctx);
652
678
  }
653
679
 
654
680
  // src/monorepo/sync.ts
655
681
  init_esm_shims();
656
- import os from "node:os";
682
+ import os from "os";
657
683
  import { execa } from "execa";
658
684
  import PQueue from "p-queue";
659
- import path7 from "pathe";
685
+ import path9 from "pathe";
660
686
  import pc from "picocolors";
661
687
 
662
688
  // src/logger.ts
@@ -668,15 +694,15 @@ var logger = createConsola();
668
694
  async function syncNpmMirror(cwd, options) {
669
695
  const packages = await getWorkspacePackages(cwd, options);
670
696
  logger.info(`[\u5F53\u524D\u5DE5\u4F5C\u533ARepo]:
671
- ${packages.map((x) => `- ${pc.green(x.manifest.name)} : ${path7.relative(cwd, x.rootDir)}`).join("\n")}
697
+ ${packages.map((x) => `- ${pc.green(x.manifest.name)} : ${path9.relative(cwd, x.rootDir)}`).join("\n")}
672
698
  `);
673
- const set5 = new Set(packages.map((x) => x.manifest.name));
699
+ const set6 = new Set(packages.map((x) => x.manifest.name));
674
700
  logger.info(`[\u5373\u5C06\u540C\u6B65\u7684\u5305]:
675
- ${Array.from(set5).map((x) => `- ${pc.green(x)}`).join("\n")}
701
+ ${Array.from(set6).map((x) => `- ${pc.green(x)}`).join("\n")}
676
702
  `);
677
703
  const concurrency = Math.max(os.cpus().length, 1);
678
704
  const queue2 = new PQueue({ concurrency });
679
- for (const pkgName of set5) {
705
+ for (const pkgName of set6) {
680
706
  if (pkgName) {
681
707
  await queue2.add(async () => {
682
708
  return execa({
@@ -692,7 +718,7 @@ init_esm_shims();
692
718
 
693
719
  // src/utils/md5.ts
694
720
  init_esm_shims();
695
- import crypto from "node:crypto";
721
+ import crypto from "crypto";
696
722
  function getFileHash(data) {
697
723
  const hashSum = crypto.createHash("md5");
698
724
  hashSum.update(data);
@@ -725,15 +751,15 @@ function isMatch(str, arr) {
725
751
 
726
752
  // src/upgrade.ts
727
753
  init_esm_shims();
728
- import process from "node:process";
729
- import { fileURLToPath } from "node:url";
754
+ import process from "process";
755
+ import { fileURLToPath as fileURLToPath2 } from "url";
730
756
  import checkbox from "@inquirer/checkbox";
731
757
  import confirm from "@inquirer/confirm";
732
- import fs5 from "fs-extra";
733
- var import_set_value4 = __toESM(require_set_value(), 1);
758
+ import fs6 from "fs-extra";
759
+ var import_set_value5 = __toESM(require_set_value(), 1);
734
760
  import klaw from "klaw";
735
761
  import PQueue2 from "p-queue";
736
- import path8 from "pathe";
762
+ import path10 from "pathe";
737
763
  import pc2 from "picocolors";
738
764
 
739
765
  // src/constants.ts
@@ -741,7 +767,7 @@ init_esm_shims();
741
767
 
742
768
  // package.json
743
769
  var name = "@icebreakers/monorepo";
744
- var version = "0.7.11";
770
+ var version = "1.0.1";
745
771
 
746
772
  // src/scripts.ts
747
773
  init_esm_shims();
@@ -791,9 +817,9 @@ function getAssetTargets(raw) {
791
817
 
792
818
  // src/upgrade.ts
793
819
  var queue = new PQueue2({ concurrency: 1 });
794
- var __filename2 = fileURLToPath(import.meta.url);
795
- var __dirname2 = path8.dirname(__filename2);
796
- var assetsDir = path8.join(__dirname2, "../assets");
820
+ var __filename2 = fileURLToPath2(import.meta.url);
821
+ var __dirname2 = path10.dirname(__filename2);
822
+ var assetsDir = path10.join(__dirname2, "../assets");
797
823
  function isWorkspace(version2) {
798
824
  if (typeof version2 === "string") {
799
825
  return version2.startsWith("workspace:");
@@ -806,21 +832,21 @@ function setPkgJson(sourcePkgJson, targetPkgJson) {
806
832
  const devDeps = index_default(sourcePkgJson, "devDependencies", { default: {} });
807
833
  const targetDeps = index_default(targetPkgJson, "dependencies", { default: {} });
808
834
  const targetDevDeps = index_default(targetPkgJson, "devDependencies", { default: {} });
809
- (0, import_set_value4.default)(targetPkgJson, "packageManager", packageManager);
835
+ (0, import_set_value5.default)(targetPkgJson, "packageManager", packageManager);
810
836
  Object.entries(deps).forEach((x) => {
811
837
  if (!isWorkspace(targetDeps[x[0]])) {
812
- (0, import_set_value4.default)(targetPkgJson, `dependencies.${x[0].replaceAll(".", "\\.")}`, x[1], { preservePaths: false });
838
+ (0, import_set_value5.default)(targetPkgJson, `dependencies.${x[0].replaceAll(".", "\\.")}`, x[1], { preservePaths: false });
813
839
  }
814
840
  });
815
841
  Object.entries(devDeps).forEach((x) => {
816
842
  if (x[0] === name) {
817
- (0, import_set_value4.default)(targetPkgJson, `devDependencies.${x[0].replaceAll(".", "\\.")}`, `^${version}`, { preservePaths: false });
843
+ (0, import_set_value5.default)(targetPkgJson, `devDependencies.${x[0].replaceAll(".", "\\.")}`, `^${version}`, { preservePaths: false });
818
844
  } else if (!isWorkspace(targetDevDeps[x[0]])) {
819
- (0, import_set_value4.default)(targetPkgJson, `devDependencies.${x[0].replaceAll(".", "\\.")}`, x[1], { preservePaths: false });
845
+ (0, import_set_value5.default)(targetPkgJson, `devDependencies.${x[0].replaceAll(".", "\\.")}`, x[1], { preservePaths: false });
820
846
  }
821
847
  });
822
848
  for (const [k, v] of scriptsEntries) {
823
- (0, import_set_value4.default)(targetPkgJson, `scripts.${k}`, v);
849
+ (0, import_set_value5.default)(targetPkgJson, `scripts.${k}`, v);
824
850
  }
825
851
  }
826
852
  function confirmOverwrite(filename) {
@@ -831,7 +857,7 @@ async function upgradeMonorepo(opts) {
831
857
  cwd: process.cwd(),
832
858
  outDir: ""
833
859
  });
834
- const absOutDir = path8.isAbsolute(outDir) ? outDir : path8.join(cwd, outDir);
860
+ const absOutDir = path10.isAbsolute(outDir) ? outDir : path10.join(cwd, outDir);
835
861
  const gitClient = new GitClient({
836
862
  baseDir: cwd
837
863
  });
@@ -853,20 +879,20 @@ async function upgradeMonorepo(opts) {
853
879
  });
854
880
  for await (const file of klaw(assetsDir, {
855
881
  filter(p) {
856
- const str = path8.relative(assetsDir, p);
882
+ const str = path10.relative(assetsDir, p);
857
883
  return isMatch(str, regexpArr);
858
884
  }
859
885
  })) {
860
886
  await queue.add(async () => {
861
887
  if (file.stats.isFile()) {
862
- const relPath = path8.relative(assetsDir, file.path);
863
- const targetPath = path8.resolve(absOutDir, relPath);
864
- const targetIsExisted = await fs5.exists(targetPath);
888
+ const relPath = path10.relative(assetsDir, file.path);
889
+ const targetPath = path10.resolve(absOutDir, relPath);
890
+ const targetIsExisted = await fs6.exists(targetPath);
865
891
  async function overwriteOrCopy(target) {
866
892
  let isOverwrite = true;
867
893
  if (targetIsExisted) {
868
- const src = await fs5.readFile(file.path);
869
- const dest = target ?? await fs5.readFile(targetPath);
894
+ const src = await fs6.readFile(file.path);
895
+ const dest = target ?? await fs6.readFile(targetPath);
870
896
  if (await isFileChanged(src, dest)) {
871
897
  isOverwrite = await confirmOverwrite(relPath);
872
898
  }
@@ -876,25 +902,25 @@ async function upgradeMonorepo(opts) {
876
902
  if (relPath === "package.json") {
877
903
  const sourcePath = file.path;
878
904
  if (targetIsExisted) {
879
- const sourcePkgJson = await fs5.readJson(sourcePath);
880
- const targetPkgJson = await fs5.readJson(targetPath);
905
+ const sourcePkgJson = await fs6.readJson(sourcePath);
906
+ const targetPkgJson = await fs6.readJson(targetPath);
881
907
  setPkgJson(sourcePkgJson, targetPkgJson);
882
908
  const data = JSON.stringify(targetPkgJson, void 0, 2);
883
- await fs5.outputFile(targetPath, `${data}
909
+ await fs6.outputFile(targetPath, `${data}
884
910
  `, "utf8");
885
911
  logger.success(targetPath);
886
912
  }
887
913
  } else if (relPath === ".changeset/config.json" && repoName) {
888
- const changesetJson = await fs5.readJson(file.path);
889
- (0, import_set_value4.default)(changesetJson, "changelog.1.repo", repoName);
914
+ const changesetJson = await fs6.readJson(file.path);
915
+ (0, import_set_value5.default)(changesetJson, "changelog.1.repo", repoName);
890
916
  const data = JSON.stringify(changesetJson, void 0, 2);
891
917
  if (await overwriteOrCopy(data)) {
892
- await fs5.outputFile(targetPath, `${data}
918
+ await fs6.outputFile(targetPath, `${data}
893
919
  `, "utf8");
894
920
  logger.success(targetPath);
895
921
  }
896
922
  } else if (await overwriteOrCopy()) {
897
- await fs5.copy(
923
+ await fs6.copy(
898
924
  file.path,
899
925
  targetPath
900
926
  );