fix: use ES2018

This commit is contained in:
xHyroM 2022-07-11 09:57:02 +02:00
parent e187173d21
commit 8aad90088f
3 changed files with 2 additions and 13 deletions

2
dist/index.js vendored
View File

@ -12,7 +12,7 @@ const main = async () => {
if (!version)
return exit('Invalid bun version.');
const release = await getGithubRelease(version, token);
if (release?.message === 'Not Found')
if ((release === null || release === void 0 ? void 0 : release.message) === 'Not Found')
return exit('Invalid bun version.');
info(`Going to install release ${release.tag_name}`);
await install(release);

View File

@ -1,11 +0,0 @@
GET https://api.github.com/repos/oven-sh/bun/releases/tags/bun-v0.1.2
Content-Type: application/json
User-Agent: setup-bun-github-action
Authorization: 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
###
GET https://api.github.com/repos/oven-sh/bun/releases/latest
Content-Type: application/json
User-Agent: setup-bun-github-action
Authorization: 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

View File

@ -3,7 +3,7 @@
"outDir": "dist/",
"lib": ["ESNext"],
"module": "esnext",
"target": "esnext",
"target": "ES2018",
"moduleResolution": "node",
// "bun-types" is the important part
"types": ["bun-types"],