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

pkg-dir

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pkg-dir - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

4

index.js
import path from 'node:path';
import {findUp, findUpSync} from 'find-up';
export async function packageDirectory({cwd}) {
export async function packageDirectory({cwd} = {}) {
const filePath = await findUp('package.json', {cwd});

@@ -9,5 +9,5 @@ return filePath && path.dirname(filePath);

export function packageDirectorySync({cwd}) {
export function packageDirectorySync({cwd} = {}) {
const filePath = findUpSync('package.json', {cwd});
return filePath && path.dirname(filePath);
}
{
"name": "pkg-dir",
"version": "6.0.0",
"version": "6.0.1",
"description": "Find the root directory of a Node.js project or npm package",

@@ -5,0 +5,0 @@ "license": "MIT",

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