</>PackageGraphPackageGraph

cosmiconfig

npmv9.0.2TypeScript

Find and load configuration from a package.json property, rc file, TypeScript module, and more!

120.7M
Weekly downloads
2
Dependents
26
Dependencies
100/100
Popularity

Overview

cosmiconfig is an npm package that find and load configuration from a package.json property, rc file, TypeScript module, and more!. It is extremely widely used, with about 120.7M downloads per week and 2 known dependents in the graph. The latest version is 9.0.2, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need find and load configuration from a package.json property, rc file, TypeScript module, and more! and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (120.7M weekly downloads).
  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • Large dependency tree (26 direct dependencies) increases install size and audit surface.

Auto-generated from collected registry metadata. No external claims are inferred.

Relationship graph

Dependencies (left) and dependents (right) of cosmiconfig.

env-pathsparse-json@react-native-com…lesscosmiconfig
cosmiconfig dependencies dependents

Dependencies

Runtime (4)

env-paths ^2.2.1import-fresh ^3.3.0js-yaml ^4.1.0parse-json ^5.2.0

Peer (1)

typescript >=4.9.5

Dev (21)

@types/js-yaml ^4.0.5@types/node ^14@types/parse-json ^4.0.0@typescript-eslint/eslint-plugin ^6.5.0@typescript-eslint/parser ^6.5.0@vitest/coverage-istanbul ^0.34.3cross-env ^7.0.3eslint ^8.48.0eslint-config-davidtheclark-node ^0.2.2eslint-config-prettier ^9.0.0eslint-import-resolver-typescript ^3.6.0eslint-plugin-import ^2.28.1eslint-plugin-node ^11.1.0eslint-plugin-vitest ^0.2.8husky ^8.0.3lint-staged ^14.0.1parent-module ^3.0.0prettier ^3.0.3remark-preset-davidtheclark ^0.12.0typescript ^5.2.2vitest ^0.34.3

Used by

Popular packages that depend on cosmiconfig.

Alternatives to cosmiconfig

Frequently installed together

Version history

VersionPublishedLicense
10.0.0-alpha.01 month agoMIT
9.0.2latest1 month agoMIT
9.0.14 months agoMIT
9.0.02 years agoMIT
9.0.0-alpha.32 years agoMIT
9.0.0-alpha.22 years agoMIT
9.0.0-alpha.12 years agoMIT
9.0.0-alpha.02 years agoMIT
8.3.62 years agoMIT
8.3.52 years agoMIT
8.3.42 years agoMIT
8.3.32 years agoMIT
8.3.22 years agoMIT
8.3.12 years agoMIT
8.3.02 years agoMIT
8.2.03 years agoMIT
8.1.33 years agoMIT
8.1.23 years agoMIT
8.1.13 years agoMIT
8.1.03 years agoMIT

Maintainers

Keywords

Funding

Frequently asked questions

How do I install cosmiconfig?

Run `npm install cosmiconfig` to add cosmiconfig to your npm project.

What license is cosmiconfig released under?

cosmiconfig is distributed under the MIT license.

How popular is cosmiconfig?

cosmiconfig has approximately 120,726,886 downloads per week and 2 known dependent packages.