mirror of
https://github.com/actions/setup-node.git
synced 2026-02-04 14:38:19 +00:00
feat: add support for mise.toml file
This commit is contained in:
parent
50a9caa992
commit
fd028e153a
4 changed files with 35 additions and 23 deletions
7
dist/cache-save/index.js
vendored
7
dist/cache-save/index.js
vendored
|
|
@ -48307,7 +48307,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) {
|
||||
|
|
@ -48315,7 +48315,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
|
|
@ -58845,7 +58845,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) {
|
||||
|
|
@ -58853,7 +58853,10 @@ function getNodeVersionFromFile(versionFilePath) {
|
|||
if (typeof node === 'object' && node?.version) {
|
||||
return node.version;
|
||||
}
|
||||
return node;
|
||||
if (typeof node === 'string') {
|
||||
return node;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
catch {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue