10
0
Fork 0
mirror of https://github.com/actions/setup-node.git synced 2026-04-08 16:54:18 +00:00

feat: add support for mise.toml file

This commit is contained in:
Gustavo Perdomo 2025-10-22 00:25:58 -03:00
parent 748956ad62
commit 724952ae6b
No known key found for this signature in database
4 changed files with 20287 additions and 8 deletions

View file

@ -69,7 +69,7 @@ export function getNodeVersionFromFile(versionFilePath: string): string | null {
core.info('Node version file is not JSON file');
}
// Try parsing the file as an MISE `mise.toml` file.
// Try parsing the file as a mise `mise.toml` file.
try {
const manifest: Record<string, any> = load(contents);
if (manifest?.tools?.node) {
@ -79,7 +79,11 @@ export function getNodeVersionFromFile(versionFilePath: string): string | null {
return node.version;
}
return node;
if (typeof node === 'string') {
return node;
}
return null;
}
} catch {
core.info('Node version file is not TOML file');