diff --git a/.changeset/config.json b/.changeset/config.json index 3bcb8b2ec..a99780262 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -10,5 +10,8 @@ "ignore": [], "snapshot": { "useCalculatedVersion": true + }, + "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { + "onlyUpdatePeerDependentsWhenOutOfRange": true } } diff --git a/.pnp.cjs b/.pnp.cjs index 363316ae5..95afc4b22 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -1005,10 +1005,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["@changesets/assemble-release-plan", [\ - ["npm:5.2.4", {\ - "packageLocation": "./.yarn/cache/@changesets-assemble-release-plan-npm-5.2.4-2920e4dc4c-32f443a0af.zip/node_modules/@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.", {\ + "packageLocation": "./.yarn/cache/@changesets-assemble-release-plan-patch-0a41f18778-ed5c70f90c.zip/node_modules/@changesets/assemble-release-plan/",\ "packageDependencies": [\ - ["@changesets/assemble-release-plan", "npm:5.2.4"],\ + ["@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."],\ ["@babel/runtime", "npm:7.23.4"],\ ["@changesets/errors", "npm:0.1.4"],\ ["@changesets/get-dependents-graph", "npm:1.3.6"],\ @@ -1036,7 +1036,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@changesets/cli", "npm:2.26.2"],\ ["@babel/runtime", "npm:7.23.4"],\ ["@changesets/apply-release-plan", "npm:6.1.4"],\ - ["@changesets/assemble-release-plan", "npm:5.2.4"],\ + ["@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."],\ ["@changesets/changelog-git", "npm:0.1.14"],\ ["@changesets/config", "npm:2.3.1"],\ ["@changesets/errors", "npm:0.1.4"],\ @@ -1117,7 +1117,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { "packageDependencies": [\ ["@changesets/get-release-plan", "npm:3.0.17"],\ ["@babel/runtime", "npm:7.23.4"],\ - ["@changesets/assemble-release-plan", "npm:5.2.4"],\ + ["@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."],\ ["@changesets/config", "npm:2.3.1"],\ ["@changesets/pre", "npm:1.0.14"],\ ["@changesets/read", "npm:0.5.9"],\ diff --git a/.yarn/cache/@changesets-assemble-release-plan-patch-0a41f18778-ed5c70f90c.zip b/.yarn/cache/@changesets-assemble-release-plan-patch-0a41f18778-ed5c70f90c.zip new file mode 100644 index 000000000..f3d453b56 Binary files /dev/null and b/.yarn/cache/@changesets-assemble-release-plan-patch-0a41f18778-ed5c70f90c.zip differ diff --git a/.yarn/patches/@changesets-assemble-release-plan-npm-5.2.4-2920e4dc4c.patch b/.yarn/patches/@changesets-assemble-release-plan-npm-5.2.4-2920e4dc4c.patch new file mode 100644 index 000000000..660bdb8c4 --- /dev/null +++ b/.yarn/patches/@changesets-assemble-release-plan-npm-5.2.4-2920e4dc4c.patch @@ -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"); + } + diff --git a/extensions/compat-await-push/package.json b/extensions/compat-await-push/package.json index 2efecb29a..2b053c50d 100644 --- a/extensions/compat-await-push/package.json +++ b/extensions/compat-await-push/package.json @@ -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" }, diff --git a/extensions/link/package.json b/extensions/link/package.json index c1a532e60..09140a509 100644 --- a/extensions/link/package.json +++ b/extensions/link/package.json @@ -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" }, diff --git a/extensions/plugin-basic-ui/package.json b/extensions/plugin-basic-ui/package.json index 5125f996f..343047b5a 100644 --- a/extensions/plugin-basic-ui/package.json +++ b/extensions/plugin-basic-ui/package.json @@ -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" }, diff --git a/extensions/plugin-devtools/package.json b/extensions/plugin-devtools/package.json index bf5d89dbb..65ae7fd84 100644 --- a/extensions/plugin-devtools/package.json +++ b/extensions/plugin-devtools/package.json @@ -45,7 +45,7 @@ "typescript": "^4.7.4" }, "peerDependencies": { - "@stackflow/core": "^1.0.10" + "@stackflow/core": "^1" }, "publishConfig": { "access": "public" diff --git a/extensions/plugin-google-analytics-4/package.json b/extensions/plugin-google-analytics-4/package.json index 81d60dbe3..57dc5791a 100644 --- a/extensions/plugin-google-analytics-4/package.json +++ b/extensions/plugin-google-analytics-4/package.json @@ -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" }, diff --git a/extensions/plugin-history-sync/package.json b/extensions/plugin-history-sync/package.json index b42257a95..843e1fe60 100644 --- a/extensions/plugin-history-sync/package.json +++ b/extensions/plugin-history-sync/package.json @@ -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" }, diff --git a/extensions/plugin-map-initial-activity/package.json b/extensions/plugin-map-initial-activity/package.json index af5d356b7..c21edc3b1 100644 --- a/extensions/plugin-map-initial-activity/package.json +++ b/extensions/plugin-map-initial-activity/package.json @@ -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" diff --git a/extensions/plugin-preload/package.json b/extensions/plugin-preload/package.json index c2ca792ee..1f11a147b 100644 --- a/extensions/plugin-preload/package.json +++ b/extensions/plugin-preload/package.json @@ -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" }, diff --git a/extensions/plugin-renderer-basic/package.json b/extensions/plugin-renderer-basic/package.json index 3b090f692..f43dbb742 100644 --- a/extensions/plugin-renderer-basic/package.json +++ b/extensions/plugin-renderer-basic/package.json @@ -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" }, diff --git a/extensions/plugin-renderer-web/package.json b/extensions/plugin-renderer-web/package.json index e1b70e196..8f749d3e3 100644 --- a/extensions/plugin-renderer-web/package.json +++ b/extensions/plugin-renderer-web/package.json @@ -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" }, diff --git a/extensions/plugin-stack-depth-change/package.json b/extensions/plugin-stack-depth-change/package.json index 4dda24961..8ca2d5847 100644 --- a/extensions/plugin-stack-depth-change/package.json +++ b/extensions/plugin-stack-depth-change/package.json @@ -46,7 +46,7 @@ "typescript": "^4.7.4" }, "peerDependencies": { - "@stackflow/core": "^1.0.10" + "@stackflow/core": "^1" }, "publishConfig": { "access": "public" diff --git a/integrations/react/package.json b/integrations/react/package.json index fffe7ad94..bea778ff3 100644 --- a/integrations/react/package.json +++ b/integrations/react/package.json @@ -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" }, diff --git a/package.json b/package.json index 2989c924e..b9e720b6c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/yarn.lock b/yarn.lock index 3944181c4..c1cf4f4d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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: @@ -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" @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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