Socket
Socket
Sign inDemoInstall

add-component-symlinks

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

LICENSE

7

History.md
1.0.1 / 2014-02-10
==================
* index: don't set a symlink if the package name matches the component name
* add README.md file
* add LICENSE file
1.0.0 / 2014-02-10

@@ -3,0 +10,0 @@ ==================

4

index.es6.js

@@ -68,2 +68,6 @@

var src = path.basename(dirname);
if (src == component.name) {
console.error('ignoring matching package and component name: %j', src);
return;
}
var dst = path.resolve(nodeModulesDir, component.name);

@@ -70,0 +74,0 @@

43

index.js

@@ -424,3 +424,3 @@

$ctx1.catch("end");
$ctx1.next = 48;
$ctx1.next = 53;
break;

@@ -434,3 +434,3 @@ case 8:

$ctx1.catch("end");
$ctx1.next = 48;
$ctx1.next = 53;
break;

@@ -444,3 +444,3 @@ case 12:

$ctx1.catch("end");
$ctx1.next = 48;
$ctx1.next = 53;
break;

@@ -474,3 +474,3 @@ case 16:

$ctx1.catch("end");
$ctx1.next = 48;
$ctx1.next = 53;
break;

@@ -481,15 +481,26 @@ case 32:

src = path.basename(dirname);
if (!(src == component.name)) {
$ctx1.next = 40;
break;
}
console.error('ignoring matching package and component name: %j', src);
$ctx1.catch("end");
$ctx1.next = 53;
break;
case 40:
dst = path.resolve(nodeModulesDir, component.name);
$ctx1.prev = 36;
$ctx1.next = 39;
$ctx1.prev = 41;
$ctx1.next = 44;
return fs.unlink(dst, resume());
case 39:
$ctx1.next = 45;
case 44:
$ctx1.next = 50;
break;
case 41:
$ctx1.prev = 41;
$ctx1.t2 = $ctx1.catch(41);
case 46:
$ctx1.prev = 46;
$ctx1.t2 = $ctx1.catch(46);
if (!('ENOENT' != $ctx1.t2.code)) {
$ctx1.next = 45;
$ctx1.next = 50;
break;

@@ -499,15 +510,15 @@ }

throw $ctx1.t2;
case 45:
case 50:
// finally, we can add a symlink for this component
console.log('adding symlink %j -> %j', src, component.name);
$ctx1.next = 48;
$ctx1.next = 53;
return fs.symlink(src, dst, resume());
case 48:
case 53:
case "end":
return $ctx1.stop();
}
}, this, [[17, 24], [36, 41]]);
}, this, [[17, 24], [41, 46]]);
}));
module.exports = addComponentSymlinks;
{
"name": "add-component-symlinks",
"version": "1.0.0",
"version": "1.0.1",
"description": "Adds symlinks to the node_modules dir to fix component require() calls",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc