fix: pnpm type-check failing due to minimatch error#3315
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8bf19ac4a8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
caio-pizzol
left a comment
There was a problem hiding this comment.
@msviderok thanks for the PR. nice find on the @types/glob@7.2.0 → @types/minimatch@6.0.0 chain - confirmed locally that the override resolves every @types/minimatch to 5.1.2 in the lockfile, and verified in a minimal repro (@types/glob@7.2.0 alone) that the override flips tsc from failing to passing.
lgtm.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Fixes
minimatcherror during thetype-checkstep due to the invalid@types/minimatch@6.0.0stub package being used.The error itself:
error TS2688: Cannot find type definition file for 'minimatch'. The file is in the program because: Entry point for implicit type library 'minimatch'pnpm why @types/minimatchshowed:superdoc link:packages/superdoc └─┬ rollup-plugin-copy 3.5.0 └─┬ globby 10.0.1 └─┬ @types/glob 7.2.0 └── @types/minimatch 6.0.0Similar issues have been handled by nx and strapi. Given that this monorepo contains 100+ projects, pinning
@types/minimatchto latest type-including version of5.1.2once at the root seems to be the least invasive fix.This should also address the issue more broadly than the previous package-local attempt in #3306, without the need for a more invasive fix of
typesproperty in each package.Verification
pnpm type-checkdoesn't throwminimatcherror anymore, although it still fails on one other type discrepancy caused by different package, which is out of scope for this fix.P.S. "other type discrepancy caused by different package" in question (
yjs-related):