Skip to content

Commit 13ef551

Browse files
avoid a major bump to vite-plugin when its peer dependency (wrangler) gets a minor bump (#9982)
1 parent c13deb9 commit 13ef551

File tree

5 files changed

+29
-5
lines changed

5 files changed

+29
-5
lines changed

.changeset/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
"baseBranch": "main",
1111
"updateInternalDependencies": "patch",
1212
"bumpVersionsWithWorkspaceProtocolOnly": true,
13+
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
14+
"onlyUpdatePeerDependentsWhenOutOfRange": true
15+
},
1316
"ignore": [],
1417
"privatePackages": {
1518
"tag": true,

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@
8282
8383
8484
85-
"postal-mime": "patches/postal-mime.patch"
85+
"postal-mime": "patches/postal-mime.patch",
86+
"@changesets/assemble-release-plan": "patches/@changesets__assemble-release-plan.patch"
8687
}
8788
}
8889
}

packages/vite-plugin-cloudflare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
},
7070
"peerDependencies": {
7171
"vite": "^6.1.0 || ^7.0.0",
72-
"wrangler": "workspace:*"
72+
"wrangler": "workspace:^"
7373
},
7474
"publishConfig": {
7575
"access": "public"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/dist/changesets-assemble-release-plan.cjs.js b/dist/changesets-assemble-release-plan.cjs.js
2+
index e32a5e5d39c3bd920201b5694632d2b44c92d486..a7cf97e5aa5b39ed73e8a6c352fc66fb39fff4c2 100644
3+
--- a/dist/changesets-assemble-release-plan.cjs.js
4+
+++ b/dist/changesets-assemble-release-plan.cjs.js
5+
@@ -322,7 +322,11 @@ function getDependencyVersionRanges(dependentPkgJSON, dependencyRelease) {
6+
versionRange: // intentionally keep other workspace ranges untouched
7+
// this has to be fixed but this should only be done when adding appropriate tests
8+
versionRange === "workspace:*" ? // workspace:* actually means the current exact version, and not a wildcard similar to a reguler * range
9+
- dependencyRelease.oldVersion : versionRange.replace(/^workspace:/, "")
10+
+ dependencyRelease.oldVersion :
11+
+ versionRange === "workspace:^" ? // workspace:^ means at least as new as the current version but less than then next major
12+
+ `^${dependencyRelease.oldVersion}`
13+
+ :
14+
+ versionRange.replace(/^workspace:/, "")
15+
});
16+
} else {
17+
dependencyVersionRanges.push({

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.

0 commit comments

Comments
 (0)