read-pkg-up
Advanced tools
Comparing version 5.0.0 to 6.0.0
@@ -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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6225
5
97
3
3
+ Addedtype-fest@^0.5.0
+ Added@babel/code-frame@7.25.9(transitive)
+ Added@babel/highlight@7.25.9(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedfind-up@4.1.0(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedlocate-path@5.0.0(transitive)
+ Addedp-locate@4.1.0(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedtype-fest@0.5.2(transitive)
- Removed@babel/code-frame@7.26.0(transitive)
- Removedfind-up@3.0.0(transitive)
- Removedlocate-path@3.0.0(transitive)
- Removedp-locate@3.0.0(transitive)
- Removedpath-exists@3.0.0(transitive)
Updatedfind-up@^4.0.0
Updatedread-pkg@^5.1.1