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

chore(deps): update all devdependencies (major) #11959

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jul 13, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@types/relay-runtime (source) 14.1.24 -> 18.2.5 age adoption passing confidence
blob-polyfill 7.0.20220408 -> 9.0.20240710 age adoption passing confidence
fetch-mock (source) 9.11.0 -> 12.2.0 age adoption passing confidence
graphql-ws (source) 5.16.0 -> 6.0.2 age adoption passing confidence
jscodeshift 0.16.1 -> 17.1.2 age adoption passing confidence
react-error-boundary 4.0.13 -> 5.0.0 age adoption passing confidence
rimraf 5.0.9 -> 6.0.1 age adoption passing confidence

Release Notes

bjornstar/blob-polyfill (blob-polyfill)

v9.0.20240710

Compare Source

v8.0.20240630

Compare Source

  • [Blob.js] Change Blob.prototype to global.Blob.prototype (@​tmisirpash)
  • [Blob.js] Make it work in environments where global.Blob exists, but global.FileReader does not (@​bjornstar)
  • [Blob.js] Add isPolyfill property to the polyfilled versions so we can differentiate them (@​bjornstar)
  • [test] Unskip tests and update to work in environments with global.Blob & global.File & global.URL (@​bjornstar)
  • [.github] Update action versions and test node v12-v22 (@​bjornstar)
wheresrhys/fetch-mock (fetch-mock)

v12.2.0

Compare Source

Features
  • implement new hardReset method (d7e0776)
  • update codemods to use hardReset() (757d480)

v12.1.0

Compare Source

Features
  • fetch-mock: add include: matcher for urls (02f880c)

v12.0.2

Compare Source

Bug Fixes
  • allow sending responses with status 0 (92c06e9)

v12.0.1

Compare Source

Bug Fixes
  • clearHistory() can deal with unmatched calls (012e9ca)

v12.0.0

Compare Source

⚠ BREAKING CHANGES
  • Replaced legacy fetch-mock code with fetch-mock/core code
Features
  • Replaced legacy fetch-mock code with fetch-mock/core code (999ce92)

v11.1.5

Compare Source

Bug Fixes
  • change export order so default is last (bc9c41d)

v11.1.4

Compare Source

Documentation Changes
  • another occurrence of the cheatsheet ref (875e4f6)
  • fix link to cheatsheet (33e75b1)

v11.1.3

Compare Source

Bug Fixes
  • add missing metadata to package.json files (4ab78b9)

v11.1.1

Compare Source

Bug Fixes
  • roll back to glob-to-regexp (b114124)

v11.1.0

Compare Source

Features
  • remove debug mode from fetch-mock (89890b6)

v11.0.2

Compare Source

Bug Fixes
  • add license file to each package (9b36f89)

v11.0.1

Compare Source

Bug Fixes
  • fixes importimng into .mts files (98ad40e)

v11.0.0

Compare Source

⚠ BREAKING CHANGES
  • force fetch-mock major release
Bug Fixes
  • force fetch-mock major release (1b31416)

v10.1.1

Compare Source

Bug Fixes
  • change module system declaratuions to avoid top level type: module (ed00140)

v10.1.0

Compare Source

Features
  • wip: replace dequal, glob-to-regexp and bump path-to-regexp (d8d8b25)
Bug Fixes

v10.0.8

Compare Source

Miscellaneous
  • rename fetch-mock-legacy directory to fetch-mock (95fd761)
  • test release please again (3a9eb12)
  • release 10.0.8 (7bbbf49)
  • remove legacy prepublish step (3100e5a)

v10.0.7: Make type definitions compatible with ESM and CommonJs

Compare Source

v10.0.6: Fix type definitions

Compare Source

v10.0.5: Fix exports

Compare Source

v10.0.4: Simple API for naming routes

Compare Source

e.g. .mock('/path', 200, 'my-name')

v10.0.3: Remove custom aborterror implementation

Compare Source

v10.0.2: Support matching data URLs

Compare Source

v10.0.1: Small fixes to types

Compare Source

v10.0.0: ESM and native fetch

Compare Source

A major rewrite to use ESM modules and default to using native fetch in all environments

Other than that the API remains unchanged

enisdenjo/graphql-ws (graphql-ws)

v6.0.2

Compare Source

Patch Changes

v6.0.1

Compare Source

Patch Changes

v6.0.0

Compare Source

Major Changes
Migrating from v5 to v6
import { makeHandler } from 'graphql-ws/use/@​fastify/websocket';

makeHandler({
  schema(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  context(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onConnect(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onDisconnect(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onClose(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onSubscribe(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onOperation(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onError(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onNext(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onComplete(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
});
Migrating from v5 to v6

Simply remove the /lib/ part from your graphql-ws imports that use a handler.

ws
- import { useServer } from 'graphql-ws/lib/use/ws';
+ import { useServer } from 'graphql-ws/use/ws';
uWebSockets.js
- import { makeBehavior } from 'graphql-ws/lib/use/uWebSockets';
+ import { makeBehavior } from 'graphql-ws/use/uWebSockets';
@​fastify/websocket
- import { makeHandler } from 'graphql-ws/lib/use/@​fastify/websocket';
+ import { makeHandler } from 'graphql-ws/use/@​fastify/websocket';
Bun
- import { handleProtocols, makeHandler } from 'graphql-ws/lib/use/bun';
+ import { handleProtocols, makeHandler } from 'graphql-ws/use/bun';
Deno
- import { makeHandler } from 'https://esm.sh/graphql-ws/lib/use/deno';
+ import { makeHandler } from 'https://esm.sh/graphql-ws/use/deno';
  • #​613 3f11aba Thanks @​enisdenjo! - ErrorMessage uses and onError returns GraphQLFormattedError (instead of GraphQLError)

    Thanks @​benjie for working on this in #​599

  • #​613 3f11aba Thanks @​enisdenjo! - Least supported Node version is v20

    Node v10 has been deprecated for years now. There is no reason to support it. Bumping the engine to the current LTS (v20) also allows the code to be leaner and use less polyfills.

  • #​613 3f11aba Thanks @​enisdenjo! - Least supported graphql peer dependency is ^15.10.1 and ^16

    Users are advised to use the latest of graphql because of various improvements in performance and security.

  • #​613 3f11aba Thanks @​enisdenjo! - NextMessage uses and onNext returns FormattedExecutionResult (instead of ExecutionResult)

  • #​613 3f11aba Thanks @​enisdenjo! - schema, context, onSubscribe, onOperation, onError, onNext and onComplete hooks don't have the full accompanying message anymore, only the ID and the relevant part from the message

    There is really no need to pass the full SubscribeMessage to the onSubscribe hook. The only relevant parts from the message are the id and the payload, the type is useless since the hook inherently has it (onNext is next type, onError is error type, etc).

    The actual techincal reason for not having the full message is to avoid serialising results and errors twice. Both onNext and onError allow the user to augment the result and return it to be used instead. onNext originally had the NextMessage argument which already has the FormattedExecutionResult, and onError originally had the ErrorMessage argument which already has the GraphQLFormattedError, and they both also returned FormattedExecutionResult and GraphQLFormattedError respectivelly - meaning, if the user serialised the results - the serialisation would happen twice.

    Additionally, the onOperation, onError, onNext and onComplete now have the payload which is the SubscribeMessage.payload (SubscribePayload) for easier access to the original query as well as execution params extensions.

Migrating from v5 to v6
schema
import { ExecutionArgs } from 'graphql';
import { ServerOptions, SubscribePayload } from 'graphql-ws';

const opts: ServerOptions = {
- schema(ctx, message, argsWithoutSchema: Omit<ExecutionArgs, 'schema'>) {
-   const messageId = message.id;
-   const messagePayload: SubscribePayload = message.payload;
- },
+ schema(ctx, id, payload) {
+   const messageId = id;
+   const messagePayload: SubscribePayload = payload;
+ },
};
context
import { ExecutionArgs } from 'graphql';
import { ServerOptions, SubscribePayload } from 'graphql-ws';

const opts: ServerOptions = {
- context(ctx, message, args: ExecutionArgs) {
-   const messageId = message.id;
-   const messagePayload: SubscribePayload = message.payload;
- },
+ context(ctx, id, payload, args: ExecutionArgs) {
+   const messageId = id;
+   const messagePayload: SubscribePayload = payload;
+ },
};
onSubscribe
import { ServerOptions, SubscribePayload } from 'graphql-ws';

const opts: ServerOptions = {
- onSubscribe(ctx, message) {
-   const messageId = message.id;
-   const messagePayload: SubscribePayload = message.payload;
- },
+ onSubscribe(ctx, id, payload) {
+   const messageId = id;
+   const messagePayload: SubscribePayload = payload;
+ },
};
onOperation

The SubscribeMessage.payload is not useful here at all, the payload has been parsed to ready-to-use graphql execution args and should be used instead.

import { ExecutionArgs } from 'graphql';
import { ServerOptions, SubscribePayload, OperationResult } from 'graphql-ws';

const opts: ServerOptions = {
- onOperation(ctx, message, args: ExecutionArgs, result: OperationResult) {
-   const messageId = message.id;
-   const messagePayload: SubscribePayload = message.payload;
- },
+ onOperation(ctx, id, payload, args: ExecutionArgs, result: OperationResult) {
+   const messageId = id;
+   const messagePayload: SubscribePayload = payload;
+ },
};
onError

The ErrorMessage.payload (GraphQLFormattedError[]) is not useful here at all, the user has access to GraphQLError[] that are true instances of the error containing object references to originalErrors and other properties. The user can always convert and return GraphQLFormattedError[] by using the .toJSON() method.

import { GraphQLError, GraphQLFormattedError } from 'graphql';
import { ServerOptions, SubscribePayload } from 'graphql-ws';

const opts: ServerOptions = {
- onError(ctx, message, errors) {
-   const messageId = message.id;
-   const graphqlErrors: readonly GraphQLError[] = errors;
-   const errorMessagePayload: readonly GraphQLFormattedError[] = message.payload;
- },
+ onError(ctx, id, payload, errors) {
+   const messageId = id;
+   const graphqlErrors: readonly GraphQLError[] = errors;
+   const subscribeMessagePayload: SubscribePayload = payload;
+   const errorMessagePayload: readonly GraphQLFormattedError[] = errors.map((e) => e.toJSON());
+ },
};
onNext

The NextMessage.payload (FormattedExecutionResult) is not useful here at all, the user has access to ExecutionResult that contains actual object references to error instances. The user can always convert and return FormattedExecutionResult by serialising the errors with GraphQLError.toJSON() method.

import { ExecutionArgs, ExecutionResult, FormattedExecutionResult } from 'graphql';
import { ServerOptions, SubscribePayload } from 'graphql-ws';

const opts: ServerOptions = {
- onNext(ctx, message, args: ExecutionArgs, result: ExecutionResult) {
-   const messageId = message.id;
-   const nextMessagePayload: FormattedExecutionResult = message.payload;
- },
+ onNext(ctx, id, payload, args: ExecutionArgs, result: ExecutionResult) {
+   const messageId = id;
+   const subscribeMessagePayload: SubscribePayload = payload;
+   const nextMessagePayload: FormattedExecutionResult = { ...result, errors: result.errors?.map((e) => e.toJSON()) };
+ },
};
onComplete
import { ServerOptions, SubscribePayload } from 'graphql-ws';

const opts: ServerOptions = {
- onComplete(ctx, message) {
-   const messageId = message.id;
- },
+ onComplete(ctx, id, payload) {
+   const messageId = id;
+   const subscribeMessagePayload: SubscribePayload = payload;
+ },
};
Migrating from v5 to v6

If you had used the suggested "ws server usage with custom subscribe method that gracefully handles thrown errors" recipe, you can simply remove it since this behaviour is now baked in.

import { subscribe } from 'graphql';
import { useServer } from 'graphql-ws/use/ws';
import { WebSocketServer } from 'ws'; // yarn add ws

const wsServer = new WebSocketServer({
  port: 4000,
  path: '/graphql',
});

useServer(
  {
    schema,
-   async subscribe(...args) {
-     const result = await subscribe(...args);
-     if ('next' in result) {
-       // is an async iterable, augment the next method to handle thrown errors
-       const originalNext = result.next;
-       result.next = async () => {
-         try {
-           return await originalNext();
-         } catch (err) {
-           // gracefully handle the error thrown from the next method
-           return { value: { errors: [err] } };
-         }
-       };
-     }
-     return result;
-   },
  },
  wsServer,
);
Migrating from v5 to v6

Replace all ocurrances of isMessage with validateMessage. Note that validateMessage throws if the message is not valid, compared with isMessage that simply returned true/false.

- import { isMessage } from 'graphql-ws';
+ import { validateMessage } from 'graphql-ws';

function isGraphQLWSMessage(val) {
- return isMessage(val);
+ try {
+   validateMessage(val);
+   return true;
+ } catch {
+   return false;
+ }
}
Migrating from v5 to v6

Replace all ocurrances of isFatalConnectionProblem with shouldRetry. Note that the result is inverted, where you returned false in isFatalConnectionProblem you should return true in shouldRetry.

import { createClient } from 'graphql-ws';

const client = createClient({
  url: 'ws://localhost:4000/graphql',
- isFatalConnectionProblem: () => false,
+ shouldRetry: () => true,
});
Minor Changes
  • #​613 3f11aba Thanks @​enisdenjo! - Client is truly zero-dependency, not even a peer dependency on graphql

    In non-browser environments, you can use only the client and not even depend on graphql by importing from graphql-ws/client.

    import { createClient } from 'graphql-ws/client';
    
    const client = createClient({
      url: 'ws://localhost:4000/graphql',
    });

    Note that, in browser envirments (and of course having your bundler use the browser package.json field), you don't have to import from graphql-ws/client - simply importing from graphql-ws will only have the createClient available.

  • #​615 29dd26a Thanks @​enisdenjo! - Define optional peer dependencies and least supported versions

    Using the peerDependencies in combination with peerDependenciesMeta configuration in package.json.

v5.16.2

Compare Source

Patch Changes

v5.16.1

Compare Source

Patch Changes
facebook/jscodeshift (jscodeshift)

v17.1.2

Compare Source

Patch Changes
  • 8f60fbf: Enable async tranformers in test utils.
    All notable changes to this project will be documented in this file.

v17.1.1

Compare Source

Fixed
  • Republished with temp dependency properly removed (#​638, thanks @​trivikr for reporting)

v17.1.0

Compare Source

Added
  • pkg.pr.new will now be used to build an npm pakage for each commit to the repo, allowing you to more easily test changes or use new features before an official release is cut. (#​622, @​Aslemammad)
Changed
Fixed
  • Removed old docs command from package.json since the new docs are in the website folder, which has instructions in its README.

v17.0.0

Compare Source

We needed to go from v0.x to a major release, and it may as well happen now. jscodeshift has been around for nine years though, so going to v1.0.0 didn't feel quite right. I've instead promoted the minor version number to a major version number, similar to what React did when it went from 0.14 to 15.0.

Fixed
  • Node.js 16 is now explicitly specified as the minimum required version. It was already implicitly required due to some dependencies requiring it, but this wasn't explicitly specified until now. (#​607, @​trivikr)
Added
Changed
bvaughn/react-error-boundary (react-error-boundary)

v5.0.0

Compare Source

Update withErrorBoundary types to be compatible with the latest forwardRef types

For more background see PR #​211

v4.1.2

Compare Source

v4.1.1

Compare Source

v4.1.0

Compare Source

isaacs/rimraf (rimraf)

v6.0.1

Compare Source

v6.0.0

Compare Source

v5.0.10

Compare Source


Configuration

📅 Schedule: Branch creation - "every weekend" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

changeset-bot bot commented Jul 13, 2024

⚠️ No Changeset found

Latest commit: f40d9c0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Jul 13, 2024

size-limit report 📦

Path Size
dist/apollo-client.min.cjs 40.67 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" 50.08 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/main.cjs" (production) 47.2 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" 36.18 KB (0%)
import { ApolloClient, InMemoryCache, HttpLink } from "dist/index.js" (production) 33.58 KB (0%)
import { ApolloProvider } from "dist/react/index.js" 1.26 KB (0%)
import { ApolloProvider } from "dist/react/index.js" (production) 1.24 KB (0%)
import { useQuery } from "dist/react/index.js" 5.21 KB (0%)
import { useQuery } from "dist/react/index.js" (production) 4.29 KB (0%)
import { useLazyQuery } from "dist/react/index.js" 5.7 KB (0%)
import { useLazyQuery } from "dist/react/index.js" (production) 4.78 KB (0%)
import { useMutation } from "dist/react/index.js" 3.62 KB (0%)
import { useMutation } from "dist/react/index.js" (production) 2.84 KB (0%)
import { useSubscription } from "dist/react/index.js" 4.42 KB (0%)
import { useSubscription } from "dist/react/index.js" (production) 3.48 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" 5.51 KB (0%)
import { useSuspenseQuery } from "dist/react/index.js" (production) 4.17 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" 5.01 KB (0%)
import { useBackgroundQuery } from "dist/react/index.js" (production) 3.66 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" 5.09 KB (0%)
import { useLoadableQuery } from "dist/react/index.js" (production) 3.74 KB (0%)
import { useReadQuery } from "dist/react/index.js" 3.41 KB (0%)
import { useReadQuery } from "dist/react/index.js" (production) 3.35 KB (0%)
import { useFragment } from "dist/react/index.js" 2.36 KB (0%)
import { useFragment } from "dist/react/index.js" (production) 2.31 KB (0%)

@renovate renovate bot force-pushed the renovate/major-all-dev branch 4 times, most recently from 6a9ee40 to 1cd58da Compare July 27, 2024 08:18
@renovate renovate bot force-pushed the renovate/major-all-dev branch 4 times, most recently from db469ce to 841baac Compare August 3, 2024 17:06
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from 13e39fe to 0bffc03 Compare August 10, 2024 17:30
@renovate renovate bot force-pushed the renovate/major-all-dev branch 3 times, most recently from d682bff to 4574e96 Compare August 24, 2024 07:28
@renovate renovate bot force-pushed the renovate/major-all-dev branch 3 times, most recently from fa663e1 to c93c917 Compare September 7, 2024 09:04
@renovate renovate bot force-pushed the renovate/major-all-dev branch from c93c917 to fa0342b Compare September 14, 2024 10:07
Copy link

pkg-pr-new bot commented Sep 14, 2024

npm i https://pkg.pr.new/@apollo/client@11959

commit: f40d9c0

@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from 0f5d3cd to 61c9d08 Compare September 28, 2024 07:58
@renovate renovate bot force-pushed the renovate/major-all-dev branch from 61c9d08 to ed97593 Compare October 5, 2024 07:09
@svc-apollo-docs
Copy link

svc-apollo-docs commented Oct 5, 2024

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 92260e0434ff3f750cd54af0

@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from 46d4c24 to dc90980 Compare October 12, 2024 09:21
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from 97c6cd3 to eddd2d0 Compare October 26, 2024 07:49
@renovate renovate bot force-pushed the renovate/major-all-dev branch from eddd2d0 to a65ba6d Compare October 27, 2024 19:17
@renovate renovate bot force-pushed the renovate/major-all-dev branch 3 times, most recently from 0e9112e to cd583bb Compare November 9, 2024 09:03
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from e3d6ae4 to 91f58cc Compare November 23, 2024 08:09
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from 112dc8f to b15d7e2 Compare November 30, 2024 09:19
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from a7ce63e to bf520d4 Compare December 7, 2024 10:38
@renovate renovate bot force-pushed the renovate/major-all-dev branch from bf520d4 to c43a491 Compare December 14, 2024 09:41
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from b72bab6 to 06b246c Compare December 21, 2024 21:42
@renovate renovate bot force-pushed the renovate/major-all-dev branch from 06b246c to 50fd61f Compare December 28, 2024 09:56
@renovate renovate bot force-pushed the renovate/major-all-dev branch 2 times, most recently from a6ce1d5 to 83690ec Compare January 11, 2025 10:28
@renovate renovate bot force-pushed the renovate/major-all-dev branch from 83690ec to f3c6881 Compare January 18, 2025 08:30
@renovate renovate bot force-pushed the renovate/major-all-dev branch from f3c6881 to f40d9c0 Compare January 26, 2025 09:23
Copy link

netlify bot commented Jan 26, 2025

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit f40d9c0
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/6795ff294f1eca00087f067d
😎 Deploy Preview https://deploy-preview-11959--apollo-client-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

1 participant