feat: fetch tarball with zst compression (#153)

This commit is contained in:
jdx 2024-12-23 13:31:53 -06:00 committed by GitHub
parent 5bb8f8c191
commit 370e73c4f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 132 additions and 125 deletions

1
dist/cache-save/index.js generated vendored
View file

@ -41622,6 +41622,7 @@ function readDocType(xmlData, i){
if (xmlData[i] === '<' && !comment) { //Determine the tag type
if( hasBody && isEntity(xmlData, i)){
i += 7;
let entityName, val;
[entityName, val,i] = readEntityExp(xmlData,i+1);
if(val.indexOf("&") === -1) //Parameter entities are not supported
entities[ validateEntityName(entityName) ] = {

2
dist/cache-save/index.js.map generated vendored

File diff suppressed because one or more lines are too long

38
dist/index.js generated vendored
View file

@ -42855,6 +42855,7 @@ function readDocType(xmlData, i){
if (xmlData[i] === '<' && !comment) { //Determine the tag type
if( hasBody && isEntity(xmlData, i)){
i += 7;
let entityName, val;
[entityName, val,i] = readEntityExp(xmlData,i+1);
if(val.indexOf("&") === -1) //Parameter entities are not supported
entities[ validateEntityName(entityName) ] = {
@ -71591,31 +71592,32 @@ async function setupMise(version) {
if (!fs.existsSync(path.join(miseBinPath))) {
core.startGroup(version ? `Download mise@${version}` : 'Setup mise');
await fs.promises.mkdir(miseBinDir, { recursive: true });
const ext = getOS() === 'windows'
? '.zip'
: version && version.startsWith('2024')
? ''
: '.tar.zst';
const url = version
? `https://mise.jdx.dev/v${version}/mise-v${version}-${getOS()}-${os.arch()}`
: `https://mise.jdx.dev/mise-latest-${getOS()}-${os.arch()}`;
? `https://mise.jdx.dev/v${version}/mise-v${version}-${getOS()}-${os.arch()}${ext}`
: `https://mise.jdx.dev/mise-latest-${getOS()}-${os.arch()}${ext}`;
const archivePath = path.join(os.tmpdir(), `mise${ext}`);
if (getOS() === 'windows') {
const zipPath = path.join(os.tmpdir(), 'mise.zip');
await exec.exec('curl', [
'--compressed',
'-fsSL',
`${url}.zip`,
'--output',
zipPath
]);
await exec.exec('unzip', [zipPath, '-d', os.tmpdir()]);
await exec.exec('curl', ['-fsSL', url, '--output', archivePath]);
await exec.exec('unzip', [archivePath, '-d', os.tmpdir()]);
await io.mv(path.join(os.tmpdir(), 'mise/bin/mise.exe'), miseBinPath);
}
else {
await exec.exec('curl', [
'--compressed',
'-fsSL',
url,
'--output',
miseBinPath
]);
if (ext === '') {
await exec.exec('sh', ['-c', `curl -fsSL ${url} > ${miseBinPath}`]);
await exec.exec('chmod', ['+x', miseBinPath]);
}
else {
await exec.exec('sh', [
'-c',
`curl -fsSL ${url} | tar --zstd -xf - -C ${os.tmpdir()} && mv ${os.tmpdir()}/mise/bin/mise ${miseBinPath}`
]);
}
}
}
core.addPath(miseBinDir);
}

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

173
package-lock.json generated
View file

@ -1006,9 +1006,9 @@
}
},
"node_modules/@eslint/js": {
"version": "9.16.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz",
"integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==",
"version": "9.17.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.17.0.tgz",
"integrity": "sha512-Sxc4hqcs1kTu0iID3kcZDW3JHq2a77HO9P8CP6YEA/FpH3Ll8UXE2r/86Rz9YJLKme39S9vU5OWNjC6Xl0Cr3w==",
"dev": true,
"license": "MIT",
"engines": {
@ -1869,17 +1869,17 @@
"license": "MIT"
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.0.tgz",
"integrity": "sha512-NR2yS7qUqCL7AIxdJUQf2MKKNDVNaig/dEB0GBLU7D+ZdHgK1NoH/3wsgO3OnPVipn51tG3MAwaODEGil70WEw==",
"version": "8.18.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.18.2.tgz",
"integrity": "sha512-adig4SzPLjeQ0Tm+jvsozSGiCliI2ajeURDGHjZ2llnA+A67HihCQ+a3amtPhUakd1GlwHxSRvzOZktbEvhPPg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "8.18.0",
"@typescript-eslint/type-utils": "8.18.0",
"@typescript-eslint/utils": "8.18.0",
"@typescript-eslint/visitor-keys": "8.18.0",
"@typescript-eslint/scope-manager": "8.18.2",
"@typescript-eslint/type-utils": "8.18.2",
"@typescript-eslint/utils": "8.18.2",
"@typescript-eslint/visitor-keys": "8.18.2",
"graphemer": "^1.4.0",
"ignore": "^5.3.1",
"natural-compare": "^1.4.0",
@ -1899,16 +1899,16 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.0.tgz",
"integrity": "sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==",
"version": "8.18.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.18.2.tgz",
"integrity": "sha512-y7tcq4StgxQD4mDr9+Jb26dZ+HTZ/SkfqpXSiqeUXZHxOUyjWDKsmwKhJ0/tApR08DgOhrFAoAhyB80/p3ViuA==",
"dev": true,
"license": "MITClause",
"license": "MIT",
"dependencies": {
"@typescript-eslint/scope-manager": "8.18.0",
"@typescript-eslint/types": "8.18.0",
"@typescript-eslint/typescript-estree": "8.18.0",
"@typescript-eslint/visitor-keys": "8.18.0",
"@typescript-eslint/scope-manager": "8.18.2",
"@typescript-eslint/types": "8.18.2",
"@typescript-eslint/typescript-estree": "8.18.2",
"@typescript-eslint/visitor-keys": "8.18.2",
"debug": "^4.3.4"
},
"engines": {
@ -1924,14 +1924,14 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.0.tgz",
"integrity": "sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==",
"version": "8.18.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.18.2.tgz",
"integrity": "sha512-YJFSfbd0CJjy14r/EvWapYgV4R5CHzptssoag2M7y3Ra7XNta6GPAJPPP5KGB9j14viYXyrzRO5GkX7CRfo8/g==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.18.0",
"@typescript-eslint/visitor-keys": "8.18.0"
"@typescript-eslint/types": "8.18.2",
"@typescript-eslint/visitor-keys": "8.18.2"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@ -1942,14 +1942,14 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.0.tgz",
"integrity": "sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==",
"version": "8.18.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.18.2.tgz",
"integrity": "sha512-AB/Wr1Lz31bzHfGm/jgbFR0VB0SML/hd2P1yxzKDM48YmP7vbyJNHRExUE/wZsQj2wUCvbWH8poNHFuxLqCTnA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/typescript-estree": "8.18.0",
"@typescript-eslint/utils": "8.18.0",
"@typescript-eslint/typescript-estree": "8.18.2",
"@typescript-eslint/utils": "8.18.2",
"debug": "^4.3.4",
"ts-api-utils": "^1.3.0"
},
@ -1966,9 +1966,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.0.tgz",
"integrity": "sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==",
"version": "8.18.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.18.2.tgz",
"integrity": "sha512-Z/zblEPp8cIvmEn6+tPDIHUbRu/0z5lqZ+NvolL5SvXWT5rQy7+Nch83M0++XzO0XrWRFWECgOAyE8bsJTl1GQ==",
"dev": true,
"license": "MIT",
"engines": {
@ -1980,14 +1980,14 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.0.tgz",
"integrity": "sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==",
"version": "8.18.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.18.2.tgz",
"integrity": "sha512-WXAVt595HjpmlfH4crSdM/1bcsqh+1weFRWIa9XMTx/XHZ9TCKMcr725tLYqWOgzKdeDrqVHxFotrvWcEsk2Tg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.18.0",
"@typescript-eslint/visitor-keys": "8.18.0",
"@typescript-eslint/types": "8.18.2",
"@typescript-eslint/visitor-keys": "8.18.2",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
@ -2046,16 +2046,16 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.0.tgz",
"integrity": "sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==",
"version": "8.18.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.18.2.tgz",
"integrity": "sha512-Cr4A0H7DtVIPkauj4sTSXVl+VBWewE9/o40KcF3TV9aqDEOWoXF3/+oRXNby3DYzZeCATvbdksYsGZzplwnK/Q==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@typescript-eslint/scope-manager": "8.18.0",
"@typescript-eslint/types": "8.18.0",
"@typescript-eslint/typescript-estree": "8.18.0"
"@typescript-eslint/scope-manager": "8.18.2",
"@typescript-eslint/types": "8.18.2",
"@typescript-eslint/typescript-estree": "8.18.2"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@ -2070,13 +2070,13 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.0.tgz",
"integrity": "sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==",
"version": "8.18.2",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.18.2.tgz",
"integrity": "sha512-zORcwn4C3trOWiCqFQP1x6G3xTRyZ1LYydnj51cRnJ6hxBlr/cKPckk+PKPUw/fXmvfKTcw7bwY3w9izgx5jZw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.18.0",
"@typescript-eslint/types": "8.18.2",
"eslint-visitor-keys": "^4.2.0"
},
"engines": {
@ -2373,9 +2373,9 @@
}
},
"node_modules/browserslist": {
"version": "4.24.2",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz",
"integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==",
"version": "4.24.3",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.3.tgz",
"integrity": "sha512-1CPmv8iobE2fyRMV97dAcMVegvvWKxmq94hkLiAkUGwKVTyDLw33K+ZxiFrREKmmps4rIw6grcCFCnTMSZ/YiA==",
"dev": true,
"funding": [
{
@ -2393,9 +2393,9 @@
],
"license": "MIT",
"dependencies": {
"caniuse-lite": "^1.0.30001669",
"electron-to-chromium": "^1.5.41",
"node-releases": "^2.0.18",
"caniuse-lite": "^1.0.30001688",
"electron-to-chromium": "^1.5.73",
"node-releases": "^2.0.19",
"update-browserslist-db": "^1.1.1"
},
"bin": {
@ -2453,9 +2453,9 @@
}
},
"node_modules/caniuse-lite": {
"version": "1.0.30001688",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001688.tgz",
"integrity": "sha512-Nmqpru91cuABu/DTCXbM2NSRHzM2uVHfPnhJ/1zEAJx/ILBRVmz3pzH4N7DZqbdG0gWClsCC05Oj0mJ/1AWMbA==",
"version": "1.0.30001690",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001690.tgz",
"integrity": "sha512-5ExiE3qQN6oF8Clf8ifIDcMRCRE/dMGcETG/XGMD8/XiXm6HXQgQTh1yZYLXXpSOsEUlJm1Xr7kGULZTuGtP/w==",
"dev": true,
"funding": [
{
@ -2739,9 +2739,9 @@
}
},
"node_modules/electron-to-chromium": {
"version": "1.5.73",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.73.tgz",
"integrity": "sha512-8wGNxG9tAG5KhGd3eeA0o6ixhiNdgr0DcHWm85XPCphwZgD1lIEoi6t3VERayWao7SF7AAZTw6oARGJeVjH8Kg==",
"version": "1.5.76",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.76.tgz",
"integrity": "sha512-CjVQyG7n7Sr+eBXE86HIulnL5N8xZY1sgmOPGuq/F0Rr0FJq63lg0kEtOIDfZBk44FnDLf6FUJ+dsJcuiUDdDQ==",
"dev": true,
"license": "ISC"
},
@ -2799,9 +2799,9 @@
}
},
"node_modules/eslint": {
"version": "9.16.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.16.0.tgz",
"integrity": "sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==",
"version": "9.17.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-9.17.0.tgz",
"integrity": "sha512-evtlNcpJg+cZLcnVKwsai8fExnqjGPicK7gnUtlNuzu+Fv9bI0aLpND5T44VLQtoMEnI57LoXO9XAkIXwohKrA==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -2810,7 +2810,7 @@
"@eslint/config-array": "^0.19.0",
"@eslint/core": "^0.9.0",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "9.16.0",
"@eslint/js": "9.17.0",
"@eslint/plugin-kit": "^0.2.3",
"@humanfs/node": "^0.16.6",
"@humanwhocodes/module-importer": "^1.0.1",
@ -2819,7 +2819,7 @@
"@types/json-schema": "^7.0.15",
"ajv": "^6.12.4",
"chalk": "^4.0.0",
"cross-spawn": "^7.0.5",
"cross-spawn": "^7.0.6",
"debug": "^4.3.2",
"escape-string-regexp": "^4.0.0",
"eslint-scope": "^8.2.0",
@ -3086,9 +3086,9 @@
"license": "MIT"
},
"node_modules/fast-xml-parser": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.0.tgz",
"integrity": "sha512-/PlTQCI96+fZMAOLMZK4CWG1ItCbfZ/0jx7UIJFChPNrx7tcEgerUgWbeieCM9MfHInUDyK8DWYZ+YrywDJuTg==",
"version": "4.5.1",
"resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-4.5.1.tgz",
"integrity": "sha512-y655CeyUQ+jj7KBbYMc4FG01V8ZQqjN+gDYGJ50RtfsUB8iG9AmwmwoAgeKLJdmueKKMrH1RJ7yXHTSoczdv5w==",
"funding": [
{
"type": "github",
@ -3108,9 +3108,9 @@
}
},
"node_modules/fastq": {
"version": "1.17.1",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz",
"integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==",
"version": "1.18.0",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.18.0.tgz",
"integrity": "sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==",
"dev": true,
"license": "ISC",
"dependencies": {
@ -3315,9 +3315,9 @@
}
},
"node_modules/globals": {
"version": "15.13.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-15.13.0.tgz",
"integrity": "sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g==",
"version": "15.14.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-15.14.0.tgz",
"integrity": "sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==",
"dev": true,
"license": "MIT",
"engines": {
@ -3505,9 +3505,9 @@
"license": "MIT"
},
"node_modules/is-core-module": {
"version": "2.15.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz",
"integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==",
"version": "2.16.1",
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
"integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
"dev": true,
"license": "MIT",
"dependencies": {
@ -5041,19 +5041,22 @@
}
},
"node_modules/resolve": {
"version": "1.22.8",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
"integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
"version": "1.22.10",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
"integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==",
"dev": true,
"license": "MIT",
"dependencies": {
"is-core-module": "^2.13.0",
"is-core-module": "^2.16.0",
"path-parse": "^1.0.7",
"supports-preserve-symlinks-flag": "^1.0.0"
},
"bin": {
"resolve": "bin/resolve"
},
"engines": {
"node": ">= 0.4"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
@ -5550,15 +5553,15 @@
}
},
"node_modules/typescript-eslint": {
"version": "8.18.0",
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.18.0.tgz",
"integrity": "sha512-Xq2rRjn6tzVpAyHr3+nmSg1/9k9aIHnJ2iZeOH7cfGOWqTkXTm3kwpQglEuLGdNrYvPF+2gtAs+/KF5rjVo+WQ==",
"version": "8.18.2",
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.18.2.tgz",
"integrity": "sha512-KuXezG6jHkvC3MvizeXgupZzaG5wjhU3yE8E7e6viOvAvD9xAWYp8/vy0WULTGe9DYDWcQu7aW03YIV3mSitrQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "8.18.0",
"@typescript-eslint/parser": "8.18.0",
"@typescript-eslint/utils": "8.18.0"
"@typescript-eslint/eslint-plugin": "8.18.2",
"@typescript-eslint/parser": "8.18.2",
"@typescript-eslint/utils": "8.18.2"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"

View file

@ -130,29 +130,30 @@ async function setupMise(version: string): Promise<void> {
if (!fs.existsSync(path.join(miseBinPath))) {
core.startGroup(version ? `Download mise@${version}` : 'Setup mise')
await fs.promises.mkdir(miseBinDir, { recursive: true })
const ext =
getOS() === 'windows'
? '.zip'
: version && version.startsWith('2024')
? ''
: '.tar.zst'
const url = version
? `https://mise.jdx.dev/v${version}/mise-v${version}-${getOS()}-${os.arch()}`
: `https://mise.jdx.dev/mise-latest-${getOS()}-${os.arch()}`
? `https://mise.jdx.dev/v${version}/mise-v${version}-${getOS()}-${os.arch()}${ext}`
: `https://mise.jdx.dev/mise-latest-${getOS()}-${os.arch()}${ext}`
const archivePath = path.join(os.tmpdir(), `mise${ext}`)
if (getOS() === 'windows') {
const zipPath = path.join(os.tmpdir(), 'mise.zip')
await exec.exec('curl', [
'--compressed',
'-fsSL',
`${url}.zip`,
'--output',
zipPath
])
await exec.exec('unzip', [zipPath, '-d', os.tmpdir()])
await exec.exec('curl', ['-fsSL', url, '--output', archivePath])
await exec.exec('unzip', [archivePath, '-d', os.tmpdir()])
await io.mv(path.join(os.tmpdir(), 'mise/bin/mise.exe'), miseBinPath)
} else {
await exec.exec('curl', [
'--compressed',
'-fsSL',
url,
'--output',
miseBinPath
])
if (ext === '') {
await exec.exec('sh', ['-c', `curl -fsSL ${url} > ${miseBinPath}`])
await exec.exec('chmod', ['+x', miseBinPath])
} else {
await exec.exec('sh', [
'-c',
`curl -fsSL ${url} | tar --zstd -xf - -C ${os.tmpdir()} && mv ${os.tmpdir()}/mise/bin/mise ${miseBinPath}`
])
}
}
}
core.addPath(miseBinDir)