@icebreakers/monorepo 1.0.9 → 1.0.11

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.
@@ -1 +1 @@
1
- pnpm dlx commitlint --edit $1
1
+ npm run commitlint ${1}
@@ -1 +1 @@
1
- pnpm dlx lint-staged
1
+ npx lint-staged
@@ -1,5 +1,4 @@
1
1
  import type { UserConfig } from '@commitlint/types'
2
- // import { RuleConfigSeverity } from '@commitlint/types'
3
2
 
4
3
  export default <UserConfig>{
5
4
  extends: ['@commitlint/config-conventional'],
@@ -23,10 +23,12 @@
23
23
  "lint": "turbo run lint",
24
24
  "release": "changeset",
25
25
  "publish-packages": "turbo run build lint test && changeset version && changeset publish",
26
+ "------": "--------------",
26
27
  "preinstall": "npx only-allow pnpm",
27
28
  "prepare": "husky",
28
29
  "commit": "commit",
29
- "-------": "-----------",
30
+ "commitlint": "commitlint --edit",
31
+ "-------": "---------------",
30
32
  "pr:alpha": "changeset pre enter alpha",
31
33
  "pr:beta": "changeset pre enter beta",
32
34
  "pr:rc": "changeset pre enter rc",
@@ -65,7 +67,7 @@
65
67
  "rimraf": "^6.0.1",
66
68
  "tslib": "^2.8.1",
67
69
  "tsup": "^8.5.0",
68
- "tsx": "^4.20.3",
70
+ "tsx": "^4.20.4",
69
71
  "turbo": "^2.5.5",
70
72
  "typescript": "^5.9.2",
71
73
  "unbuild": "^3.6.0",
@@ -27,11 +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.5.0_@microsoft+api-extractor@7.52.8_@types+node@24.2.1__jiti@2.5.1_postcss@8.5.6_909b33e640ed77f1174edb29c7a71c08/node_modules/tsup/assets/esm_shims.js
30
+ // ../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@24.2.1__jiti@2.5.1_postcss@8.5.6_b76c485363f9581519c6b4918a355419/node_modules/tsup/assets/esm_shims.js
31
31
  import path from "path";
32
32
  import { fileURLToPath } from "url";
33
33
  var init_esm_shims = __esm({
34
- "../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@24.2.1__jiti@2.5.1_postcss@8.5.6_909b33e640ed77f1174edb29c7a71c08/node_modules/tsup/assets/esm_shims.js"() {
34
+ "../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@24.2.1__jiti@2.5.1_postcss@8.5.6_b76c485363f9581519c6b4918a355419/node_modules/tsup/assets/esm_shims.js"() {
35
35
  "use strict";
36
36
  }
37
37
  });
@@ -767,7 +767,7 @@ init_esm_shims();
767
767
 
768
768
  // package.json
769
769
  var name = "@icebreakers/monorepo";
770
- var version = "1.0.9";
770
+ var version = "1.0.11";
771
771
 
772
772
  // src/scripts.ts
773
773
  init_esm_shims();
@@ -775,7 +775,8 @@ var scripts = {
775
775
  "script:init": "monorepo init",
776
776
  "script:sync": "monorepo sync",
777
777
  "script:clean": "monorepo clean",
778
- "script:mirror": "monorepo mirror"
778
+ "script:mirror": "monorepo mirror",
779
+ "commitlint": "commitlint --edit"
779
780
  };
780
781
  var scriptsEntries = Object.entries(scripts);
781
782
 
@@ -853,7 +854,7 @@ function confirmOverwrite(filename) {
853
854
  return confirm({ message: `${pc2.greenBright(filename)} \u6587\u4EF6\u5185\u5BB9\u53D1\u751F\u6539\u53D8,\u662F\u5426\u8986\u76D6?`, default: true });
854
855
  }
855
856
  async function upgradeMonorepo(opts) {
856
- const { outDir, raw, interactive, cwd } = defu(opts, {
857
+ const { outDir, raw, interactive, cwd, skipOverwrite } = defu(opts, {
857
858
  cwd: process.cwd(),
858
859
  outDir: ""
859
860
  });
@@ -896,6 +897,8 @@ async function upgradeMonorepo(opts) {
896
897
  if (await isFileChanged(src, dest)) {
897
898
  isOverwrite = await confirmOverwrite(relPath);
898
899
  }
900
+ } else if (skipOverwrite) {
901
+ isOverwrite = false;
899
902
  }
900
903
  return isOverwrite;
901
904
  }
package/dist/cli.cjs CHANGED
@@ -28,10 +28,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  mod
29
29
  ));
30
30
 
31
- // ../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@24.2.1__jiti@2.5.1_postcss@8.5.6_909b33e640ed77f1174edb29c7a71c08/node_modules/tsup/assets/cjs_shims.js
31
+ // ../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@24.2.1__jiti@2.5.1_postcss@8.5.6_b76c485363f9581519c6b4918a355419/node_modules/tsup/assets/cjs_shims.js
32
32
  var getImportMetaUrl, importMetaUrl;
33
33
  var init_cjs_shims = __esm({
34
- "../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@24.2.1__jiti@2.5.1_postcss@8.5.6_909b33e640ed77f1174edb29c7a71c08/node_modules/tsup/assets/cjs_shims.js"() {
34
+ "../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@24.2.1__jiti@2.5.1_postcss@8.5.6_b76c485363f9581519c6b4918a355419/node_modules/tsup/assets/cjs_shims.js"() {
35
35
  "use strict";
36
36
  getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
37
37
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
@@ -232,7 +232,7 @@ init_cjs_shims();
232
232
 
233
233
  // package.json
234
234
  var name = "@icebreakers/monorepo";
235
- var version = "1.0.9";
235
+ var version = "1.0.11";
236
236
 
237
237
  // src/create.ts
238
238
  init_cjs_shims();
@@ -345,7 +345,14 @@ async function createNewProject(options) {
345
345
  const sourceJson = await import_fs_extra.default.readJson(sourceJsonPath);
346
346
  (0, import_set_value.default)(sourceJson, "version", "0.0.0");
347
347
  (0, import_set_value.default)(sourceJson, "name", import_pathe.default.basename(targetName));
348
- await import_fs_extra.default.outputJson(import_pathe.default.resolve(to, renameJson ? "package.mock.json" : filename), sourceJson, { spaces: 2 });
348
+ await import_fs_extra.default.outputJson(
349
+ import_pathe.default.resolve(
350
+ to,
351
+ renameJson ? "package.mock.json" : filename
352
+ ),
353
+ sourceJson,
354
+ { spaces: 2 }
355
+ );
349
356
  } else {
350
357
  await import_fs_extra.default.copy(import_pathe.default.resolve(from, filename), import_pathe.default.resolve(to, filename));
351
358
  }
@@ -797,7 +804,8 @@ var scripts = {
797
804
  "script:init": "monorepo init",
798
805
  "script:sync": "monorepo sync",
799
806
  "script:clean": "monorepo clean",
800
- "script:mirror": "monorepo mirror"
807
+ "script:mirror": "monorepo mirror",
808
+ "commitlint": "commitlint --edit"
801
809
  };
802
810
  var scriptsEntries = Object.entries(scripts);
803
811
 
@@ -908,7 +916,7 @@ function confirmOverwrite(filename) {
908
916
  return (0, import_confirm.default)({ message: `${import_picocolors3.default.greenBright(filename)} \u6587\u4EF6\u5185\u5BB9\u53D1\u751F\u6539\u53D8,\u662F\u5426\u8986\u76D6?`, default: true });
909
917
  }
910
918
  async function upgradeMonorepo(opts) {
911
- const { outDir, raw, interactive, cwd: cwd2 } = defu(opts, {
919
+ const { outDir, raw, interactive, cwd: cwd2, skipOverwrite } = defu(opts, {
912
920
  cwd: import_node_process2.default.cwd(),
913
921
  outDir: ""
914
922
  });
@@ -951,6 +959,8 @@ async function upgradeMonorepo(opts) {
951
959
  if (await isFileChanged(src, dest)) {
952
960
  isOverwrite = await confirmOverwrite(relPath);
953
961
  }
962
+ } else if (skipOverwrite) {
963
+ isOverwrite = false;
954
964
  }
955
965
  return isOverwrite;
956
966
  }
@@ -989,7 +999,7 @@ async function upgradeMonorepo(opts) {
989
999
  // src/program.ts
990
1000
  var cwd = import_node_process3.default.cwd();
991
1001
  import_commander.program.name(name).version(version);
992
- import_commander.program.option("-i,--interactive").option("--raw", "raw mode").option("--outDir <dir>", "Output directory").action(async (opts) => {
1002
+ import_commander.program.command("upgrade").description("\u5347\u7EA7/\u540C\u6B65 monorepo \u76F8\u5173\u5305").alias("up").option("-i,--interactive").option("--raw", "raw mode").option("--outDir <dir>", "Output directory").option("-s,--skip-overwrite", "skip overwrite").action(async (opts) => {
993
1003
  await upgradeMonorepo(opts);
994
1004
  logger.success("upgrade @icebreakers/monorepo ok!");
995
1005
  });
package/dist/cli.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  syncNpmMirror,
12
12
  upgradeMonorepo,
13
13
  version
14
- } from "./chunk-567V4OD6.js";
14
+ } from "./chunk-VREN7PW3.js";
15
15
 
16
16
  // src/cli.ts
17
17
  init_esm_shims();
@@ -56,7 +56,14 @@ async function createNewProject(options) {
56
56
  const sourceJson = await fs.readJson(sourceJsonPath);
57
57
  (0, import_set_value.default)(sourceJson, "version", "0.0.0");
58
58
  (0, import_set_value.default)(sourceJson, "name", path.basename(targetName));
59
- await fs.outputJson(path.resolve(to, renameJson ? "package.mock.json" : filename), sourceJson, { spaces: 2 });
59
+ await fs.outputJson(
60
+ path.resolve(
61
+ to,
62
+ renameJson ? "package.mock.json" : filename
63
+ ),
64
+ sourceJson,
65
+ { spaces: 2 }
66
+ );
60
67
  } else {
61
68
  await fs.copy(path.resolve(from, filename), path.resolve(to, filename));
62
69
  }
@@ -67,7 +74,7 @@ async function createNewProject(options) {
67
74
  // src/program.ts
68
75
  var cwd = process2.cwd();
69
76
  program.name(name).version(version);
70
- program.option("-i,--interactive").option("--raw", "raw mode").option("--outDir <dir>", "Output directory").action(async (opts) => {
77
+ program.command("upgrade").description("\u5347\u7EA7/\u540C\u6B65 monorepo \u76F8\u5173\u5305").alias("up").option("-i,--interactive").option("--raw", "raw mode").option("--outDir <dir>", "Output directory").option("-s,--skip-overwrite", "skip overwrite").action(async (opts) => {
71
78
  await upgradeMonorepo(opts);
72
79
  logger.success("upgrade @icebreakers/monorepo ok!");
73
80
  });
package/dist/index.cjs CHANGED
@@ -33,10 +33,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
33
33
  ));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // ../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@24.2.1__jiti@2.5.1_postcss@8.5.6_909b33e640ed77f1174edb29c7a71c08/node_modules/tsup/assets/cjs_shims.js
36
+ // ../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@24.2.1__jiti@2.5.1_postcss@8.5.6_b76c485363f9581519c6b4918a355419/node_modules/tsup/assets/cjs_shims.js
37
37
  var getImportMetaUrl, importMetaUrl;
38
38
  var init_cjs_shims = __esm({
39
- "../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@24.2.1__jiti@2.5.1_postcss@8.5.6_909b33e640ed77f1174edb29c7a71c08/node_modules/tsup/assets/cjs_shims.js"() {
39
+ "../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@24.2.1__jiti@2.5.1_postcss@8.5.6_b76c485363f9581519c6b4918a355419/node_modules/tsup/assets/cjs_shims.js"() {
40
40
  "use strict";
41
41
  getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
42
42
  importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
@@ -762,7 +762,7 @@ init_cjs_shims();
762
762
 
763
763
  // package.json
764
764
  var name = "@icebreakers/monorepo";
765
- var version = "1.0.9";
765
+ var version = "1.0.11";
766
766
 
767
767
  // src/scripts.ts
768
768
  init_cjs_shims();
@@ -770,7 +770,8 @@ var scripts = {
770
770
  "script:init": "monorepo init",
771
771
  "script:sync": "monorepo sync",
772
772
  "script:clean": "monorepo clean",
773
- "script:mirror": "monorepo mirror"
773
+ "script:mirror": "monorepo mirror",
774
+ "commitlint": "commitlint --edit"
774
775
  };
775
776
  var scriptsEntries = Object.entries(scripts);
776
777
 
@@ -881,7 +882,7 @@ function confirmOverwrite(filename) {
881
882
  return (0, import_confirm.default)({ message: `${import_picocolors2.default.greenBright(filename)} \u6587\u4EF6\u5185\u5BB9\u53D1\u751F\u6539\u53D8,\u662F\u5426\u8986\u76D6?`, default: true });
882
883
  }
883
884
  async function upgradeMonorepo(opts) {
884
- const { outDir, raw, interactive, cwd } = defu(opts, {
885
+ const { outDir, raw, interactive, cwd, skipOverwrite } = defu(opts, {
885
886
  cwd: import_node_process.default.cwd(),
886
887
  outDir: ""
887
888
  });
@@ -924,6 +925,8 @@ async function upgradeMonorepo(opts) {
924
925
  if (await isFileChanged(src, dest)) {
925
926
  isOverwrite = await confirmOverwrite(relPath);
926
927
  }
928
+ } else if (skipOverwrite) {
929
+ isOverwrite = false;
927
930
  }
928
931
  return isOverwrite;
929
932
  }
package/dist/index.d.cts CHANGED
@@ -28,6 +28,7 @@ interface CliOpts {
28
28
  raw?: boolean;
29
29
  outDir?: string;
30
30
  cwd?: string;
31
+ skipOverwrite?: boolean;
31
32
  }
32
33
 
33
34
  declare class GitClient {
package/dist/index.d.ts CHANGED
@@ -28,6 +28,7 @@ interface CliOpts {
28
28
  raw?: boolean;
29
29
  outDir?: string;
30
30
  cwd?: string;
31
+ skipOverwrite?: boolean;
31
32
  }
32
33
 
33
34
  declare class GitClient {
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  setVscodeBinaryMirror,
13
13
  syncNpmMirror,
14
14
  upgradeMonorepo
15
- } from "./chunk-567V4OD6.js";
15
+ } from "./chunk-VREN7PW3.js";
16
16
 
17
17
  // src/index.ts
18
18
  init_esm_shims();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/monorepo",
3
3
  "type": "module",
4
- "version": "1.0.9",
4
+ "version": "1.0.11",
5
5
  "description": "icebreaker's monorepo config generator",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -49,7 +49,7 @@
49
49
  "@vue/test-utils": "^2.4.6",
50
50
  "@vue/tsconfig": "^0.7.0",
51
51
  "jsdom": "^26.1.0",
52
- "vite": "^7.1.1",
52
+ "vite": "^7.1.2",
53
53
  "vite-plugin-dts": "^4.5.4",
54
54
  "vue": "^3.5.18",
55
55
  "vue-tsc": "^3.0.5"