Compare commits

...

5 Commits

Author SHA1 Message Date
Marina Skripnik
b4cdfa017c
Merge ead69d56d0 into efcb663fc6 2026-02-20 10:11:40 -03:00
Marco Ippolito
efcb663fc6
fix: remove hardcoded bearer (#1467) 2026-02-19 11:58:14 -06:00
Maryna S
ead69d56d0 Update dist files 2026-02-02 21:52:57 +02:00
Maryna S
43959a440a Resolve merge conflicts 2026-02-02 21:46:00 +02:00
Maryna S
fc2e41dd00 Print pnpm in env details output 2025-10-30 15:10:30 +02:00
6 changed files with 11 additions and 10 deletions

View File

@ -133,10 +133,11 @@ describe('main tests', () => {
describe('printEnvDetailsAndSetOutput', () => {
it.each([
[{node: '12.0.2', npm: '6.3.3', yarn: '1.22.11'}],
[{node: '16.0.2', npm: '7.3.3', yarn: '2.22.11'}],
[{node: '14.0.1', npm: '8.1.0', yarn: '3.2.1'}],
[{node: '17.0.2', npm: '6.3.3', yarn: ''}]
[{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', pnpm: ''}],
[{node: '14.0.1', npm: '8.1.0', yarn: '3.2.1', pnpm: ''}],
[{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 => {
getExecOutputSpy.mockImplementation(async command => {
if (Reflect.has(obj, command) && !obj[command]) {

View File

@ -71907,7 +71907,7 @@ function getNodeVersionFromFile(versionFilePath) {
}
async function printEnvDetailsAndSetOutput() {
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 output = pathTool ? await getToolVersion(tool, ['--version']) : '';
return { tool, output };

4
dist/setup/index.js vendored
View File

@ -81660,7 +81660,7 @@ class BaseDistribution {
const dataUrl = `${initialUrl}/index.json`;
const headers = {};
if (this.nodeInfo.mirrorToken) {
headers['Authorization'] = `Bearer ${this.nodeInfo.mirrorToken}`;
headers['Authorization'] = this.nodeInfo.mirrorToken;
}
const response = await this.httpClient.getJson(dataUrl, headers);
return response.result || [];
@ -82445,7 +82445,7 @@ function getNodeVersionFromFile(versionFilePath) {
}
async function printEnvDetailsAndSetOutput() {
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 output = pathTool ? await getToolVersion(tool, ['--version']) : '';
return { tool, output };

View File

@ -470,7 +470,7 @@ Please refer to the [Ensuring workflow access to your package - Configuring a pa
It is possible to use a private mirror hosting Node.js binaries. This mirror must be a full mirror of the official Node.js distribution.
The mirror URL can be set using the `mirror` input.
It is possible to specify a token to authenticate with the mirror using the `mirror-token` input.
The token will be passed as a bearer token in the `Authorization` header.
The token will be passed in the `Authorization` header.
```yaml
- uses: actions/setup-node@v6

View File

@ -103,7 +103,7 @@ export default abstract class BaseDistribution {
const headers = {};
if (this.nodeInfo.mirrorToken) {
headers['Authorization'] = `Bearer ${this.nodeInfo.mirrorToken}`;
headers['Authorization'] = this.nodeInfo.mirrorToken;
}
const response = await this.httpClient.getJson<INodeVersion[]>(

View File

@ -62,7 +62,7 @@ export function getNodeVersionFromFile(versionFilePath: string): string | null {
export async function printEnvDetailsAndSetOutput() {
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 output = pathTool ? await getToolVersion(tool, ['--version']) : '';