Skip to content

Commit f842d68

Browse files
committed
feat: add support for mise.toml file
1 parent 65d868f commit f842d68

File tree

7 files changed

+26224
-6107
lines changed

7 files changed

+26224
-6107
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ This action provides the following functionality for GitHub Actions users:
1616

1717
- Caching is now automatically enabled for npm projects when either the `devEngines.packageManager` field or the top-level `packageManager` field in `package.json` is set to `npm`. For other package managers, such as Yarn and pnpm, caching is disabled by default and must be configured manually using the `cache` input.
1818

19-
- The `always-auth` input has been removed, as it is deprecated and will no longer be supported in future npm releases. To ensure your workflows continue to run without warnings or errors, please remove any references to `always-auth` from your configuration.
19+
- The `always-auth` input has been removed, as it is deprecated and will no longer be supported in future npm releases. To ensure your workflows continue to run without warnings or errors, please remove any references to `always-auth` from your configuration.
2020

21-
## Breaking changes in V5
21+
## Breaking changes in V5
2222

2323
- Enabled caching by default with package manager detection if no cache input is provided.
2424
> For workflows with elevated privileges or access to sensitive information, we recommend disabling automatic caching by setting `package-manager-cache: false` when caching is not needed for secure operation.
@@ -41,23 +41,23 @@ See [action.yml](action.yml)
4141
# Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node
4242
node-version: ''
4343

44-
# File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions.
45-
# If node-version and node-version-file are both provided the action will use version from node-version.
44+
# File containing the version Spec of the version to use. Examples: package.json, mise.toml, .nvmrc, .node-version, .tool-versions.
45+
# If node-version and node-version-file are both provided the action will use version from node-version.
4646
node-version-file: ''
4747

48-
# Set this option if you want the action to check for the latest available version
48+
# Set this option if you want the action to check for the latest available version
4949
# that satisfies the version spec.
50-
# It will only get affect for lts Nodejs versions (12.x, >=10.15.0, lts/Hydrogen).
50+
# It will only get affect for lts Nodejs versions (12.x, >=10.15.0, lts/Hydrogen).
5151
# Default: false
5252
check-latest: false
5353

5454
# Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.
55-
# Default: ''. The action use system architecture by default
55+
# Default: ''. The action use system architecture by default
5656
architecture: ''
5757

58-
# Used to pull node distributions from https://github.com/actions/node-versions.
59-
# Since there's a default, this is typically not supplied by the user.
60-
# When running this action on github.com, the default value is sufficient.
58+
# Used to pull node distributions from https://github.com/actions/node-versions.
59+
# Since there's a default, this is typically not supplied by the user.
60+
# When running this action on github.com, the default value is sufficient.
6161
# When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
6262
#
6363
# We recommend using a service account with the least permissions necessary. Also
@@ -78,18 +78,18 @@ See [action.yml](action.yml)
7878
# default: true
7979
package-manager-cache: true
8080

81-
# Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc.
82-
# It will generate hash from the target file for primary key. It works only If cache is specified.
81+
# Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc.
82+
# It will generate hash from the target file for primary key. It works only If cache is specified.
8383
# Supports wildcards or a list of file names for caching multiple dependencies.
8484
# Default: ''
8585
cache-dependency-path: ''
8686

87-
# Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file,
87+
# Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file,
8888
# and set up auth to read in from env.NODE_AUTH_TOKEN.
8989
# Default: ''
9090
registry-url: ''
9191

92-
# Optional scope for authenticating against scoped registries.
92+
# Optional scope for authenticating against scoped registries.
9393
# Will fall back to the repository owner when using the GitHub Packages registry (https://npm.pkg.github.com/).
9494
# Default: ''
9595
scope: ''

__tests__/main.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1+
import * as cache from '@actions/cache';
12
import * as core from '@actions/core';
23
import * as exec from '@actions/exec';
3-
import * as tc from '@actions/tool-cache';
4-
import * as cache from '@actions/cache';
54
import * as io from '@actions/io';
5+
import * as tc from '@actions/tool-cache';
66

77
import fs from 'fs';
8-
import path from 'path';
98
import osm from 'os';
9+
import path from 'path';
1010

1111
import each from 'jest-each';
1212

13+
import OfficialBuilds from '../src/distributions/official_builds/official_builds';
1314
import * as main from '../src/main';
1415
import * as util from '../src/util';
15-
import OfficialBuilds from '../src/distributions/official_builds/official_builds';
1616

1717
describe('main tests', () => {
1818
let inputs = {} as any;
@@ -109,6 +109,7 @@ describe('main tests', () => {
109109
${'{"volta": {"node": ">=14.0.0 <=17.0.0"}}'}| ${'>=14.0.0 <=17.0.0'}
110110
${'{"volta": {"extends": "./package.json"}}'}| ${'18.0.0'}
111111
${'{"engines": {"node": "17.0.0"}}'} | ${'17.0.0'}
112+
${'[tools]\ngo="latest"\nnode = "24.10"'} | ${'24.10'}
112113
${'{}'} | ${null}
113114
`.it('parses "$contents"', ({contents, expected}) => {
114115
const existsSpy = jest.spyOn(fs, 'existsSync');

0 commit comments

Comments
 (0)