Repository navigation
Conversation
The Window global was typed via @tanstack/query-core, which is not a dependency of this package. The import ended up in the published declaration files, failing type checks for consumers whose package manager does not hoist query-core (e.g. pnpm). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jest/globals is not a declared dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Replace yarn.lock with pnpm-lock.yaml (imported from yarn.lock, so resolved versions are unchanged) for the library and the example app - Set packageManager to pnpm@12.8.1 - Deny install scripts that are not needed (@parcel/watcher, unrs-resolver, core-js); prebuilt binaries come via optional deps - Give example/ its own pnpm-workspace.yaml so it stays a separate project - CI: install pnpm with pnpm/action-setup instead of corepack (corepack cannot run pnpm 12) and cache the pnpm store keyed on the lockfile - CI: the build job now runs the build instead of the tests - Update READMEs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AliceR
force-pushed
the
chore/migrate-pnpm
branch
from
October 1, 2026 10:57
c121f90 to
dd0f28a
Compare
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the library and the example app from Yarn 4 to pnpm 12.
Changes
yarn.lock→pnpm-lock.yamlviapnpm import, so resolved versions are unchanged. Done for both the root andexample/.packageManager:pnpm@12.8.1..yarnrc.ymlremoved.pnpm-workspace.yaml(allowBuilds):@parcel/watcher,unrs-resolver(via Jest): their scripts are only fallbacks; the prebuilt binaries arrive as optional depscore-js,core-js-pure(example): postinstall banner onlypnpm-workspace.yaml, so it stays a standalone project. Thelink:setup forreact,react-domand@tanstack/react-queryis unchanged; verified that the app and the library resolve a single copy of each.pnpm/action-setup(v6.1.0, SHA-pinned) with its pnpm-store cache keyed onpnpm-lock.yaml. This replaces corepack and thenode_modulescache keyed onpackage.json. Corepack cannot run pnpm 12 (it expectsbin/pnpm.cjs, but pnpm 12 ships native binaries), and Node 25+ no longer bundles corepack.buildjob was runningyarn testinstead of the build. It now runspnpm build.Fixes surfaced by pnpm's strict
node_modulesfix:published types referenced@tanstack/query-core, which is not a dependency of this package.dist/src/context/index.d.tscontainedimport('@tanstack/query-core').QueryClient, which fails type checking for consumers whose package manager doesn't hoistquery-core(e.g. pnpm withoutskipLibCheck). Now references@tanstack/react-query, which re-exports it.queryKeys.test.tsimported the undeclared@jest/globals; it now uses the Jest globals like the other suites.Local setup
Install pnpm 12 (https://pnpm.io/installation), for example
npm i -g pnpm, then runpnpm install. Note thatcorepack enablewon't work with pnpm 12.Verification
From a clean state:
pnpm install --frozen-lockfile,pnpm lint,pnpm test(94/94) andpnpm buildall pass.pnpm pack --dry-runcontents match the previous build. The example app installs andpnpm buildcompiles.Not in this PR
StacApiProvider.test.d.tsis published because the dtsexcludeonly matches*.test.ts. This predates the migration.npmecosystem entry (works for pnpm) could be added.🤖 Generated with Claude Code