Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency cosmiconfig to v9 #88

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Nov 26, 2023

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
cosmiconfig 5.2.1 -> 9.0.0 age adoption passing confidence

Release Notes

cosmiconfig/cosmiconfig (cosmiconfig)

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: 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.

Copy link
Author

renovate bot commented Nov 26, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/typescript
npm ERR!   dev typescript@"3.9.6" from the root project
npm ERR!   peer typescript@">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev" from [email protected]
npm ERR!   node_modules/tslint
npm ERR!     dev tslint@"5.20.1" from the root project
npm ERR!     peer tslint@"^5.1.0" from [email protected]
npm ERR!     node_modules/tslint-microsoft-contrib
npm ERR!       dev tslint-microsoft-contrib@"6.2.0" from the root project
npm ERR!     1 more (tslint-clean-code)
npm ERR!   4 more (tsutils, tslint-microsoft-contrib, tsutils, tsutils)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional typescript@">=4.9.5" from [email protected]
npm ERR! node_modules/cosmiconfig
npm ERR!   cosmiconfig@"9.0.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/typescript
npm ERR!   peerOptional typescript@">=4.9.5" from [email protected]
npm ERR!   node_modules/cosmiconfig
npm ERR!     cosmiconfig@"9.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /tmp/worker/86c03c/312663/cache/others/npm/_logs/2023-11-26T16_03_30_792Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /tmp/worker/86c03c/312663/cache/others/npm/_logs/2023-11-26T16_03_30_792Z-debug-0.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