Skip to content

fix(watcher): add micromatch as direct dependency for @parcel/watcher#10182

Merged
davidfirst merged 1 commit intomasterfrom
fix/add-micromatch-dependency
Feb 4, 2026
Merged

fix(watcher): add micromatch as direct dependency for @parcel/watcher#10182
davidfirst merged 1 commit intomasterfrom
fix/add-micromatch-dependency

Conversation

@davidfirst
Copy link
Copy Markdown
Member

@parcel/watcher requires micromatch but due to pnpm's strict hoisting behavior, micromatch may not be accessible in all contexts. This causes intermittent "Cannot find module 'micromatch'" errors when running the watcher.

Adding micromatch as a direct workspace dependency ensures it's hoisted to the root node_modules where @parcel/watcher's wrapper.js can resolve it.

@parcel/watcher requires micromatch but due to pnpm's strict hoisting,
it may not be accessible in all contexts, causing intermittent
"Cannot find module 'micromatch'" errors during watch.
Copilot AI review requested due to automatic review settings February 4, 2026 15:18
Copy link
Copy Markdown
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

Adds micromatch as a direct workspace dependency to prevent intermittent Cannot find module 'micromatch' failures when @parcel/watcher is resolved under pnpm’s strict module layout.

Changes:

  • Add micromatch to the workspace dependency policy so it’s available at the workspace/root installation level for watcher resolution.

"lru-cache": "10.4.3",
"memoizee": "0.4.15",
"mime": "2.5.2",
"micromatch": "^4.0.5",
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

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

micromatch is being added to the workspace dependency policy, but pnpm-lock.yaml (importer "." dependencies) currently doesn’t list micromatch as a direct dependency. With pnpm, that can mean it won’t be linked at the workspace root on a clean install, which undermines the intended fix. Regenerate and commit the lockfile changes so micromatch appears as a direct dependency for the root importer.

Suggested change
"micromatch": "^4.0.5",

Copilot uses AI. Check for mistakes.
@davidfirst davidfirst enabled auto-merge (squash) February 4, 2026 15:33
@davidfirst davidfirst merged commit 98c08ba into master Feb 4, 2026
18 checks passed
@davidfirst davidfirst deleted the fix/add-micromatch-dependency branch February 4, 2026 15:50
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.

3 participants