Socket
Socket
Sign inDemoInstall

link-parent-bin

Package Overview
Dependencies
21
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.3 to 0.2.0

CHANGELOG.md

13

package.json
{
"name": "link-parent-bin",
"version": "0.1.3",
"version": "0.2.0",
"description": "",

@@ -10,2 +10,6 @@ "main": "src/ParentBinLinker.js",

},
"repository": {
"type": "git",
"url": "git+https://github.com/nicojs/node-link-parent-bin.git"
},
"scripts": {

@@ -21,3 +25,7 @@ "clean": "node tasks/clean.js",

"preversion": "npm test",
"version": "conventional-changelog -r 0 > changelog.md"
"version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md",
"postversion": "npm publish && git push && git push --tags",
"release:patch": "npm version patch -m \"chore(release): %s\"",
"release:minor": "npm version minor -m \"chore(release): %s\"",
"release:major": "npm version major -m \"chore(release): %s\""
},

@@ -40,2 +48,3 @@ "keywords": [],

"chai-as-promised": "^6.0.0",
"conventional-changelog-cli": "^1.3.22",
"install-local": "^0.3.1",

@@ -42,0 +51,0 @@ "mocha": "^3.2.0",

4

src/ParentBinLinker.d.ts

@@ -6,3 +6,4 @@ import { Options } from './program';

export interface PackageJson {
bin?: Dictionary;
name?: string;
bin?: Dictionary | string;
devDependencies?: Dictionary;

@@ -19,2 +20,3 @@ dependencies?: Dictionary;

linkBinsToChildren(): Promise<any>;
private binariesFrom(pkg);
}

@@ -31,4 +31,5 @@ "use strict";

if (pkg.bin) {
return Promise.all(Object.keys(pkg.bin).map(function (bin) { return Promise.all(childPackages.map(function (childPackage) {
return _this.linkBin(bin, path.resolve(moduleDir, pkg.bin[bin]), childPackage)
var binaries_1 = _this.binariesFrom(pkg);
return Promise.all(Object.keys(binaries_1).map(function (bin) { return Promise.all(childPackages.map(function (childPackage) {
return _this.linkBin(bin, path.resolve(moduleDir, binaries_1[bin]), childPackage)
.catch(function (err) { return _this.log.error("Could not link bin " + bin + " for child " + childPackage + ".", err); });

@@ -64,2 +65,8 @@ })); }));

};
ParentBinLinker.prototype.binariesFrom = function (pkg) {
var isString = function (val) { return typeof val === 'string'; };
return isString(pkg.bin)
? (_a = {}, _a[pkg.name] = pkg.bin, _a) : pkg.bin;
var _a;
};
return ParentBinLinker;

@@ -66,0 +73,0 @@ }());

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