mirror of
https://github.com/actions/setup-node.git
synced 2026-02-11 09:30:28 +08:00
Compare commits
4 Commits
dependabot
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d02c89dce7 | ||
|
|
6044e13b5d | ||
|
|
8e494633d0 | ||
|
|
621ac41091 |
@@ -13,3 +13,4 @@ allowed:
|
||||
|
||||
reviewed:
|
||||
npm:
|
||||
- "@actions/http-client"
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
name: "@actions/http-client"
|
||||
version: 3.0.0
|
||||
version: 3.0.2
|
||||
type: npm
|
||||
summary: Actions Http Client
|
||||
homepage: https://github.com/actions/toolkit/tree/main/packages/http-client
|
||||
license: mit
|
||||
license: other
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
2
.licenses/npm/fast-xml-parser.dep.yml
generated
2
.licenses/npm/fast-xml-parser.dep.yml
generated
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: fast-xml-parser
|
||||
version: 5.3.3
|
||||
version: 5.3.4
|
||||
type: npm
|
||||
summary: Validate XML, Parse XML, Build XML without C/C++ based libraries
|
||||
homepage:
|
||||
|
||||
34
.licenses/npm/undici-6.23.0.dep.yml
generated
Normal file
34
.licenses/npm/undici-6.23.0.dep.yml
generated
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
name: undici
|
||||
version: 6.23.0
|
||||
type: npm
|
||||
summary: An HTTP/1.1 client, written from scratch for Node.js
|
||||
homepage: https://undici.nodejs.org
|
||||
license: mit
|
||||
licenses:
|
||||
- sources: LICENSE
|
||||
text: |
|
||||
MIT License
|
||||
|
||||
Copyright (c) Matteo Collina and Undici 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.
|
||||
- sources: README.md
|
||||
text: MIT
|
||||
notices: []
|
||||
12
README.md
12
README.md
@@ -115,7 +115,7 @@ See [action.yml](action.yml)
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
@@ -123,7 +123,7 @@ steps:
|
||||
- run: npm test
|
||||
```
|
||||
|
||||
The `node-version` input is optional. If not supplied, the node version from PATH will be used. However, it is recommended to always specify Node.js version and don't rely on the system one.
|
||||
The `node-version` input is optional. If not supplied, the node version from PATH will be used. However, it is recommended to always specify Node.js version and not rely on the system one.
|
||||
|
||||
The action will first check the local cache for a semver match. If unable to find a specific version in the cache, the action will attempt to download a version of Node.js. It will pull LTS versions from [node-versions releases](https://github.com/actions/node-versions/releases) and on miss or failure will fall back to the previous behavior of downloading directly from [node dist](https://nodejs.org/dist/).
|
||||
|
||||
@@ -164,7 +164,7 @@ See the examples of using cache for `yarn`/`pnpm` and `cache-dependency-path` in
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
@@ -177,7 +177,7 @@ steps:
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
@@ -193,7 +193,7 @@ This behavior is controlled by the `package-manager-cache` input, which defaults
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
package-manager-cache: false
|
||||
@@ -212,7 +212,7 @@ jobs:
|
||||
node: [ 20, 22, 24 ]
|
||||
name: Node ${{ matrix.node }} sample
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v6
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
|
||||
27524
dist/cache-save/index.js
vendored
27524
dist/cache-save/index.js
vendored
File diff suppressed because one or more lines are too long
27524
dist/setup/index.js
vendored
27524
dist/setup/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -8,7 +8,7 @@ Currently, `actions/setup-node` supports caching dependencies for Npm and Yarn p
|
||||
For the first iteration, we have decided to not support cases where `package-lock.json` / `yarn.lock` are located outside of repository root.
|
||||
Current implementation searches the following file patterns in the repository root: `package-lock.json`, `yarn.lock` (in order of resolving priorities)
|
||||
|
||||
Obviously, it made build-in caching unusable for mono-repos and repos with complex structure.
|
||||
Obviously, it made built-in caching unusable for mono-repos and repos with complex structure.
|
||||
We would like to revisit this decision and add customization for dependencies lock file location.
|
||||
|
||||
## Proposal
|
||||
@@ -24,7 +24,7 @@ The second option looks more generic because it allows to:
|
||||
## Decision
|
||||
|
||||
Add `cache-dependency-path` input that will accept path (relative to repository root) to dependencies lock file.
|
||||
If provided path contains wildcards, the action will search all maching files and calculate common hash like `${{ hashFiles('**/package-lock.json') }}` YAML construction does.
|
||||
If provided path contains wildcards, the action will search all matching files and calculate common hash like `${{ hashFiles('**/package-lock.json') }}` YAML construction does.
|
||||
The hash of provided matched files will be used as a part of cache key.
|
||||
|
||||
Yaml examples:
|
||||
|
||||
1553
package-lock.json
generated
1553
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -51,7 +51,7 @@
|
||||
"eslint-plugin-jest": "^27.9.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-circus": "^30.2.0",
|
||||
"jest-circus": "^29.7.0",
|
||||
"jest-each": "^29.7.0",
|
||||
"prettier": "^3.6.2",
|
||||
"ts-jest": "^29.4.1",
|
||||
|
||||
Reference in New Issue
Block a user