Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.1.3 to 1.2.0

22

bin/install-from-cache.js

@@ -55,6 +55,3 @@ #!/usr/bin/env node

const getAssetUrlPrefix = () => {
const url =
process.env.npm_package_github ||
process.env.npm_package_repository ||
(process.env.npm_package_repository_type === 'git' && process.env.npm_package_repository_url),
const url = process.env.npm_package_github || (process.env.npm_package_repository_type === 'git' && process.env.npm_package_repository_url),
result = getRepo(url),

@@ -145,2 +142,19 @@ host = mirrorHost || process.env[mirrorEnvVar] || 'https://github.com';

checks: {
if (process.env.npm_package_json && /\bpackage\.json$/i.test(process.env.npm_package_json)) {
// for NPM >= 7
try {
// read the package info
const pkg = JSON.parse(await fsp.readFile(process.env.npm_package_json));
// populate necessary environment variables locally
process.env.npm_package_github = pkg.github || '';
process.env.npm_package_repository_type = (pkg.repository && pkg.repository.type) || '';
process.env.npm_package_repository_url = (pkg.repository && pkg.repository.url) || '';
process.env.npm_package_version = pkg.version || '';
process.env.npm_package_scripts_verify_build = (pkg.scripts && pkg.scripts['verify-build']) || '';
process.env.npm_package_scripts_test = (pkg.scripts && pkg.scripts.test) || '';
} catch (error) {
console.log('Could not retrieve and parse package.json.');
break checks;
}
}
if (!artifactPath) {

@@ -147,0 +161,0 @@ console.log('No artifact path was specified with --artifact.');

6

package.json
{
"name": "install-artifact-from-github",
"version": "1.1.3",
"version": "1.2.0",
"description": "Create binary artifacts hosted by github and install them without compiling.",

@@ -19,4 +19,4 @@ "homepage": "http://github.com/uhop/install-artifact-from-github",

"bin": {
"install-from-cache": "./bin/install-from-cache.js",
"save-to-github-cache": "./bin/save-to-github-cache.js"
"install-from-cache": "bin/install-from-cache.js",
"save-to-github-cache": "bin/save-to-github-cache.js"
},

@@ -23,0 +23,0 @@ "keywords": [

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

- 1.2.0 *support for NPM >= 7.*
- 1.1.3 *technical release: updated docs.*

@@ -62,0 +63,0 @@ - 1.1.2 *technical release: updated docs.*

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