Socket
Socket
Sign inDemoInstall

nativescript-hook

Package Overview
Dependencies
Maintainers
7
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-hook - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

16

index.js

@@ -13,3 +13,3 @@ module.exports = function (__dirname) {

};
}
};

@@ -21,2 +21,3 @@ var fs = require('fs');

var mkdirp = require('mkdirp');
var glob = require('glob');

@@ -62,3 +63,3 @@ function generateHookName(pkg, hook) {

ns.hooks.forEach(function (hook) {
callback(hooksDir, pkg, hook)
callback(hooksDir, pkg, hook);
});

@@ -68,2 +69,9 @@ }

function hookInstalled(hookDir, pkg, hook) {
var hookBaseName = pkg.name;
var hookGlob = path.join(hookDir, "*" + hookBaseName + "*");
var files = glob.sync(hookGlob);
return files.length > 0;
}
function postinstall(pkgdir) {

@@ -75,2 +83,6 @@ forEachHook(pkgdir, function (hooksDir, pkg, hook) {

}
if (hookInstalled(hookDir, pkg, hook)) {
console.log('Hook already installed: ' + pkg.name);
return;
}
var hookFileName = generateHookName(pkg, hook);

@@ -77,0 +89,0 @@ var hookPath = path.join(hookDir, hookFileName);

3

package.json
{
"name": "nativescript-hook",
"version": "0.2.0",
"version": "0.2.1",
"description": "Helper module for installing hooks into NativeScript projects",

@@ -16,4 +16,5 @@ "main": "index.js",

"dependencies": {
"glob": "^6.0.1",
"mkdirp": "^0.5.1"
}
}

@@ -0,0 +0,0 @@ nativescript-hook

Sorry, the diff of this file is not supported yet

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