Skip to content

[extensions] Declare optional React type peer for next-themes - #7263

Open
sharmila-oai wants to merge 3 commits into
yarnpkg:masterfrom
sharmila-oai:dev/sharmila/next-themes-type-peer
Open

[extensions] Declare optional React type peer for next-themes#7263
sharmila-oai wants to merge 3 commits into
yarnpkg:masterfrom
sharmila-oai:dev/sharmila/next-themes-type-peer

Conversation

@sharmila-oai

@sharmila-oai sharmila-oai commented Aug 21, 2026

Copy link
Copy Markdown

What's the problem this PR addresses?

next-themes publishes declarations that reference React types without declaring an @types/react peer. Yarn already infers optional type peers; this entry records the missing declaration for other consumers of the shared extensions database, including pnpm.

How did you fix it?

Add an optional @types/react peer for next-themes@>=0.2.1 <=0.4.6. The matching package-author draft fixes the manifest for future releases.

Verification with unmodified pnpm 11.19.0 and its global virtual store:

  • Applying this entry restores ThemeProvider prop checking in 0.2.1 and setTheme callback typing in 0.4.6.
  • The corrected 0.4.6 consumer passes a frozen offline reinstall and typecheck without changing its lockfile.

Yarn's six existing package-extension acceptance tests, focused ESLint, and yarn version check pass.

Checklist

  • I have read the Contributing Guide.
  • I have set the packages that need to be released for my changes to be effective.
  • I will check that all automated PR checks pass before the PR gets reviewed.

@sharmila-oai sharmila-oai changed the title [extensions] Add optional @types/react peer metadata for next-themes [extensions] Declare optional React type peer for next-themes Aug 21, 2026
@sharmila-oai
sharmila-oai marked this pull request as ready for review August 21, 2026 22:10
@sharmila-oai

Copy link
Copy Markdown
Author

@arcanis could you take a look?

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.

1 participant