Skip to content

Commit

Permalink
chore: pin internal peer dependencies version
Browse files Browse the repository at this point in the history
chore: resolve lock file

chore: change peer dependency bump strategy

chore: resolve lock file

chore: fix bump strategy patch file

chore: apply missing changeset esm patch

chore: enable experimental changeset option
  • Loading branch information
orionmiz committed Feb 13, 2024
1 parent 43a2f2a commit 6a3afe7
Show file tree
Hide file tree
Showing 18 changed files with 110 additions and 53 deletions.
3 changes: 3 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
"ignore": [],
"snapshot": {
"useCalculatedVersion": true
},
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
"onlyUpdatePeerDependentsWhenOutOfRange": true
}
}
10 changes: 5 additions & 5 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
diff --git a/dist/assemble-release-plan.cjs.dev.js b/dist/assemble-release-plan.cjs.dev.js
index e1376ca756d69816f8c79637ee7b45161f092167..647618a12a4d6a787b7d184aabfebbf387aab699 100644
--- a/dist/assemble-release-plan.cjs.dev.js
+++ b/dist/assemble-release-plan.cjs.dev.js
@@ -257,7 +257,7 @@ function shouldBumpMajor({
// we check if it is a peerDependency because if it is, our dependent bump type might need to be major.
return depType === "peerDependencies" && nextRelease.type !== "none" && nextRelease.type !== "patch" && ( // 1. If onlyUpdatePeerDependentsWhenOutOfRange set to true, bump major if the version is leaving the range.
// 2. If onlyUpdatePeerDependentsWhenOutOfRange set to false, bump major regardless whether or not the version is leaving the range.
- !onlyUpdatePeerDependentsWhenOutOfRange || !semverSatisfies__default['default'](incrementVersion(nextRelease, preInfo), versionRange)) && ( // bump major only if the dependent doesn't already has a major release.
+ !onlyUpdatePeerDependentsWhenOutOfRange) && (
!releases.has(dependent) || releases.has(dependent) && releases.get(dependent).type !== "major");
}

diff --git a/dist/assemble-release-plan.cjs.prod.js b/dist/assemble-release-plan.cjs.prod.js
index 3a83720644a94cdf6e62fa188a72c51c0384d00e..faba645908aa29c28a3cee52727fb8a67532010a 100644
--- a/dist/assemble-release-plan.cjs.prod.js
+++ b/dist/assemble-release-plan.cjs.prod.js
@@ -130,7 +130,7 @@ function getDependencyVersionRanges(dependentPkgJSON, dependencyRelease) {
}

function shouldBumpMajor({dependent: dependent, depType: depType, versionRange: versionRange, releases: releases, nextRelease: nextRelease, preInfo: preInfo, onlyUpdatePeerDependentsWhenOutOfRange: onlyUpdatePeerDependentsWhenOutOfRange}) {
- return "peerDependencies" === depType && "none" !== nextRelease.type && "patch" !== nextRelease.type && (!onlyUpdatePeerDependentsWhenOutOfRange || !semverSatisfies__default.default(incrementVersion(nextRelease, preInfo), versionRange)) && (!releases.has(dependent) || releases.has(dependent) && "major" !== releases.get(dependent).type);
+ return "peerDependencies" === depType && "none" !== nextRelease.type && "patch" !== nextRelease.type && !onlyUpdatePeerDependentsWhenOutOfRange && (!releases.has(dependent) || releases.has(dependent) && "major" !== releases.get(dependent).type);
}

function flattenReleases(changesets, packagesByName, ignoredPackages) {
diff --git a/dist/assemble-release-plan.esm.js b/dist/assemble-release-plan.esm.js
index 62891eb5dee97a33e6587514267c3cde5b314830..e5c405125129df6a608e10a085b064dfd5393518 100644
--- a/dist/assemble-release-plan.esm.js
+++ b/dist/assemble-release-plan.esm.js
@@ -246,7 +246,7 @@ function shouldBumpMajor({
// we check if it is a peerDependency because if it is, our dependent bump type might need to be major.
return depType === "peerDependencies" && nextRelease.type !== "none" && nextRelease.type !== "patch" && ( // 1. If onlyUpdatePeerDependentsWhenOutOfRange set to true, bump major if the version is leaving the range.
// 2. If onlyUpdatePeerDependentsWhenOutOfRange set to false, bump major regardless whether or not the version is leaving the range.
- !onlyUpdatePeerDependentsWhenOutOfRange || !semverSatisfies(incrementVersion(nextRelease, preInfo), versionRange)) && ( // bump major only if the dependent doesn't already has a major release.
+ !onlyUpdatePeerDependentsWhenOutOfRange) && ( // bump major only if the dependent doesn't already has a major release.
!releases.has(dependent) || releases.has(dependent) && releases.get(dependent).type !== "major");
}

4 changes: 2 additions & 2 deletions extensions/compat-await-push/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
"typescript": "^4.7.4"
},
"peerDependencies": {
"@stackflow/core": "^1.0.10",
"@stackflow/react": "^1.1.7",
"@stackflow/core": "^1",
"@stackflow/react": "^1",
"@types/react": ">=16.8.0",
"react": ">=16.8.0"
},
Expand Down
8 changes: 4 additions & 4 deletions extensions/link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
"typescript": "^4.7.4"
},
"peerDependencies": {
"@stackflow/core": "^1.0.10",
"@stackflow/plugin-history-sync": "^1.3.18",
"@stackflow/plugin-preload": "^1.2.15",
"@stackflow/react": "^1.1.7",
"@stackflow/core": "^1",
"@stackflow/plugin-history-sync": "^1",
"@stackflow/plugin-preload": "^1",
"@stackflow/react": "^1",
"@types/react": ">=16.8.0",
"react": ">=16.8.0"
},
Expand Down
4 changes: 2 additions & 2 deletions extensions/plugin-basic-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
"typescript": "^4.7.4"
},
"peerDependencies": {
"@stackflow/core": "^1.0.10",
"@stackflow/react": "^1.1.7",
"@stackflow/core": "^1",
"@stackflow/react": "^1",
"@types/react": ">=16.8.0",
"react": ">=16.8.0"
},
Expand Down
2 changes: 1 addition & 1 deletion extensions/plugin-devtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"typescript": "^4.7.4"
},
"peerDependencies": {
"@stackflow/core": "^1.0.10"
"@stackflow/core": "^1"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions extensions/plugin-google-analytics-4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
"typescript": "^4.7.4"
},
"peerDependencies": {
"@stackflow/core": "^1.0.10",
"@stackflow/react": "^1.1.7",
"@stackflow/core": "^1",
"@stackflow/react": "^1",
"@types/react": ">=16.8.0",
"react": ">=16.8.0"
},
Expand Down
4 changes: 2 additions & 2 deletions extensions/plugin-history-sync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
"typescript": "^4.7.4"
},
"peerDependencies": {
"@stackflow/core": "^1.0.10",
"@stackflow/react": "^1.1.7",
"@stackflow/core": "^1",
"@stackflow/react": "^1",
"@types/react": ">=16.8.0",
"react": ">=16.8.0"
},
Expand Down
4 changes: 2 additions & 2 deletions extensions/plugin-map-initial-activity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"typescript": "^4.7.4"
},
"peerDependencies": {
"@stackflow/core": "^1.0.10",
"@stackflow/react": "^1.1.7"
"@stackflow/core": "^1",
"@stackflow/react": "^1"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions extensions/plugin-preload/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"typescript": "^4.7.4"
},
"peerDependencies": {
"@stackflow/core": "^1.0.10",
"@stackflow/react": "^1.1.7",
"@stackflow/core": "^1",
"@stackflow/react": "^1",
"@types/react": ">=16.8.0",
"react": ">=16.8.0"
},
Expand Down
4 changes: 2 additions & 2 deletions extensions/plugin-renderer-basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"typescript": "^4.7.4"
},
"peerDependencies": {
"@stackflow/core": "^1.0.10",
"@stackflow/react": "^1.1.7",
"@stackflow/core": "^1",
"@stackflow/react": "^1",
"@types/react": ">=16.8.0",
"react": ">=16.8.0"
},
Expand Down
4 changes: 2 additions & 2 deletions extensions/plugin-renderer-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"typescript": "^4.7.4"
},
"peerDependencies": {
"@stackflow/core": "^1.0.10",
"@stackflow/react": "^1.1.7",
"@stackflow/core": "^1",
"@stackflow/react": "^1",
"@types/react": ">=16.8.0",
"react": ">=16.8.0"
},
Expand Down
2 changes: 1 addition & 1 deletion extensions/plugin-stack-depth-change/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"typescript": "^4.7.4"
},
"peerDependencies": {
"@stackflow/core": "^1.0.10"
"@stackflow/core": "^1"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion integrations/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"typescript": "^4.7.4"
},
"peerDependencies": {
"@stackflow/core": "^1.0.10",
"@stackflow/core": "^1",
"@types/react": ">=16.8.0",
"react": ">=16.8.0"
},
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
},
"resolutions": {
"@mdx-js/react": "2.1.1",
"esbuild": "^0.16"
"esbuild": "^0.16",
"@changesets/assemble-release-plan@^5.2.4": "patch:@changesets/assemble-release-plan@npm%3A5.2.4#./.yarn/patches/@changesets-assemble-release-plan-npm-5.2.4-2920e4dc4c.patch"
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
Expand Down
62 changes: 38 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ __metadata:
languageName: node
linkType: hard

"@changesets/assemble-release-plan@npm:^5.2.4":
"@changesets/assemble-release-plan@npm:5.2.4":
version: 5.2.4
resolution: "@changesets/assemble-release-plan@npm:5.2.4"
dependencies:
Expand All @@ -494,6 +494,20 @@ __metadata:
languageName: node
linkType: hard

"@changesets/assemble-release-plan@patch:@changesets/assemble-release-plan@npm%3A5.2.4#./.yarn/patches/@changesets-assemble-release-plan-npm-5.2.4-2920e4dc4c.patch::locator=%40stackflow%2Fmonorepo%40workspace%3A.":
version: 5.2.4
resolution: "@changesets/assemble-release-plan@patch:@changesets/assemble-release-plan@npm%3A5.2.4#./.yarn/patches/@changesets-assemble-release-plan-npm-5.2.4-2920e4dc4c.patch::version=5.2.4&hash=7362f2&locator=%40stackflow%2Fmonorepo%40workspace%3A."
dependencies:
"@babel/runtime": ^7.20.1
"@changesets/errors": ^0.1.4
"@changesets/get-dependents-graph": ^1.3.6
"@changesets/types": ^5.2.1
"@manypkg/get-packages": ^1.1.3
semver: ^7.5.3
checksum: ed5c70f90c04ee479ab7d225f1f0602dbcd93af7a46871c0e02326429ae2f7512d9c61442b1da05f736bdd5e2ea27acfbd78ae556a215a8fee1b34ac39053704
languageName: node
linkType: hard

"@changesets/changelog-git@npm:^0.1.14":
version: 0.1.14
resolution: "@changesets/changelog-git@npm:0.1.14"
Expand Down Expand Up @@ -1884,8 +1898,8 @@ __metadata:
rimraf: ^3.0.2
typescript: ^4.7.4
peerDependencies:
"@stackflow/core": ^1.0.10
"@stackflow/react": ^1.1.7
"@stackflow/core": ^1
"@stackflow/react": ^1
"@types/react": ">=16.8.0"
react: ">=16.8.0"
languageName: unknown
Expand Down Expand Up @@ -2057,10 +2071,10 @@ __metadata:
rimraf: ^3.0.2
typescript: ^4.7.4
peerDependencies:
"@stackflow/core": ^1.0.10
"@stackflow/plugin-history-sync": ^1.3.18
"@stackflow/plugin-preload": ^1.2.15
"@stackflow/react": ^1.1.7
"@stackflow/core": ^1
"@stackflow/plugin-history-sync": ^1
"@stackflow/plugin-preload": ^1
"@stackflow/react": ^1
"@types/react": ">=16.8.0"
react: ">=16.8.0"
languageName: unknown
Expand Down Expand Up @@ -2111,8 +2125,8 @@ __metadata:
ts-pattern: ^4.0.5
typescript: ^4.7.4
peerDependencies:
"@stackflow/core": ^1.0.10
"@stackflow/react": ^1.1.7
"@stackflow/core": ^1
"@stackflow/react": ^1
"@types/react": ">=16.8.0"
react: ">=16.8.0"
languageName: unknown
Expand Down Expand Up @@ -2141,7 +2155,7 @@ __metadata:
rimraf: ^3.0.2
typescript: ^4.7.4
peerDependencies:
"@stackflow/core": ^1.0.10
"@stackflow/core": ^1
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -2171,8 +2185,8 @@ __metadata:
rimraf: ^3.0.2
typescript: ^4.7.4
peerDependencies:
"@stackflow/core": ^1.0.10
"@stackflow/react": ^1.1.7
"@stackflow/core": ^1
"@stackflow/react": ^1
"@types/react": ">=16.8.0"
react: ">=16.8.0"
languageName: unknown
Expand Down Expand Up @@ -2210,8 +2224,8 @@ __metadata:
typescript: ^4.7.4
url-pattern: ^1.0.3
peerDependencies:
"@stackflow/core": ^1.0.10
"@stackflow/react": ^1.1.7
"@stackflow/core": ^1
"@stackflow/react": ^1
"@types/react": ">=16.8.0"
react: ">=16.8.0"
languageName: unknown
Expand All @@ -2237,8 +2251,8 @@ __metadata:
rimraf: ^3.0.2
typescript: ^4.7.4
peerDependencies:
"@stackflow/core": ^1.0.10
"@stackflow/react": ^1.1.7
"@stackflow/core": ^1
"@stackflow/react": ^1
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -2268,8 +2282,8 @@ __metadata:
rimraf: ^3.0.2
typescript: ^4.7.4
peerDependencies:
"@stackflow/core": ^1.0.10
"@stackflow/react": ^1.1.7
"@stackflow/core": ^1
"@stackflow/react": ^1
"@types/react": ">=16.8.0"
react: ">=16.8.0"
languageName: unknown
Expand Down Expand Up @@ -2300,8 +2314,8 @@ __metadata:
rimraf: ^3.0.2
typescript: ^4.7.4
peerDependencies:
"@stackflow/core": ^1.0.10
"@stackflow/react": ^1.1.7
"@stackflow/core": ^1
"@stackflow/react": ^1
"@types/react": ">=16.8.0"
react: ">=16.8.0"
languageName: unknown
Expand Down Expand Up @@ -2332,8 +2346,8 @@ __metadata:
rimraf: ^3.0.2
typescript: ^4.7.4
peerDependencies:
"@stackflow/core": ^1.0.10
"@stackflow/react": ^1.1.7
"@stackflow/core": ^1
"@stackflow/react": ^1
"@types/react": ">=16.8.0"
react: ">=16.8.0"
languageName: unknown
Expand Down Expand Up @@ -2362,7 +2376,7 @@ __metadata:
rimraf: ^3.0.2
typescript: ^4.7.4
peerDependencies:
"@stackflow/core": ^1.0.10
"@stackflow/core": ^1
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -2391,7 +2405,7 @@ __metadata:
rimraf: ^3.0.2
typescript: ^4.7.4
peerDependencies:
"@stackflow/core": ^1.0.10
"@stackflow/core": ^1
"@types/react": ">=16.8.0"
react: ">=16.8.0"
languageName: unknown
Expand Down

0 comments on commit 6a3afe7

Please sign in to comment.