@savvy-web/silk 4.0.4 → 4.0.6

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/biome/silk.json CHANGED
@@ -146,7 +146,6 @@
146
146
  "**/public/tsconfig/**/*.json",
147
147
  "**/.claude/settings.json",
148
148
  "**/.claude/settings.local.json",
149
- "**/.claude/design/design.config.json",
150
149
  "**/.changeset/config.json",
151
150
  "**/.markdownlint.json",
152
151
  "**/devcontainer.json",
@@ -67,14 +67,14 @@ let semver_ranges_valid_js = require("semver/ranges/valid.js");
67
67
  semver_ranges_valid_js = __toESM(semver_ranges_valid_js, 1);
68
68
  let semver_functions_satisfies_js = require("semver/functions/satisfies.js");
69
69
  semver_functions_satisfies_js = __toESM(semver_functions_satisfies_js, 1);
70
+ let semver_functions_inc_js = require("semver/functions/inc.js");
71
+ semver_functions_inc_js = __toESM(semver_functions_inc_js, 1);
70
72
  let semver_functions_prerelease_js = require("semver/functions/prerelease.js");
71
73
  semver_functions_prerelease_js = __toESM(semver_functions_prerelease_js, 1);
72
74
  let semver_functions_parse_js = require("semver/functions/parse.js");
73
75
  semver_functions_parse_js = __toESM(semver_functions_parse_js, 1);
74
76
  let semver_functions_gt_js = require("semver/functions/gt.js");
75
77
  semver_functions_gt_js = __toESM(semver_functions_gt_js, 1);
76
- let semver_functions_inc_js = require("semver/functions/inc.js");
77
- semver_functions_inc_js = __toESM(semver_functions_inc_js, 1);
78
78
  //#region ../silk-core/dist/dev/pkg/errors/ChangesetConfigError.js
79
79
  /**
80
80
  * Raised when the `.changeset/config.json` file cannot be read or decoded.
@@ -49314,7 +49314,7 @@ function shouldSkipPackage({ packageJson }, { ignore, allowPrivatePackages }) {
49314
49314
  return !packageJson.version;
49315
49315
  }
49316
49316
  //#endregion
49317
- //#region ../../node_modules/.pnpm/@changesets+config@4.0.0/node_modules/@changesets/config/dist/index.mjs
49317
+ //#region ../../node_modules/.pnpm/@changesets+config@4.0.1/node_modules/@changesets/config/dist/index.mjs
49318
49318
  const DEFAULT_CONFIG = {
49319
49319
  lang: void 0,
49320
49320
  message: void 0,
@@ -50109,13 +50109,11 @@ const noDuplicateFixedPackages = ({ config, errors }) => {
50109
50109
  if (config.fixed.length === 0) return;
50110
50110
  const foundNames = /* @__PURE__ */ new Set();
50111
50111
  const duplicatedNames = /* @__PURE__ */ new Set();
50112
- for (const fixedGroup of config.fixed) {
50113
- for (const name of fixedGroup) {
50114
- if (foundNames.has(name)) duplicatedNames.add(name);
50115
- foundNames.add(name);
50116
- }
50117
- errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `fixed: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of fixed packages. Packages can only be belong to a single group. ${picomatchNote}`));
50112
+ for (const fixedGroup of config.fixed) for (const name of fixedGroup) {
50113
+ if (foundNames.has(name)) duplicatedNames.add(name);
50114
+ foundNames.add(name);
50118
50115
  }
50116
+ errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `fixed: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of fixed packages. Packages can only be belong to a single group. ${picomatchNote}`));
50119
50117
  };
50120
50118
  const linkedGroupsExist = ({ config, writtenConfig, packageNames, warnings }) => {
50121
50119
  if (config.linked.length === 0) return;
@@ -50125,13 +50123,11 @@ const noDuplicateLinkedPackages = ({ config, errors }) => {
50125
50123
  if (config.linked.length === 0) return;
50126
50124
  const foundNames = /* @__PURE__ */ new Set();
50127
50125
  const duplicatedNames = /* @__PURE__ */ new Set();
50128
- for (const linkedGroup of config.linked) {
50129
- for (const name of linkedGroup) {
50130
- if (foundNames.has(name)) duplicatedNames.add(name);
50131
- foundNames.add(name);
50132
- }
50133
- errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `linked: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of linked packages. Packages can only be belong to a single group. ${picomatchNote}`));
50126
+ for (const linkedGroup of config.linked) for (const name of linkedGroup) {
50127
+ if (foundNames.has(name)) duplicatedNames.add(name);
50128
+ foundNames.add(name);
50134
50129
  }
50130
+ errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `linked: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of linked packages. Packages can only be belong to a single group. ${picomatchNote}`));
50135
50131
  };
50136
50132
  const noFixedAndLinkedPackages = ({ config, errors }) => {
50137
50133
  if (config.fixed.length === 0 || config.linked.length === 0) return;
@@ -50228,7 +50224,7 @@ async function readConfig(cwd, packages) {
50228
50224
  packages ??= await getPackages(cwd);
50229
50225
  return validateConfig(JSON.parse(await node_fs_promises.readFile(node_path.join(packages.rootDir, ".changeset", "config.json"), "utf8")), packages);
50230
50226
  }
50231
- var version = "4.0.0";
50227
+ var version = "4.0.1";
50232
50228
  const defaultConfig = normalizeWrittenConfig({
50233
50229
  packageNames: [],
50234
50230
  writtenConfig: parse(WrittenConfigSchema, {
@@ -53678,7 +53674,7 @@ function applyEdits(text, edits) {
53678
53674
  return text;
53679
53675
  }
53680
53676
  //#endregion
53681
- //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.1.0/node_modules/@changesets/apply-release-plan/dist/index.mjs
53677
+ //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.1.1/node_modules/@changesets/apply-release-plan/dist/index.mjs
53682
53678
  /**
53683
53679
  * A simple JSON editing utility that preserves formatting. They specified operation keys
53684
53680
  * must exist in the JSON for this implementation.
@@ -53822,8 +53818,8 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
53822
53818
  for (const depType of DEPENDENCY_TYPES) {
53823
53819
  const deps = packageJson[depType];
53824
53820
  if (deps) for (const release of versionsToUpdate) {
53825
- if (release.newVersion == null) continue;
53826
- const { name, newVersion } = release;
53821
+ const { name, newVersion, type } = release;
53822
+ if (newVersion == null || type === "none") continue;
53827
53823
  let depCurrentVersion = deps[name];
53828
53824
  if (!depCurrentVersion || depCurrentVersion.startsWith("file:") || depCurrentVersion.startsWith("link:") || !shouldUpdateDependencyBasedOnConfig(cwd, release, {
53829
53825
  depVersionRange: depCurrentVersion,
@@ -53840,7 +53836,7 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
53840
53836
  depCurrentVersion = workspaceDepVersion;
53841
53837
  }
53842
53838
  if (new semver_classes_range_js.default(depCurrentVersion).range !== "" || (0, semver_functions_prerelease_js.default)(newVersion) != null) {
53843
- let newNewRange = snapshot ? newVersion : `${getVersionRangeType(depCurrentVersion)}${newVersion}`;
53839
+ let newNewRange = snapshot ? newVersion : getNewDependencyRange(depCurrentVersion, newVersion, type);
53844
53840
  if (usesWorkspaceRange) newNewRange = `workspace:${newNewRange}`;
53845
53841
  pkgJsonEdits.push({
53846
53842
  keys: [depType, name],
@@ -53851,6 +53847,20 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
53851
53847
  }
53852
53848
  return pkgJsonEdits;
53853
53849
  }
53850
+ function getNewDependencyRange(versionRange, newVersion, releaseType) {
53851
+ const comparatorSets = new semver_classes_range_js.default(versionRange).set;
53852
+ const comparators = comparatorSets.length === 1 ? comparatorSets[0] : [];
53853
+ if (comparators.length === 2 && versionRange.includes(">") && versionRange.includes("<")) {
53854
+ const lowerBound = comparators.find(({ operator }) => operator.startsWith(">"));
53855
+ const upperBound = comparators.find(({ operator }) => operator.startsWith("<"));
53856
+ if (lowerBound && upperBound) {
53857
+ let newUpperBound = upperBound.value;
53858
+ if (!(0, semver_functions_satisfies_js.default)(newVersion, newUpperBound)) newUpperBound = `<${(0, semver_functions_inc_js.default)(newVersion, releaseType)}`;
53859
+ return comparators[0] === lowerBound ? `>=${newVersion} ${newUpperBound}` : `${newUpperBound} >=${newVersion}`;
53860
+ }
53861
+ }
53862
+ return `${getVersionRangeType(versionRange)}${newVersion}`;
53863
+ }
53854
53864
  function getVersionRangeType(versionRange) {
53855
53865
  if (versionRange.charAt(0) === "^") return "^";
53856
53866
  if (versionRange.charAt(0) === "~") return "~";
@@ -53948,16 +53958,18 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
53948
53958
  if (!changeset.releases.some((release) => shouldSkipPackage(packagesByName.get(release.name), {
53949
53959
  ignore: config.ignore,
53950
53960
  allowPrivatePackages: config.privatePackages.version
53951
- }))) if (isPreChangesets) {
53952
- const newChangesetPath = node_path.resolve(cwd, ".changeset", "pre", `${changeset.id}.md`);
53953
- await node_fs_promises.rename(changesetPath, newChangesetPath);
53954
- touchedFiles.push(changesetPath, newChangesetPath);
53955
- } else {
53956
- await node_fs_promises.rm(changesetPath, {
53957
- recursive: true,
53958
- force: true
53959
- });
53960
- touchedFiles.push(changesetPath);
53961
+ }))) {
53962
+ if (isPreChangesets) {
53963
+ const newChangesetPath = node_path.resolve(cwd, ".changeset", "pre", `${changeset.id}.md`);
53964
+ await node_fs_promises.rename(changesetPath, newChangesetPath);
53965
+ touchedFiles.push(changesetPath, newChangesetPath);
53966
+ } else {
53967
+ await node_fs_promises.rm(changesetPath, {
53968
+ recursive: true,
53969
+ force: true
53970
+ });
53971
+ touchedFiles.push(changesetPath);
53972
+ }
53961
53973
  }
53962
53974
  }
53963
53975
  }));
@@ -54022,10 +54034,13 @@ async function updateChangelog(changelogPath, changelog, name) {
54022
54034
  await node_fs_promises.writeFile(changelogPath, completelyNewChangelog);
54023
54035
  return;
54024
54036
  }
54025
- const isVersionHeading = /^#{1,6}\s+\d+\.\d+/.test(fileData);
54037
+ const firstVersionHeaderIndex = fileData.search(/^#{1,6}\s+\d+\.\d+/m);
54026
54038
  let newChangelog;
54027
- if (isVersionHeading) newChangelog = templateString.trimStart() + fileData;
54028
- else {
54039
+ if (firstVersionHeaderIndex >= 0) {
54040
+ const prefix = fileData.slice(0, firstVersionHeaderIndex);
54041
+ const suffix = fileData.slice(firstVersionHeaderIndex);
54042
+ newChangelog = prefix + templateString.trimStart() + "\n" + suffix;
54043
+ } else {
54029
54044
  const index = fileData.indexOf("\n");
54030
54045
  newChangelog = index === -1 ? fileData + templateString : fileData.slice(0, index) + templateString + fileData.slice(index + 1);
54031
54046
  }
@@ -54507,7 +54522,7 @@ async function readChangesets(rootDir, sinceRef) {
54507
54522
  return await Promise.all(changesetContents);
54508
54523
  }
54509
54524
  //#endregion
54510
- //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.1/node_modules/@changesets/get-release-plan/dist/index.mjs
54525
+ //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.2/node_modules/@changesets/get-release-plan/dist/index.mjs
54511
54526
  async function getReleasePlan(cwd, sinceRef, passedConfig) {
54512
54527
  const packages = await getPackages(cwd);
54513
54528
  const configResult = await readConfig(packages.rootDir, packages);
@@ -28,10 +28,10 @@ import * as assert from "node:assert";
28
28
  import * as v8 from "node:v8";
29
29
  import validRange from "semver/ranges/valid.js";
30
30
  import semverSatisfies from "semver/functions/satisfies.js";
31
+ import semverInc from "semver/functions/inc.js";
31
32
  import semverPrerelease from "semver/functions/prerelease.js";
32
33
  import semverParse from "semver/functions/parse.js";
33
34
  import semverGt from "semver/functions/gt.js";
34
- import semverInc from "semver/functions/inc.js";
35
35
 
36
36
  //#region \0rolldown/runtime.js
37
37
  var __create = Object.create;
@@ -49830,7 +49830,7 @@ function shouldSkipPackage({ packageJson }, { ignore, allowPrivatePackages }) {
49830
49830
  }
49831
49831
 
49832
49832
  //#endregion
49833
- //#region ../../node_modules/.pnpm/@changesets+config@4.0.0/node_modules/@changesets/config/dist/index.mjs
49833
+ //#region ../../node_modules/.pnpm/@changesets+config@4.0.1/node_modules/@changesets/config/dist/index.mjs
49834
49834
  const DEFAULT_CONFIG = {
49835
49835
  lang: void 0,
49836
49836
  message: void 0,
@@ -50625,13 +50625,11 @@ const noDuplicateFixedPackages = ({ config, errors }) => {
50625
50625
  if (config.fixed.length === 0) return;
50626
50626
  const foundNames = /* @__PURE__ */ new Set();
50627
50627
  const duplicatedNames = /* @__PURE__ */ new Set();
50628
- for (const fixedGroup of config.fixed) {
50629
- for (const name of fixedGroup) {
50630
- if (foundNames.has(name)) duplicatedNames.add(name);
50631
- foundNames.add(name);
50632
- }
50633
- errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `fixed: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of fixed packages. Packages can only be belong to a single group. ${picomatchNote}`));
50628
+ for (const fixedGroup of config.fixed) for (const name of fixedGroup) {
50629
+ if (foundNames.has(name)) duplicatedNames.add(name);
50630
+ foundNames.add(name);
50634
50631
  }
50632
+ errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `fixed: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of fixed packages. Packages can only be belong to a single group. ${picomatchNote}`));
50635
50633
  };
50636
50634
  const linkedGroupsExist = ({ config, writtenConfig, packageNames, warnings }) => {
50637
50635
  if (config.linked.length === 0) return;
@@ -50641,13 +50639,11 @@ const noDuplicateLinkedPackages = ({ config, errors }) => {
50641
50639
  if (config.linked.length === 0) return;
50642
50640
  const foundNames = /* @__PURE__ */ new Set();
50643
50641
  const duplicatedNames = /* @__PURE__ */ new Set();
50644
- for (const linkedGroup of config.linked) {
50645
- for (const name of linkedGroup) {
50646
- if (foundNames.has(name)) duplicatedNames.add(name);
50647
- foundNames.add(name);
50648
- }
50649
- errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `linked: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of linked packages. Packages can only be belong to a single group. ${picomatchNote}`));
50642
+ for (const linkedGroup of config.linked) for (const name of linkedGroup) {
50643
+ if (foundNames.has(name)) duplicatedNames.add(name);
50644
+ foundNames.add(name);
50650
50645
  }
50646
+ errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `linked: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of linked packages. Packages can only be belong to a single group. ${picomatchNote}`));
50651
50647
  };
50652
50648
  const noFixedAndLinkedPackages = ({ config, errors }) => {
50653
50649
  if (config.fixed.length === 0 || config.linked.length === 0) return;
@@ -50744,7 +50740,7 @@ async function readConfig(cwd, packages) {
50744
50740
  packages ??= await getPackages(cwd);
50745
50741
  return validateConfig(JSON.parse(await fs$1.readFile(path$1.join(packages.rootDir, ".changeset", "config.json"), "utf8")), packages);
50746
50742
  }
50747
- var version = "4.0.0";
50743
+ var version = "4.0.1";
50748
50744
  const defaultWrittenConfig = {
50749
50745
  ["$schema"]: `https://unpkg.com/@changesets/config@${version}/schema.json`,
50750
50746
  baseBranch: "main",
@@ -54227,7 +54223,7 @@ function applyEdits(text, edits) {
54227
54223
  }
54228
54224
 
54229
54225
  //#endregion
54230
- //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.1.0/node_modules/@changesets/apply-release-plan/dist/index.mjs
54226
+ //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.1.1/node_modules/@changesets/apply-release-plan/dist/index.mjs
54231
54227
  /**
54232
54228
  * A simple JSON editing utility that preserves formatting. They specified operation keys
54233
54229
  * must exist in the JSON for this implementation.
@@ -54244,7 +54240,7 @@ function editJson(json, operations) {
54244
54240
  const error = errors[0];
54245
54241
  throw new Error(`Failed to parse JSON at offset ${error.offset}: ${printParseErrorCode(error.error)}`);
54246
54242
  }
54247
- return applyEdits(json, operations.map((op) => {
54243
+ const edits = operations.map((op) => {
54248
54244
  const valueNode = getValueNode(parsed, op.keys);
54249
54245
  if (!valueNode) throw new Error(`Key path "${op.keys.join(".")}" not found in JSON`);
54250
54246
  return {
@@ -54252,7 +54248,8 @@ function editJson(json, operations) {
54252
54248
  offset: valueNode.offset,
54253
54249
  length: valueNode.length
54254
54250
  };
54255
- }));
54251
+ });
54252
+ return applyEdits(json, edits);
54256
54253
  }
54257
54254
  function getValueNode(root, keys) {
54258
54255
  let node = root;
@@ -54371,8 +54368,8 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
54371
54368
  for (const depType of DEPENDENCY_TYPES) {
54372
54369
  const deps = packageJson[depType];
54373
54370
  if (deps) for (const release of versionsToUpdate) {
54374
- if (release.newVersion == null) continue;
54375
- const { name, newVersion } = release;
54371
+ const { name, newVersion, type } = release;
54372
+ if (newVersion == null || type === "none") continue;
54376
54373
  let depCurrentVersion = deps[name];
54377
54374
  if (!depCurrentVersion || depCurrentVersion.startsWith("file:") || depCurrentVersion.startsWith("link:") || !shouldUpdateDependencyBasedOnConfig(cwd, release, {
54378
54375
  depVersionRange: depCurrentVersion,
@@ -54389,7 +54386,7 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
54389
54386
  depCurrentVersion = workspaceDepVersion;
54390
54387
  }
54391
54388
  if (new Range(depCurrentVersion).range !== "" || semverPrerelease(newVersion) != null) {
54392
- let newNewRange = snapshot ? newVersion : `${getVersionRangeType(depCurrentVersion)}${newVersion}`;
54389
+ let newNewRange = snapshot ? newVersion : getNewDependencyRange(depCurrentVersion, newVersion, type);
54393
54390
  if (usesWorkspaceRange) newNewRange = `workspace:${newNewRange}`;
54394
54391
  pkgJsonEdits.push({
54395
54392
  keys: [depType, name],
@@ -54400,6 +54397,20 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
54400
54397
  }
54401
54398
  return pkgJsonEdits;
54402
54399
  }
54400
+ function getNewDependencyRange(versionRange, newVersion, releaseType) {
54401
+ const comparatorSets = new Range(versionRange).set;
54402
+ const comparators = comparatorSets.length === 1 ? comparatorSets[0] : [];
54403
+ if (comparators.length === 2 && versionRange.includes(">") && versionRange.includes("<")) {
54404
+ const lowerBound = comparators.find(({ operator }) => operator.startsWith(">"));
54405
+ const upperBound = comparators.find(({ operator }) => operator.startsWith("<"));
54406
+ if (lowerBound && upperBound) {
54407
+ let newUpperBound = upperBound.value;
54408
+ if (!semverSatisfies(newVersion, newUpperBound)) newUpperBound = `<${semverInc(newVersion, releaseType)}`;
54409
+ return comparators[0] === lowerBound ? `>=${newVersion} ${newUpperBound}` : `${newUpperBound} >=${newVersion}`;
54410
+ }
54411
+ }
54412
+ return `${getVersionRangeType(versionRange)}${newVersion}`;
54413
+ }
54403
54414
  function getVersionRangeType(versionRange) {
54404
54415
  if (versionRange.charAt(0) === "^") return "^";
54405
54416
  if (versionRange.charAt(0) === "~") return "~";
@@ -54498,16 +54509,18 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
54498
54509
  if (!changeset.releases.some((release) => shouldSkipPackage(packagesByName.get(release.name), {
54499
54510
  ignore: config.ignore,
54500
54511
  allowPrivatePackages: config.privatePackages.version
54501
- }))) if (isPreChangesets) {
54502
- const newChangesetPath = path$1.resolve(cwd, ".changeset", "pre", `${changeset.id}.md`);
54503
- await fs$1.rename(changesetPath, newChangesetPath);
54504
- touchedFiles.push(changesetPath, newChangesetPath);
54505
- } else {
54506
- await fs$1.rm(changesetPath, {
54507
- recursive: true,
54508
- force: true
54509
- });
54510
- touchedFiles.push(changesetPath);
54512
+ }))) {
54513
+ if (isPreChangesets) {
54514
+ const newChangesetPath = path$1.resolve(cwd, ".changeset", "pre", `${changeset.id}.md`);
54515
+ await fs$1.rename(changesetPath, newChangesetPath);
54516
+ touchedFiles.push(changesetPath, newChangesetPath);
54517
+ } else {
54518
+ await fs$1.rm(changesetPath, {
54519
+ recursive: true,
54520
+ force: true
54521
+ });
54522
+ touchedFiles.push(changesetPath);
54523
+ }
54511
54524
  }
54512
54525
  }
54513
54526
  }));
@@ -54572,10 +54585,13 @@ async function updateChangelog(changelogPath, changelog, name) {
54572
54585
  await fs$1.writeFile(changelogPath, completelyNewChangelog);
54573
54586
  return;
54574
54587
  }
54575
- const isVersionHeading = /^#{1,6}\s+\d+\.\d+/.test(fileData);
54588
+ const firstVersionHeaderIndex = fileData.search(/^#{1,6}\s+\d+\.\d+/m);
54576
54589
  let newChangelog;
54577
- if (isVersionHeading) newChangelog = templateString.trimStart() + fileData;
54578
- else {
54590
+ if (firstVersionHeaderIndex >= 0) {
54591
+ const prefix = fileData.slice(0, firstVersionHeaderIndex);
54592
+ const suffix = fileData.slice(firstVersionHeaderIndex);
54593
+ newChangelog = prefix + templateString.trimStart() + "\n" + suffix;
54594
+ } else {
54579
54595
  const index = fileData.indexOf("\n");
54580
54596
  newChangelog = index === -1 ? fileData + templateString : fileData.slice(0, index) + templateString + fileData.slice(index + 1);
54581
54597
  }
@@ -55062,7 +55078,7 @@ async function readChangesets(rootDir, sinceRef) {
55062
55078
  }
55063
55079
 
55064
55080
  //#endregion
55065
- //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.1/node_modules/@changesets/get-release-plan/dist/index.mjs
55081
+ //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.2/node_modules/@changesets/get-release-plan/dist/index.mjs
55066
55082
  async function getReleasePlan(cwd, sinceRef, passedConfig) {
55067
55083
  const packages = await getPackages(cwd);
55068
55084
  const configResult = await readConfig(packages.rootDir, packages);
@@ -55071,7 +55087,9 @@ async function getReleasePlan(cwd, sinceRef, passedConfig) {
55071
55087
  ...configResult.config,
55072
55088
  ...passedConfig
55073
55089
  } : configResult.config;
55074
- return assembleReleasePlan(await readChangesets(packages.rootDir, sinceRef), packages, config, await readPreState(packages.rootDir));
55090
+ const changesets = await readChangesets(packages.rootDir, sinceRef);
55091
+ const preState = await readPreState(packages.rootDir);
55092
+ return assembleReleasePlan(changesets, packages, config, preState);
55075
55093
  }
55076
55094
 
55077
55095
  //#endregion
@@ -71,14 +71,14 @@ let semver_ranges_valid_js = require("semver/ranges/valid.js");
71
71
  semver_ranges_valid_js = __toESM(semver_ranges_valid_js, 1);
72
72
  let semver_functions_satisfies_js = require("semver/functions/satisfies.js");
73
73
  semver_functions_satisfies_js = __toESM(semver_functions_satisfies_js, 1);
74
+ let semver_functions_inc_js = require("semver/functions/inc.js");
75
+ semver_functions_inc_js = __toESM(semver_functions_inc_js, 1);
74
76
  let semver_functions_prerelease_js = require("semver/functions/prerelease.js");
75
77
  semver_functions_prerelease_js = __toESM(semver_functions_prerelease_js, 1);
76
78
  let semver_functions_parse_js = require("semver/functions/parse.js");
77
79
  semver_functions_parse_js = __toESM(semver_functions_parse_js, 1);
78
80
  let semver_functions_gt_js = require("semver/functions/gt.js");
79
81
  semver_functions_gt_js = __toESM(semver_functions_gt_js, 1);
80
- let semver_functions_inc_js = require("semver/functions/inc.js");
81
- semver_functions_inc_js = __toESM(semver_functions_inc_js, 1);
82
82
  //#region ../silk-core/dist/dev/pkg/errors/ChangesetConfigError.js
83
83
  /**
84
84
  * Raised when the `.changeset/config.json` file cannot be read or decoded.
@@ -49318,7 +49318,7 @@ function shouldSkipPackage({ packageJson }, { ignore, allowPrivatePackages }) {
49318
49318
  return !packageJson.version;
49319
49319
  }
49320
49320
  //#endregion
49321
- //#region ../../node_modules/.pnpm/@changesets+config@4.0.0/node_modules/@changesets/config/dist/index.mjs
49321
+ //#region ../../node_modules/.pnpm/@changesets+config@4.0.1/node_modules/@changesets/config/dist/index.mjs
49322
49322
  const DEFAULT_CONFIG = {
49323
49323
  lang: void 0,
49324
49324
  message: void 0,
@@ -50113,13 +50113,11 @@ const noDuplicateFixedPackages = ({ config, errors }) => {
50113
50113
  if (config.fixed.length === 0) return;
50114
50114
  const foundNames = /* @__PURE__ */ new Set();
50115
50115
  const duplicatedNames = /* @__PURE__ */ new Set();
50116
- for (const fixedGroup of config.fixed) {
50117
- for (const name of fixedGroup) {
50118
- if (foundNames.has(name)) duplicatedNames.add(name);
50119
- foundNames.add(name);
50120
- }
50121
- errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `fixed: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of fixed packages. Packages can only be belong to a single group. ${picomatchNote}`));
50116
+ for (const fixedGroup of config.fixed) for (const name of fixedGroup) {
50117
+ if (foundNames.has(name)) duplicatedNames.add(name);
50118
+ foundNames.add(name);
50122
50119
  }
50120
+ errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `fixed: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of fixed packages. Packages can only be belong to a single group. ${picomatchNote}`));
50123
50121
  };
50124
50122
  const linkedGroupsExist = ({ config, writtenConfig, packageNames, warnings }) => {
50125
50123
  if (config.linked.length === 0) return;
@@ -50129,13 +50127,11 @@ const noDuplicateLinkedPackages = ({ config, errors }) => {
50129
50127
  if (config.linked.length === 0) return;
50130
50128
  const foundNames = /* @__PURE__ */ new Set();
50131
50129
  const duplicatedNames = /* @__PURE__ */ new Set();
50132
- for (const linkedGroup of config.linked) {
50133
- for (const name of linkedGroup) {
50134
- if (foundNames.has(name)) duplicatedNames.add(name);
50135
- foundNames.add(name);
50136
- }
50137
- errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `linked: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of linked packages. Packages can only be belong to a single group. ${picomatchNote}`));
50130
+ for (const linkedGroup of config.linked) for (const name of linkedGroup) {
50131
+ if (foundNames.has(name)) duplicatedNames.add(name);
50132
+ foundNames.add(name);
50138
50133
  }
50134
+ errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `linked: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of linked packages. Packages can only be belong to a single group. ${picomatchNote}`));
50139
50135
  };
50140
50136
  const noFixedAndLinkedPackages = ({ config, errors }) => {
50141
50137
  if (config.fixed.length === 0 || config.linked.length === 0) return;
@@ -50232,7 +50228,7 @@ async function readConfig(cwd, packages) {
50232
50228
  packages ??= await getPackages(cwd);
50233
50229
  return validateConfig(JSON.parse(await node_fs_promises.readFile(node_path.join(packages.rootDir, ".changeset", "config.json"), "utf8")), packages);
50234
50230
  }
50235
- var version = "4.0.0";
50231
+ var version = "4.0.1";
50236
50232
  const defaultConfig = normalizeWrittenConfig({
50237
50233
  packageNames: [],
50238
50234
  writtenConfig: parse(WrittenConfigSchema, {
@@ -53682,7 +53678,7 @@ function applyEdits(text, edits) {
53682
53678
  return text;
53683
53679
  }
53684
53680
  //#endregion
53685
- //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.1.0/node_modules/@changesets/apply-release-plan/dist/index.mjs
53681
+ //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.1.1/node_modules/@changesets/apply-release-plan/dist/index.mjs
53686
53682
  /**
53687
53683
  * A simple JSON editing utility that preserves formatting. They specified operation keys
53688
53684
  * must exist in the JSON for this implementation.
@@ -53826,8 +53822,8 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
53826
53822
  for (const depType of DEPENDENCY_TYPES) {
53827
53823
  const deps = packageJson[depType];
53828
53824
  if (deps) for (const release of versionsToUpdate) {
53829
- if (release.newVersion == null) continue;
53830
- const { name, newVersion } = release;
53825
+ const { name, newVersion, type } = release;
53826
+ if (newVersion == null || type === "none") continue;
53831
53827
  let depCurrentVersion = deps[name];
53832
53828
  if (!depCurrentVersion || depCurrentVersion.startsWith("file:") || depCurrentVersion.startsWith("link:") || !shouldUpdateDependencyBasedOnConfig(cwd, release, {
53833
53829
  depVersionRange: depCurrentVersion,
@@ -53844,7 +53840,7 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
53844
53840
  depCurrentVersion = workspaceDepVersion;
53845
53841
  }
53846
53842
  if (new semver_classes_range_js.default(depCurrentVersion).range !== "" || (0, semver_functions_prerelease_js.default)(newVersion) != null) {
53847
- let newNewRange = snapshot ? newVersion : `${getVersionRangeType(depCurrentVersion)}${newVersion}`;
53843
+ let newNewRange = snapshot ? newVersion : getNewDependencyRange(depCurrentVersion, newVersion, type);
53848
53844
  if (usesWorkspaceRange) newNewRange = `workspace:${newNewRange}`;
53849
53845
  pkgJsonEdits.push({
53850
53846
  keys: [depType, name],
@@ -53855,6 +53851,20 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
53855
53851
  }
53856
53852
  return pkgJsonEdits;
53857
53853
  }
53854
+ function getNewDependencyRange(versionRange, newVersion, releaseType) {
53855
+ const comparatorSets = new semver_classes_range_js.default(versionRange).set;
53856
+ const comparators = comparatorSets.length === 1 ? comparatorSets[0] : [];
53857
+ if (comparators.length === 2 && versionRange.includes(">") && versionRange.includes("<")) {
53858
+ const lowerBound = comparators.find(({ operator }) => operator.startsWith(">"));
53859
+ const upperBound = comparators.find(({ operator }) => operator.startsWith("<"));
53860
+ if (lowerBound && upperBound) {
53861
+ let newUpperBound = upperBound.value;
53862
+ if (!(0, semver_functions_satisfies_js.default)(newVersion, newUpperBound)) newUpperBound = `<${(0, semver_functions_inc_js.default)(newVersion, releaseType)}`;
53863
+ return comparators[0] === lowerBound ? `>=${newVersion} ${newUpperBound}` : `${newUpperBound} >=${newVersion}`;
53864
+ }
53865
+ }
53866
+ return `${getVersionRangeType(versionRange)}${newVersion}`;
53867
+ }
53858
53868
  function getVersionRangeType(versionRange) {
53859
53869
  if (versionRange.charAt(0) === "^") return "^";
53860
53870
  if (versionRange.charAt(0) === "~") return "~";
@@ -53952,16 +53962,18 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
53952
53962
  if (!changeset.releases.some((release) => shouldSkipPackage(packagesByName.get(release.name), {
53953
53963
  ignore: config.ignore,
53954
53964
  allowPrivatePackages: config.privatePackages.version
53955
- }))) if (isPreChangesets) {
53956
- const newChangesetPath = node_path.resolve(cwd, ".changeset", "pre", `${changeset.id}.md`);
53957
- await node_fs_promises.rename(changesetPath, newChangesetPath);
53958
- touchedFiles.push(changesetPath, newChangesetPath);
53959
- } else {
53960
- await node_fs_promises.rm(changesetPath, {
53961
- recursive: true,
53962
- force: true
53963
- });
53964
- touchedFiles.push(changesetPath);
53965
+ }))) {
53966
+ if (isPreChangesets) {
53967
+ const newChangesetPath = node_path.resolve(cwd, ".changeset", "pre", `${changeset.id}.md`);
53968
+ await node_fs_promises.rename(changesetPath, newChangesetPath);
53969
+ touchedFiles.push(changesetPath, newChangesetPath);
53970
+ } else {
53971
+ await node_fs_promises.rm(changesetPath, {
53972
+ recursive: true,
53973
+ force: true
53974
+ });
53975
+ touchedFiles.push(changesetPath);
53976
+ }
53965
53977
  }
53966
53978
  }
53967
53979
  }));
@@ -54026,10 +54038,13 @@ async function updateChangelog(changelogPath, changelog, name) {
54026
54038
  await node_fs_promises.writeFile(changelogPath, completelyNewChangelog);
54027
54039
  return;
54028
54040
  }
54029
- const isVersionHeading = /^#{1,6}\s+\d+\.\d+/.test(fileData);
54041
+ const firstVersionHeaderIndex = fileData.search(/^#{1,6}\s+\d+\.\d+/m);
54030
54042
  let newChangelog;
54031
- if (isVersionHeading) newChangelog = templateString.trimStart() + fileData;
54032
- else {
54043
+ if (firstVersionHeaderIndex >= 0) {
54044
+ const prefix = fileData.slice(0, firstVersionHeaderIndex);
54045
+ const suffix = fileData.slice(firstVersionHeaderIndex);
54046
+ newChangelog = prefix + templateString.trimStart() + "\n" + suffix;
54047
+ } else {
54033
54048
  const index = fileData.indexOf("\n");
54034
54049
  newChangelog = index === -1 ? fileData + templateString : fileData.slice(0, index) + templateString + fileData.slice(index + 1);
54035
54050
  }
@@ -54511,7 +54526,7 @@ async function readChangesets(rootDir, sinceRef) {
54511
54526
  return await Promise.all(changesetContents);
54512
54527
  }
54513
54528
  //#endregion
54514
- //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.1/node_modules/@changesets/get-release-plan/dist/index.mjs
54529
+ //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.2/node_modules/@changesets/get-release-plan/dist/index.mjs
54515
54530
  async function getReleasePlan(cwd, sinceRef, passedConfig) {
54516
54531
  const packages = await getPackages(cwd);
54517
54532
  const configResult = await readConfig(packages.rootDir, packages);
@@ -28,10 +28,10 @@ import * as assert from "node:assert";
28
28
  import * as v8 from "node:v8";
29
29
  import validRange from "semver/ranges/valid.js";
30
30
  import semverSatisfies from "semver/functions/satisfies.js";
31
+ import semverInc from "semver/functions/inc.js";
31
32
  import semverPrerelease from "semver/functions/prerelease.js";
32
33
  import semverParse from "semver/functions/parse.js";
33
34
  import semverGt from "semver/functions/gt.js";
34
- import semverInc from "semver/functions/inc.js";
35
35
 
36
36
  //#region \0rolldown/runtime.js
37
37
  var __create = Object.create;
@@ -49830,7 +49830,7 @@ function shouldSkipPackage({ packageJson }, { ignore, allowPrivatePackages }) {
49830
49830
  }
49831
49831
 
49832
49832
  //#endregion
49833
- //#region ../../node_modules/.pnpm/@changesets+config@4.0.0/node_modules/@changesets/config/dist/index.mjs
49833
+ //#region ../../node_modules/.pnpm/@changesets+config@4.0.1/node_modules/@changesets/config/dist/index.mjs
49834
49834
  const DEFAULT_CONFIG = {
49835
49835
  lang: void 0,
49836
49836
  message: void 0,
@@ -50625,13 +50625,11 @@ const noDuplicateFixedPackages = ({ config, errors }) => {
50625
50625
  if (config.fixed.length === 0) return;
50626
50626
  const foundNames = /* @__PURE__ */ new Set();
50627
50627
  const duplicatedNames = /* @__PURE__ */ new Set();
50628
- for (const fixedGroup of config.fixed) {
50629
- for (const name of fixedGroup) {
50630
- if (foundNames.has(name)) duplicatedNames.add(name);
50631
- foundNames.add(name);
50632
- }
50633
- errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `fixed: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of fixed packages. Packages can only be belong to a single group. ${picomatchNote}`));
50628
+ for (const fixedGroup of config.fixed) for (const name of fixedGroup) {
50629
+ if (foundNames.has(name)) duplicatedNames.add(name);
50630
+ foundNames.add(name);
50634
50631
  }
50632
+ errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `fixed: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of fixed packages. Packages can only be belong to a single group. ${picomatchNote}`));
50635
50633
  };
50636
50634
  const linkedGroupsExist = ({ config, writtenConfig, packageNames, warnings }) => {
50637
50635
  if (config.linked.length === 0) return;
@@ -50641,13 +50639,11 @@ const noDuplicateLinkedPackages = ({ config, errors }) => {
50641
50639
  if (config.linked.length === 0) return;
50642
50640
  const foundNames = /* @__PURE__ */ new Set();
50643
50641
  const duplicatedNames = /* @__PURE__ */ new Set();
50644
- for (const linkedGroup of config.linked) {
50645
- for (const name of linkedGroup) {
50646
- if (foundNames.has(name)) duplicatedNames.add(name);
50647
- foundNames.add(name);
50648
- }
50649
- errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `linked: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of linked packages. Packages can only be belong to a single group. ${picomatchNote}`));
50642
+ for (const linkedGroup of config.linked) for (const name of linkedGroup) {
50643
+ if (foundNames.has(name)) duplicatedNames.add(name);
50644
+ foundNames.add(name);
50650
50645
  }
50646
+ errors.push(...Array.from(duplicatedNames, (pkgOrGlob) => `linked: Invalid group: The package or glob "${pkgOrGlob}" is defined in multiple groups of linked packages. Packages can only be belong to a single group. ${picomatchNote}`));
50651
50647
  };
50652
50648
  const noFixedAndLinkedPackages = ({ config, errors }) => {
50653
50649
  if (config.fixed.length === 0 || config.linked.length === 0) return;
@@ -50744,7 +50740,7 @@ async function readConfig(cwd, packages) {
50744
50740
  packages ??= await getPackages(cwd);
50745
50741
  return validateConfig(JSON.parse(await fs$1.readFile(path$1.join(packages.rootDir, ".changeset", "config.json"), "utf8")), packages);
50746
50742
  }
50747
- var version = "4.0.0";
50743
+ var version = "4.0.1";
50748
50744
  const defaultWrittenConfig = {
50749
50745
  ["$schema"]: `https://unpkg.com/@changesets/config@${version}/schema.json`,
50750
50746
  baseBranch: "main",
@@ -54227,7 +54223,7 @@ function applyEdits(text, edits) {
54227
54223
  }
54228
54224
 
54229
54225
  //#endregion
54230
- //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.1.0/node_modules/@changesets/apply-release-plan/dist/index.mjs
54226
+ //#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.1.1/node_modules/@changesets/apply-release-plan/dist/index.mjs
54231
54227
  /**
54232
54228
  * A simple JSON editing utility that preserves formatting. They specified operation keys
54233
54229
  * must exist in the JSON for this implementation.
@@ -54244,7 +54240,7 @@ function editJson(json, operations) {
54244
54240
  const error = errors[0];
54245
54241
  throw new Error(`Failed to parse JSON at offset ${error.offset}: ${printParseErrorCode(error.error)}`);
54246
54242
  }
54247
- return applyEdits(json, operations.map((op) => {
54243
+ const edits = operations.map((op) => {
54248
54244
  const valueNode = getValueNode(parsed, op.keys);
54249
54245
  if (!valueNode) throw new Error(`Key path "${op.keys.join(".")}" not found in JSON`);
54250
54246
  return {
@@ -54252,7 +54248,8 @@ function editJson(json, operations) {
54252
54248
  offset: valueNode.offset,
54253
54249
  length: valueNode.length
54254
54250
  };
54255
- }));
54251
+ });
54252
+ return applyEdits(json, edits);
54256
54253
  }
54257
54254
  function getValueNode(root, keys) {
54258
54255
  let node = root;
@@ -54371,8 +54368,8 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
54371
54368
  for (const depType of DEPENDENCY_TYPES) {
54372
54369
  const deps = packageJson[depType];
54373
54370
  if (deps) for (const release of versionsToUpdate) {
54374
- if (release.newVersion == null) continue;
54375
- const { name, newVersion } = release;
54371
+ const { name, newVersion, type } = release;
54372
+ if (newVersion == null || type === "none") continue;
54376
54373
  let depCurrentVersion = deps[name];
54377
54374
  if (!depCurrentVersion || depCurrentVersion.startsWith("file:") || depCurrentVersion.startsWith("link:") || !shouldUpdateDependencyBasedOnConfig(cwd, release, {
54378
54375
  depVersionRange: depCurrentVersion,
@@ -54389,7 +54386,7 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
54389
54386
  depCurrentVersion = workspaceDepVersion;
54390
54387
  }
54391
54388
  if (new Range(depCurrentVersion).range !== "" || semverPrerelease(newVersion) != null) {
54392
- let newNewRange = snapshot ? newVersion : `${getVersionRangeType(depCurrentVersion)}${newVersion}`;
54389
+ let newNewRange = snapshot ? newVersion : getNewDependencyRange(depCurrentVersion, newVersion, type);
54393
54390
  if (usesWorkspaceRange) newNewRange = `workspace:${newNewRange}`;
54394
54391
  pkgJsonEdits.push({
54395
54392
  keys: [depType, name],
@@ -54400,6 +54397,20 @@ function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateI
54400
54397
  }
54401
54398
  return pkgJsonEdits;
54402
54399
  }
54400
+ function getNewDependencyRange(versionRange, newVersion, releaseType) {
54401
+ const comparatorSets = new Range(versionRange).set;
54402
+ const comparators = comparatorSets.length === 1 ? comparatorSets[0] : [];
54403
+ if (comparators.length === 2 && versionRange.includes(">") && versionRange.includes("<")) {
54404
+ const lowerBound = comparators.find(({ operator }) => operator.startsWith(">"));
54405
+ const upperBound = comparators.find(({ operator }) => operator.startsWith("<"));
54406
+ if (lowerBound && upperBound) {
54407
+ let newUpperBound = upperBound.value;
54408
+ if (!semverSatisfies(newVersion, newUpperBound)) newUpperBound = `<${semverInc(newVersion, releaseType)}`;
54409
+ return comparators[0] === lowerBound ? `>=${newVersion} ${newUpperBound}` : `${newUpperBound} >=${newVersion}`;
54410
+ }
54411
+ }
54412
+ return `${getVersionRangeType(versionRange)}${newVersion}`;
54413
+ }
54403
54414
  function getVersionRangeType(versionRange) {
54404
54415
  if (versionRange.charAt(0) === "^") return "^";
54405
54416
  if (versionRange.charAt(0) === "~") return "~";
@@ -54498,16 +54509,18 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
54498
54509
  if (!changeset.releases.some((release) => shouldSkipPackage(packagesByName.get(release.name), {
54499
54510
  ignore: config.ignore,
54500
54511
  allowPrivatePackages: config.privatePackages.version
54501
- }))) if (isPreChangesets) {
54502
- const newChangesetPath = path$1.resolve(cwd, ".changeset", "pre", `${changeset.id}.md`);
54503
- await fs$1.rename(changesetPath, newChangesetPath);
54504
- touchedFiles.push(changesetPath, newChangesetPath);
54505
- } else {
54506
- await fs$1.rm(changesetPath, {
54507
- recursive: true,
54508
- force: true
54509
- });
54510
- touchedFiles.push(changesetPath);
54512
+ }))) {
54513
+ if (isPreChangesets) {
54514
+ const newChangesetPath = path$1.resolve(cwd, ".changeset", "pre", `${changeset.id}.md`);
54515
+ await fs$1.rename(changesetPath, newChangesetPath);
54516
+ touchedFiles.push(changesetPath, newChangesetPath);
54517
+ } else {
54518
+ await fs$1.rm(changesetPath, {
54519
+ recursive: true,
54520
+ force: true
54521
+ });
54522
+ touchedFiles.push(changesetPath);
54523
+ }
54511
54524
  }
54512
54525
  }
54513
54526
  }));
@@ -54572,10 +54585,13 @@ async function updateChangelog(changelogPath, changelog, name) {
54572
54585
  await fs$1.writeFile(changelogPath, completelyNewChangelog);
54573
54586
  return;
54574
54587
  }
54575
- const isVersionHeading = /^#{1,6}\s+\d+\.\d+/.test(fileData);
54588
+ const firstVersionHeaderIndex = fileData.search(/^#{1,6}\s+\d+\.\d+/m);
54576
54589
  let newChangelog;
54577
- if (isVersionHeading) newChangelog = templateString.trimStart() + fileData;
54578
- else {
54590
+ if (firstVersionHeaderIndex >= 0) {
54591
+ const prefix = fileData.slice(0, firstVersionHeaderIndex);
54592
+ const suffix = fileData.slice(firstVersionHeaderIndex);
54593
+ newChangelog = prefix + templateString.trimStart() + "\n" + suffix;
54594
+ } else {
54579
54595
  const index = fileData.indexOf("\n");
54580
54596
  newChangelog = index === -1 ? fileData + templateString : fileData.slice(0, index) + templateString + fileData.slice(index + 1);
54581
54597
  }
@@ -55062,7 +55078,7 @@ async function readChangesets(rootDir, sinceRef) {
55062
55078
  }
55063
55079
 
55064
55080
  //#endregion
55065
- //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.1/node_modules/@changesets/get-release-plan/dist/index.mjs
55081
+ //#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.2/node_modules/@changesets/get-release-plan/dist/index.mjs
55066
55082
  async function getReleasePlan(cwd, sinceRef, passedConfig) {
55067
55083
  const packages = await getPackages(cwd);
55068
55084
  const configResult = await readConfig(packages.rootDir, packages);
@@ -55071,7 +55087,9 @@ async function getReleasePlan(cwd, sinceRef, passedConfig) {
55071
55087
  ...configResult.config,
55072
55088
  ...passedConfig
55073
55089
  } : configResult.config;
55074
- return assembleReleasePlan(await readChangesets(packages.rootDir, sinceRef), packages, config, await readPreState(packages.rootDir));
55090
+ const changesets = await readChangesets(packages.rootDir, sinceRef);
55091
+ const preState = await readPreState(packages.rootDir);
55092
+ return assembleReleasePlan(changesets, packages, config, preState);
55075
55093
  }
55076
55094
 
55077
55095
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvy-web/silk",
3
- "version": "4.0.4",
3
+ "version": "4.0.6",
4
4
  "private": false,
5
5
  "description": "The single Silk Suite dev-tooling package — changeset, commitlint, lint, and biome conventions",
6
6
  "homepage": "https://github.com/savvy-web/systems/tree/main/packages/silk",
@@ -83,31 +83,31 @@
83
83
  "@effected/templates": "^0.6.0",
84
84
  "@effected/workspaces": "^0.22.0",
85
85
  "@savvy-web/changelog": "0.1.3",
86
- "@savvy-web/cli": "3.0.4",
87
- "@savvy-web/mcp": "3.0.4",
88
- "@savvy-web/silk-effects": "8.0.4",
86
+ "@savvy-web/cli": "3.1.0",
87
+ "@savvy-web/mcp": "3.0.6",
88
+ "@savvy-web/silk-effects": "8.1.0",
89
89
  "effect": "4.0.0-rc.115",
90
90
  "semver": "^7.8.5"
91
91
  },
92
92
  "peerDependencies": {
93
93
  "@biomejs/biome": "2.5.13",
94
- "@changesets/cli": "^3.0.2",
94
+ "@changesets/cli": "^3.0.3",
95
95
  "@commitlint/cli": "^21.2.2",
96
96
  "@commitlint/config-conventional": "^21.2.2",
97
97
  "@types/bun": "^1.4.2",
98
- "@types/node": "^26.5.1",
99
- "@vitest/coverage-istanbul": "^5.0.0",
100
- "@vitest/coverage-v8": "^5.0.0",
101
- "@vitest/expect": "^5.0.0",
98
+ "@types/node": "^26.6.1",
99
+ "@vitest/coverage-istanbul": "^5.0.1",
100
+ "@vitest/coverage-v8": "^5.0.1",
101
+ "@vitest/expect": "^5.0.1",
102
102
  "husky": "^9.1.7",
103
103
  "lint-staged": "^17.5.1",
104
104
  "markdownlint-cli2": "^0.23.2",
105
105
  "markdownlint-cli2-formatter-codequality": "^0.0.7",
106
106
  "tsx": "^4.23.13",
107
- "turbo": "^2.10.12",
107
+ "turbo": "^2.10.13",
108
108
  "typescript": "^7.0.2",
109
109
  "vite": "^8.3.0",
110
- "vitest": "^5.0.0"
110
+ "vitest": "^5.0.1"
111
111
  },
112
112
  "peerDependenciesMeta": {
113
113
  "@biomejs/biome": {