Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel]
node-version-file:
[.nvmrc, .tool-versions, .tool-versions-node, package.json]
[.nvmrc, .tool-versions, .tool-versions-node, package.json, mise.toml]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Setup node from node version file
Expand Down
35 changes: 35 additions & 0 deletions .licenses/npm/smol-toml.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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ See [action.yml](action.yml)
# Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node
node-version: ''

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

Expand Down
2 changes: 2 additions & 0 deletions __tests__/data/mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tools]
node = "26.5.0"
18 changes: 11 additions & 7 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import {
jest,
afterAll,
afterEach,
beforeEach,
describe,
it,
expect,
beforeEach,
afterEach,
afterAll
it,
jest
} from '@jest/globals';
import {fileURLToPath} from 'url';
import fs from 'fs';
import path from 'path';
import osm from 'os';
import {fileURLToPath} from 'url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

Expand Down Expand Up @@ -197,6 +196,11 @@ describe('main tests', () => {
${'{"engines": {"node": "17.0.0"}}'} | ${'17.0.0'}
${'{"devEngines": {"runtime": {"name": "node", "version": "22.0.0"}}}'} | ${'22.0.0'}
${'{"devEngines": {"runtime": [{"name": "bun"}, {"name": "node", "version": "22.0.0"}]}}'} | ${'22.0.0'}
${'[tools]\ngo="latest"\nnode = "24.10"'} | ${'24.10'}
${'[tools]\nnode = "22.12"'} | ${'22.12'}
${'[tools]\ngo="latest"\nnode = "24.10"'} | ${'24.10'}
${'[tools]\nnode = { version = "22.20" }'} | ${'22.20'}
${'[tools]\nnode = { postinstall = "corepack enable" }'} | ${null}
`.it('parses "$contents"', ({contents, expected}: any) => {
const existsSpy = jest.spyOn(fs, 'existsSync');
existsSpy.mockImplementation(() => true);
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ inputs:
node-version:
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.'
node-version-file:
description: 'File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions.'
description: 'File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions, mise.toml.'
architecture:
description: 'Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.'
check-latest:
Expand Down
Loading