mirror of
https://gitea.com/actions/setup-node.git
synced 2025-04-20 07:45:38 +08:00
minor polishing
This commit is contained in:
parent
15e57b56d6
commit
f3c48890ed
@ -309,7 +309,6 @@ describe('setup-node', () => {
|
|||||||
expect(logSpy).toHaveBeenCalledWith(
|
expect(logSpy).toHaveBeenCalledWith(
|
||||||
'Not found in manifest. Falling back to download directly from Node'
|
'Not found in manifest. Falling back to download directly from Node'
|
||||||
);
|
);
|
||||||
expect(logSpy).toHaveBeenCalledWith('came here undefined');
|
|
||||||
expect(dlSpy).toHaveBeenCalled();
|
expect(dlSpy).toHaveBeenCalled();
|
||||||
expect(exSpy).toHaveBeenCalled();
|
expect(exSpy).toHaveBeenCalled();
|
||||||
expect(cnSpy).toHaveBeenCalledWith(`::add-path::${expPath}${osm.EOL}`);
|
expect(cnSpy).toHaveBeenCalledWith(`::add-path::${expPath}${osm.EOL}`);
|
||||||
|
6
dist/setup/index.js
vendored
6
dist/setup/index.js
vendored
@ -73431,7 +73431,7 @@ var Distributions;
|
|||||||
Distributions["RC"] = "rc";
|
Distributions["RC"] = "rc";
|
||||||
})(Distributions || (Distributions = {}));
|
})(Distributions || (Distributions = {}));
|
||||||
function identifyDistribution(versionSpec) {
|
function identifyDistribution(versionSpec) {
|
||||||
let distribution = '';
|
let distribution = Distributions.DEFAULT;
|
||||||
if (versionSpec.includes(Distributions.NIGHTLY)) {
|
if (versionSpec.includes(Distributions.NIGHTLY)) {
|
||||||
distribution = Distributions.NIGHTLY;
|
distribution = Distributions.NIGHTLY;
|
||||||
}
|
}
|
||||||
@ -73441,9 +73441,6 @@ function identifyDistribution(versionSpec) {
|
|||||||
else if (versionSpec.includes(Distributions.RC)) {
|
else if (versionSpec.includes(Distributions.RC)) {
|
||||||
distribution = Distributions.RC;
|
distribution = Distributions.RC;
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
distribution = Distributions.DEFAULT;
|
|
||||||
}
|
|
||||||
return distribution;
|
return distribution;
|
||||||
}
|
}
|
||||||
function getNodejsDistribution(installerOptions) {
|
function getNodejsDistribution(installerOptions) {
|
||||||
@ -73651,7 +73648,6 @@ class OfficialBuilds extends base_distribution_1.default {
|
|||||||
}
|
}
|
||||||
if (!toolPath) {
|
if (!toolPath) {
|
||||||
const nodeVersions = yield this.getNodejsVersions();
|
const nodeVersions = yield this.getNodejsVersions();
|
||||||
core.info('came here undefined');
|
|
||||||
const versions = this.filterVersions(nodeVersions);
|
const versions = this.filterVersions(nodeVersions);
|
||||||
const evaluatedVersion = this.evaluateVersions(versions);
|
const evaluatedVersion = this.evaluateVersions(versions);
|
||||||
if (!evaluatedVersion) {
|
if (!evaluatedVersion) {
|
||||||
|
@ -13,15 +13,13 @@ enum Distributions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function identifyDistribution(versionSpec: string) {
|
function identifyDistribution(versionSpec: string) {
|
||||||
let distribution = '';
|
let distribution = Distributions.DEFAULT;
|
||||||
if (versionSpec.includes(Distributions.NIGHTLY)) {
|
if (versionSpec.includes(Distributions.NIGHTLY)) {
|
||||||
distribution = Distributions.NIGHTLY;
|
distribution = Distributions.NIGHTLY;
|
||||||
} else if (versionSpec.includes(Distributions.CANARY)) {
|
} else if (versionSpec.includes(Distributions.CANARY)) {
|
||||||
distribution = Distributions.CANARY;
|
distribution = Distributions.CANARY;
|
||||||
} else if (versionSpec.includes(Distributions.RC)) {
|
} else if (versionSpec.includes(Distributions.RC)) {
|
||||||
distribution = Distributions.RC;
|
distribution = Distributions.RC;
|
||||||
} else {
|
|
||||||
distribution = Distributions.DEFAULT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return distribution;
|
return distribution;
|
||||||
|
@ -4,7 +4,7 @@ import * as tc from '@actions/tool-cache';
|
|||||||
import semver from 'semver';
|
import semver from 'semver';
|
||||||
|
|
||||||
import BaseDistribution from '../base-distribution';
|
import BaseDistribution from '../base-distribution';
|
||||||
import {INodejs, INodeVersion} from '../base-models';
|
import {INodejs} from '../base-models';
|
||||||
|
|
||||||
export default class NightlyNodejs extends BaseDistribution {
|
export default class NightlyNodejs extends BaseDistribution {
|
||||||
constructor(nodeInfo: INodejs) {
|
constructor(nodeInfo: INodejs) {
|
||||||
|
@ -108,7 +108,6 @@ export default class OfficialBuilds extends BaseDistribution {
|
|||||||
|
|
||||||
if (!toolPath) {
|
if (!toolPath) {
|
||||||
const nodeVersions = await this.getNodejsVersions();
|
const nodeVersions = await this.getNodejsVersions();
|
||||||
core.info('came here undefined');
|
|
||||||
const versions = this.filterVersions(nodeVersions);
|
const versions = this.filterVersions(nodeVersions);
|
||||||
const evaluatedVersion = this.evaluateVersions(versions);
|
const evaluatedVersion = this.evaluateVersions(versions);
|
||||||
if (!evaluatedVersion) {
|
if (!evaluatedVersion) {
|
||||||
|
@ -3,7 +3,7 @@ import * as core from '@actions/core';
|
|||||||
import * as semver from 'semver';
|
import * as semver from 'semver';
|
||||||
|
|
||||||
import BaseDistribution from '../../base-distribution';
|
import BaseDistribution from '../../base-distribution';
|
||||||
import {INodejs, INodeVersion} from '../../base-models';
|
import {INodejs} from '../../base-models';
|
||||||
|
|
||||||
export default class RcBuild extends BaseDistribution {
|
export default class RcBuild extends BaseDistribution {
|
||||||
constructor(nodeInfo: INodejs) {
|
constructor(nodeInfo: INodejs) {
|
||||||
|
@ -4,7 +4,7 @@ import * as tc from '@actions/tool-cache';
|
|||||||
import semver from 'semver';
|
import semver from 'semver';
|
||||||
|
|
||||||
import BaseDistribution from '../base-distribution';
|
import BaseDistribution from '../base-distribution';
|
||||||
import {INodejs, INodeVersion} from '../base-models';
|
import {INodejs} from '../base-models';
|
||||||
|
|
||||||
export default class CanaryBuild extends BaseDistribution {
|
export default class CanaryBuild extends BaseDistribution {
|
||||||
constructor(nodeInfo: INodejs) {
|
constructor(nodeInfo: INodejs) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user