mirror of
https://github.com/actions/setup-node.git
synced 2025-12-17 13:57:48 +00:00
feat: add support for mise.toml file
This commit is contained in:
parent
d721415790
commit
367970386b
4 changed files with 35 additions and 23 deletions
7
dist/cache-save/index.js
vendored
7
dist/cache-save/index.js
vendored
|
|
@ -93333,7 +93333,7 @@ function getNodeVersionFromFile(versionFilePath) {
|
|||
catch (_g) {
|
||||
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 ((_d = manifest === null || manifest === void 0 ? void 0 : manifest.tools) === null || _d === void 0 ? void 0 : _d.node) {
|
||||
|
|
@ -93341,7 +93341,10 @@ function getNodeVersionFromFile(versionFilePath) {
|
|||
if (typeof node === 'object' && (node === null || node === void 0 ? void 0 : node.version)) {
|
||||
return node.version;
|
||||
}
|
||||
return node;
|
||||
if (typeof node === 'string') {
|
||||
return node;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
catch (_h) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue