Skip to content

Releases: actions/setup-node

v3.0.0

24 Feb 13:45
9ced9a4
Compare
Choose a tag to compare

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 #414, all scripts will now be run with Node 16 rather than Node 12.
  • We removed deprecated version input (#424). Please use node-version input instead.

Fix logic of error handling for npm warning and uncaught exception

28 Dec 10:21
1f8c6b9
Compare
Choose a tag to compare

In scope of this release we fix logic of error handling related to caching (#358) and (#359).

In the previous behaviour we relied on stderr output to throw error. The warning messages from package managers can be written to the stderr's output. For now the action will throw an error only if exit code differs from zero. Besides, we add logic to сatch and log unhandled exceptions.

Adding Node.js version file support

29 Nov 11:04
04c56d2
Compare
Choose a tag to compare

In scope of this release we add the node-version-file input and update actions/cache dependency to the latest version.

Adding Node.js version file support

The new input (node-version-file) provides functionality to specify the path to the file containing Node.js's version with such behaviour:

  • If the file does not exist the action will throw an error.
  • If you specify both node-version and node-version-file inputs, the action will use value from the node-version input and throw the following warning: Both node-version and node-version-file inputs are specified, only node-version will be used.
  • For now the action does not support all of the variety of values for Node.js version files. The action can handle values according to the documentation and values with v prefix (v14)
steps:
  - uses: actions/checkout@v2
  - name: Setup node from node version file
    uses: actions/setup-node@v2
    with:
      node-version-file: '.nvmrc'
  - run: npm install
  - run: npm test

Update actions/cache dependency to 1.0.8 version.

We updated actions/cache dependency to the latest version (1.0.8). For more information please refer to the toolkit/cache.

Add "cache-hit" output

27 Sep 13:12
270253e
Compare
Choose a tag to compare

This release introduces a new output: cache-hit (#327).

The cache-hit output contains boolean value indicating that an exact match was found for the key. It shows that the action uses already existing cache or not. The output is available only if cache is enabled.

Support caching for mono repos and repositories with complex structure

05 Aug 16:44
25316bb
Compare
Choose a tag to compare

This release introduces dependency caching support for mono repos and repositories with complex structure (#305).

By default, the action searches for the dependency file (package-lock.json or yarn.lock) in the repository root. Use the cache-dependency-path input for cases when multiple dependency files are used, or they are located in different subdirectories. This input supports wildcards or a list of file names for caching multiple dependencies.

Yaml example:

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
  with:
    node-version: 14
    cache: npm
    cache-dependency-path: 'sub-project/package-lock.json'

For more examples of using cache-dependency-path input, see the Advanced usage guide.

Revert temporary fix

04 Aug 14:27
4d0182a
Compare
Choose a tag to compare

We had to disable pre-cached Node.js usage in the previous version due to the broken image cache. Now cache is fixed, so we can safely enable its usage again.
Thank you for understanding.

Revert temporary fix for v1

04 Aug 14:29
f1f314f
Compare
Choose a tag to compare

We had to disable pre-cached Node.js usage in the previous version due to the broken image cache. Now cache is fixed, so we can safely enable its usage again.
Thank you for understanding.

Temporary maintenance fix.

03 Aug 16:25
d6e3b55
Compare
Choose a tag to compare

Temporarily disabled usage of pre-cached Node.js.

Temporary maintenance fix

03 Aug 16:32
eb41679
Compare
Choose a tag to compare

Temporarily disabled usage of pre-cached Node.js

Support caching pnpm dependencies

20 Jul 12:27
aa759c6
Compare
Choose a tag to compare

This release introduces dependency caching support for the pnpm package manager (#278).

Caching pnpm dependencies:

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2
  with:
    version: 6.10.0
- uses: actions/setup-node@v2
  with:
    node-version: '14'
    cache: 'pnpm'
- run: pnpm install
- run: pnpm test

NOTE: pnpm caching support requires pnpm version >= 6.10.0