Socket
Socket
Sign inDemoInstall

read-pkg-up

Package Overview
Dependencies
44
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 6.0.0 to 7.0.0

14

index.d.ts

@@ -1,2 +0,2 @@

import {Omit} from 'type-fest';
import {Except} from 'type-fest';
import readPkg = require('read-pkg');

@@ -12,3 +12,3 @@

cwd?: string;
} & Omit<readPkg.Options, 'cwd'>;
} & Except<readPkg.Options, 'cwd'>;

@@ -22,3 +22,3 @@ type NormalizeOptions = {

cwd?: string;
} & Omit<readPkg.NormalizeOptions, 'cwd'>;
} & Except<readPkg.NormalizeOptions, 'cwd'>;

@@ -29,3 +29,3 @@ type PackageJson = readPkg.PackageJson;

interface ReadResult {
package: PackageJson;
packageJson: PackageJson;
path: string;

@@ -35,3 +35,3 @@ }

interface NormalizedReadResult {
package: NormalizedPackageJson;
packageJson: NormalizedPackageJson;
path: string;

@@ -52,3 +52,3 @@ }

// {
// package: {
// packageJson: {
// name: 'awesome-package',

@@ -77,3 +77,3 @@ // version: '1.0.0',

// {
// package: {
// packageJson: {
// name: 'awesome-package',

@@ -80,0 +80,0 @@ // version: '1.0.0',

@@ -14,3 +14,3 @@ 'use strict';

return {
package: await readPkg({...options, cwd: path.dirname(filePath)}),
packageJson: await readPkg({...options, cwd: path.dirname(filePath)}),
path: filePath

@@ -28,5 +28,5 @@ };

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

@@ -49,11 +49,11 @@ "license": "MIT",

"dependencies": {
"find-up": "^4.0.0",
"read-pkg": "^5.1.1",
"type-fest": "^0.5.0"
"find-up": "^4.1.0",
"read-pkg": "^5.2.0",
"type-fest": "^0.8.1"
},
"devDependencies": {
"ava": "^1.4.1",
"tsd": "^0.7.3",
"xo": "^0.24.0"
"ava": "^2.4.0",
"tsd": "^0.9.0",
"xo": "^0.25.3"
}
}

@@ -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)

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

@@ -46,7 +46,7 @@ version: '1.0.0',

### readPkgUp([options])
### readPkgUp(options?)
Returns a `Promise<object>` or `Promise<undefined>` if no `package.json` was found.
### readPkgUp.sync([options])
### readPkgUp.sync(options?)

@@ -82,4 +82,12 @@ Returns the result object or `undefined` if no `package.json` was found.

## License
---
MIT © [Sindre Sorhus](https://sindresorhus.com)
<div align="center">
<b>
<a href="https://tidelift.com/subscription/pkg/npm-read-pkg-up?utm_source=npm-read-pkg-up&utm_medium=referral&utm_campaign=readme">Get professional support for this package with a Tidelift subscription</a>
</b>
<br>
<sub>
Tidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.
</sub>
</div>
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc