rman 2.25.1 → 2.25.2
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.
|
@@ -37,6 +37,12 @@ export declare class NodeDependencyUpdater implements DependencyUpdater {
|
|
|
37
37
|
/** Fills in what `d` may move to, from its own settings and the rules that do not depend on what
|
|
38
38
|
* else moves (steps 1-3). */
|
|
39
39
|
protected prepare(d: NodeDependencyUpdater.Decision, info: NpmReleases | undefined): void;
|
|
40
|
+
/**
|
|
41
|
+
* The first range of a dependency rman does not move - a pinned `11.7.5`, a `>=2 <3` - that the
|
|
42
|
+
* registry's newest offerable release falls outside, and that release. `undefined` when every
|
|
43
|
+
* such range still takes it, which is nothing worth a row.
|
|
44
|
+
*/
|
|
45
|
+
protected outgrown(d: NodeDependencyUpdater.Decision, releases: readonly NpmRelease[]): NodeDependencyUpdater.Decision['unmovable'];
|
|
40
46
|
/** Whether the registry offers `release` as a move at all: newer than what is declared, not
|
|
41
47
|
* deprecated, not above the `latest` tag, and not a prerelease unless the range is on one. */
|
|
42
48
|
protected offerable(d: NodeDependencyUpdater.Decision, release: NpmRelease): boolean;
|
|
@@ -98,6 +104,16 @@ export declare namespace NodeDependencyUpdater {
|
|
|
98
104
|
fields: Map<string, string>;
|
|
99
105
|
/** The fields whose range is rewritten. */
|
|
100
106
|
movable: string[];
|
|
107
|
+
/** The fields holding a valid range rman does not rewrite - a pinned version, `>=a <b`. */
|
|
108
|
+
fixed: string[];
|
|
109
|
+
/** Not planned, but listed when a release falls outside a `fixed` range - see `outgrown`. */
|
|
110
|
+
listed?: boolean;
|
|
111
|
+
/** That release, and the range it falls outside. */
|
|
112
|
+
unmovable?: {
|
|
113
|
+
field: string;
|
|
114
|
+
range: string;
|
|
115
|
+
version: string;
|
|
116
|
+
};
|
|
101
117
|
/** Whether this name is planned at all - rather than only stating rules for the others. */
|
|
102
118
|
wanted: boolean;
|
|
103
119
|
/** What is declared now, as a version: the highest floor among the movable ranges. */
|
|
@@ -64,7 +64,7 @@ export class NodeDependencyUpdater {
|
|
|
64
64
|
for (const d of decisions)
|
|
65
65
|
this.prepare(d, registry.get(d.name));
|
|
66
66
|
this.resolve(decisions, ctx);
|
|
67
|
-
return decisions.filter(d => d.wanted).map(d => this.toEntry(d));
|
|
67
|
+
return decisions.filter(d => d.wanted || d.unmovable).map(d => this.toEntry(d));
|
|
68
68
|
}
|
|
69
69
|
async applyPlan(ctx, plan) {
|
|
70
70
|
const originals = new Map();
|
|
@@ -142,6 +142,7 @@ export class NodeDependencyUpdater {
|
|
|
142
142
|
settings,
|
|
143
143
|
fields: new Map(),
|
|
144
144
|
movable: [],
|
|
145
|
+
fixed: [],
|
|
145
146
|
wanted: false,
|
|
146
147
|
allowed: [],
|
|
147
148
|
candidates: [],
|
|
@@ -150,14 +151,19 @@ export class NodeDependencyUpdater {
|
|
|
150
151
|
byName.set(name, d);
|
|
151
152
|
}
|
|
152
153
|
d.fields.set(field, range);
|
|
153
|
-
if (
|
|
154
|
+
if (kinds && !kinds.includes(field))
|
|
155
|
+
continue;
|
|
156
|
+
if (this.movablePattern.test(range))
|
|
154
157
|
d.movable.push(field);
|
|
158
|
+
else if (semver.validRange(range))
|
|
159
|
+
d.fixed.push(field);
|
|
155
160
|
}
|
|
156
161
|
}
|
|
157
162
|
for (const d of byName.values()) {
|
|
158
163
|
const picked = !options.names?.length || micromatch.isMatch(d.name, options.names);
|
|
159
164
|
const rejected = settings.reject.length > 0 && micromatch.isMatch(d.name, settings.reject);
|
|
160
165
|
d.wanted = d.movable.length > 0 && picked && !rejected;
|
|
166
|
+
d.listed = !d.wanted && d.fixed.length > 0 && picked && !rejected;
|
|
161
167
|
if (d.wanted) {
|
|
162
168
|
d.floor = d.movable.map(f => semver.minVersion(d.fields.get(f)).version).sort(semver.rcompare)[0];
|
|
163
169
|
}
|
|
@@ -196,6 +202,8 @@ export class NodeDependencyUpdater {
|
|
|
196
202
|
prepare(d, info) {
|
|
197
203
|
d.releases = new Map((info?.releases ?? []).map(r => [r.version, r]));
|
|
198
204
|
d.latestTag = info?.latest;
|
|
205
|
+
if (d.listed && info)
|
|
206
|
+
d.unmovable = this.outgrown(d, info.releases);
|
|
199
207
|
if (!d.wanted)
|
|
200
208
|
return;
|
|
201
209
|
if (!info) {
|
|
@@ -220,6 +228,30 @@ export class NodeDependencyUpdater {
|
|
|
220
228
|
}
|
|
221
229
|
d.index = d.candidates.length ? 0 : -1;
|
|
222
230
|
}
|
|
231
|
+
/**
|
|
232
|
+
* The first range of a dependency rman does not move - a pinned `11.7.5`, a `>=2 <3` - that the
|
|
233
|
+
* registry's newest offerable release falls outside, and that release. `undefined` when every
|
|
234
|
+
* such range still takes it, which is nothing worth a row.
|
|
235
|
+
*/
|
|
236
|
+
/* **Listed, never moved.** Only a `^` or `~` range on a plain version is rewritten, since anything
|
|
237
|
+
* else was written that way on purpose. But leaving such a dependency out of the table entirely
|
|
238
|
+
* hid it: measured on `panates/hl7v2`, `"mocha": "11.7.5"` with 12.x out appeared nowhere, and a
|
|
239
|
+
* person reading the table took that for "up to date". A `skipped` row says what is there and why
|
|
240
|
+
* it stays. */
|
|
241
|
+
outgrown(d, releases) {
|
|
242
|
+
for (const field of d.fixed) {
|
|
243
|
+
const range = d.fields.get(field);
|
|
244
|
+
const newest = releases
|
|
245
|
+
.map(r => semver.parse(r.version))
|
|
246
|
+
.filter((v) => !!v && !v.prerelease.length)
|
|
247
|
+
.filter(v => !releases.find(r => r.version === v.version)?.deprecated)
|
|
248
|
+
.filter(v => !d.latestTag || !semver.valid(d.latestTag) || semver.lte(v, d.latestTag))
|
|
249
|
+
.sort(semver.rcompare)[0];
|
|
250
|
+
if (newest && !semver.satisfies(newest, range))
|
|
251
|
+
return { field, range, version: newest.version };
|
|
252
|
+
}
|
|
253
|
+
return undefined;
|
|
254
|
+
}
|
|
223
255
|
/** Whether the registry offers `release` as a move at all: newer than what is declared, not
|
|
224
256
|
* deprecated, not above the `latest` tag, and not a prerelease unless the range is on one. */
|
|
225
257
|
offerable(d, release) {
|
|
@@ -431,6 +463,19 @@ export class NodeDependencyUpdater {
|
|
|
431
463
|
return [...result];
|
|
432
464
|
}
|
|
433
465
|
toEntry(d) {
|
|
466
|
+
if (!d.wanted && d.unmovable) {
|
|
467
|
+
const { field, range, version } = d.unmovable;
|
|
468
|
+
return {
|
|
469
|
+
package: d.pkg,
|
|
470
|
+
name: d.name,
|
|
471
|
+
types: [field],
|
|
472
|
+
current: range,
|
|
473
|
+
status: 'skipped',
|
|
474
|
+
latest: version,
|
|
475
|
+
available: version,
|
|
476
|
+
reason: 'not a ^ or ~ range - rman moves only those',
|
|
477
|
+
};
|
|
478
|
+
}
|
|
434
479
|
const entry = {
|
|
435
480
|
package: d.pkg,
|
|
436
481
|
name: d.name,
|
package/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = '2.25.
|
|
1
|
+
export const version = '2.25.2';
|