Skip to content

fix: pnpm type-check failing due to minimatch error#3315

Merged
caio-pizzol merged 3 commits into
superdoc-dev:mainfrom
msviderok:fix/minimatch-types
May 15, 2026
Merged

fix: pnpm type-check failing due to minimatch error#3315
caio-pizzol merged 3 commits into
superdoc-dev:mainfrom
msviderok:fix/minimatch-types

Conversation

@msviderok
Copy link
Copy Markdown
Contributor

@msviderok msviderok commented May 15, 2026

Summary

Fixes minimatch error during the type-check step due to the invalid @types/minimatch@6.0.0 stub 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/minimatch showed:

superdoc link:packages/superdoc
└─┬ rollup-plugin-copy 3.5.0
  └─┬ globby 10.0.1
    └─┬ @types/glob 7.2.0
      └── @types/minimatch 6.0.0

Similar issues have been handled by nx and strapi. Given that this monorepo contains 100+ projects, pinning @types/minimatch to latest type-including version of 5.1.2 once 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 types property in each package.

Verification

pnpm type-check doesn't throw minimatch error 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):

packages/collaboration-yjs/src/shared-doc/shared-doc.ts:27:36 - error TS2345: Argument of type 'this' is not assignable to parameter of type 'Doc'.
packages/collaboration-yjs/src/shared-doc/shared-doc.ts:124:27 - error TS2345: Argument of type 'SharedSuperDoc' is not assignable to parameter of type 'Doc'.
packages/collaboration-yjs/src/shared-doc/shared-doc.ts:137:43 - error TS2345: Argument of type 'SharedSuperDoc' is not assignable to parameter of type 'Doc'.
packages/collaboration-yjs/src/shared-doc/shared-doc.ts:142:35 - error TS2345: Argument of type 'SharedSuperDoc' is not assignable to parameter of type 'Doc'.

@msviderok msviderok requested a review from a team as a code owner May 15, 2026 11:46
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment thread pnpm-lock.yaml
@caio-pizzol caio-pizzol self-assigned this May 15, 2026
Copy link
Copy Markdown
Contributor

@caio-pizzol caio-pizzol left a comment

Choose a reason for hiding this comment

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

@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.

@caio-pizzol caio-pizzol self-requested a review May 15, 2026 12:38
@caio-pizzol caio-pizzol enabled auto-merge (squash) May 15, 2026 12:39
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@caio-pizzol caio-pizzol merged commit 249a961 into superdoc-dev:main May 15, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants