mirror of
https://github.com/actions/setup-node
synced 2024-12-22 13:12:43 +00:00
chore: run prettier
This commit is contained in:
parent
5b579f1638
commit
bb59d50268
2 changed files with 4 additions and 5 deletions
7
dist/setup/index.js
vendored
7
dist/setup/index.js
vendored
|
@ -71774,11 +71774,10 @@ function parseNodeVersionFile(contents) {
|
||||||
nodeVersion = (_a = found === null || found === void 0 ? void 0 : found.groups) === null || _a === void 0 ? void 0 : _a.version;
|
nodeVersion = (_a = found === null || found === void 0 ? void 0 : found.groups) === null || _a === void 0 ? void 0 : _a.version;
|
||||||
if (!nodeVersion) {
|
if (!nodeVersion) {
|
||||||
try {
|
try {
|
||||||
// Try parsing the file as an NPM `package.json`
|
// Try parsing the file as an NPM `package.json` file.
|
||||||
// file.
|
nodeVersion = (_b = JSON.parse(contents).volta) === null || _b === void 0 ? void 0 : _b.node;
|
||||||
nodeVersion = (_b = JSON.parse(contents).engines) === null || _b === void 0 ? void 0 : _b.node;
|
|
||||||
if (!nodeVersion)
|
if (!nodeVersion)
|
||||||
(_c = JSON.parse(contents).volta) === null || _c === void 0 ? void 0 : _c.node;
|
nodeVersion = (_c = JSON.parse(contents).engines) === null || _c === void 0 ? void 0 : _c.node;
|
||||||
if (!nodeVersion)
|
if (!nodeVersion)
|
||||||
throw new Error();
|
throw new Error();
|
||||||
}
|
}
|
||||||
|
|
|
@ -504,7 +504,7 @@ export function parseNodeVersionFile(contents: string): string {
|
||||||
try {
|
try {
|
||||||
// Try parsing the file as an NPM `package.json` file.
|
// Try parsing the file as an NPM `package.json` file.
|
||||||
nodeVersion = JSON.parse(contents).volta?.node;
|
nodeVersion = JSON.parse(contents).volta?.node;
|
||||||
if (!nodeVersion)nodeVersion = JSON.parse(contents).engines?.node;
|
if (!nodeVersion) nodeVersion = JSON.parse(contents).engines?.node;
|
||||||
if (!nodeVersion) throw new Error();
|
if (!nodeVersion) throw new Error();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// In the case of an unknown format,
|
// In the case of an unknown format,
|
||||||
|
|
Loading…
Reference in a new issue