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

Upgrade minimatch from v3 to v9 #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

codemod-staging[bot]
Copy link

This PR upgrades the minimatch package from version 3 to 9, ensuring continued support for Node v16 while keeping the project up to date with the latest dependency improvements.

Key changes

  • Dependency update: Upgraded minimatch to version 9 across relevant packages (build-utils, cli, client, fs-detectors).
  • Import statement update: Changed all default imports to named imports, as minimatch v9 removes the default export.

How the upgrade was done

The only breaking change that applied to vercel/vercel codebase was the change of default import to named import for minimatch. The change was applied using the following ast-grep codemod:

id: change-minimatch-default-import-to-named-import
language: js
rule:
  pattern: import $A from 'minimatch'
constraints:
  A:
    kind: import_clause
    has:
      kind: identifier
fix:
  import {$A} from 'minimatch';

Also runnable through codemod registry: https://codemod.com/registry/minimatch-to-named-imports

Purpose of the upgrade

The current minimatch version did not have any known CVE reports and was secure as is. The upgrade is solely to stay on top of the latest updates and enhancements for this dependency, aligning the project with modern JavaScript practices.

Node.js compatibility

  • We chose v9 (instead of v10) to maintain Node.js 16 compatibility, as v10 drops support for Node.js 16.

Testing and verification

@codemod-staging codemod-staging bot force-pushed the codemod-com/chore/upgrade-minimatch branch 3 times, most recently from 5ff3cca to 52f4db1 Compare October 21, 2024 21:40
@codemod-staging codemod-staging bot force-pushed the codemod-com/chore/upgrade-minimatch branch from 52f4db1 to 904c30e Compare October 21, 2024 21:42
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.

1 participant