Socket
Socket
Sign inDemoInstall

cosmiconfig

Package Overview
Dependencies
25
Maintainers
2
Versions
56
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
23456Next

9.0.0

Diff

Changelog

Source

9.0.0

  • Added searchStrategy option:
    • The none value means that cosmiconfig does not traverse any directories upwards.
      • Breaking change: This is the default value if you don't pass a stopDir option, which means that cosmiconfig no longer traverses directories by default, and instead just looks in the current working directory.
        • If you want to achieve maximum backwards compatibility without adding an explicit stopDir, add the searchStrategy: 'global' option.
    • The project value means that cosmiconfig traverses upwards until it finds a package.json (or .yaml) file.
    • The global value means that cosmiconfig traverses upwards until the passed stopDir, or your home directory if no stopDir is given.
  • Breaking change: Meta config files (i.e. config.js and similar) are not looked for in the current working directory anymore. Instead, it looks in the .config subfolder.
  • Breaking change: When defining searchPlaces in a meta config file, the tool-defined searchPlaces are merged into this. Users may specify mergeSearchPlaces: false to disable this.
  • Added support for a special $import key which will import another configuration file
    • The imported file will act as a base file - all properties from that file will be applied to the configuration, but can be overridden by the importing file
    • For more information, read the import section of the README
  • Added searching in OS conventional folders (XDG compatible on Linux, %APPDATA% on Windows, Library/Preferences on macOS) for searchStrategy: 'global'
  • Fixed crash when trying to load a file that is not readable due to file system permissions
  • Fixed wrong ERR_REQUIRE_ESM error being thrown when there is an issue loading an ESM file
d-fischer
published 9.0.0-alpha.3 •

d-fischer
published 9.0.0-alpha.2 •

d-fischer
published 9.0.0-alpha.1 •

d-fischer
published 9.0.0-alpha.0 •

d-fischer
published 8.3.6 •

Changelog

Source

8.3.6

  • Ignore search place if accessing it causes ENOTDIR (i.e. if access of a subpath of a file is attempted)
d-fischer
published 8.3.5 •

Changelog

Source

8.3.5

  • Fixed regression in transform option
jrandolf
published 8.3.4 •

Changelog

Source

8.3.4

  • Fixed crash in older node versions
jrandolf
published 8.3.3 •

Changelog

Source

8.3.3

  • Added back node 14 compat to package.json
jrandolf
published 8.3.2 •

Changelog

Source

8.3.2

  • Fixed some issues with TypeScript config loading
23456Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc