Skip to content

Commit 86d7342

Browse files
committed
feat: add support for mise.toml file
1 parent ab72c7e commit 86d7342

File tree

7 files changed

+56365
-36012
lines changed

7 files changed

+56365
-36012
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: 6 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;
@@ -112,6 +112,8 @@ describe('main tests', () => {
112112
${'{"engines": {"node": "17.0.0"}}'} | ${'17.0.0'}
113113
${'{"devEngines": {"runtime": {"name": "node", "version": "22.0.0"}}}'} | ${'22.0.0'}
114114
${'{"devEngines": {"runtime": [{"name": "bun"}, {"name": "node", "version": "22.0.0"}]}}'} | ${'22.0.0'}
115+
${'[tools]\ngo="latest"\nnode = "24.10"'} | ${'24.10'}
116+
${'[tools]\nnode = "22.12"'} | ${'22.12'}
115117
`.it('parses "$contents"', ({contents, expected}) => {
116118
const existsSpy = jest.spyOn(fs, 'existsSync');
117119
existsSpy.mockImplementation(() => true);

0 commit comments

Comments
 (0)