mirror of
https://github.com/actions/setup-node.git
synced 2026-03-01 06:41:05 +08:00
Merge ead69d56d0 into c882bffdbd
This commit is contained in:
commit
553d8ef2a4
@ -135,10 +135,11 @@ describe('main tests', () => {
|
|||||||
|
|
||||||
describe('printEnvDetailsAndSetOutput', () => {
|
describe('printEnvDetailsAndSetOutput', () => {
|
||||||
it.each([
|
it.each([
|
||||||
[{node: '12.0.2', npm: '6.3.3', yarn: '1.22.11'}],
|
[{node: '12.0.2', npm: '6.3.3', yarn: '1.22.11', pnpm: ''}],
|
||||||
[{node: '16.0.2', npm: '7.3.3', yarn: '2.22.11'}],
|
[{node: '16.0.2', npm: '7.3.3', yarn: '2.22.11', pnpm: ''}],
|
||||||
[{node: '14.0.1', npm: '8.1.0', yarn: '3.2.1'}],
|
[{node: '14.0.1', npm: '8.1.0', yarn: '3.2.1', pnpm: ''}],
|
||||||
[{node: '17.0.2', npm: '6.3.3', yarn: ''}]
|
[{node: '17.0.2', npm: '6.3.3', yarn: '', pnpm: ''}],
|
||||||
|
[{node: '24.10.0', npm: '11.6.1', yarn: '', pnpm: '10.18.3'}]
|
||||||
])('Tools versions %p', async obj => {
|
])('Tools versions %p', async obj => {
|
||||||
getExecOutputSpy.mockImplementation(async command => {
|
getExecOutputSpy.mockImplementation(async command => {
|
||||||
if (Reflect.has(obj, command) && !obj[command]) {
|
if (Reflect.has(obj, command) && !obj[command]) {
|
||||||
|
|||||||
2
dist/cache-save/index.js
vendored
2
dist/cache-save/index.js
vendored
@ -71918,7 +71918,7 @@ function getNodeVersionFromFile(versionFilePath) {
|
|||||||
}
|
}
|
||||||
async function printEnvDetailsAndSetOutput() {
|
async function printEnvDetailsAndSetOutput() {
|
||||||
core.startGroup('Environment details');
|
core.startGroup('Environment details');
|
||||||
const promises = ['node', 'npm', 'yarn'].map(async (tool) => {
|
const promises = ['node', 'npm', 'yarn', 'pnpm'].map(async (tool) => {
|
||||||
const pathTool = await io.which(tool, false);
|
const pathTool = await io.which(tool, false);
|
||||||
const output = pathTool ? await getToolVersion(tool, ['--version']) : '';
|
const output = pathTool ? await getToolVersion(tool, ['--version']) : '';
|
||||||
return { tool, output };
|
return { tool, output };
|
||||||
|
|||||||
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
@ -82455,7 +82455,7 @@ function getNodeVersionFromFile(versionFilePath) {
|
|||||||
}
|
}
|
||||||
async function printEnvDetailsAndSetOutput() {
|
async function printEnvDetailsAndSetOutput() {
|
||||||
core.startGroup('Environment details');
|
core.startGroup('Environment details');
|
||||||
const promises = ['node', 'npm', 'yarn'].map(async (tool) => {
|
const promises = ['node', 'npm', 'yarn', 'pnpm'].map(async (tool) => {
|
||||||
const pathTool = await io.which(tool, false);
|
const pathTool = await io.which(tool, false);
|
||||||
const output = pathTool ? await getToolVersion(tool, ['--version']) : '';
|
const output = pathTool ? await getToolVersion(tool, ['--version']) : '';
|
||||||
return { tool, output };
|
return { tool, output };
|
||||||
|
|||||||
@ -74,7 +74,7 @@ export function getNodeVersionFromFile(versionFilePath: string): string | null {
|
|||||||
|
|
||||||
export async function printEnvDetailsAndSetOutput() {
|
export async function printEnvDetailsAndSetOutput() {
|
||||||
core.startGroup('Environment details');
|
core.startGroup('Environment details');
|
||||||
const promises = ['node', 'npm', 'yarn'].map(async tool => {
|
const promises = ['node', 'npm', 'yarn', 'pnpm'].map(async tool => {
|
||||||
const pathTool = await io.which(tool, false);
|
const pathTool = await io.which(tool, false);
|
||||||
const output = pathTool ? await getToolVersion(tool, ['--version']) : '';
|
const output = pathTool ? await getToolVersion(tool, ['--version']) : '';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user