@icebreakers/monorepo 3.2.11 → 3.2.12

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.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_upgrade = require('./upgrade-BDVNfq80.cjs');
1
+ const require_upgrade = require('./upgrade-DR2Sqzg5.cjs');
2
2
  let node_process = require("node:process");
3
3
  node_process = require_upgrade.__toESM(node_process);
4
4
  let _icebreakers_monorepo_templates = require("@icebreakers/monorepo-templates");
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { C as syncSkills, F as generateAgenticTemplate, I as generateAgenticTemplates, L as loadAgenticTasks, M as resolveCommandConfig, N as createTimestampFolderName, O as name, P as defaultAgenticBaseDir, R as logger, S as skillTargets, _ as getCreateChoices, b as cleanProjects, g as defaultTemplate, h as createNewProject, i as init, k as version, n as syncNpmMirror, r as setVscodeBinaryMirror, t as upgradeMonorepo } from "./upgrade-zJC3jLQe.mjs";
1
+ import { C as syncSkills, F as generateAgenticTemplate, I as generateAgenticTemplates, L as loadAgenticTasks, M as resolveCommandConfig, N as createTimestampFolderName, O as name, P as defaultAgenticBaseDir, R as logger, S as skillTargets, _ as getCreateChoices, b as cleanProjects, g as defaultTemplate, h as createNewProject, i as init, k as version, n as syncNpmMirror, r as setVscodeBinaryMirror, t as upgradeMonorepo } from "./upgrade-CPqyPuV5.mjs";
2
2
  import process from "node:process";
3
3
  import { input, program, select } from "@icebreakers/monorepo-templates";
4
4
 
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
- const require_upgrade = require('./upgrade-BDVNfq80.cjs');
2
+ const require_upgrade = require('./upgrade-DR2Sqzg5.cjs');
3
3
  let _icebreakers_monorepo_templates = require("@icebreakers/monorepo-templates");
4
4
 
5
5
  exports.GitClient = require_upgrade.GitClient;
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { A as defineMonorepoConfig, B as getWorkspacePackages, C as syncSkills, D as templatesDir, E as rootDir, F as generateAgenticTemplate, I as generateAgenticTemplates, L as loadAgenticTasks, M as resolveCommandConfig, N as createTimestampFolderName, O as name, P as defaultAgenticBaseDir, R as logger, S as skillTargets, T as packageDir, V as GitClient, _ as getCreateChoices, a as escapeStringRegexp, b as cleanProjects, c as isFileChanged, d as toWorkspaceGitignorePath, f as updateIssueTemplateConfig, h as createNewProject, i as init, j as loadMonorepoConfig, k as version, l as isGitignoreFile, m as createContext, n as syncNpmMirror, o as isMatch, p as isIgnorableFsError, r as setVscodeBinaryMirror, s as getFileHash, t as upgradeMonorepo, u as toPublishGitignorePath, v as getTemplateMap, w as assetsDir, x as getSkillTargetPaths, y as templateMap, z as getWorkspaceData } from "./upgrade-zJC3jLQe.mjs";
1
+ import { A as defineMonorepoConfig, B as getWorkspacePackages, C as syncSkills, D as templatesDir, E as rootDir, F as generateAgenticTemplate, I as generateAgenticTemplates, L as loadAgenticTasks, M as resolveCommandConfig, N as createTimestampFolderName, O as name, P as defaultAgenticBaseDir, R as logger, S as skillTargets, T as packageDir, V as GitClient, _ as getCreateChoices, a as escapeStringRegexp, b as cleanProjects, c as isFileChanged, d as toWorkspaceGitignorePath, f as updateIssueTemplateConfig, h as createNewProject, i as init, j as loadMonorepoConfig, k as version, l as isGitignoreFile, m as createContext, n as syncNpmMirror, o as isMatch, p as isIgnorableFsError, r as setVscodeBinaryMirror, s as getFileHash, t as upgradeMonorepo, u as toPublishGitignorePath, v as getTemplateMap, w as assetsDir, x as getSkillTargetPaths, y as templateMap, z as getWorkspaceData } from "./upgrade-CPqyPuV5.mjs";
2
2
 
3
3
  export { GitClient, assetsDir, cleanProjects, createContext, createNewProject, createTimestampFolderName, defaultAgenticBaseDir, defineMonorepoConfig, escapeStringRegexp, generateAgenticTemplate, generateAgenticTemplates, getCreateChoices, getFileHash, getSkillTargetPaths, getTemplateMap, getWorkspaceData, getWorkspacePackages, init, isFileChanged, isGitignoreFile, isIgnorableFsError, isMatch, loadAgenticTasks, loadMonorepoConfig, logger, name, packageDir, resolveCommandConfig, rootDir, setVscodeBinaryMirror, skillTargets, syncNpmMirror, syncSkills, templateMap, templatesDir, toPublishGitignorePath, toWorkspaceGitignorePath, updateIssueTemplateConfig, upgradeMonorepo, version };
@@ -559,7 +559,7 @@ async function resolveCommandConfig(name, cwd) {
559
559
  //#endregion
560
560
  //#region package.json
561
561
  var name = "@icebreakers/monorepo";
562
- var version = "3.2.11";
562
+ var version = "3.2.12";
563
563
 
564
564
  //#endregion
565
565
  //#region src/constants.ts
@@ -664,11 +664,13 @@ async function cleanProjects(cwd, overrides) {
664
664
  });
665
665
  const readmeZh = path.resolve(workspaceDir, "README.zh-CN.md");
666
666
  const qoderDir = path.resolve(workspaceDir, ".qoder");
667
+ const docsPlansDir = path.resolve(workspaceDir, "docs/plans");
667
668
  const skillTargets = Object.values(getSkillTargetPaths());
668
669
  const candidates = Array.from(new Set([
669
670
  ...cleanDirs.filter(Boolean),
670
671
  readmeZh,
671
672
  qoderDir,
673
+ docsPlansDir,
672
674
  ...skillTargets
673
675
  ]));
674
676
  await Promise.all(candidates.map(async (dir) => {
@@ -1165,6 +1167,9 @@ async function syncNpmMirror(cwd, options) {
1165
1167
  function normalizeEol(input) {
1166
1168
  return input.replace(/\r\n/g, "\n");
1167
1169
  }
1170
+ function normalizeComparableContent(input) {
1171
+ return normalizeEol(input).trimEnd();
1172
+ }
1168
1173
  function normalizeHeadingKey(line) {
1169
1174
  return line.replace(/^##\s+/, "").trim().toLowerCase();
1170
1175
  }
@@ -1220,6 +1225,9 @@ function mergePlainText(source, target) {
1220
1225
  }
1221
1226
  return `${result.join("\n")}\n`;
1222
1227
  }
1228
+ function getSectionSignature(section) {
1229
+ return `${section.key}\n${trimEdgeEmptyLines(section.lines).join("\n")}`;
1230
+ }
1223
1231
  /**
1224
1232
  * Merge AGENTS instructions by keeping existing sections and filling missing sections
1225
1233
  * from source defaults. This avoids destructive overwrite while still syncing updates.
@@ -1232,13 +1240,25 @@ function mergeAgentsMarkdown(source, target) {
1232
1240
  const targetSectionMap = new Map(targetParsed.sections.map((section) => [section.key, section]));
1233
1241
  const mergedSections = [];
1234
1242
  for (const section of sourceParsed.sections) mergedSections.push(targetSectionMap.get(section.key) ?? section);
1235
- for (const section of targetParsed.sections) if (!sourceSectionKeys.has(section.key)) mergedSections.push(section);
1243
+ const seenTargetOnlySectionSignatures = /* @__PURE__ */ new Set();
1244
+ for (const section of targetParsed.sections) if (!sourceSectionKeys.has(section.key)) {
1245
+ const signature = getSectionSignature(section);
1246
+ if (seenTargetOnlySectionSignatures.has(signature)) continue;
1247
+ seenTargetOnlySectionSignatures.add(signature);
1248
+ mergedSections.push(section);
1249
+ }
1236
1250
  const preamble = trimEdgeEmptyLines(targetParsed.preamble.length ? targetParsed.preamble : sourceParsed.preamble);
1237
1251
  const blocks = [];
1238
1252
  if (preamble.length) blocks.push(preamble.join("\n"));
1239
1253
  for (const section of mergedSections) blocks.push(trimEdgeEmptyLines(section.lines).join("\n"));
1240
1254
  return `${blocks.filter(Boolean).join("\n\n")}\n`;
1241
1255
  }
1256
+ /**
1257
+ * Compare AGENTS markdown with normalized EOL and trailing newline differences ignored.
1258
+ */
1259
+ function isAgentsMarkdownEquivalent(left, right) {
1260
+ return normalizeComparableContent(left) === normalizeComparableContent(right);
1261
+ }
1242
1262
 
1243
1263
  //#endregion
1244
1264
  //#region src/commands/upgrade/overwrite.ts
@@ -1536,6 +1556,7 @@ async function upgradeMonorepo(opts) {
1536
1556
  const exists = await fs.pathExists(targetPath);
1537
1557
  const target = exists ? await fs.readFile(targetPath, "utf8") : "";
1538
1558
  const data = exists ? mergeAgentsMarkdown(source, target) : source;
1559
+ if (exists && isAgentsMarkdownEquivalent(target, data)) continue;
1539
1560
  const intent = await evaluateWriteIntent(targetPath, buildWriteIntentOptions(data));
1540
1561
  const action = async () => {
1541
1562
  await fs.outputFile(targetPath, data, "utf8");
@@ -570,7 +570,7 @@ async function resolveCommandConfig(name, cwd) {
570
570
  //#endregion
571
571
  //#region package.json
572
572
  var name = "@icebreakers/monorepo";
573
- var version = "3.2.11";
573
+ var version = "3.2.12";
574
574
 
575
575
  //#endregion
576
576
  //#region src/constants.ts
@@ -675,11 +675,13 @@ async function cleanProjects(cwd, overrides) {
675
675
  });
676
676
  const readmeZh = pathe.default.resolve(workspaceDir, "README.zh-CN.md");
677
677
  const qoderDir = pathe.default.resolve(workspaceDir, ".qoder");
678
+ const docsPlansDir = pathe.default.resolve(workspaceDir, "docs/plans");
678
679
  const skillTargets = Object.values(getSkillTargetPaths());
679
680
  const candidates = Array.from(new Set([
680
681
  ...cleanDirs.filter(Boolean),
681
682
  readmeZh,
682
683
  qoderDir,
684
+ docsPlansDir,
683
685
  ...skillTargets
684
686
  ]));
685
687
  await Promise.all(candidates.map(async (dir) => {
@@ -1176,6 +1178,9 @@ async function syncNpmMirror(cwd, options) {
1176
1178
  function normalizeEol(input) {
1177
1179
  return input.replace(/\r\n/g, "\n");
1178
1180
  }
1181
+ function normalizeComparableContent(input) {
1182
+ return normalizeEol(input).trimEnd();
1183
+ }
1179
1184
  function normalizeHeadingKey(line) {
1180
1185
  return line.replace(/^##\s+/, "").trim().toLowerCase();
1181
1186
  }
@@ -1231,6 +1236,9 @@ function mergePlainText(source, target) {
1231
1236
  }
1232
1237
  return `${result.join("\n")}\n`;
1233
1238
  }
1239
+ function getSectionSignature(section) {
1240
+ return `${section.key}\n${trimEdgeEmptyLines(section.lines).join("\n")}`;
1241
+ }
1234
1242
  /**
1235
1243
  * Merge AGENTS instructions by keeping existing sections and filling missing sections
1236
1244
  * from source defaults. This avoids destructive overwrite while still syncing updates.
@@ -1243,13 +1251,25 @@ function mergeAgentsMarkdown(source, target) {
1243
1251
  const targetSectionMap = new Map(targetParsed.sections.map((section) => [section.key, section]));
1244
1252
  const mergedSections = [];
1245
1253
  for (const section of sourceParsed.sections) mergedSections.push(targetSectionMap.get(section.key) ?? section);
1246
- for (const section of targetParsed.sections) if (!sourceSectionKeys.has(section.key)) mergedSections.push(section);
1254
+ const seenTargetOnlySectionSignatures = /* @__PURE__ */ new Set();
1255
+ for (const section of targetParsed.sections) if (!sourceSectionKeys.has(section.key)) {
1256
+ const signature = getSectionSignature(section);
1257
+ if (seenTargetOnlySectionSignatures.has(signature)) continue;
1258
+ seenTargetOnlySectionSignatures.add(signature);
1259
+ mergedSections.push(section);
1260
+ }
1247
1261
  const preamble = trimEdgeEmptyLines(targetParsed.preamble.length ? targetParsed.preamble : sourceParsed.preamble);
1248
1262
  const blocks = [];
1249
1263
  if (preamble.length) blocks.push(preamble.join("\n"));
1250
1264
  for (const section of mergedSections) blocks.push(trimEdgeEmptyLines(section.lines).join("\n"));
1251
1265
  return `${blocks.filter(Boolean).join("\n\n")}\n`;
1252
1266
  }
1267
+ /**
1268
+ * Compare AGENTS markdown with normalized EOL and trailing newline differences ignored.
1269
+ */
1270
+ function isAgentsMarkdownEquivalent(left, right) {
1271
+ return normalizeComparableContent(left) === normalizeComparableContent(right);
1272
+ }
1253
1273
 
1254
1274
  //#endregion
1255
1275
  //#region src/commands/upgrade/overwrite.ts
@@ -1547,6 +1567,7 @@ async function upgradeMonorepo(opts) {
1547
1567
  const exists = await fs_extra.default.pathExists(targetPath);
1548
1568
  const target = exists ? await fs_extra.default.readFile(targetPath, "utf8") : "";
1549
1569
  const data = exists ? mergeAgentsMarkdown(source, target) : source;
1570
+ if (exists && isAgentsMarkdownEquivalent(target, data)) continue;
1550
1571
  const intent = await evaluateWriteIntent(targetPath, buildWriteIntentOptions(data));
1551
1572
  const action = async () => {
1552
1573
  await fs_extra.default.outputFile(targetPath, data, "utf8");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/monorepo",
3
3
  "type": "module",
4
- "version": "3.2.11",
4
+ "version": "3.2.12",
5
5
  "description": "The icebreaker's monorepo manager",
6
6
  "author": "ice breaker <hi@sonofmagic.top>",
7
7
  "license": "MIT",
@@ -73,7 +73,7 @@
73
73
  "pathe": "^2.0.3",
74
74
  "picocolors": "^1.1.1",
75
75
  "semver": "^7.7.4",
76
- "simple-git": "^3.32.2",
76
+ "simple-git": "^3.32.3",
77
77
  "yaml": "^2.8.2",
78
78
  "@icebreakers/monorepo-templates": "0.1.11"
79
79
  },