Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: actions/setup-node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
Choose a base ref
...
head repository: actions/setup-node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e33196f7422957bea03ed53f6fbb155025ffc7b8
Choose a head ref

Commits on Jan 10, 2023

  1. 2

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9227cda View commit details

Commits on Jan 11, 2023

  1. Fix a minor typo (#662)

    phanan authored Jan 11, 2023
    2

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f38519b View commit details

Commits on Jan 12, 2023

  1. 2

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    3dbcda8 View commit details

Commits on Jan 31, 2023

  1. 2

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    ae9f0f7 View commit details

Commits on Feb 20, 2023

  1. 3

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    7c29869 View commit details

Commits on Mar 8, 2023

  1. Add and configure ESLint and update configuration for Prettier (#703)

    * Add ESLinter and update Prettier
    
    * Update eslint config
    
    * Update dependencies
    
    * Rebuild action
    
    * Update package.json
    
    * Updates docs
    
    * Update docs
    IvanZosimov authored Mar 8, 2023
    4

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    962678f View commit details
  2. Add update-config-files.yml

    IvanZosimov committed Mar 8, 2023
    1
    Copy the full SHA
    fcd1810 View commit details

Commits on Mar 10, 2023

  1. Merge pull request #705 from akv-platform/reusable-workflow

    Turn on automatic update of ESLint and Prettier configuration files
    marko-zivic-93 authored Mar 10, 2023
    2

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    10f5623 View commit details

Commits on Mar 14, 2023

  1. Update configuration files (#708)

    Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
    github-actions[bot] and github-actions[bot] authored Mar 14, 2023
    2

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a4fcaaf View commit details

Commits on Apr 3, 2023

  1. 2

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e828f9b View commit details

Commits on Apr 6, 2023

  1. 2

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9d255ef View commit details

Commits on Apr 11, 2023

  1. 2

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d98fa11 View commit details

Commits on Apr 20, 2023

  1. Update xml2js (#742)

    dmitry-shibanov authored Apr 20, 2023
    7

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5b32c90 View commit details

Commits on May 10, 2023

  1. Update to node 18.x (#751)

    feelepxyz authored May 10, 2023
    2

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a9893b0 View commit details

Commits on May 23, 2023

  1. Copy the full SHA
    7598dbc View commit details
  2. Copy the full SHA
    15a2477 View commit details
  3. Copy the full SHA
    d0d39bd View commit details
  4. Copy the full SHA
    7d16907 View commit details

Commits on May 25, 2023

  1. Copy the full SHA
    10efafc View commit details

Commits on May 26, 2023

  1. Merge pull request #758 from akv-platform/remove-implicit-dependencies

    Remove implicit dependencies
    marko-zivic-93 authored May 26, 2023
    3

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    869f4dd View commit details

Commits on Jun 15, 2023

  1. 3

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    698d505 View commit details

Commits on Jun 21, 2023

  1. Detect cached folders from multiple directories (#735)

    * Add project-dir
    
    * Fix find lock file
    
    * Remove package-dir input
    
    * format & resolve conflicts
    
    * Add unit tests
    
    * build dist
    
    * Apply change request fixes
    
    * handle non-dir cache-dependency-path
    
    * bump cache version
    
    * run checks
    
    * Handle globs in cacheDependencyPath
    
    * refactor, introduce `cacheDependencyPathToProjectsDirectories`
    
    it is necessary for the next PR related yarn optimization
    
    * Changes requests
    
    * Apply fixes
    
    * review fixes
    
    * add e2e
    
    * Add unique
    
    * review updates
    
    * review updates second stage
    
    * Review fixes 3
    
    * imporve e2e tests
    dsame authored Jun 21, 2023
    3

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8170e22 View commit details

Commits on Jun 22, 2023

  1. 1

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c6722d3 View commit details

Commits on Jun 27, 2023

  1. Do not ivalidate the cache entirely on lock file change (#744)

    * Do not ivalidate the cache entirely on yarn3 lock file change
    
    * Use cache prefix if all sub-projects are yarn managed
    
    * Rename functions & add e2e tests
    dsame authored Jun 27, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e33196f View commit details
Showing with 17,272 additions and 16,126 deletions.
  1. +6 −0 .eslintignore
  2. +51 −0 .eslintrc.js
  3. +1 −0 .gitattributes
  4. +1 −1 .github/ISSUE_TEMPLATE/config.yml
  5. +1 −1 .github/workflows/basic-validation.yml
  6. +1 −1 .github/workflows/check-dist.yml
  7. +4 −4 .github/workflows/codeql-analysis.yml
  8. +109 −0 .github/workflows/e2e-cache.yml
  9. +5 −5 .github/workflows/release-new-action-version.yml
  10. +11 −0 .github/workflows/update-config-files.yml
  11. +9 −3 .github/workflows/versions.yml
  12. +1 −1 .licenses/npm/@azure/core-http.dep.yml
  13. +32 −0 .licenses/npm/@azure/core-util.dep.yml
  14. +1 −1 .licenses/npm/@azure/ms-rest-js.dep.yml
  15. +1 −1 .licenses/npm/@azure/storage-blob.dep.yml
  16. +1 −1 .licenses/npm/@types/node-fetch.dep.yml
  17. +0 −23 .licenses/npm/tough-cookie-4.0.0.dep.yml
  18. 0 .licenses/npm/{tough-cookie-3.0.1.dep.yml → tough-cookie.dep.yml}
  19. +35 −0 .licenses/npm/tslib-2.5.0.dep.yml
  20. +0 −33 .licenses/npm/universalify.dep.yml
  21. +1 −1 .licenses/npm/xml2js.dep.yml
  22. +7 −0 .prettierignore
  23. +11 −0 .prettierrc.js
  24. +0 −11 .prettierrc.json
  25. +67 −3 README.md
  26. +22 −25 __tests__/authutil.test.ts
  27. +7 −7 __tests__/cache-restore.test.ts
  28. +113 −104 __tests__/cache-save.test.ts
  29. +272 −2 __tests__/cache-utils.test.ts
  30. +22 −22 __tests__/canary-installer.test.ts
  31. +128 −33 __tests__/data/pnpm-lock.yaml
  32. +2 −2 __tests__/main.test.ts
  33. +18 −0 __tests__/mock/glob-mock.test.ts
  34. +29 −0 __tests__/mock/glob-mock.ts
  35. +110 −21 __tests__/nightly-installer.test.ts
  36. +33 −33 __tests__/official-installer.test.ts
  37. +59 −0 __tests__/prepare-yarn-subprojects.sh
  38. +4 −2 __tests__/problem-matcher.test.ts
  39. +20 −20 __tests__/rc-installer.test.ts
  40. +1 −1 action.yml
  41. +12,141 −12,614 dist/cache-save/index.js
  42. +1,151 −2,898 dist/setup/index.js
  43. +11 −4 docs/advanced-usage.md
  44. +2 −1 docs/contributors.md
  45. +2,461 −168 package-lock.json
  46. +13 −5 package.json
  47. +3 −3 src/authutil.ts
  48. +24 −7 src/cache-restore.ts
  49. +8 −10 src/cache-save.ts
  50. +234 −41 src/cache-utils.ts
  51. +2 −1 src/constants.ts
  52. +15 −11 src/distributions/base-distribution.ts
  53. +9 −0 src/util.ts
  54. +2 −1 tsconfig.json
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ignore list
/*

# Do not ignore these folders:
!__tests__/
!src/
51 changes: 51 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
// This is a reusable configuration file copied from https://github.com/actions/reusable-workflows/tree/main/reusable-configurations. Please don't make changes to this file as it's the subject of an automatic update.
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:eslint-plugin-jest/recommended',
'eslint-config-prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'eslint-plugin-node', 'eslint-plugin-jest'],
rules: {
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description'
}
],
'no-console': 'error',
'yoda': 'error',
'prefer-const': [
'error',
{
destructuring: 'all'
}
],
'no-control-regex': 'off',
'no-constant-condition': ['error', {checkLoops: false}],
'node/no-extraneous-import': 'error'
},
overrides: [
{
files: ['**/*{test,spec}.ts'],
rules: {
'@typescript-eslint/no-unused-vars': 'off',
'jest/no-standalone-expect': 'off',
'jest/no-conditional-expect': 'off',
'no-console': 'off',

}
}
],
env: {
node: true,
es6: true,
'jest/globals': true
}
};
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* text=auto eol=lf
.licenses/** -diff linguist-generated=true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
blank_issues_enabled: false
blank_issues_enabled: false
2 changes: 1 addition & 1 deletion .github/workflows/basic-validation.yml
Original file line number Diff line number Diff line change
@@ -14,4 +14,4 @@ on:
jobs:
call-basic-validation:
name: Basic validation
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
uses: actions/reusable-workflows/.github/workflows/basic-validation.yml@main
2 changes: 1 addition & 1 deletion .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
@@ -14,4 +14,4 @@ on:
jobs:
call-check-dist:
name: Check dist/
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
uses: actions/reusable-workflows/.github/workflows/check-dist.yml@main
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -2,13 +2,13 @@ name: CodeQL analysis

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]
schedule:
- cron: '0 3 * * 0'

jobs:
call-codeQL-analysis:
name: CodeQL analysis
uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main
name: CodeQL analysis
uses: actions/reusable-workflows/.github/workflows/codeql-analysis.yml@main
109 changes: 109 additions & 0 deletions .github/workflows/e2e-cache.yml
Original file line number Diff line number Diff line change
@@ -134,3 +134,112 @@ jobs:
- name: Verify node and yarn
run: __tests__/verify-node.sh "${{ matrix.node-version }}"
shell: bash

yarn-subprojects:
name: Test yarn subprojects
strategy:
matrix:
node-version: [12, 14, 16]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: prepare sub-projects
run: __tests__/prepare-yarn-subprojects.sh yarn1

# expect
# - no errors
# - log
# ##[debug]Cache Paths:
# ##[debug]["sub2/.yarn/cache","sub3/.yarn/cache","../../../.cache/yarn/v6"]
- name: Setup Node
uses: ./
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: |
**/*.lock
yarn.lock
yarn-subprojects-berry-local:
name: Test yarn subprojects all locally managed
strategy:
matrix:
node-version: [12, 14, 16]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: prepare sub-projects
run: __tests__/prepare-yarn-subprojects.sh

# expect
# - no errors
# - log
# ##[info]All dependencies are managed locally by yarn3, the previous cache can be used
# ##[debug]["node-cache-Linux-yarn-401024703386272f1a950c9f014cbb1bb79a7a5b6e1fb00e8b90d06734af41ee","node-cache-Linux-yarn"]
- name: Setup Node
uses: ./
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: |
sub2/*.lock
sub3/*.lock
yarn-subprojects-berry-global:
name: Test yarn subprojects some locally managed
strategy:
matrix:
node-version: [12, 14, 16]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: prepare sub-projects
run: __tests__/prepare-yarn-subprojects.sh global

# expect
# - no errors
# - log must
# ##[debug]"/home/runner/work/setup-node-test/setup-node-test/sub2" dependencies are managed by yarn 3 locally
# ##[debug]"/home/runner/work/setup-node-test/setup-node-test/sub3" dependencies are not managed by yarn 3 locally
- name: Setup Node
uses: ./
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: |
sub2/*.lock
sub3/*.lock
yarn-subprojects-berry-git:
name: Test yarn subprojects managed by git
strategy:
matrix:
node-version: [12, 14, 16]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: prepare sub-projects
run: /bin/bash __tests__/prepare-yarn-subprojects.sh keepcache

# expect
# - no errors
# - log
# [debug]"/home/runner/work/setup-node-test/setup-node-test/sub2" has .yarn/cache - dependencies are kept in the repository
# [debug]"/home/runner/work/setup-node-test/setup-node-test/sub3" has .yarn/cache - dependencies are kept in the repository
# [debug]["node-cache-Linux-yarn-401024703386272f1a950c9f014cbb1bb79a7a5b6e1fb00e8b90d06734af41ee"]
- name: Setup Node
uses: ./
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
cache-dependency-path: |
sub2/*.lock
sub3/*.lock
10 changes: 5 additions & 5 deletions .github/workflows/release-new-action-version.yml
Original file line number Diff line number Diff line change
@@ -21,8 +21,8 @@ jobs:
name: releaseNewActionVersion
runs-on: ubuntu-latest
steps:
- name: Update the ${{ env.TAG_NAME }} tag
uses: actions/publish-action@v0.2.1
with:
source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
- name: Update the ${{ env.TAG_NAME }} tag
uses: actions/publish-action@v0.2.2
with:
source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
11 changes: 11 additions & 0 deletions .github/workflows/update-config-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Update configuration files

on:
schedule:
- cron: '0 3 * * 0'
workflow_dispatch:

jobs:
call-update-configuration-files:
name: Update configuration files
uses: actions/reusable-workflows/.github/workflows/update-config-files.yml@main
12 changes: 9 additions & 3 deletions .github/workflows/versions.yml
Original file line number Diff line number Diff line change
@@ -57,7 +57,12 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: ['20-v8-canary', '20.0.0-v8-canary','20.0.0-v8-canary20221103f7e2421e91']
node-version:
[
'20-v8-canary',
'20.0.0-v8-canary',
'20.0.0-v8-canary20221101e50e45c9f8'
]
steps:
- uses: actions/checkout@v3
- name: Setup Node
@@ -77,7 +82,8 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [16.0.0-nightly20210420a0261d231c, 17-nightly, 18.0.0-nightly]
node-version:
[16.0.0-nightly20210420a0261d231c, 17-nightly, 18.0.0-nightly]
steps:
- uses: actions/checkout@v3
- name: Setup Node
@@ -170,7 +176,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- name: Setup node from node version file
2 changes: 1 addition & 1 deletion .licenses/npm/@azure/core-http.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions .licenses/npm/@azure/core-util.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .licenses/npm/@azure/ms-rest-js.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .licenses/npm/@azure/storage-blob.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .licenses/npm/@types/node-fetch.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 0 additions & 23 deletions .licenses/npm/tough-cookie-4.0.0.dep.yml

This file was deleted.

File renamed without changes.
35 changes: 35 additions & 0 deletions .licenses/npm/tslib-2.5.0.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading