mirror of
https://github.com/actions/setup-node.git
synced 2025-04-22 03:28:42 +00:00
minor polishing
This commit is contained in:
parent
15e57b56d6
commit
f3c48890ed
7 changed files with 5 additions and 13 deletions
|
@ -309,7 +309,6 @@ describe('setup-node', () => {
|
|||
expect(logSpy).toHaveBeenCalledWith(
|
||||
'Not found in manifest. Falling back to download directly from Node'
|
||||
);
|
||||
expect(logSpy).toHaveBeenCalledWith('came here undefined');
|
||||
expect(dlSpy).toHaveBeenCalled();
|
||||
expect(exSpy).toHaveBeenCalled();
|
||||
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 || (Distributions = {}));
|
||||
function identifyDistribution(versionSpec) {
|
||||
let distribution = '';
|
||||
let distribution = Distributions.DEFAULT;
|
||||
if (versionSpec.includes(Distributions.NIGHTLY)) {
|
||||
distribution = Distributions.NIGHTLY;
|
||||
}
|
||||
|
@ -73441,9 +73441,6 @@ function identifyDistribution(versionSpec) {
|
|||
else if (versionSpec.includes(Distributions.RC)) {
|
||||
distribution = Distributions.RC;
|
||||
}
|
||||
else {
|
||||
distribution = Distributions.DEFAULT;
|
||||
}
|
||||
return distribution;
|
||||
}
|
||||
function getNodejsDistribution(installerOptions) {
|
||||
|
@ -73651,7 +73648,6 @@ class OfficialBuilds extends base_distribution_1.default {
|
|||
}
|
||||
if (!toolPath) {
|
||||
const nodeVersions = yield this.getNodejsVersions();
|
||||
core.info('came here undefined');
|
||||
const versions = this.filterVersions(nodeVersions);
|
||||
const evaluatedVersion = this.evaluateVersions(versions);
|
||||
if (!evaluatedVersion) {
|
||||
|
|
|
@ -13,15 +13,13 @@ enum Distributions {
|
|||
}
|
||||
|
||||
function identifyDistribution(versionSpec: string) {
|
||||
let distribution = '';
|
||||
let distribution = Distributions.DEFAULT;
|
||||
if (versionSpec.includes(Distributions.NIGHTLY)) {
|
||||
distribution = Distributions.NIGHTLY;
|
||||
} else if (versionSpec.includes(Distributions.CANARY)) {
|
||||
distribution = Distributions.CANARY;
|
||||
} else if (versionSpec.includes(Distributions.RC)) {
|
||||
distribution = Distributions.RC;
|
||||
} else {
|
||||
distribution = Distributions.DEFAULT;
|
||||
}
|
||||
|
||||
return distribution;
|
||||
|
|
|
@ -4,7 +4,7 @@ import * as tc from '@actions/tool-cache';
|
|||
import semver from 'semver';
|
||||
|
||||
import BaseDistribution from '../base-distribution';
|
||||
import {INodejs, INodeVersion} from '../base-models';
|
||||
import {INodejs} from '../base-models';
|
||||
|
||||
export default class NightlyNodejs extends BaseDistribution {
|
||||
constructor(nodeInfo: INodejs) {
|
||||
|
|
|
@ -108,7 +108,6 @@ export default class OfficialBuilds extends BaseDistribution {
|
|||
|
||||
if (!toolPath) {
|
||||
const nodeVersions = await this.getNodejsVersions();
|
||||
core.info('came here undefined');
|
||||
const versions = this.filterVersions(nodeVersions);
|
||||
const evaluatedVersion = this.evaluateVersions(versions);
|
||||
if (!evaluatedVersion) {
|
||||
|
|
|
@ -3,7 +3,7 @@ import * as core from '@actions/core';
|
|||
import * as semver from 'semver';
|
||||
|
||||
import BaseDistribution from '../../base-distribution';
|
||||
import {INodejs, INodeVersion} from '../../base-models';
|
||||
import {INodejs} from '../../base-models';
|
||||
|
||||
export default class RcBuild extends BaseDistribution {
|
||||
constructor(nodeInfo: INodejs) {
|
||||
|
|
|
@ -4,7 +4,7 @@ import * as tc from '@actions/tool-cache';
|
|||
import semver from 'semver';
|
||||
|
||||
import BaseDistribution from '../base-distribution';
|
||||
import {INodejs, INodeVersion} from '../base-models';
|
||||
import {INodejs} from '../base-models';
|
||||
|
||||
export default class CanaryBuild extends BaseDistribution {
|
||||
constructor(nodeInfo: INodejs) {
|
||||
|
|
Loading…
Add table
Reference in a new issue