mirror of
https://github.com/actions/setup-node.git
synced 2025-11-07 04:56:55 +00:00
Compare commits
5 commits
be9b65193d
...
2b8a28d01e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2b8a28d01e | ||
|
|
dda4788290 | ||
|
|
7944727638 | ||
|
|
ee2d14815c | ||
|
|
34c363a48a |
7 changed files with 1632 additions and 2257 deletions
20
.licenses/npm/uuid-11.1.0.dep.yml
generated
20
.licenses/npm/uuid-11.1.0.dep.yml
generated
|
|
@ -1,20 +0,0 @@
|
|||
---
|
||||
name: uuid
|
||||
version: 11.1.0
|
||||
type: npm
|
||||
summary: RFC9562 UUIDs
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE.md
|
||||
text: |
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2010-2020 Robert Kieffer and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
notices: []
|
||||
|
|
@ -3,7 +3,7 @@ name: uuid
|
|||
version: 8.3.2
|
||||
type: npm
|
||||
summary: RFC4122 (v1, v4, and v5) UUIDs
|
||||
homepage: https://github.com/uuidjs/uuid#readme
|
||||
homepage:
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE.md
|
||||
3816
dist/setup/index.js
vendored
3816
dist/setup/index.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -300,6 +300,35 @@ steps:
|
|||
- run: npm test
|
||||
```
|
||||
|
||||
**Restore-Only Cache**
|
||||
|
||||
```yaml
|
||||
## In some workflows, you may want to restore a cache without saving it. This can help reduce cache writes and storage usage in workflows that only need to read from cache
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
# Restore Node.js modules cache (restore-only)
|
||||
- name: Restore Node modules cache
|
||||
uses: actions/cache@v4
|
||||
id: cache-node-modules
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-
|
||||
# Setup Node.js
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '24'
|
||||
# Install dependencies
|
||||
- run: npm install
|
||||
```
|
||||
|
||||
> For more details related to cache scenarios, please refer [Node – npm](https://github.com/actions/cache/blob/main/examples.md#node---npm).
|
||||
|
||||
## Multiple Operating Systems and Architectures
|
||||
|
||||
```yaml
|
||||
|
|
|
|||
16
package-lock.json
generated
16
package-lock.json
generated
|
|
@ -17,8 +17,7 @@
|
|||
"@actions/http-client": "^2.2.1",
|
||||
"@actions/io": "^1.0.2",
|
||||
"@actions/tool-cache": "^2.0.2",
|
||||
"semver": "^7.6.3",
|
||||
"uuid": "^11.1.0"
|
||||
"semver": "^7.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.14",
|
||||
|
|
@ -5683,19 +5682,6 @@
|
|||
"punycode": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "11.1.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
|
||||
"integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
|
||||
"funding": [
|
||||
"https://github.com/sponsors/broofa",
|
||||
"https://github.com/sponsors/ctavan"
|
||||
],
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"uuid": "dist/esm/bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/v8-to-istanbul": {
|
||||
"version": "9.1.3",
|
||||
"resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz",
|
||||
|
|
|
|||
|
|
@ -36,8 +36,7 @@
|
|||
"@actions/http-client": "^2.2.1",
|
||||
"@actions/io": "^1.0.2",
|
||||
"@actions/tool-cache": "^2.0.2",
|
||||
"semver": "^7.6.3",
|
||||
"uuid": "^11.1.0"
|
||||
"semver": "^7.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.14",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import {v4 as uuidv4} from 'uuid';
|
||||
import * as tc from '@actions/tool-cache';
|
||||
import * as hc from '@actions/http-client';
|
||||
import * as core from '@actions/core';
|
||||
|
|
@ -185,7 +184,7 @@ export default abstract class BaseDistribution {
|
|||
const osArch: string = this.translateArchToDistUrl(arch);
|
||||
|
||||
// Create temporary folder to download to
|
||||
const tempDownloadFolder = `temp_${uuidv4()}`;
|
||||
const tempDownloadFolder = `temp_${crypto.randomUUID()}`;
|
||||
const tempDirectory = process.env['RUNNER_TEMP'] || '';
|
||||
assert.ok(tempDirectory, 'Expected RUNNER_TEMP to be defined');
|
||||
const tempDir: string = path.join(tempDirectory, tempDownloadFolder);
|
||||
|
|
|
|||
Loading…
Reference in a new issue