rman 2.43.1 → 2.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.
|
|
1
|
+
export const version = '2.44.0';
|
|
@@ -118,6 +118,8 @@ export declare abstract class VersionScheme {
|
|
|
118
118
|
export declare class SemverScheme extends VersionScheme {
|
|
119
119
|
readonly name = "semver";
|
|
120
120
|
readonly bumpNames: readonly ["patch", "minor", "major"];
|
|
121
|
+
/** The counter a new prerelease line starts at: `1.0.0-beta.1`, then `beta.2`. `semver.inc` takes only `0` or `1`. */
|
|
122
|
+
protected readonly firstPrerelease: '0' | '1';
|
|
121
123
|
bumpFor(kind: ChangeKind): string;
|
|
122
124
|
isValid(version: string): boolean;
|
|
123
125
|
compare(a: string, b: string): number;
|
|
@@ -96,6 +96,11 @@ export class VersionScheme {
|
|
|
96
96
|
export class SemverScheme extends VersionScheme {
|
|
97
97
|
name = 'semver';
|
|
98
98
|
bumpNames = ['patch', 'minor', 'major'];
|
|
99
|
+
/** The counter a new prerelease line starts at: `1.0.0-beta.1`, then `beta.2`. `semver.inc` takes only `0` or `1`. */
|
|
100
|
+
/* **1, not semver's 0** - the user's choice (2026-11-24): the first beta is "beta 1". npm's own
|
|
101
|
+
* `npm version premajor --preid beta`, changesets and lerna start at `.0`, so this is a deliberate
|
|
102
|
+
* departure. An existing line keeps counting from wherever it is (`beta.0` -> `beta.1`). */
|
|
103
|
+
firstPrerelease = '1';
|
|
99
104
|
bumpFor(kind) {
|
|
100
105
|
switch (kind) {
|
|
101
106
|
case 'breaking':
|
|
@@ -132,14 +137,14 @@ export class SemverScheme extends VersionScheme {
|
|
|
132
137
|
return semver.inc(current, 'prerelease', preid) ?? current;
|
|
133
138
|
/**
|
|
134
139
|
* **A prerelease moving to another identifier keeps its version when that version already
|
|
135
|
-
* holds the change** - `2.19.0-alpha.1` -> `2.19.0-beta.
|
|
140
|
+
* holds the change** - `2.19.0-alpha.1` -> `2.19.0-beta.1` for a fix or a feature, since
|
|
136
141
|
* `2.19.0` is a minor's target already. It moves on only when the change needs more than the
|
|
137
|
-
* target gives: a breaking change on `2.19.0-alpha.1` is `3.0.0-beta.
|
|
142
|
+
* target gives: a breaking change on `2.19.0-alpha.1` is `3.0.0-beta.1`.
|
|
138
143
|
*/
|
|
139
144
|
if (existing && this.coversBump(current, bump)) {
|
|
140
|
-
return `${semver.major(current)}.${semver.minor(current)}.${semver.patch(current)}-${preid}.
|
|
145
|
+
return `${semver.major(current)}.${semver.minor(current)}.${semver.patch(current)}-${preid}.${this.firstPrerelease}`;
|
|
141
146
|
}
|
|
142
|
-
return semver.inc(current, `pre${releaseType}`, preid) ?? current;
|
|
147
|
+
return semver.inc(current, `pre${releaseType}`, preid, this.firstPrerelease) ?? current;
|
|
143
148
|
}
|
|
144
149
|
isPrerelease(version) {
|
|
145
150
|
return !!semver.prerelease(version);
|