Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache: yarn not working for Yarn 3 (Berry) in a subfolder #488

Closed
2 of 5 tasks
kachkaev opened this issue May 10, 2022 · 11 comments
Closed
2 of 5 tasks

cache: yarn not working for Yarn 3 (Berry) in a subfolder #488

kachkaev opened this issue May 10, 2022 · 11 comments
Assignees
Labels
feature request New feature or request to improve the current logic

Comments

@kachkaev
Copy link

kachkaev commented May 10, 2022

Description:

When a repo with Yarn Berry is in a subfolder, cache: yarn does not get applied.

Action version:

setup-node@3.1.1

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

Yarn 3.2

Repro steps:

Configure a pipeline that checks out the Node repo into a subfolder:

    - name: Check out tooling
      uses: actions/checkout@v3
      with:
        path: tooling ## 👈 👀
        repository: example-org/example-tooling-repo

Setup Node, as suggested in the action docs:

    - name: Setup Node
      uses: actions/setup-node@v3
      with:
        node-version: 18
        cache: yarn
        cache-dependency-path: tooling/yarn.lock

Expected behavior:

actions/setup-node correctly launches the right version of Yarn (which is included into the repo). Therefore, the right folder is cached and the follow-up setup is faster.

Actual behavior:

Yarn cache dir is resolved to /home/runner/.cache/yarn/v6. This is because yarn --version is called in the default directory, which is followed by yarn cache dir instead of yarn config get cacheFolder inside tooling. Cache end up empty and so all packages are re-downloaded again each time.

Potential solution:

It’d be nice to pass working-directory down to actions/setup-node (similar to the run task).

Workaround:

     - name: Setup Node
       uses: actions/setup-node@v3
       with:
         node-version: 18
-       cache: yarn
-       cache-dependency-path: tooling/yarn.lock
+        
+    - name: Get yarn cache directory path
+      id: yarn-cache-dir-path
+      run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
+      shell: bash
+      working-directory: tooling
+
+    - name: Restore yarn cache
+      uses: actions/cache@v3
+      with:
+        path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
+        key: yarn-cache-folder-${{ hashFiles('**/yarn.lock', '.yarnrc.yml') }}
+        restore-keys: |
+          yarn-cache-folder-

Cache key is inspired by #325

@kachkaev kachkaev added bug Something isn't working needs triage labels May 10, 2022
@e-korolevskii e-korolevskii added investigation The issue is under investigation and removed needs triage labels May 11, 2022
@e-korolevskii
Copy link
Contributor

Hi @kachkaev ,

We will investigate on that issue and come back to you.

@e-korolevskii
Copy link
Contributor

Hello @kachkaev ,

Thanks for your issue. This is unexpected behavior because you're using binaries located directly in a directory, but the action is running at the root of the repository, so it doesn't see yarn binaries in a subfolder. So the yarn version hasn't changed.
We recommend that you install the required version before restoring the cache.

@e-korolevskii e-korolevskii removed the investigation The issue is under investigation label May 18, 2022
@kachkaev
Copy link
Author

kachkaev commented May 18, 2022

This is unexpected behavior because you're using binaries located directly in a directory, but the action is running at the root of the repository

Yep, that's what happens. Keeping Yarn binary in the project and calling global yarn is a normal thing for Yarn berry. In this case global yarn command finds a local binary and delegates everything to it. Thus, there is no need install the right version of global yarn to get the right behavior.

Running yarn config get cacheFolder returns [project-dir]/.yarn/cache rather than some shared global folder. Even if I install the ‘right’ global Yarn but call it from a wrong cwd, it won't return the correct result. Thus, as far as I understand, the only solution is to have something like:

     - name: Setup Node
       uses: actions/setup-node@v3
       with:
         node-version: 18
        cache: yarn
-       cache-dependency-path: tooling/yarn.lock
+       working-directory: tooling ## proposed option, does not exist at the time of writing

This proposed working-directory option will help find yarn.lock path, so cache-dependency-path won't be necessary. This will also make global yarn delegate everything to [job-dir]/tooling/.yarn/releases/yarn-3.x.x.cjs. The delegated binary will know the right cacheFolder: [job-dir]/tooling/.yarn/cache.

Please let me know if you see other solutions here! 🙂

@IvanZosimov
Copy link
Contributor

IvanZosimov commented May 25, 2022

Hi, @kachkaev 👋 ! Thanks for popping this issue up! Our action, in fact, doesn't support yarn berry out of the box, but you found the perfect workaround that can be helpful to other customers! I think we can close this issue now because it's not really a bug, but expected behaviour. However, I'd like to ask you to open a new feature request and we will investigate the possibility of adding this functionality to the new releases.

@kachkaev
Copy link
Author

👋 @IvanZosimov! Yeah I actually agree with you that this more like a feature request rather than a bug report. Do you know if it’s OK to just change issue labels instead of closing and reopening it?

@IvanZosimov IvanZosimov added feature request New feature or request to improve the current logic and removed bug Something isn't working labels May 26, 2022
@IvanZosimov
Copy link
Contributor

Hello, @kachkaev 👋 ! Yes, it's OK, I changed the label by myself, thank you again for contributing 🤟

@gruckion
Copy link

Hi, @kachkaev 👋 ! Thanks for popping this issue up! Our action, in fact, doesn't support yarn berry out of the box, but you found the perfect workaround that can be helpful to other customers! I think we can close this issue now because it's not really a bug, but expected behaviour. However, I'd like to ask you to open a new feature request and we will investigate the possibility of adding this functionality to the new releases.

Read the comments it sounds like there is a potential work around? But I am unclear on what the work around is. I also don't see working-directory in the actions.yml or in any open PRs.

What's the status of this one?

@IvanZosimov
Copy link
Contributor

Hi, @gruckion 👋 Most probably my comment mislead you, sorry for that. About the status, this feature request is not the top priority at the moment, so we keep it to implement in the future.

@kachkaev
Copy link
Author

Read the comments it sounds like there is a potential work around? But I am unclear on what the work around is

See workaround section in the first comment.

olegstepura added a commit to muehlemann-popp/html-to-pdf that referenced this issue Nov 9, 2022
olegstepura added a commit to muehlemann-popp/html-to-pdf that referenced this issue Nov 11, 2022
- fix dockerfile
- remove i386 arch
- fix puppeteer running on arm
- use a fix from actions/setup-node#488 (comment)
- lint inside container
- remove double build for tests
- upgrade all deps
- fix linter errors
nweldev pushed a commit to fullwebdev/fullwebdev that referenced this issue Dec 4, 2022
@dsame dsame self-assigned this Dec 15, 2022
mcmartins added a commit to gap-packages/francy that referenced this issue Feb 27, 2023
* Canvas test failures #91
fixed workflows
fixed dockerfile for binder

* Fix unknown entity warnings (#90)

* fixed package info

* fix for #92 #93 and #94
added new workflow for releasetools

* use yarn instead of npm

* workaround for yarn caches on subprojects: from actions/setup-node#488 (comment)

---------

Co-authored-by: Manuel Martins <Manuel.Martins@ecmwf.int>
Co-authored-by: Jerry James <loganjerry@gmail.com>
mcmartins added a commit to gap-packages/francy that referenced this issue Mar 2, 2023
* Canvas test failures #91
fixed workflows
fixed dockerfile for binder

* Fix unknown entity warnings (#90)

* fixed workflows
fixed dockerfile for binder

* fixed dockerfile for binder

* fixed dockerfile for binder

* fixed dockerfile for binder

* fixed package info

* fix for #92 #93 and #94
added new workflow for releasetools

* revert changes from latest jupyterlab extension cookiecutter

* use yarn instead of npm

* workaround for yarn caches on subprojects: from actions/setup-node#488 (comment)

* workaround for yarn caches on subprojects: from actions/setup-node#488 (comment)

* new release 2.0.2 to test ReleaseTools

---------

Co-authored-by: Manuel Martins <Manuel.Martins@ecmwf.int>
Co-authored-by: Jerry James <loganjerry@gmail.com>
mcmartins added a commit to gap-packages/francy that referenced this issue Mar 10, 2023
* Canvas test failures #91
fixed workflows
fixed dockerfile for binder

* Fix unknown entity warnings (#90)

* fixed workflows
fixed dockerfile for binder

* fixed dockerfile for binder

* fixed dockerfile for binder

* fixed dockerfile for binder

* fixed package info

* fix for #92 #93 and #94
added new workflow for releasetools

* revert changes from latest jupyterlab extension cookiecutter

* use yarn instead of npm

* workaround for yarn caches on subprojects: from actions/setup-node#488 (comment)

* workaround for yarn caches on subprojects: from actions/setup-node#488 (comment)

* new release 2.0.2 to test ReleaseTools

* Update RELEASE.yml

use already present gh-pages branch

---------

Co-authored-by: Manuel Martins <Manuel.Martins@ecmwf.int>
Co-authored-by: Jerry James <loganjerry@gmail.com>
mcmartins added a commit to gap-packages/francy that referenced this issue Mar 10, 2023
* Canvas test failures #91
fixed workflows
fixed dockerfile for binder

* Fix unknown entity warnings (#90)

* fixed workflows
fixed dockerfile for binder

* fixed dockerfile for binder

* fixed dockerfile for binder

* fixed dockerfile for binder

* fixed package info

* fix for #92 #93 and #94
added new workflow for releasetools

* revert changes from latest jupyterlab extension cookiecutter

* use yarn instead of npm

* workaround for yarn caches on subprojects: from actions/setup-node#488 (comment)

* workaround for yarn caches on subprojects: from actions/setup-node#488 (comment)

* new release 2.0.2 to test ReleaseTools

* Update RELEASE.yml

use already present gh-pages branch

* Update RELEASE.yml

---------

Co-authored-by: Manuel Martins <Manuel.Martins@ecmwf.int>
Co-authored-by: Jerry James <loganjerry@gmail.com>
@danialdezfouli
Copy link

danialdezfouli commented Mar 13, 2023

I fixed it with the following setup, but the docker still takes time (2-3m) to build the image, maybe we should apply cache to docker too.

jobs:
  frontend:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3

      - name: Get yarn cache directory path
        id: yarn-cache-dir-path
        run: echo "dir=$(cd client && yarn config get cacheFolder)" >> $GITHUB_ENV

      - name: Cache Dependencies
        uses: actions/cache@v3
        with:
          path: ${{ env.dir }}
          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
          restore-keys: |
            ${{ runner.os }}-yarn-

      - name: Setup Node.js and Yarn
        uses: actions/setup-node@v3
        with:
          node-version: 18
          cache: yarn
          cache-dependency-path: client/yarn.lock
          registry-url: "https://registry.yarnpkg.com"

      - name: Install dependencies
        working-directory: client
        run: yarn install

      - name: Run linter
        working-directory: client
        run: yarn lint

mcmartins added a commit to gap-packages/francy that referenced this issue Mar 14, 2023
* Canvas test failures #91
fixed workflows
fixed dockerfile for binder

* Fix unknown entity warnings (#90)

* fixed workflows
fixed dockerfile for binder

* fixed dockerfile for binder

* fixed dockerfile for binder

* fixed dockerfile for binder

* fixed package info

* fix for #92 #93 and #94
added new workflow for releasetools

* revert changes from latest jupyterlab extension cookiecutter

* use yarn instead of npm

* workaround for yarn caches on subprojects: from actions/setup-node#488 (comment)

* workaround for yarn caches on subprojects: from actions/setup-node#488 (comment)

* new release 2.0.2 to test ReleaseTools

* Update RELEASE.yml

use already present gh-pages branch

* Update RELEASE.yml

* added fetch-depth: 0 to fetch all branches

---------

Co-authored-by: Manuel Martins <Manuel.Martins@ecmwf.int>
Co-authored-by: Jerry James <loganjerry@gmail.com>
mcmartins added a commit to gap-packages/francy that referenced this issue Mar 14, 2023
* develop:
  update gh-pages branch
  added fetch-depth: 0 to fetch all branches
  Update RELEASE.yml
  Update RELEASE.yml
  new release 2.0.2 to test ReleaseTools
  workaround for yarn caches on subprojects: from actions/setup-node#488 (comment)
  workaround for yarn caches on subprojects: from actions/setup-node#488 (comment)
  use yarn instead of npm
  revert changes from latest jupyterlab extension cookiecutter
  fix for #92 #93 and #94 added new workflow for releasetools
  fixed package info
  fixed dockerfile for binder
  fixed dockerfile for binder
  fixed dockerfile for binder
  fixed workflows fixed dockerfile for binder
  Fix unknown entity warnings (#90)
  Canvas test failures #91 fixed workflows fixed dockerfile for binder
astrowq added a commit to astrowq/setup-yarn that referenced this issue Jun 2, 2023
@dsame
Copy link
Contributor

dsame commented Jul 25, 2023

Hello @kachkaev, i am going to close this issue because the PR is merged , but please feel free to reopen it or create new issue in case if the problem still exists

@dsame dsame closed this as completed Jul 25, 2023
deining pushed a commit to deining/setup-node that referenced this issue Nov 9, 2023
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.9.5 to 5.0.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v4.9.5...v5.0.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
rgalanakis added a commit to webhookdb/webhookdb that referenced this issue Jan 7, 2024
* Fix incorrect sizing of recent blog post images

* Fix broken hash navigation on page load with code examples

The code replacement modifies height, which means
the anchor navigation is at the wrong place.
Renavigate after code has loaded.

* Update browserlist

* Yarn workaround in github action

See actions/setup-node#488
for reference.

* eslint-check -> eslint, remove website test (we don't have them)
CrispyBaguette pushed a commit to CrispyBaguette/wasm-palette-converter that referenced this issue Nov 8, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/setup-node](https://github.com/actions/setup-node) | action | major | `v2.5.2` -> `v4.1.0` |

---

### Release Notes

<details>
<summary>actions/setup-node (actions/setup-node)</summary>

### [`v4.1.0`](https://github.com/actions/setup-node/releases/tag/v4.1.0)

[Compare Source](actions/setup-node@v4.0.4...v4.1.0)

#### What's Changed

-   Resolve High Security Alerts by upgrading Dependencies by [@&#8203;aparnajyothi-y](https://github.com/aparnajyothi-y) in actions/setup-node#1132
-   Upgrade IA Publish by [@&#8203;Jcambass](https://github.com/Jcambass) in actions/setup-node#1134
-   Revise `isGhes` logic by [@&#8203;jww3](https://github.com/jww3) in actions/setup-node#1148
-   Add architecture to cache key by [@&#8203;pengx17](https://github.com/pengx17) in actions/setup-node#843
    This addresses issues with caching by adding the architecture (arch) to the cache key, ensuring that cache keys are accurate to prevent conflicts.
    Note: This change may break previous cache keys as they will no longer be compatible with the new format.

#### New Contributors

-   [@&#8203;jww3](https://github.com/jww3) made their first contribution in actions/setup-node#1148
-   [@&#8203;pengx17](https://github.com/pengx17) made their first contribution in actions/setup-node#843

**Full Changelog**: actions/setup-node@v4...v4.1.0

### [`v4.0.4`](https://github.com/actions/setup-node/releases/tag/v4.0.4)

[Compare Source](actions/setup-node@v4.0.3...v4.0.4)

#### What's Changed

-   Add workflow file for publishing releases to immutable action package by [@&#8203;Jcambass](https://github.com/Jcambass) in actions/setup-node#1125
-   Enhance Windows ARM64 Setup and Update micromatch Dependency by [@&#8203;priyagupta108](https://github.com/priyagupta108) in actions/setup-node#1126

##### Documentation changes:

-   Documentation update in the README file by [@&#8203;suyashgaonkar](https://github.com/suyashgaonkar) in actions/setup-node#1106
-   Correct invalid 'lts' version string reference by [@&#8203;fulldecent](https://github.com/fulldecent) in actions/setup-node#1124

#### New Contributors

-   [@&#8203;suyashgaonkar](https://github.com/suyashgaonkar) made their first contribution in actions/setup-node#1106
-   [@&#8203;priyagupta108](https://github.com/priyagupta108) made their first contribution in actions/setup-node#1126
-   [@&#8203;Jcambass](https://github.com/Jcambass) made their first contribution in actions/setup-node#1125
-   [@&#8203;fulldecent](https://github.com/fulldecent) made their first contribution in actions/setup-node#1124

**Full Changelog**: actions/setup-node@v4...v4.0.4

### [`v4.0.3`](https://github.com/actions/setup-node/releases/tag/v4.0.3)

[Compare Source](actions/setup-node@v4.0.2...v4.0.3)

#### What's Changed

##### Bug fixes:

-   Fix macos latest check failures by [@&#8203;HarithaVattikuti](https://github.com/HarithaVattikuti) in actions/setup-node#1041

##### Documentation changes:

-   Documentation update to update default Node version to 20 by [@&#8203;bengreeley](https://github.com/bengreeley) in actions/setup-node#949

##### Dependency  updates:

-   Bump undici from 5.26.5 to 5.28.3 by [@&#8203;dependabot](https://github.com/dependabot) in actions/setup-node#965
-   Bump braces from 3.0.2 to 3.0.3 and other dependency updates by [@&#8203;dependabot](https://github.com/dependabot) in actions/setup-node#1087

#### New Contributors

-   [@&#8203;bengreeley](https://github.com/bengreeley) made their first contribution in actions/setup-node#949
-   [@&#8203;HarithaVattikuti](https://github.com/HarithaVattikuti) made their first contribution in actions/setup-node#1041

**Full Changelog**: actions/setup-node@v4...v4.0.3

### [`v4.0.2`](https://github.com/actions/setup-node/releases/tag/v4.0.2)

[Compare Source](actions/setup-node@v4.0.1...v4.0.2)

#### What's Changed

-   Add support for `volta.extends` by [@&#8203;ThisIsManta](https://github.com/ThisIsManta) in actions/setup-node#921
-   Add support for arm64 Windows by [@&#8203;dmitry-shibanov](https://github.com/dmitry-shibanov) in actions/setup-node#927

#### New Contributors

-   [@&#8203;ThisIsManta](https://github.com/ThisIsManta) made their first contribution in actions/setup-node#921

**Full Changelog**: actions/setup-node@v4.0.1...v4.0.2

### [`v4.0.1`](https://github.com/actions/setup-node/releases/tag/v4.0.1)

[Compare Source](actions/setup-node@v4.0.0...v4.0.1)

#### What's Changed

-   Ignore engines in Yarn 1 e2e-cache tests by [@&#8203;trivikr](https://github.com/trivikr) in actions/setup-node#882
-   Update setup-node references in the README.md file to setup-node@v4 by [@&#8203;jwetzell](https://github.com/jwetzell) in actions/setup-node#884
-   Update reusable workflows to use Node.js v20 by [@&#8203;MaksimZhukov](https://github.com/MaksimZhukov) in actions/setup-node#889
-   Add fix for cache to resolve slow post action step by [@&#8203;aparnajyothi-y](https://github.com/aparnajyothi-y) in actions/setup-node#917
-   Fix README.md by [@&#8203;takayamaki](https://github.com/takayamaki) in actions/setup-node#898
-   Add `package.json` to `node-version-file` list of examples. by [@&#8203;TWiStErRob](https://github.com/TWiStErRob) in actions/setup-node#879
-   Fix node-version-file interprets entire package.json as a version by [@&#8203;NullVoxPopuli](https://github.com/NullVoxPopuli) in actions/setup-node#865

#### New Contributors

-   [@&#8203;trivikr](https://github.com/trivikr) made their first contribution in actions/setup-node#882
-   [@&#8203;jwetzell](https://github.com/jwetzell) made their first contribution in actions/setup-node#884
-   [@&#8203;aparnajyothi-y](https://github.com/aparnajyothi-y) made their first contribution in actions/setup-node#917
-   [@&#8203;takayamaki](https://github.com/takayamaki) made their first contribution in actions/setup-node#898
-   [@&#8203;TWiStErRob](https://github.com/TWiStErRob) made their first contribution in actions/setup-node#879
-   [@&#8203;NullVoxPopuli](https://github.com/NullVoxPopuli) made their first contribution in actions/setup-node#865

**Full Changelog**: actions/setup-node@v4...v4.0.1

### [`v4.0.0`](https://github.com/actions/setup-node/releases/tag/v4.0.0)

[Compare Source](actions/setup-node@v3.8.2...v4.0.0)

#### What's Changed

In scope of this release we changed version of node runtime for action from node16 to node20 and updated dependencies in actions/setup-node#866

Besides, release contains such changes as:

-   Upgrade actions/checkout to v4 by [@&#8203;gmembre-zenika](https://github.com/gmembre-zenika) in actions/setup-node#868
-   Update actions/checkout for documentation and yaml by [@&#8203;dmitry-shibanov](https://github.com/dmitry-shibanov) in actions/setup-node#876

#### New Contributors

-   [@&#8203;gmembre-zenika](https://github.com/gmembre-zenika) made their first contribution in actions/setup-node#868

**Full Changelog**: actions/setup-node@v3...v4.0.0

### [`v3.8.2`](https://github.com/actions/setup-node/releases/tag/v3.8.2)

[Compare Source](actions/setup-node@v3.8.1...v3.8.2)

#### What's Changed

-   Update semver by [@&#8203;dmitry-shibanov](https://github.com/dmitry-shibanov) in actions/setup-node#861
-   Update temp directory creation by [@&#8203;nikolai-laevskii](https://github.com/nikolai-laevskii) in actions/setup-node#859
-   Bump [@&#8203;babel/traverse](https://github.com/babel/traverse) from 7.15.4 to 7.23.2 by [@&#8203;dependabot](https://github.com/dependabot) in actions/setup-node#870
-   Add notice about binaries not being updated yet by [@&#8203;nikolai-laevskii](https://github.com/nikolai-laevskii) in actions/setup-node#872
-   Update toolkit cache and core by [@&#8203;dmitry-shibanov](https://github.com/dmitry-shibanov) and [@&#8203;seongwon-privatenote](https://github.com/seongwon-privatenote) in actions/setup-node#875

**Full Changelog**: actions/setup-node@v3...v3.8.2

### [`v3.8.1`](https://github.com/actions/setup-node/releases/tag/v3.8.1)

[Compare Source](actions/setup-node@v3.8.0...v3.8.1)

#### What's Changed

In scope of this release, the filter was removed within the cache-save step by [@&#8203;dmitry-shibanov](https://github.com/dmitry-shibanov) in actions/setup-node#831. It is filtered and checked in the toolkit/cache library.

**Full Changelog**: actions/setup-node@v3...v3.8.1

### [`v3.8.0`](https://github.com/actions/setup-node/releases/tag/v3.8.0)

[Compare Source](actions/setup-node@v3.7.0...v3.8.0)

#### What's Changed

##### Bug fixes:

-   Add check for existing paths by [@&#8203;dmitry-shibanov](https://github.com/dmitry-shibanov) in actions/setup-node#803
-   Resolve SymbolicLink by [@&#8203;dmitry-shibanov](https://github.com/dmitry-shibanov) in actions/setup-node#809
-   Change passing logic for cache input by [@&#8203;dmitry-shibanov](https://github.com/dmitry-shibanov) in actions/setup-node#816
-   Fix armv7 cache issue by [@&#8203;louislam](https://github.com/louislam) in actions/setup-node#794
-   Update check-dist workflow name by [@&#8203;sinchang](https://github.com/sinchang) in actions/setup-node#710

##### Feature implementations:

-   feat: handling the case where "node" is used for tool-versions file. by [@&#8203;xytis](https://github.com/xytis) in actions/setup-node#812

##### Documentation changes:

-   Refer to semver package name in README.md by [@&#8203;olleolleolle](https://github.com/olleolleolle) in actions/setup-node#808

##### Update dependencies:

-   Update toolkit cache to fix zstd by [@&#8203;dmitry-shibanov](https://github.com/dmitry-shibanov) in actions/setup-node#804
-   Bump tough-cookie and [@&#8203;azure/ms-rest-js](https://github.com/azure/ms-rest-js) by [@&#8203;dependabot](https://github.com/dependabot) in actions/setup-node#802
-   Bump semver from 6.1.2 to 6.3.1 by [@&#8203;dependabot](https://github.com/dependabot) in actions/setup-node#807
-   Bump word-wrap from 1.2.3 to 1.2.4 by [@&#8203;dependabot](https://github.com/dependabot) in actions/setup-node#815

#### New Contributors

-   [@&#8203;olleolleolle](https://github.com/olleolleolle) made their first contribution in actions/setup-node#808
-   [@&#8203;louislam](https://github.com/louislam) made their first contribution in actions/setup-node#794
-   [@&#8203;sinchang](https://github.com/sinchang) made their first contribution in actions/setup-node#710
-   [@&#8203;xytis](https://github.com/xytis) made their first contribution in actions/setup-node#812

**Full Changelog**: actions/setup-node@v3...v3.8.0

### [`v3.7.0`](https://github.com/actions/setup-node/releases/tag/v3.7.0)

[Compare Source](actions/setup-node@v3.6.0...v3.7.0)

#### What's Changed

In scope of this release we added a logic to save an additional cache path for yarn 3 ([related pull request](actions/setup-node#744) and [feature request](actions/setup-node#325)). Moreover, we added functionality to use all the sub directories derived from `cache-dependency-path` input and add detect all dependencies directories to cache (related [pull request](actions/setup-node#735) and [feature request](actions/setup-node#488)).

##### Besides, we made such changes as:

-   Replace workflow badge with new badge by [@&#8203;jongwooo](https://github.com/jongwooo) in actions/setup-node#653
-   Fix a minor typo by [@&#8203;phanan](https://github.com/phanan) in actions/setup-node#662
-   docs: fix typo in advanced-usage.md by [@&#8203;remarkablemark](https://github.com/remarkablemark) in actions/setup-node#697
-   bugfix: Don't attempt to use Windows fallbacks on non-Windows OSes by [@&#8203;domdomegg](https://github.com/domdomegg) in actions/setup-node#718
-   Update to node 18.x by [@&#8203;feelepxyz](https://github.com/feelepxyz) in actions/setup-node#751
-   Remove implicit dependencies by [@&#8203;nikolai-laevskii](https://github.com/nikolai-laevskii) in actions/setup-node#758
-   Fix description about ensuring workflow access to private package by [@&#8203;x86chi](https://github.com/x86chi) in actions/setup-node#704

#### New Contributors

-   [@&#8203;jongwooo](https://github.com/jongwooo) made their first contribution in actions/setup-node#653
-   [@&#8203;phanan](https://github.com/phanan) made their first contribution in actions/setup-node#662
-   [@&#8203;remarkablemark](https://github.com/remarkablemark) made their first contribution in actions/setup-node#697
-   [@&#8203;domdomegg](https://github.com/domdomegg) made their first contribution in actions/setup-node#718
-   [@&#8203;feelepxyz](https://github.com/feelepxyz) made their first contribution in actions/setup-node#751
-   [@&#8203;nikolai-laevskii](https://github.com/nikolai-laevskii) made their first contribution in actions/setup-node#758
-   [@&#8203;x86chi](https://github.com/x86chi) made their first contribution in actions/setup-node#704

**Full Changelog**: actions/setup-node@v3...v3.7.0

### [`v3.6.0`](https://github.com/actions/setup-node/releases/tag/v3.6.0): Add Support for Nightly, Canary and RC builds for Node.js

[Compare Source](actions/setup-node@v3.5.1...v3.6.0)

In scope of this release we added support to download nightly, rc (actions/setup-node#611) and canary (actions/setup-node#619) Node.js distributions.

##### For nightly versions:

```yaml
jobs:
  build:
    runs-on: ubuntu-latest
    name: Node sample
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '16-nightly'
      - run: npm ci
      - run: npm test
```

##### For canary versions:

```yaml
jobs:
  build:
    runs-on: ubuntu-latest
    name: Node sample
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '16-v8-canary’
      - run: npm ci
      - run: npm test
```

##### For rc versions:

```yaml
jobs:
  build:
    runs-on: ubuntu-latest
    name: Node sample
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '16.0.0-rc.1’
      - run: npm ci
      - run: npm test
```

Note: For more examples please refer to [documentation](https://github.com/actions/setup-node#advanced-usage).

Besides, we added the following changes as:

-   Updated minimatch: actions/setup-node#608
-   Fixed extra newline character in version output when reading from a file: actions/setup-node#625
-   Passed the token input through on GHES: actions/setup-node#595
-   Fixed issue with scoped registries are duplicated in npmrc: actions/setup-node#637

### [`v3.5.1`](https://github.com/actions/setup-node/releases/tag/v3.5.1): Update @&#8203;actions/core and Print Node, Npm, Yarn versions

[Compare Source](actions/setup-node@v3.5.0...v3.5.1)

In scope of this release we updated [actions/core to 1.10.0](actions/setup-node#587). Moreover, we added logic [to print Nodejs, Npm, Yarn versions](actions/setup-node#368) after installation.

### [`v3.5.0`](https://github.com/actions/setup-node/releases/tag/v3.5.0): Add support for engines.node and Volta

[Compare Source](actions/setup-node@v3.4.1...v3.5.0)

In scope of this release we add support for engines.node. The action will be able to grab the version form package.json#engines.node. actions/setup-node#485. Moreover, we [added support for Volta](actions/setup-node#532)

Besides, we updated [@&#8203;actions/core to 1.9.1](actions/setup-node#574) and [@&#8203;actions/cache to 3.0.4](actions/setup-node#573)

### [`v3.4.1`](https://github.com/actions/setup-node/releases/tag/v3.4.1): Fix pnpm output and node-version  output issues

[Compare Source](actions/setup-node@v3.4.0...v3.4.1)

In scope of this release we fixed bugs related to the pnpm 7.5.1 output issue from `pnpm store path` actions/setup-node#545. Moreover we fixed the issue with falling on node-version output actions/setup-node#540.

### [`v3.4.0`](https://github.com/actions/setup-node/releases/tag/v3.4.0): Add support for asdf format and update actions/cache version to 3.0.0

[Compare Source](actions/setup-node@v3.3.0...v3.4.0)

In scope of this release we updated `actions/cache` package as the new version contains fixes for [caching error handling](actions/setup-node#526). Moreover, we added support for asdf format as Node.js version file actions/setup-node#373. Besides, we introduced new output [node-version](actions/setup-node#534) and added `npm-shrinkwrap.json` to dependency file patterns: actions/setup-node#439

### [`v3.3.0`](https://github.com/actions/setup-node/releases/tag/v3.3.0): Add support for lts/-n aliases

[Compare Source](actions/setup-node@v3.2.0...v3.3.0)

In scope of this release we added support for `lts/-n` aliases, improve logic for `current`, `latest` and `node` aliases to handle them from `toolcache`, update `ncc` package.

##### Support of lts/-n aliases

-   Related pull request: actions/setup-node#481
-   Related issue: actions/setup-node#26

```yaml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
  with:
    node-version: lts/-1
- run: npm ci
- run: npm test
```

##### Minor improvements

-   Update zeit/ncc to vercel/ncc: actions/setup-node#476
-   Get latest version from cache if exists: actions/setup-node#496

### [`v3.2.0`](https://github.com/actions/setup-node/releases/tag/v3.2.0): Add current, node, latest aliases

[Compare Source](actions/setup-node@v3.1.1...v3.2.0)

In scope of this release we added new aliases to install the latest Node.js version. actions/setup-node#483

```yml
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
  with:
    node-version: current
- run: npm ci
- run: npm test
```

### [`v3.1.1`](https://github.com/actions/setup-node/releases/tag/v3.1.1): Update actions/cache version to 2.0.2

[Compare Source](actions/setup-node@v3.1.0...v3.1.1)

In scope of this release we updated `actions/cache` package as the new version contains fixes related to GHES 3.5 (actions/setup-node#460)

### [`v3.1.0`](https://github.com/actions/setup-node/releases/tag/v3.1.0): Add caching support on GHES 3.5

[Compare Source](actions/setup-node@v3.0.0...v3.1.0)

In scope of this release we added [support for caching from GHES 3.5](actions/setup-node#452) and fixed download issue for files > 2GB during restore. Besides, we updated `actions/cache` dependency to 2.0.0 version.

### [`v3.0.0`](https://github.com/actions/setup-node/releases/tag/v3.0.0)

[Compare Source](actions/setup-node@v2.5.2...v3.0.0)

In scope of this release we changed version of the runtime Node.js for the setup-node action and updated package-lock.json file to  v2.

##### Breaking Changes

-   With the update to Node 16 in actions/setup-node#414, all scripts will now be run with Node 16 rather than Node 12.
-   We removed deprecated `version` input (actions/setup-node#424). Please use `node-version` input instead.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS44LjAiLCJ1cGRhdGVkSW5WZXIiOiIzOS44LjAiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIiLCJsYWJlbHMiOltdfQ==-->

Reviewed-on: https://gitea.bruyant.xyz/alexandre/PaletteSwitcher/pulls/56
Co-authored-by: Renovate <renovate@bruyant.xyz>
Co-committed-by: Renovate <renovate@bruyant.xyz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

7 participants