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

fix(deps): update dependency cosmiconfig to v9 #140

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

Conversation

svc-secops
Copy link
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
cosmiconfig ^5.0.6 -> ^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 - "every weekend" in timezone America/Los_Angeles, Automerge - "after 8am and before 4pm on tuesday" in timezone America/Los_Angeles.

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

β™» Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

πŸ”• Ignore: Close this PR and you won't be reminded about this update again.


This PR has been generated by Renovate Bot.

@svc-secops
Copy link
Contributor Author

svc-secops commented Feb 17, 2024

⚠ 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 ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @endemolshinegroup/cosmiconfig-typescript-loader@1.0.2
npm ERR! Found: cosmiconfig@9.0.0
npm ERR! node_modules/cosmiconfig
npm ERR!   cosmiconfig@"^9.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer cosmiconfig@">=5 < 6" from @endemolshinegroup/cosmiconfig-typescript-loader@1.0.2
npm ERR! node_modules/@endemolshinegroup/cosmiconfig-typescript-loader
npm ERR!   @endemolshinegroup/cosmiconfig-typescript-loader@"^1.0.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: cosmiconfig@5.2.1
npm ERR! node_modules/cosmiconfig
npm ERR!   peer cosmiconfig@">=5 < 6" from @endemolshinegroup/cosmiconfig-typescript-loader@1.0.2
npm ERR!   node_modules/@endemolshinegroup/cosmiconfig-typescript-loader
npm ERR!     @endemolshinegroup/cosmiconfig-typescript-loader@"^1.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! See /tmp/renovate/cache/others/npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/renovate/cache/others/npm/_logs/2024-03-16T11_40_14_167Z-debug-0.log

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

Successfully merging this pull request may close these issues.

None yet

1 participant