Comparing version 1.3.0 to 1.3.1
@@ -10,3 +10,8 @@ // Copyright (C) 2015-2016 IBM Corporation and Others. All Rights Reserved. | ||
var isglobal = process.env.npm_config_global === 'true'; | ||
var npmrc = '.npmrc'; | ||
var npmrcPath = path.resolve(process.env.INIT_CWD, npmrc); | ||
// uses semver regex from https://semver.org/ | ||
const YARN_REGEX = /yarn(-(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)?((.*cli)?\.js)?$/; | ||
module.exports = function npmInstallNpm(fullIcu, advice) { | ||
@@ -23,3 +28,3 @@ var icupkg = fullIcu.icupkg; | ||
if ( /yarn((.*cli)?\.js)?$/.test(npmPath) ) { | ||
if (YARN_REGEX.test(npmPath) ) { | ||
console.log('Looks like you are using yarn…'); | ||
@@ -38,4 +43,20 @@ installVerb = 'add'; | ||
if(fs.existsSync(npmrcPath)) { | ||
try { | ||
fs.linkSync(npmrcPath, npmrc); | ||
} catch(e) { | ||
fs.symlinkSync(npmrcPath, npmrc); | ||
} | ||
} | ||
console.log('full-icu$', cmdPath, args.join(' ')); | ||
var spawned = child_process.spawnSync(cmdPath, args, { stdio: 'inherit' }); | ||
if(fs.existsSync(npmrc)) { | ||
try { | ||
fs.unlinkSync(npmrc); | ||
} catch(e) { | ||
} | ||
} | ||
if(spawned.error) { | ||
@@ -42,0 +63,0 @@ throw(spawned.error); |
{ | ||
"name": "full-icu", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "install 'full-icu' data for your current node", | ||
@@ -5,0 +5,0 @@ "scripts": { |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
30035
215
9