Skip to content

feat(deps): upgrade cosmiconfig to 7.1.0#573

Merged
jimmyandrade merged 1 commit into
itgalaxy:masterfrom
pravi:update-consmiconfig-7
Jul 2, 2026
Merged

feat(deps): upgrade cosmiconfig to 7.1.0#573
jimmyandrade merged 1 commit into
itgalaxy:masterfrom
pravi:update-consmiconfig-7

Conversation

@pravi

@pravi pravi commented May 19, 2022

Copy link
Copy Markdown

Summary

  • Upgrade cosmiconfig from 5.2.x to 7.1.0 (named export API).
  • Refactor buildConfig with proper v7 result typing and load configFile without a redundant search() call.
  • Rebased onto current master (includes cosmiconfig coverage from test: expand cosmiconfig coverage before upgrade #655, Release Please ADR, Lefthook, etc.).

Supersedes the original 2022 draft; all 66 tests pass, including src/standalone/cosmiconfig.test.ts.

Closes #572

Test plan

  • npm test — 66 tests passing
  • cosmiconfig discovery: json, yaml, js, webfont.config.js, package.json, walk-up
  • CLI --config relative, absolute, and node_modules package name
  • result.config.filePath output metadata unchanged

@jimmyandrade jimmyandrade requested a review from Copilot July 2, 2026 03:08
@jimmyandrade jimmyandrade self-assigned this Jul 2, 2026
@jimmyandrade jimmyandrade added the dependencies Pull requests that update a dependency file label Jul 2, 2026
@jimmyandrade jimmyandrade modified the milestone: 11.0 Jul 2, 2026
@jimmyandrade jimmyandrade added this to the 12.0 milestone Jul 2, 2026
Switch to the named cosmiconfig export, tighten buildConfig typing for
v7 results, and load configFile paths without a redundant search() call.

Rebases the original itgalaxy#573 upgrade onto current master with cosmiconfig
coverage tests from itgalaxy#655.

Closes itgalaxy#572

Co-authored-by: Cursor <cursoragent@cursor.com>
@jimmyandrade jimmyandrade force-pushed the update-consmiconfig-7 branch from f6bae90 to 861569d Compare July 2, 2026 03:11
@jimmyandrade jimmyandrade changed the title Update cosmiconfig to version 7 feat(deps): upgrade cosmiconfig to 7.1.0 Jul 2, 2026
@jimmyandrade jimmyandrade marked this pull request as ready for review July 2, 2026 03:12
@jimmyandrade jimmyandrade merged commit d83a422 into itgalaxy:master Jul 2, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the project’s configuration-loading dependency (cosmiconfig) to v7 and adjusts the standalone entrypoint to compile against the new module export shape.

Changes:

  • Bump cosmiconfig to ^7.0.1.
  • Update the cosmiconfig import usage in src/standalone/index.ts.
  • Regenerate lockfile entries consistent with the updated dependency tree.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/standalone/index.ts Updates cosmiconfig import; adjusts config-loading behavior (but introduces/retains issues around search(null) and any casting).
package.json Updates cosmiconfig dependency range to ^7.0.1.
package-lock.json Updates resolved dependency graph for cosmiconfig v7 and related transitive dependencies.
Comments suppressed due to low confidence (1)

src/standalone/index.ts:6

  • This import uses spacing that differs from the surrounding imports in this file (which use {foo, bar} with no inner spaces). Keeping it consistent reduces noisy diffs when formatting is applied.
import path from "path";

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/standalone/index.ts Outdated
Comment on lines 36 to 38
if (!config) {
return {};
return {} as any;
}
Comment thread src/standalone/index.ts Outdated
Comment on lines 36 to 38
if (!config) {
return {};
return {} as any;
}
@jimmyandrade

Copy link
Copy Markdown
Collaborator

Added advanced YAML regression coverage in `d17f926` on `itgalaxy/webfont@update-consmiconfig-7` (push to the original fork branch was denied).

The new test fixture exercises anchors, aliases, flow collections, and YAML 1.1 truthy scalars (`yes`/`on`) under cosmiconfig v7's `yaml` parser, and asserts woff2 generation still works.

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

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update cosmiconfig module to latest upstream release

3 participants