Skip to content

Commit 7a1806e

Browse files
committed
chore: patch @changesets/assemble-release-plan to fix changesets/changesets#1228
1 parent f5477cd commit 7a1806e

3 files changed

Lines changed: 34 additions & 3 deletions

File tree

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
diff --git a/dist/changesets-assemble-release-plan.cjs.js b/dist/changesets-assemble-release-plan.cjs.js
2+
index ae379dc5ba7ac6d40bd68c7029aca350bd92d88a..e3238f0c0f2e99c48833e95ceee8e2e2236562e4 100644
3+
--- a/dist/changesets-assemble-release-plan.cjs.js
4+
+++ b/dist/changesets-assemble-release-plan.cjs.js
5+
@@ -307,6 +307,22 @@ function getDependencyVersionRanges(dependentPkgJSON, dependencyRelease) {
6+
return dependencyVersionRanges;
7+
}
8+
function shouldBumpMajor({
9+
+ ...options
10+
+}) {
11+
+ const should = shouldBumpMajor_original(options);
12+
+
13+
+ // breaking changes in 0.x versions should bump minor
14+
+ if (
15+
+ should &&
16+
+ options.depType === "peerDependencies" && // This check is unnecessary but we only want this patch to fix https://github.com/changesets/changesets/issues/1228
17+
+ options.releases.has(options.dependent) &&
18+
+ options.releases.get(options.dependent).oldVersion.startsWith("0.")
19+
+ )
20+
+ return false;
21+
+
22+
+ return should;
23+
+}
24+
+function shouldBumpMajor_original({
25+
dependent,
26+
depType,
27+
versionRange,

‎pnpm-lock.yaml‎

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,4 @@ overrides:
166166
patchedDependencies:
167167
ghost: patches/ghost.patch
168168
"@tryghost/html-to-plaintext": patches/@tryghost__html-to-plaintext.patch
169+
"@changesets/assemble-release-plan": patches/@changesets__assemble-release-plan.patch

0 commit comments

Comments
 (0)