Skip to content

Update dependency cosmiconfig to v10 - #95

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/cosmiconfig-10.x
Open

Update dependency cosmiconfig to v10#95
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/cosmiconfig-10.x

Conversation

@renovate

@renovate renovate Bot commented Aug 2, 2026

Copy link
Copy Markdown

This PR contains the following updates:

Package Change Age Confidence
cosmiconfig 5.2.110.0.0 age confidence

Release Notes

cosmiconfig/cosmiconfig (cosmiconfig)

v10.0.0

Compare Source

  • Breaking change: The required version range is now ^22.18 || >=24.
  • Breaking change: Remove typescript in favor of Node's own type stripping. This means that TypeScript 7 projects are supported, but non-erasable type syntax like namespace or enum is unsupported.
  • Breaking change: JSON parsing uses the JSON.parse function directly. parse-json is no longer used for better error messages, since Node has improved theirs.
  • Remove import-fresh dependency in favor of directly clearing the cache.
  • Added support for UTF-16 config files

v9.0.2

Compare Source

  • Fixed a prototype chain issue that may happen when merging different config objects.
  • Fixed the project search strategy not correctly stopping at the package boundary.

v9.0.1

Compare Source

  • Fixed a race condition where multiple instances existing simultaneously could cause cosmiconfig to fail to load TypeScript config files.
  • Fixed an issue on Windows where CWD being a short path (e.g. C:\Users\USERNA~1) would cause cosmiconfig to fail to load ESM config files.

v9.0.0

Compare Source

  • 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

v8.3.6

Compare Source

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

v8.3.5

Compare Source

  • Fixed regression in transform option

v8.3.4

Compare Source

  • Fixed crash in older node versions

v8.3.3

Compare Source

  • Added back node 14 compat to package.json

v8.3.2

Compare Source

  • Fixed some issues with TypeScript config loading

v8.3.1

Compare Source

  • Fixed crash when stopDir was given but undefined

v8.3.0

Compare Source

  • Add support for TypeScript configuration files

v8.2.0

Compare Source

  • Add support for ECMAScript modules (ESM) to the asynchronous API. End users running Node versions that support ESM can provide .mjs files, or .js files whose nearest parent package.json file contains "type": "module".
    • ${moduleName}rc.mjs and ${moduleName}.config.mjs are included in the default searchPlaces of the asynchronous API.
    • The synchronous API does not support ECMAScript modules, so does not look for .mjs files.
    • To learn more, read "Loading JS modules".

v8.1.3

Compare Source

  • Fixed: existence of meta config breaking default loaders

v8.1.2

Compare Source

  • Fixed: generation of TypeScript types going to the wrong output path

v8.1.1

Compare Source

  • Fixed: meta config overriding original options completely (now merges correctly)

v8.1.0

Compare Source

  • Added: always look at .config.{yml,yaml,json,js,cjs} file to configure cosmiconfig itself, and look for tool configuration in it using packageProp (similar to package.json)

v8.0.0

Compare Source

No major breaking changes! We dropped support for Node 10 and 12 -- which you're probably not using. And we swapped out the YAML parser -- which you probably won't notice.

  • Breaking change: Drop support for Node 10 and 12.

  • Breaking change: Use npm package js-yaml to parse YAML instead of npm package yaml.

  • Added: Loader errors now include the path of the file that was tried to be loaded.

v7.1.0

Compare Source

  • Added: Additional default searchPlaces within a .config subdirectory (without leading dot in the file name)

v7.0.1

Compare Source

  • Fixed: If there was a directory that had the same name as a search place (e.g. "package.json"), we would try to read it as a file, which would cause an exception.

v7.0.0

Compare Source

  • Breaking change: Add ${moduleName}rc.cjs and ${moduleName}.config.cjs to the default searchPlaces, to support users of "type": "module" in recent versions of Node.
  • Breaking change: Drop support for Node 8. Now requires Node 10+.

v6.0.0

Compare Source

  • Breaking change: The package now has named exports. See examples below.

  • Breaking change: Separate async and sync APIs, accessible from different named exports. If you used explorer.searchSync() or explorer.loadSync(), you'll now create a sync explorer with cosmiconfigSync(), then use explorerSync.search() and explorerSync.load().

    // OLD: cosmiconfig v5
    import cosmiconfig from 'cosmiconfig';
    
    const explorer = cosmiconfig('example');
    const searchAsyncResult = await explorer.search();
    const loadAsyncResult = await explorer.load('./file/to/load');
    const searchSyncResult = explorer.searchSync();
    const loadSyncResult = explorer.loadSync('./file/to/load');
    
    // NEW: cosmiconfig v6
    import { cosmiconfig, cosmiconfigSync } from 'cosmiconfig';
    
    const explorer = cosmiconfig('example');
    const searchAsyncResult = await explorer.search();
    const loadAsyncResult = await explorer.load('./file/to/load');
    
    const explorerSync = cosmiconfigSync('example');
    const searchSyncResult = explorerSync.search();
    const loadSyncResult = explorerSync.load('./file/to/load');
  • Breaking change: Remove support for Node 4 and 6. Requires Node 8+.

  • Breaking change: Use npm package yaml to parse YAML instead of npm package js-yaml.

  • Breaking change: Remove cosmiconfig.loaders and add named export defaultLoaders that exports the default loaders used for each extension.

    import { defaultLoaders } from 'cosmiconfig';
    
    console.log(Object.entries(defaultLoaders));
    // [
    //   [ '.js', [Function: loadJs] ],
    //   [ '.json', [Function: loadJson] ],
    //   [ '.yaml', [Function: loadYaml] ],
    //   [ '.yml', [Function: loadYaml] ],
    //   [ 'noExt', [Function: loadYaml] ]
    // ]
  • Migrate from Flowtype to Typescript.

  • Lazy load all default loaders.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants