mirror of
https://code.forgejo.org/actions/setup-node.git
synced 2024-11-22 07:11:01 -05:00
Switch warning to info logging
This commit is contained in:
parent
bcdcde00c0
commit
36d2ce149e
3 changed files with 8 additions and 8 deletions
|
@ -549,7 +549,7 @@ describe('setup-node', () => {
|
||||||
await main.run();
|
await main.run();
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(warningSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true')
|
expect(logSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true')
|
||||||
expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...');
|
expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...');
|
||||||
expect(dbgSpy).toHaveBeenCalledWith(`LTS alias 'erbium' for Node version 'lts/erbium'`)
|
expect(dbgSpy).toHaveBeenCalledWith(`LTS alias 'erbium' for Node version 'lts/erbium'`)
|
||||||
expect(dbgSpy).toHaveBeenCalledWith(`Found LTS release '12.16.2' for Node version 'lts/erbium'`)
|
expect(dbgSpy).toHaveBeenCalledWith(`Found LTS release '12.16.2' for Node version 'lts/erbium'`)
|
||||||
|
@ -577,7 +577,7 @@ describe('setup-node', () => {
|
||||||
await main.run();
|
await main.run();
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(warningSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true')
|
expect(logSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true')
|
||||||
expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...');
|
expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...');
|
||||||
expect(dbgSpy).toHaveBeenCalledWith(`LTS alias 'erbium' for Node version 'lts/erbium'`)
|
expect(dbgSpy).toHaveBeenCalledWith(`LTS alias 'erbium' for Node version 'lts/erbium'`)
|
||||||
expect(dbgSpy).toHaveBeenCalledWith(`Found LTS release '12.16.2' for Node version 'lts/erbium'`)
|
expect(dbgSpy).toHaveBeenCalledWith(`Found LTS release '12.16.2' for Node version 'lts/erbium'`)
|
||||||
|
@ -604,7 +604,7 @@ describe('setup-node', () => {
|
||||||
await main.run();
|
await main.run();
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(warningSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true')
|
expect(logSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true')
|
||||||
expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...');
|
expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...');
|
||||||
expect(dbgSpy).toHaveBeenCalledWith(`LTS alias '*' for Node version 'lts/*'`)
|
expect(dbgSpy).toHaveBeenCalledWith(`LTS alias '*' for Node version 'lts/*'`)
|
||||||
expect(dbgSpy).toHaveBeenCalledWith(`Found LTS release '14.0.0' for Node version 'lts/*'`)
|
expect(dbgSpy).toHaveBeenCalledWith(`Found LTS release '14.0.0' for Node version 'lts/*'`)
|
||||||
|
@ -632,7 +632,7 @@ describe('setup-node', () => {
|
||||||
await main.run();
|
await main.run();
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(warningSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true')
|
expect(logSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true')
|
||||||
expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...');
|
expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...');
|
||||||
expect(dbgSpy).toHaveBeenCalledWith(`LTS alias '*' for Node version 'lts/*'`)
|
expect(dbgSpy).toHaveBeenCalledWith(`LTS alias '*' for Node version 'lts/*'`)
|
||||||
expect(dbgSpy).toHaveBeenCalledWith(`Found LTS release '14.0.0' for Node version 'lts/*'`)
|
expect(dbgSpy).toHaveBeenCalledWith(`Found LTS release '14.0.0' for Node version 'lts/*'`)
|
||||||
|
@ -658,7 +658,7 @@ describe('setup-node', () => {
|
||||||
await main.run();
|
await main.run();
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(warningSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true')
|
expect(logSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true')
|
||||||
expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...');
|
expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...');
|
||||||
expect(logSpy).toHaveBeenCalledWith('Unable to resolve version from manifest...');
|
expect(logSpy).toHaveBeenCalledWith('Unable to resolve version from manifest...');
|
||||||
expect(dbgSpy).toHaveBeenCalledWith(`Unexpected LTS alias '' for Node version 'lts/'`)
|
expect(dbgSpy).toHaveBeenCalledWith(`Unexpected LTS alias '' for Node version 'lts/'`)
|
||||||
|
@ -680,7 +680,7 @@ describe('setup-node', () => {
|
||||||
await main.run();
|
await main.run();
|
||||||
|
|
||||||
// assert
|
// assert
|
||||||
expect(warningSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true')
|
expect(logSpy).toHaveBeenCalledWith('LTS version is provided. For LTS versions `check-latest` will be automatically set to true')
|
||||||
expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...');
|
expect(logSpy).toHaveBeenCalledWith('Attempt to resolve the latest version from manifest...');
|
||||||
expect(dbgSpy).toHaveBeenCalledWith(`LTS alias 'unknown' for Node version 'lts/unknown'`)
|
expect(dbgSpy).toHaveBeenCalledWith(`LTS alias 'unknown' for Node version 'lts/unknown'`)
|
||||||
expect(logSpy).toHaveBeenCalledWith('Unable to resolve version from manifest...');
|
expect(logSpy).toHaveBeenCalledWith('Unable to resolve version from manifest...');
|
||||||
|
|
2
dist/index.js
vendored
2
dist/index.js
vendored
|
@ -13108,7 +13108,7 @@ function getNode(versionSpec, stable, checkLatest, auth, arch = os.arch()) {
|
||||||
let osPlat = os.platform();
|
let osPlat = os.platform();
|
||||||
let osArch = translateArchToDistUrl(arch);
|
let osArch = translateArchToDistUrl(arch);
|
||||||
if (isLtsVersion(versionSpec)) {
|
if (isLtsVersion(versionSpec)) {
|
||||||
core.warning('LTS version is provided. For LTS versions `check-latest` will be automatically set to true');
|
core.info('LTS version is provided. For LTS versions `check-latest` will be automatically set to true');
|
||||||
checkLatest = true;
|
checkLatest = true;
|
||||||
}
|
}
|
||||||
if (checkLatest) {
|
if (checkLatest) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ export async function getNode(
|
||||||
let osArch: string = translateArchToDistUrl(arch);
|
let osArch: string = translateArchToDistUrl(arch);
|
||||||
|
|
||||||
if (isLtsVersion(versionSpec)) {
|
if (isLtsVersion(versionSpec)) {
|
||||||
core.warning('LTS version is provided. For LTS versions `check-latest` will be automatically set to true');
|
core.info('LTS version is provided. For LTS versions `check-latest` will be automatically set to true');
|
||||||
checkLatest = true;
|
checkLatest = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue