Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot] 3866feebf5 chore(deps): bump pnpm/action-setup from 6.1.0 to 6.1.1
Bumps [pnpm/action-setup](https://github.com/pnpm/action-setup) from 6.1.0 to 6.1.1.
- [Release notes](https://github.com/pnpm/action-setup/releases)
- [Commits](https://github.com/pnpm/action-setup/compare/ea17c68df8912ef543352723c149a84f56e3d413...73e46992e05b19abd31f2f3c20e0e7370d762115)

---
updated-dependencies:
- dependency-name: pnpm/action-setup
  dependency-version: 6.1.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-09 07:05:57 +00:00
7 changed files with 10 additions and 141 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ jobs:
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
uses: pnpm/action-setup@73e46992e05b19abd31f2f3c20e0e7370d762115 # v6.1.1
with:
version: 10
- name: Generate pnpm file
+1 -4
View File
@@ -270,10 +270,7 @@ jobs:
steps:
- name: Get node version
run: |
latestNodeVersion=$(
curl -fsSL https://nodejs.org/dist/index.json |
jq -r 'first(.[] | select(.version | test("-") | not) | .version)'
)
latestNodeVersion=$(curl https://nodejs.org/dist/index.json | jq -r '. [0].version')
echo "LATEST_NODE_VERSION=$latestNodeVersion" >> $GITHUB_OUTPUT
id: version
shell: bash
+2 -3
View File
@@ -151,10 +151,9 @@ Examples:
**Note:** Like the other values, `*` will get the latest [locally-cached Node.js version](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#nodejs), or the latest version from [actions/node-versions](https://github.com/actions/node-versions/blob/main/versions-manifest.json), depending on the [`check-latest`](docs/advanced-usage.md#check-latest-version) input.
`current`/`latest`/`node` always resolve to the latest stable version from [dist index](https://nodejs.org/dist/index.json) (prerelease entries are skipped).
`current`/`latest`/`node` always resolve to the latest [dist version](https://nodejs.org/dist/index.json).
That version is then downloaded from actions/node-versions if possible, or directly from Node.js if not.
If no stable version is available in the dist index, setup fails with an explicit error.
Since it will not always be cached, there is a possibility of hitting rate limits when downloading from dist.
Since it will not be cached always, there is possibility of hitting rate limit when downloading from dist
### Checking in lockfiles
-110
View File
@@ -993,111 +993,6 @@ describe('setup-node', () => {
expect(logSpy).toHaveBeenCalledWith('getting latest node version...');
}
);
it.each(['latest', 'current', 'node'])(
'skips a newer prerelease and selects the latest stable version for %s',
async inputVersion => {
// Arrange
inputs['node-version'] = inputVersion;
const stableVersion = nodeTestDist[0];
const prereleaseVersion = {
...nodeTestDist[0],
version: 'v99.0.0-alpha.1'
};
os.platform = 'darwin';
os.arch = 'x64';
const cleanStableVersion = stableVersion.version.replace(/^v/, '');
const toolPath = path.normalize(
`/cache/node/${cleanStableVersion}/x64`
);
findSpy.mockImplementation(() => '');
getManifestSpy.mockImplementation(() => {
throw new Error('Unable to download manifest');
});
getJsonSpy.mockImplementation((url: any) => {
if (url === nodeVersionsManifestUrl) {
throw new Error('Unable to download raw manifest');
}
return {result: [prereleaseVersion, ...nodeTestDist]};
});
dlSpy.mockImplementation(async () => '/some/temp/path');
exSpy.mockImplementation(async () => '/some/other/temp/path');
cacheSpy.mockImplementation(async () => toolPath);
getExecOutputSpy.mockImplementation(async () => ({
stdout: `v${cleanStableVersion}\n`,
stderr: '',
exitCode: 0
}));
// Act
await runWithRetries();
// assert
expect(findSpy).toHaveBeenCalledWith(
'node',
stableVersion.version,
'x64'
);
expect(findSpy).not.toHaveBeenCalledWith(
'node',
prereleaseVersion.version,
'x64'
);
expect(dlSpy).toHaveBeenCalledWith(
`https://nodejs.org/dist/v${cleanStableVersion}/node-v${cleanStableVersion}-darwin-x64.tar.gz`,
undefined,
undefined
);
expect(setFailedSpy).not.toHaveBeenCalled();
expect(addPathSpy).toHaveBeenCalledWith(path.join(toolPath, 'bin'));
}
);
const prereleaseOnlyIndex = [
{...nodeTestDist[0], version: 'v99.0.0-alpha.1'}
];
it.each([
['latest', 'an empty index', []],
['current', 'an empty index', []],
['node', 'an empty index', []],
['latest', 'a prerelease-only index', prereleaseOnlyIndex],
['current', 'a prerelease-only index', prereleaseOnlyIndex],
['node', 'a prerelease-only index', prereleaseOnlyIndex]
])(
'fails with the stable-version error for %s with %s',
async (inputVersion, _description, index) => {
// Arrange
inputs['node-version'] = inputVersion;
os.platform = 'darwin';
os.arch = 'x64';
findSpy.mockImplementation(() => '');
getManifestSpy.mockImplementation(() => {
throw new Error('Unable to download manifest');
});
getJsonSpy.mockImplementation((url: any) => {
if (url === nodeVersionsManifestUrl) {
throw new Error('Unable to download raw manifest');
}
return {result: index};
});
// Act
await runWithRetries();
// assert
expect(setFailedSpy).toHaveBeenCalledWith(
`Unable to find a stable Node version for '${inputVersion}' on platform ${os.platform} and architecture ${os.arch}.`
);
}
);
});
describe('latest alias syntax from cache', () => {
@@ -1122,11 +1017,6 @@ describe('setup-node', () => {
// assert
expect(logSpy).toHaveBeenCalledWith('getting latest node version...');
expect(findSpy).toHaveBeenCalledWith(
'node',
expectedVersion.version,
'x64'
);
expect(logSpy).toHaveBeenCalledWith(`Found in cache @ ${toolPath}`);
}
);
+1 -6
View File
@@ -98991,7 +98991,6 @@ var external_node_path_default = /*#__PURE__*/__nccwpck_require__.n(external_nod
const nodeVersionsManifestUrl = 'https://raw.githubusercontent.com/actions/node-versions/main/versions-manifest.json';
const invalidManifestMessage = 'The manifest fetched is empty, truncated, or does not contain any valid tool release entries.';
function isValidManifest(manifest) {
@@ -99115,11 +99114,7 @@ class OfficialBuilds extends BaseDistribution {
let version = '';
if (this.isLatestSyntax(this.nodeInfo.versionSpec)) {
core_info(`getting latest node version...`);
const stableVersion = versions.find(potential => semver_default().prerelease(potential) === null);
if (!stableVersion) {
throw new Error(`Unable to find a stable Node version for '${this.nodeInfo.versionSpec}' on platform ${this.osPlat} and architecture ${this.nodeInfo.arch}.`);
}
return stableVersion;
return versions[0];
}
version = super.evaluateVersions(versions);
return version;
+4 -4
View File
@@ -4237,13 +4237,13 @@
"license": "ISC"
},
"node_modules/handlebars": {
"version": "4.7.10",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.10.tgz",
"integrity": "sha512-P5VJMVM7qgBn6vjXMw8WG9uVI+ncf2pi72j4de4yz5ZULLj2RGqLYaKOYGsgyrViQ0tePOVlN1tDCCXXtFqXKg==",
"version": "4.7.9",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz",
"integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"minimist": "^1.2.8",
"minimist": "^1.2.5",
"neo-async": "^2.6.2",
"source-map": "^0.6.1",
"wordwrap": "^1.0.0"
@@ -3,7 +3,6 @@ import path from 'node:path';
import * as core from '@actions/core';
import * as exec from '@actions/exec';
import * as tc from '@actions/tool-cache';
import semver from 'semver';
import BaseDistribution from '../base-distribution.js';
import {NodeInputs, INodeVersion, INodeVersionInfo} from '../base-models.js';
@@ -196,18 +195,7 @@ export default class OfficialBuilds extends BaseDistribution {
if (this.isLatestSyntax(this.nodeInfo.versionSpec)) {
core.info(`getting latest node version...`);
const stableVersion = versions.find(
potential => semver.prerelease(potential) === null
);
if (!stableVersion) {
throw new Error(
`Unable to find a stable Node version for '${this.nodeInfo.versionSpec}' on platform ${this.osPlat} and architecture ${this.nodeInfo.arch}.`
);
}
return stableVersion;
return versions[0];
}
version = super.evaluateVersions(versions);