Skip to content

@actions/glob: bump minimatch from v3.0.4 to v10.2.4#2355

Open
shogo82148 wants to merge 3 commits intoactions:mainfrom
shogo82148:bump-minimatch-v10
Open

@actions/glob: bump minimatch from v3.0.4 to v10.2.4#2355
shogo82148 wants to merge 3 commits intoactions:mainfrom
shogo82148:bump-minimatch-v10

Conversation

@shogo82148
Copy link
Contributor

@shogo82148 shogo82148 commented Mar 20, 2026

Minimatch v3 has compatibility issues with ES Modules (See #2085 (comment)). Updating to the latest version, v10, will resolve the problem.

closes #2085 and closes #1955

@shogo82148 shogo82148 requested a review from a team as a code owner March 20, 2026 10:47
Copilot AI review requested due to automatic review settings March 20, 2026 10:47
pattern = new Pattern('C:/foo/b[\\!]r/b*')
expect(pattern.searchPath).toBe('C:\\foo\\b[\\!]r')
expect(pattern.match('C:/foo/b[undefined/!]r/baz')).toBeTruthy() // Note, "undefined" substr to accommodate a bug in Minimatch when nocase=true
expect(pattern.match('C:/foo/b[undefined/!]r/baz')).toBeFalsy()
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is a bug of minimatch v3. toBeFalsy is correct.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates @actions/glob to use minimatch@10 to address ESM compatibility problems reported in actions/toolkit issues.

Changes:

  • Bump minimatch dependency from ^3.0.4 to ^10.2.4 (and update lockfile transitive deps).
  • Update internal-pattern.ts to use minimatch’s named exports/types (Minimatch, MinimatchOptions).
  • Adjust pattern unit tests to reflect the matching behavior observed with the newer minimatch version.

Reviewed changes

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

File Description
packages/glob/src/internal-pattern.ts Switches to minimatch v10 import/types for pattern matching.
packages/glob/package.json Updates runtime dependency to minimatch@^10.2.4.
packages/glob/package-lock.json Locks minimatch@10.2.4 and its updated transitive dependency graph.
packages/glob/tests/internal-pattern.test.ts Updates expectations for bracket-pattern behavior under minimatch v10.
Files not reviewed (1)
  • packages/glob/package-lock.json: Language not supported

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

Comment on lines 46 to 49
"dependencies": {
"@actions/core": "^3.0.0",
"minimatch": "^3.0.4"
"minimatch": "^10.2.4"
}
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

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

minimatch@10.2.4 declares engines: { node: "18 || 20 || >=22" } (see updated package-lock). @actions/glob currently doesn’t declare a compatible Node runtime in its own package.json, so consumers on older Node versions can install this package and then fail at runtime. Consider adding an explicit engines.node requirement (and/or documenting the minimum supported Node version) to make the breaking requirement visible during install.

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

glob doesn't work on windows @actions/glob - Outdated minimatch dependency

2 participants