@vercel/fun
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -1,2 +0,3 @@ | ||
export declare function generateNodeTarballUrl(version: string, platform?: string, arch?: string): string; | ||
export declare function installNode(dest: string, version: string, platform?: string, arch?: string): Promise<void>; | ||
/// <reference types="node" /> | ||
export declare function generateNodeTarballUrl(version: string, platform?: NodeJS.Platform, arch?: string): string; | ||
export declare function installNode(dest: string, version: string, platform?: NodeJS.Platform, arch?: string): Promise<void>; |
@@ -23,2 +23,3 @@ "use strict"; | ||
const fs_extra_1 = require("fs-extra"); | ||
const semver_1 = require("semver"); | ||
const unzip_1 = require("./unzip"); | ||
@@ -44,2 +45,9 @@ const debug = (0, debug_1.default)('@vercel/fun:install-node'); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
// For Apple M1, use the x64 binaries for v14 or less, | ||
// since there are no arm64 binaries for these versions | ||
if (platform === 'darwin' && | ||
arch === 'arm64' && | ||
(0, semver_1.satisfies)(version, '<= 14')) { | ||
arch = 'x64'; | ||
} | ||
const tarballUrl = generateNodeTarballUrl(version, platform, arch); | ||
@@ -46,0 +54,0 @@ debug('Downloading Node.js %s tarball %o', version, tarballUrl); |
@@ -1,2 +0,3 @@ | ||
export declare function generatePythonTarballUrl(version: string, platform?: string, arch?: string): string; | ||
export declare function installPython(dest: string, version: string, platform?: string, arch?: string): Promise<void>; | ||
/// <reference types="node" /> | ||
export declare function generatePythonTarballUrl(version: string, platform?: NodeJS.Platform, arch?: string): string; | ||
export declare function installPython(dest: string, version: string, platform?: NodeJS.Platform, arch?: string): Promise<void>; |
@@ -27,2 +27,6 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
// For Apple M1 use the x64 binaries | ||
if (platform === 'darwin' && arch === 'arm64') { | ||
arch = 'x64'; | ||
} | ||
const tarballUrl = generatePythonTarballUrl(version, platform, arch); | ||
@@ -29,0 +33,0 @@ debug('Downloading Python %s tarball %o', version, tarballUrl); |
{ | ||
"name": "@vercel/fun", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Local Lambda development environment", | ||
@@ -35,2 +35,3 @@ "main": "dist/src/index", | ||
"promisepipe": "3.0.0", | ||
"semver": "7.3.5", | ||
"stat-mode": "0.3.0", | ||
@@ -37,0 +38,0 @@ "stream-to-promise": "2.2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
157217
1830
20
+ Addedsemver@7.3.5
+ Addedlru-cache@6.0.0(transitive)
+ Addedsemver@7.3.5(transitive)
+ Addedyallist@4.0.0(transitive)