package-directory
Find the root directory of a Node.js project or npm package
by sindresorhusJavaScript
Commit activity
Last 12 weeks · 1 commit
Community health
4 of 6 standards met
Recent fixes
With ESM modules, Node has introduced a 2nd use for . So now the presence of a file does not necessarily indicate the root of a package. It could just contain to indicate that a subdirectory's files are to be treated as ESM modules. Could check the contents of files found, and ignore any which don't indicate package root? Perhaps checking for a field would do the trick.
Repository: sindresorhus/package-directory. Description: Find the root directory of a Node.js project or npm package Stars: 254, Forks: 21. Primary language: JavaScript. Languages: JavaScript (89.9%), TypeScript (10.1%). License: MIT. Latest release: v8.2.0 (8mo ago). Open PRs: 0, open issues: 0. Last activity: 1mo ago. Community health: 85%. Top contributors: sindresorhus, coreyfarrell, BendingBender, jimmywarting, kellyselden, LinusU, Richienb, SamVerschueren.