Skip to content

Upgrade global-prefix to ^3.0.0 to Reduce Dependency Conflicts #7

@blaster151

Description

@blaster151

Problem Statement
The current version of resolve-dir depends on global-modules@1.0.0, which in turn depends on global-prefix@1.0.2. This is causing dependency conflicts in modern projects because:

  • global-prefix@1.0.2 is outdated and forces older dependencies to be included.
  • Newer versions of global-prefix (3.0.0+) improve compatibility with modern package management.
  • Projects using tools like webpack-cli, which indirectly depend on resolve-dir, end up stuck with global-prefix@1.0.2, preventing deduplication.

Proposed Solution
Update package.json to use:

"global-modules": "^2.0.0"

which would resolve the issue by allowing global-prefix@3.0.0 to be deduplicated in modern projects.

Why This Is Safe
No breaking changes expected: global-modules@2.0.0 is a drop-in replacement.
resolve-dir itself is tiny (less than 10 lines of code), and the upgrade does not affect its logic.
Does not introduce unnecessary complexity: This is a simple dependency version bump.

Would You Accept a PR?
If this change is acceptable, I’d be happy to submit a pull request making this small update.

Thanks for your time, and I appreciate the work that has gone into this project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions