-
-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #497 from adopted-ember-addons/pre-release
have release-plan do a prerelease from main
- Loading branch information
Showing
4 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,7 +89,7 @@ | |
"prettier": "^2.3.2", | ||
"qunit": "^2.16.0", | ||
"qunit-dom": "^1.6.0", | ||
"release-plan": "^0.9.0" | ||
"release-plan": "^0.10.0" | ||
}, | ||
"peerDependencies": { | ||
"active-model-adapter": "*", | ||
|
@@ -119,5 +119,17 @@ | |
}, | ||
"ember-addon": { | ||
"configPath": "tests/dummy/config" | ||
}, | ||
"release-plan": { | ||
"semverIncrementAs": { | ||
"major": "prerelease", | ||
"minor": "prerelease", | ||
"patch": "prerelease" | ||
} | ||
}, | ||
"pnpm": { | ||
"patchedDependencies": { | ||
"[email protected]": "patches/[email protected]" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
diff --git a/dist/plan.js b/dist/plan.js | ||
index 3e1641cb2cca0ec94e310b5b25bb98b78001c3cf..0e6de599b02eb66f7102d1d58802c298a9c9008a 100644 | ||
--- a/dist/plan.js | ||
+++ b/dist/plan.js | ||
@@ -39,7 +39,10 @@ class Plan { | ||
solution.set(pkgName, { impact: undefined, oldVersion: entry.version }); | ||
} | ||
else { | ||
- const newVersion = inc(entry.version, impact); | ||
+ const newVersion = inc( | ||
+ entry.version, | ||
+ this.#configureImpact(pkgName, impact), | ||
+ ); | ||
solution.set(pkgName, { | ||
impact, | ||
oldVersion: entry.version, | ||
@@ -51,6 +54,18 @@ class Plan { | ||
} | ||
return solution; | ||
} | ||
+ | ||
+ #configureImpact(pkgName, impact) { | ||
+ const packageJson = this.#pkgs.get(pkgName)?.pkg; | ||
+ if (packageJson && packageJson['release-plan']?.semverIncrementAs) { | ||
+ const semverOverrides = packageJson['release-plan'].semverIncrementAs; | ||
+ if (semverOverrides[impact]) { | ||
+ return semverOverrides[impact]; | ||
+ } | ||
+ } | ||
+ return impact; | ||
+ } | ||
+ | ||
#expandWorkspaceRange(range, availableVersion) { | ||
// this implements PNPM's rules for how workspace: protocol dependencies get | ||
// expanded into proper semver ranges. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.