Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

read-pkg-up

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

read-pkg-up - npm Package Compare versions

Comparing version 3.0.0 to 4.0.0

12

index.js

@@ -5,4 +5,4 @@ 'use strict';

module.exports = opts => {
return findUp('package.json', opts).then(fp => {
module.exports = options => {
return findUp('package.json', options).then(fp => {
if (!fp) {

@@ -12,8 +12,8 @@ return {};

return readPkg(fp, opts).then(pkg => ({pkg, path: fp}));
return readPkg(fp, options).then(pkg => ({pkg, path: fp}));
});
};
module.exports.sync = opts => {
const fp = findUp.sync('package.json', opts);
module.exports.sync = options => {
const fp = findUp.sync('package.json', options);

@@ -25,5 +25,5 @@ if (!fp) {

return {
pkg: readPkg.sync(fp, opts),
pkg: readPkg.sync(fp, options),
path: fp
};
};
{
"name": "read-pkg-up",
"version": "3.0.0",
"description": "Read the closest package.json file",
"license": "MIT",
"repository": "sindresorhus/read-pkg-up",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=4"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"json",
"read",
"parse",
"file",
"fs",
"graceful",
"load",
"pkg",
"package",
"find",
"up",
"find-up",
"findup",
"look-up",
"look",
"search",
"match",
"resolve",
"parent",
"parents",
"folder",
"directory",
"dir",
"walk",
"walking",
"path"
],
"dependencies": {
"find-up": "^2.0.0",
"read-pkg": "^3.0.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
}
"name": "read-pkg-up",
"version": "4.0.0",
"description": "Read the closest package.json file",
"license": "MIT",
"repository": "sindresorhus/read-pkg-up",
"author": {
"name": "Sindre Sorhus",
"email": "sindresorhus@gmail.com",
"url": "sindresorhus.com"
},
"engines": {
"node": ">=6"
},
"scripts": {
"test": "xo && ava"
},
"files": [
"index.js"
],
"keywords": [
"json",
"read",
"parse",
"file",
"fs",
"graceful",
"load",
"pkg",
"package",
"find",
"up",
"find-up",
"findup",
"look-up",
"look",
"search",
"match",
"resolve",
"parent",
"parents",
"folder",
"directory",
"dir",
"walk",
"walking",
"path"
],
"dependencies": {
"find-up": "^3.0.0",
"read-pkg": "^3.0.0"
},
"devDependencies": {
"ava": "*",
"xo": "*"
}
}

@@ -27,4 +27,4 @@ # read-pkg-up [![Build Status](https://travis-ci.org/sindresorhus/read-pkg-up.svg?branch=master)](https://travis-ci.org/sindresorhus/read-pkg-up)

readPkgUp().then(result => {
console.log(result);
(async () => {
console.log(await readPkgUp());
/*

@@ -40,3 +40,3 @@ {

*/
});
})();
```

@@ -57,2 +57,4 @@

Type: `Object`
##### cwd

@@ -59,0 +61,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