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 5.0.0 to 6.0.0

index.d.ts

8

index.js

@@ -10,7 +10,7 @@ 'use strict';

if (!filePath) {
return {};
return;
}
return {
pkg: await readPkg({...options, cwd: path.dirname(filePath)}),
package: await readPkg({...options, cwd: path.dirname(filePath)}),
path: filePath

@@ -24,9 +24,9 @@ };

if (!filePath) {
return {};
return;
}
return {
pkg: readPkg.sync({...options, cwd: path.dirname(filePath)}),
package: readPkg.sync({...options, cwd: path.dirname(filePath)}),
path: filePath
};
};
{
"name": "read-pkg-up",
"version": "5.0.0",
"version": "6.0.0",
"description": "Read the closest package.json file",

@@ -16,6 +16,7 @@ "license": "MIT",

"scripts": {
"test": "xo && ava"
"test": "xo && ava && tsd"
},
"files": [
"index.js"
"index.js",
"index.d.ts"
],

@@ -30,3 +31,2 @@ "keywords": [

"load",
"pkg",
"package",

@@ -46,3 +46,2 @@ "find",

"directory",
"dir",
"walk",

@@ -53,9 +52,11 @@ "walking",

"dependencies": {
"find-up": "^3.0.0",
"read-pkg": "^5.0.0"
"find-up": "^4.0.0",
"read-pkg": "^5.1.1",
"type-fest": "^0.5.0"
},
"devDependencies": {
"ava": "^1.3.1",
"ava": "^1.4.1",
"tsd": "^0.7.3",
"xo": "^0.24.0"
}
}

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

{
pkg: {
package: {
name: 'awesome-package',

@@ -48,11 +48,11 @@ version: '1.0.0',

Returns a `Promise` for the result object.
Returns a `Promise<object>` or `Promise<undefined>` if no `package.json` was found.
### readPkgUp.sync([options])
Returns the result object.
Returns the result object or `undefined` if no `package.json` was found.
#### options
Type: `Object`
Type: `object`

@@ -59,0 +59,0 @@ ##### cwd

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