Skip to content

Commit 58a435d

Browse files
committed
feat: add support for mise.toml file
1 parent d02c89d commit 58a435d

File tree

7 files changed

+85128
-64763
lines changed

7 files changed

+85128
-64763
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ 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.
44+
# File containing the version Spec of the version to use. Examples: package.json, mise.toml, .nvmrc, .node-version, .tool-versions.
4545
# If node-version and node-version-file are both provided the action will use version from node-version.
4646
node-version-file: ''
4747

__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)