mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2025-06-15 08:21:12 +00:00
Don't reverse the manifest
This commit is contained in:
parent
c4f9da006e
commit
e8fa6b0ff5
4 changed files with 195 additions and 171 deletions
5
dist/setup/index.js
vendored
5
dist/setup/index.js
vendored
|
@ -70626,8 +70626,6 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
|
|||
core.info('Attempt to resolve LTS alias from manifest...');
|
||||
// No try-catch since it's not possible to resolve LTS alias without manifest
|
||||
manifest = yield getManifest(auth);
|
||||
// Reverse it so later Object.fromEntries() gets the latest version of each LTS
|
||||
manifest.reverse();
|
||||
versionSpec = resolveLtsAliasFromManifest(versionSpec, stable, manifest);
|
||||
}
|
||||
if (isLatestSyntax(versionSpec)) {
|
||||
|
@ -70762,7 +70760,8 @@ function resolveLtsAliasFromManifest(versionSpec, stable, manifest) {
|
|||
const n = Number(alias);
|
||||
const aliases = Object.fromEntries(manifest
|
||||
.filter(x => x.lts && x.stable === stable)
|
||||
.map(x => [x.lts.toLowerCase(), x]));
|
||||
.map(x => [x.lts.toLowerCase(), x])
|
||||
.reverse());
|
||||
const numbered = Object.values(aliases);
|
||||
const release = alias === '*'
|
||||
? numbered[numbered.length - 1]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue