Socket
Socket
Sign inDemoInstall

parent-package-json

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parent-package-json - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

lib/index.js

@@ -5,3 +5,3 @@ var fs = require('fs'),

module.exports = function findPackageJSON(startPath) {
startPath = startPath || __dirname;
startPath = startPath || process.cwd();
var searchPath = path.join(startPath + '/..');

@@ -8,0 +8,0 @@

{
"name": "parent-package-json",
"version": "1.0.1",
"version": "1.0.2",
"description": "Find, read and parse the package.json of the parent module",

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

@@ -35,3 +35,3 @@ # parent-package-json

Usually, `parent-package-json` will use `__dirname` for starting at, it will search the parent folders up until `/` for finding a `package.json` (and stops as soon as it finds one). If you want it to start somewhere other than `__dirname`, provide a path as an argument instead:
Usually, `parent-package-json` will use `process.cwd()` for starting at, it will search the parent folders up until `/` for finding a `package.json` (and stops as soon as it finds one). If you want it to start somewhere other than `process.cwd()`, provide a path as an argument instead:

@@ -38,0 +38,0 @@ ```javascript

@@ -38,7 +38,2 @@ var assert = require('assert'),

});
it('should find its own package.json', function() {
mock.restore();
expect(parent()).to.not.equal(false);
mock(mockFs);
});
});

@@ -45,0 +40,0 @@

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