mirror of
https://github.com/actions/setup-node.git
synced 2026-06-14 14:13:52 +08:00
feat: add support for mise.toml file
This commit is contained in:
7
dist/cache-save/index.js
vendored
7
dist/cache-save/index.js
vendored
@@ -75721,7 +75721,7 @@ function getNodeVersionFromFile(versionFilePath) {
|
||||
catch {
|
||||
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 = (0, js_toml_1.load)(contents);
|
||||
if (manifest?.tools?.node) {
|
||||
@@ -75729,7 +75729,10 @@ function getNodeVersionFromFile(versionFilePath) {
|
||||
if (typeof node === 'object' && node?.version) {
|
||||
return node.version;
|
||||
}
|
||||
return node;
|
||||
if (typeof node === 'string') {
|
||||
return node;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
catch {
|
||||
|
||||
7
dist/setup/index.js
vendored
7
dist/setup/index.js
vendored
@@ -86259,7 +86259,7 @@ function getNodeVersionFromFile(versionFilePath) {
|
||||
catch {
|
||||
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 = (0, js_toml_1.load)(contents);
|
||||
if (manifest?.tools?.node) {
|
||||
@@ -86267,7 +86267,10 @@ function getNodeVersionFromFile(versionFilePath) {
|
||||
if (typeof node === 'object' && node?.version) {
|
||||
return node.version;
|
||||
}
|
||||
return node;
|
||||
if (typeof node === 'string') {
|
||||
return node;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
catch {
|
||||
|
||||
Reference in New Issue
Block a user