## Summary
Fixes#57 — the `@dev-plugins/apollo-client` plugin throws / stops
reporting queries and mutations under Apollo Client v4.
Two internals the plugin relied on changed shape in v4:
- `getOperationName` moved from `@apollo/client/utilities` to
`@apollo/client/utilities/internal` (this is what the linked issue
comment flagged).
- The private `client.queryManager.queries` `Map` is gone in v4,
replaced by `obsQueries` (not equivalent), and `ObservableQuery.queryId`
was removed.
Rather than branching on the installed version, this switches to APIs
that are public and stable across both majors:
- Inlines the (trivial) `getOperationName` lookup instead of importing
it, so it's no longer tied to either import path.
- Replaces `client.queryManager.queries` with the public
`client.getObservableQueries()` (a `Map` in v3, a `Set` in v4 —
normalized into an array).
- Reads `document`/`variables`/`queryName` directly off each
`ObservableQuery` (public in both versions) instead of the private
`QueryInfo` map entry, and uses `getCurrentResult().data` for cached
data instead of the private `diff`/`lastDiff`.
- Falls back to a generated id when `ObservableQuery.queryId` isn't
present (v4).
- `ApolloClientType` is now a small duck-typed interface instead of
`ApolloClient<NormalizedCacheObject>`, since the `ApolloClient` class
generic was removed entirely in v4 and the old type couldn't compile
against both majors at once.
- Declares `@apollo/client` as a `peerDependencies` range (`^3.8.0 ||
^4.0.0`) — it was previously undeclared.
`client.queryManager.mutationStore` is unchanged in shape between v3 and
v4, so the mutations path didn't need changes.
## Test plan
- [x] `tsc --noEmit` passes with `@apollo/[email protected]` installed
- [x] `tsc --noEmit` passes with `@apollo/[email protected]` installed
- [x] Added `src/__tests__/utils.test.ts` covering the new
`getOperationName` lookup and the `Map`/`Set` normalization; passes
under the package's existing jest preset
- [ ] Manual check in the example app against both `@apollo/client` v3
and v4 (queries + a mutation) — happy to do this if useful before merge
---------
Co-authored-by: Vojtech Novak <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
# Why
fix typecheck errors
fixes#70
# How
- fix nullable NavigationContainerRef from react-navigation
- for apollo-client, bun treats dependency differently for react-dom as
peerDependnecy from `@apollo/client`. to workaround this, i have to add
react-dom devDeps to the apollo plugin, so bun will keep the same
resolution
# Why
bun 1.3 uses isolated modules by default and then some errors happen
because of missing dependencies
# How
- add missing devDeps and peerDeps
- remove `**/webui/babel.config.js` to fix no `babel-preset-expo` as
dependencies. we don't need these default babel.config.js and can just
use the builtin from expo-cli
This PR adds a missing style that prevented the main content page from
the `react-query` plugin from being scrollable when there were too many
items.
Note that this PR will also close#49.
# Why
sdk 53 projects will pull eslint 9 by default. this pr tries to fix the
eslint 9 support.
# How
- update `[email protected]` to support eslint 9 base config
- add eslint 9 flat `eslint.config.js`
# Why
the
[redux-devtools-expo-dev-plugin](https://github.com/matt-oakes/redux-devtools-expo-dev-plugin`)
has more powerful feature and i think we don't necessarily maintain two
different redux plugins
# How
deprecate and remove `@dev-plugins/redux` in favor of
`redux-devtools-expo-dev-plugin`. also remove redux from example app
# Why
since `[email protected]` with the fix from
https://github.com/expo/expo/pull/36594, we don't need to disable
unstable_enablePackageExports anymore
# How
- [packages] remove `unstable_enablePackageExports` workaround. the
whole metro config can be removed
- [example] remove unused metro config and babel config
# Why
SDK 53 has a breaking change to devtools client transport. We have to
bump the version for dev-plugins packages
# How
- update packages to expo sdk 53
- fix typescript errors and lint errors
- apply workaround for antd:
https://github.com/expo/expo/discussions/36551#discussioncomment-13015890
# Why
migrate sdk 52
# How
- update deps to latest
- migrate from yarn to bun
- [mmkv] remove devDep to async-storage
- [react-navigation] the original
`@react-navigation/devtools/lib/module/useDevToolsBase` breaks because
of internal files that doesn't export in ESM mode. this pr tries to use
`useReduxDevToolsExtension` with an adapter to the redux extension
- [tinybase] migrate to 5.0