Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

pkg-dir

Package Overview
Dependencies
1
Maintainers
1
Versions
10
Issues
File Explorer

Advanced tools

7.0.0


Changelog

Source

Breaking

  • Require Node.js 14 b05b835
  • Fix TypeScript return type dea1a16

https://github.com/sindresorhus/pkg-dir/compare/v6.0.1...v7.0.0

6.0.1

sindresorhus
published 6.0.1 •

Changelog

Source

  • Fix regression in v6 (#15) 6570506

https://github.com/sindresorhus/pkg-dir/compare/v6.0.0...v6.0.1

6.0.0

sindresorhus
published 6.0.0 •

Changelog

Source

Breaking

  • Require Node.js 12.20 (#14) 198c9fe aeafb93
  • This package is now pure ESM. Please read this.
  • Changed from a default export to named exports and the export names changed too.
  • The cwd argument is now part of an options-object.
-const pkgDir = require('pkg-dir'); +import {packageDirectory} from 'pkg-dir'; -await pkgDir('/Users/unicorn/foo'); +await packageDirectory({cwd: '/Users/unicorn/foo'});

https://github.com/sindresorhus/pkg-dir/compare/v5.0.0...v6.0.0

5.0.0

sindresorhus
published 5.0.0 •

Changelog

Source

Breaking

  • Require Node.js 10 (#9) d3919a8

https://github.com/sindresorhus/pkg-dir/compare/v4.2.0...v5.0.0

4.2.0

sindresorhus
published 4.2.0 •

Changelog

Source

  • Update find-up dependency (#7) aba58d7

https://github.com/sindresorhus/pkg-dir/compare/v4.1.0...v4.2.0

4.1.0

sindresorhus
published 4.1.0 •

Changelog

Source

  • Refactor TypeScript definition to CommonJS compatible export (#5) 88b6650

https://github.com/sindresorhus/pkg-dir/compare/v4.0.0...v4.1.0

4.0.0

sindresorhus
published 4.0.0 •

Changelog

Source

Breaking:

  • Require Node.js 8 (#4) 24d765b
  • Return undefined instead of null when the project root cannot be found 80325b3 undefined works better with new JS features like default arguments.

Enhancements:

  • Add TypeScript definition (#4) 24d765b

https://github.com/sindresorhus/pkg-dir/compare/v3.0.0...v4.0.0

3.0.0

sindresorhus
published 3.0.0 •

2.0.0

sindresorhus
published 2.0.0 •

1.0.0

sindresorhus
published 1.0.0 •

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc