Socket
Socket
Sign inDemoInstall

install-artifact-from-github

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

install-artifact-from-github - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

18

bin/install-from-cache.js

@@ -15,3 +15,5 @@ #!/usr/bin/env node

const getPlatform = () => {
const platform = process.platform;
let platform = process.env.npm_config_platform;
if (platform) return platform;
platform = process.platform;
if (platform !== 'linux') return platform;

@@ -27,4 +29,7 @@ // detecting musl using algorithm from https://github.com/lovell/detect-libc under Apache License 2.0

};
const platform = getPlatform();
const platform = getPlatform(),
platformArch = process.env.npm_config_platform_arch || process.arch,
platformABI = process.env.npm_config_platform_abi || process.versions.modules;
const isParamPresent = name => process.argv.indexOf('--' + name) > 0;

@@ -70,4 +75,3 @@

if (!result) return null;
const host = mirrorHost || process.env[mirrorEnvVar] || 'https://github.com';
let assetUrl = host;
let assetUrl = mirrorHost || process.env[mirrorEnvVar] || 'https://github.com';
if (!skipPath && !process.env[skipPathVar]) {

@@ -79,3 +83,3 @@ assetUrl += `/${result[1]}/${result[2]}/releases/download`;

}
assetUrl += `/${prefix}${platform}-${process.arch}-${process.versions.modules}${suffix}`;
assetUrl += `/${prefix}${platform}-${platformArch}-${platformABI}${suffix}`;
return assetUrl;

@@ -113,2 +117,6 @@ };

const isVerified = async () => {
if (process.env.npm_config_platform || process.env.npm_config_platform_arch || process.env.npm_config_platform_abi) {
console.log(`Fetched for the custom platform "${platform}-${platformArch}-${platformABI}" -- skipping the verification.`);
return true;
}
try {

@@ -115,0 +123,0 @@ if (process.env.npm_package_scripts_verify_build) {

{
"name": "install-artifact-from-github",
"version": "1.3.0",
"version": "1.3.1",
"description": "Create binary artifacts hosted by github and install them without compiling.",

@@ -30,3 +30,6 @@ "homepage": "https://github.com/uhop/install-artifact-from-github",

"author": "Eugene Lazutkin <eugene.lazutkin@gmail.com> (https://lazutkin.com/)",
"license": "BSD-3-Clause"
"license": "BSD-3-Clause",
"scripts": {
"test": "node tests/test-env.js"
}
}

@@ -60,2 +60,3 @@ # install-artifact-from-github [![NPM version][npm-img]][npm-url]

- 1.3.1 *added a way to specify a custom build, thx (Grisha Pushkov)[https://github.com/reepush] + a test.*
- 1.3.0 *enhanced support for custom mirrors.*

@@ -62,0 +63,0 @@ - 1.2.0 *support for NPM >= 7.*

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc