Installations
npm install pkg-dir-cli
Developer Guide
Typescript
No
Module System
ESM
Min. Node Version
>=18
Node Version
18.18.2
NPM Version
9.2.0
Score
62
Supply Chain
73.1
Quality
75.4
Maintenance
100
Vulnerability
99.6
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
sindresorhus
Download Statistics
Total Downloads
40,671
Last Day
25
Last Week
51
Last Month
478
Last Year
7,941
GitHub Statistics
24 Stars
15 Commits
4 Forks
7 Watching
1 Branches
2 Contributors
Sponsor this package
Package Meta Information
Latest Version
4.0.0
Package Id
pkg-dir-cli@4.0.0
Unpacked Size
3.19 kB
Size
1.67 kB
File Count
4
NPM Version
9.2.0
Node Version
18.18.2
Publised On
04 Nov 2023
Total Downloads
Cumulative downloads
Total Downloads
40,671
Last day
8.7%
25
Compared to previous day
Last week
-62.8%
51
Compared to previous week
Last month
-43.2%
478
Compared to previous month
Last year
248.9%
7,941
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
pkg-dir-cli
Find the root directory of a Node.js project or npm package
Install
1npm install --global pkg-dir-cli
Usage
$ pkg-dir --help
Usage
$ pkg-dir <cwd>
Examples
$ echo $PWD
/Users/sindresorhus/foo/bar
$ pkg-dir
/Users/sindresorhus/foo
Example
/
└── Users
└── sindresorhus
└── foo
├── package.json
└── bar
└── example.js
$ echo $PWD
/Users/sindresorhus/foo/bar
$ pkg-dir
/Users/sindresorhus/foo
Related
- pkg-dir - API for this module
- find-up-cli - Find a file by walking up parent directories
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: MIT License: license:0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/pkg-dir-cli/main.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/sindresorhus/pkg-dir-cli/main.yml/main?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/main.yml:21
- Info: 0 out of 2 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 1 npmCommand dependencies pinned
Reason
Found 1/15 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/main.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 1 are checked with a SAST tool
Score
3.4
/10
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More