actions / actions/toolkit

@actions/glob v0.7.0 breaks ESM actions: Minimatch is not a named export in minimatch v10

Open Beginner friendly
#2,408 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.9k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

Bug report

Package: @actions/glob
Version: 0.7.0

Description

@actions/glob v0.7.0 bumped minimatch from v3 to v10 (PR #2355), but lib/internal-pattern.js still imports Minimatch as a named export:

import { Minimatch } from 'minimatch';  // internal-pattern.js:5

minimatch v10 does not export Minimatch as a named export, so this crashes at runtime with a SyntaxError in any ESM context.

Error
file:///…/node_modules/@actions/glob/lib/internal-pattern.js:5
import { Minimatch } from 'minimatch';
         ^^^^^^^^^
SyntaxError: The requested module 'minimatch' does not provide an export named 'Minimatch'
    at #asyncInstantiate (node:internal/modules/esm/module_job:326:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:429:5)
Steps to reproduce

Use @actions/glob v0.7.0 in a Node.js action that runs as ESM (e.g. a .mts action with using: node24).

Expected behavior

@actions/glob v0.7.0 should work with the minimatch v10 it ships with.

Possible fix

In internal-pattern.js, update the import to use minimatch v10's API — likely import Minimatch from 'minimatch' (default export) or the equivalent named export from v10.

Environment
  • Node.js: v24.15.0
  • @actions/glob: 0.7.0
  • minimatch: 10.x (pulled in transitively by @actions/glob v0.7.0)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/internal-pattern.js and inspect how @actions/glob imports Minimatch. Reproduce the failure in an ESM Node.js v24 action, then verify that the package loads and works with minimatch v10 without the named-export SyntaxError.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.