Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a new pull request by comparing changes across two branches #453

Merged
merged 13 commits into from
Jul 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ export type MissingTree = string | {
// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
export type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier;
export type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier | undefined;

// @public (undocumented)
export type ModifierDetails = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1354,7 +1354,7 @@ type MissingTree = string | {
// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier;
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier | undefined;

// @public (undocumented)
type ModifierDetails = {
Expand Down Expand Up @@ -1801,7 +1801,7 @@ class QueryManager<TStore> {
getQueryStore(): Record<string, QueryStoreValue>;
// (undocumented)
protected inFlightLinkObservables: Trie<{
observable?: Observable<FetchResult<any>> | undefined;
observable?: Observable<FetchResult<any>>;
}>;
// (undocumented)
link: ApolloLink;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ type MissingTree = string | {
// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier;
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier | undefined;

// @public (undocumented)
type ModifierDetails = {
Expand Down Expand Up @@ -1577,7 +1577,7 @@ class QueryManager<TStore> {
getQueryStore(): Record<string, QueryStoreValue>;
// (undocumented)
protected inFlightLinkObservables: Trie<{
observable?: Observable<FetchResult<any>> | undefined;
observable?: Observable<FetchResult<any>>;
}>;
// (undocumented)
link: ApolloLink;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,7 @@ type MissingTree = string | {
// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier;
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier | undefined;

// @public (undocumented)
type ModifierDetails = {
Expand Down Expand Up @@ -1391,7 +1391,7 @@ class QueryManager<TStore> {
getQueryStore(): Record<string, QueryStoreValue>;
// (undocumented)
protected inFlightLinkObservables: Trie<{
observable?: Observable<FetchResult<any>> | undefined;
observable?: Observable<FetchResult<any>>;
}>;
// (undocumented)
link: ApolloLink;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ type MissingTree = string | {
// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier;
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier | undefined;

// @public (undocumented)
type ModifierDetails = {
Expand Down Expand Up @@ -1322,7 +1322,7 @@ class QueryManager<TStore> {
getQueryStore(): Record<string, QueryStoreValue>;
// (undocumented)
protected inFlightLinkObservables: Trie<{
observable?: Observable<FetchResult<any>> | undefined;
observable?: Observable<FetchResult<any>>;
}>;
// (undocumented)
link: ApolloLink;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ type MissingTree = string | {
// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier;
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier | undefined;

// @public (undocumented)
type ModifierDetails = {
Expand Down Expand Up @@ -1367,7 +1367,7 @@ class QueryManager<TStore> {
getQueryStore(): Record<string, QueryStoreValue>;
// (undocumented)
protected inFlightLinkObservables: Trie<{
observable?: Observable<FetchResult<any>> | undefined;
observable?: Observable<FetchResult<any>>;
}>;
// (undocumented)
link: ApolloLink;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ type MissingTree = string | {
// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier;
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier | undefined;

// @public (undocumented)
type ModifierDetails = {
Expand Down Expand Up @@ -1446,7 +1446,7 @@ class QueryManager<TStore> {
getQueryStore(): Record<string, QueryStoreValue>;
// (undocumented)
protected inFlightLinkObservables: Trie<{
observable?: Observable<FetchResult<any>> | undefined;
observable?: Observable<FetchResult<any>>;
}>;
// (undocumented)
link: ApolloLink;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,7 @@ type MissingTree = string | {
// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier;
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier | undefined;

// @public (undocumented)
type ModifierDetails = {
Expand Down Expand Up @@ -1446,7 +1446,7 @@ class QueryManager<TStore> {
getQueryStore(): Record<string, QueryStoreValue>;
// (undocumented)
protected inFlightLinkObservables: Trie<{
observable?: Observable<FetchResult<any>> | undefined;
observable?: Observable<FetchResult<any>>;
}>;
// (undocumented)
link: ApolloLink;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ type MissingTree = string | {
// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier;
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier | undefined;

// @public (undocumented)
type ModifierDetails = {
Expand Down Expand Up @@ -1307,7 +1307,7 @@ class QueryManager<TStore> {
getQueryStore(): Record<string, QueryStoreValue>;
// (undocumented)
protected inFlightLinkObservables: Trie<{
observable?: Observable<FetchResult<any>> | undefined;
observable?: Observable<FetchResult<any>>;
}>;
// (undocumented)
link: ApolloLink;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ export class MockSubscriptionLink extends ApolloLink {
// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier;
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier | undefined;

// @public (undocumented)
type ModifierDetails = {
Expand Down Expand Up @@ -1388,7 +1388,7 @@ class QueryManager<TStore> {
getQueryStore(): Record<string, QueryStoreValue>;
// (undocumented)
protected inFlightLinkObservables: Trie<{
observable?: Observable<FetchResult<any>> | undefined;
observable?: Observable<FetchResult<any>>;
}>;
// (undocumented)
link: ApolloLink;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1000,7 +1000,7 @@ export class MockSubscriptionLink extends ApolloLink {
// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier;
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier | undefined;

// @public (undocumented)
type ModifierDetails = {
Expand Down Expand Up @@ -1345,7 +1345,7 @@ class QueryManager<TStore> {
getQueryStore(): Record<string, QueryStoreValue>;
// (undocumented)
protected inFlightLinkObservables: Trie<{
observable?: Observable<FetchResult<any>> | undefined;
observable?: Observable<FetchResult<any>>;
}>;
// (undocumented)
link: ApolloLink;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

```ts

/// <reference types="node" />

import type { FieldNode } from 'graphql';
import type { FragmentDefinitionNode } from 'graphql';
import type { GraphQLSchema } from 'graphql';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1648,7 +1648,7 @@ type MissingTree = string | {
// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier;
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier | undefined;

// @public (undocumented)
type ModifierDetails = {
Expand Down Expand Up @@ -2109,7 +2109,7 @@ class QueryManager<TStore> {
getQueryStore(): Record<string, QueryStoreValue>;
// (undocumented)
protected inFlightLinkObservables: Trie<{
observable?: Observable<FetchResult<any>> | undefined;
observable?: Observable<FetchResult<any>>;
}>;
// (undocumented)
link: ApolloLink;
Expand Down
4 changes: 2 additions & 2 deletions .api-reports/api-report.md → .api-reports/api-report.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,7 @@ type MissingTree = string | {
// Warning: (ae-forgotten-export) The symbol "InvalidateModifier" needs to be exported by the entry point index.d.ts
//
// @public (undocumented)
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier;
type Modifier<T> = (value: T, details: ModifierDetails) => T | DeleteModifier | InvalidateModifier | undefined;

// @public (undocumented)
type ModifierDetails = {
Expand Down Expand Up @@ -2149,7 +2149,7 @@ class QueryManager<TStore> {
getQueryStore(): Record<string, QueryStoreValue>;
// (undocumented)
protected inFlightLinkObservables: Trie<{
observable?: Observable<FetchResult<any>> | undefined;
observable?: Observable<FetchResult<any>>;
}>;
// (undocumented)
link: ApolloLink;
Expand Down
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

Lint:
docker:
- image: cimg/node:22.2.0
- image: cimg/node:22.3.0
steps:
- checkout
- run: npm version
Expand All @@ -24,15 +24,15 @@ jobs:

Formatting:
docker:
- image: cimg/node:22.2.0
- image: cimg/node:22.3.0
steps:
- checkout
- run: npm ci
- run: npm run check:format

Tests:
docker:
- image: cimg/node:22.2.0
- image: cimg/node:22.3.0
parameters:
project:
type: string
Expand All @@ -54,7 +54,7 @@ jobs:

BuildTarball:
docker:
- image: cimg/node:22.2.0
- image: cimg/node:22.3.0
steps:
- checkout
- run: npm run ci:precheck
Expand All @@ -73,7 +73,7 @@ jobs:
react:
type: string
docker:
- image: cimg/node:22.2.0-browsers
- image: cimg/node:22.3.0-browsers
steps:
- checkout
- attach_workspace:
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
externalPackage:
type: string
docker:
- image: cimg/node:22.2.0
- image: cimg/node:22.3.0
steps:
- checkout
- attach_workspace:
Expand Down
4 changes: 2 additions & 2 deletions .size-limits.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"dist/apollo-client.min.cjs": 39561,
"import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32821
"dist/apollo-client.min.cjs": 39605,
"import { ApolloClient, InMemoryCache, HttpLink } from \"dist/index.js\" (production)": 32852
}
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# @apollo/client

## 3.10.8

### Patch Changes

- [#11911](https://github.com/apollographql/apollo-client/pull/11911) [`1f0460a`](https://github.com/apollographql/apollo-client/commit/1f0460a60fc613e8d6f218a74ded69e81e960791) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Allow `undefined` to be returned from a `cache.modify` modifier function when a generic type argument is used.

## 3.10.7

### Patch Changes

- [#11901](https://github.com/apollographql/apollo-client/pull/11901) [`10a8c0a`](https://github.com/apollographql/apollo-client/commit/10a8c0a8f6f3e13ec3c67bf53cc11a948b60e6d9) Thanks [@phryneas](https://github.com/phryneas)! - update `canUseLayoutEffect` check to also allow for layout effects in React Native

- [#11861](https://github.com/apollographql/apollo-client/pull/11861) [`1aed0e8`](https://github.com/apollographql/apollo-client/commit/1aed0e82fcc432380a56d4a446f414ce8b1a7a90) Thanks [@henryqdineen](https://github.com/henryqdineen)! - Defend against non-serializable params in `invariantWrappers`

- [#11905](https://github.com/apollographql/apollo-client/pull/11905) [`29755da`](https://github.com/apollographql/apollo-client/commit/29755da8797dc94613a23fe050ddd6ef9ffab607) Thanks [@phryneas](https://github.com/phryneas)! - Add `.d.cts` files for cjs bundles

- [#11906](https://github.com/apollographql/apollo-client/pull/11906) [`d104759`](https://github.com/apollographql/apollo-client/commit/d104759cfb4be31e2ffbe166531a9b11861ade99) Thanks [@phryneas](https://github.com/phryneas)! - chore: update TypeScript to 5.5

## 3.10.6

### Patch Changes

- [#11900](https://github.com/apollographql/apollo-client/pull/11900) [`f745558`](https://github.com/apollographql/apollo-client/commit/f74555826995009a6bb9d824506cecb3508e3365) Thanks [@phryneas](https://github.com/phryneas)! - `useMutation`: use `useIsomorphicLayoutEffect` instead of `useLayoutEffect`

## 3.10.5

### Patch Changes
Expand Down
10 changes: 7 additions & 3 deletions ROADMAP.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 🔮 Apollo Client Roadmap

**Last updated: 2024-06-03**
**Last updated: 2024-07-01**

For up to date release notes, refer to the project's [Changelog](https://github.com/apollographql/apollo-client/blob/main/CHANGELOG.md).

Expand All @@ -13,10 +13,14 @@ For up to date release notes, refer to the project's [Changelog](https://github.

---

## [3.11.0](https://github.com/apollographql/apollo-client/milestone/40) - July 9th, 2024
_Release candidate - July 2nd, 2024_
## [3.11.0](https://github.com/apollographql/apollo-client/milestone/40) - July 16th, 2024
_Release candidate - July 8th, 2024_

- Rewriting `useQuery` and `useSubscription` for better React Compiler support
- Add an `ignoreResults` option to the `useSubscription` API
- Support extensions in useSubscription
- Support errorPolicy in useSubscription hook and subscribeToMore function
- React 19 rc compatibility

## Upcoming features

Expand Down
2 changes: 1 addition & 1 deletion config/apiExtractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ try {
buildReport(
mainEntryPointFilePath,
"apiReport",
`api-report${path ? "-" + path.replace(/\//g, "_") : ""}.md`
`api-report${path ? "-" + path.replace(/\//g, "_") : ""}.api.md`
);
});
}
Expand Down
11 changes: 11 additions & 0 deletions config/prepareDist.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,14 @@ entryPoints.forEach(function buildPackageJson({
) + "\n"
);
});

entryPoints.forEach(function buildCts({
dirs,
bundleName = dirs[dirs.length - 1],
}) {
if (!dirs.length) return;
fs.writeFileSync(
path.join(distRoot, ...dirs, `${bundleName}.d.cts`),
'export * from "./index.d.ts";\n'
);
});
Loading
Loading