graphql-tools
graphql-tools copied to clipboard
fix(deps): update dependency apollo-upload-client to v18
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| apollo-upload-client | 17.0.0 -> 18.0.1 |
Release Notes
jaydenseric/apollo-upload-client (apollo-upload-client)
v18.0.1
Patch
- Corrected the function
createUploadLinkoptionuritype, fixing #316. - Prefixed unused parameters with
_, fixing #317. - Fixed a typo in the changelog entry for v18.0.0.
v18.0.0
Major
-
Updated Node.js support to
^18.15.0 || >=20.4.0. -
Updated the
@apollo/clientpeer dependency to^3.8.0. -
Updated the
extract-filesdependency to v13.-
React Native is no longer supported out of the box.
The class
ReactNativeFileis no longer exported, or matched by the functionisExtractableFile.This class was bloating non React Native environments with an extra module, increasing bundle sizes when building and adding an extra step to ESM loading waterfalls in browsers.
It’s the responsibility of Facebook to adhere to web standards and implement spec-complaint
Blob,File, andFormDataglobals in the React Native environment.To migrate, React Native projects that are unable to use the standard globals can manually implement a class
ReactNativeFileand match it with a custom functionisReactNativeFilefor use with the functioncreateUploadLinkoptionisExtractableFile. -
“Plain” objects in the GraphQL operation that aren’t
Objectinstances (e.g.Object.create(null)) are now also deep cloned when searching for extractable files.
-
-
Updated dev dependencies, some of which require newer Node.js versions than previously supported.
-
Use the Node.js test runner API and remove the dev dependency
test-director. -
Refactored tests to use the standard
AbortController,AbortSignal,File,FormData, andResponseAPIs available in modern Node.js and removed the dev dependenciesabort-controller,formdata-node, andnode-fetch. -
Public modules are now individually listed in the package
filesandexportsfields. -
Removed the package main index module; deep imports must be used. To migrate:
- import { - createUploadLink, - formDataAppendFile, - isExtractableFile - } from "apollo-upload-client"; + import createUploadLink from "apollo-upload-client/createUploadLink.mjs"; + import formDataAppendFile from "apollo-upload-client/formDataAppendFile.mjs"; + import isExtractableFile from "apollo-upload-client/isExtractableFile.mjs"; -
Shortened public module deep import paths, removing the
/public/. To migrate:- import createUploadLink from "apollo-upload-client/public/createUploadLink.js"; + import createUploadLink from "apollo-upload-client/createUploadLink.mjs"; - import formDataAppendFile from "apollo-upload-client/public/formDataAppendFile.js"; + import formDataAppendFile from "apollo-upload-client/formDataAppendFile.mjs"; - import isExtractableFile from "apollo-upload-client/public/isExtractableFile.js"; + import isExtractableFile from "apollo-upload-client/isExtractableFile.mjs"; -
The API is now ESM in
.mjsfiles instead of CJS in.jsfiles, accessible viaimportbut notrequire. -
Implemented TypeScript types via JSDoc comments.
Types published in
@types/apollo-upload-clientshould no longer be used.Projects must configure TypeScript to use types from the ECMAScript modules that have a
// @​ts-checkcomment:compilerOptions.allowJsshould betrue.compilerOptions.maxNodeModuleJsDepthshould be reasonably large, e.g.10.compilerOptions.moduleshould be"node16"or"nodenext".
-
Internally, use the function
selectHttpOptionsAndBodyInternalthat was added in@apollo/clientv3.5.5.
Minor
- Added a new option
printfor the functioncreateUploadLink, to customize how the GraphQL query or mutation AST prints to a string for transport. It that works like the same option forHttpLink.
Patch
- Updated dev dependencies.
- Simplified dev dependencies and config for ESLint.
- Integrated the ESLint plugin
eslint-plugin-optimal-modules. - Check TypeScript types via a new package
typesscript. - Removed the
jsdoc-mddev dependency and the related package scripts, replacing the readme “API” section with a manually written “Exports” section. - Updated the
package.jsonfieldrepositoryto conform to new npm requirements. - Updated GitHub Actions CI config:
- The workflow still triggers on push, but no longer on pull request.
- The workflow can now be manually triggered.
- Run tests with Node.js v18, v20, v21.
- Updated
actions/checkoutto v4. - Updated
actions/setup-nodeto v3.
- Use the
node:URL scheme for Node.js builtin module imports. - Reorganized the test file structure.
- In tests, for objects with the property
headersthat as of@apollo/clientv3.7.0 is a null-prototype object, use the assertiondeepEqualinstead ofdeepStrictEqual. - Tweaked code for type safety.
- Updated documentation, including link URLs.
- Refactored example code in the readme.
- Removed the readme badges.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
- [ ] If you want to rebase/retry this PR, check this box
This PR has been generated by Mend Renovate. View repository job log here.
🦋 Changeset detected
Latest commit: 7632f82191e16b8b9efd399eb2b1e2ea66c064fc
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| @graphql-tools/links | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
✅ Benchmark Results
✓ no_errors
✓ expected_result
checks.........................: 100.00% ✓ 210 ✗ 0
data_received..................: 24 MB 2.4 MB/s
data_sent......................: 90 kB 9.0 kB/s
http_req_blocked...............: avg=6.85µs min=2.7µs med=3.6µs max=220.3µs p(90)=4.46µs p(95)=5.46µs
http_req_connecting............: avg=1.53µs min=0s med=0s max=161.5µs p(90)=0s p(95)=0s
http_req_duration..............: avg=89.62ms min=74.98ms med=84.11ms max=228.39ms p(90)=109.63ms p(95)=130.8ms
{ expected_response:true }...: avg=89.62ms min=74.98ms med=84.11ms max=228.39ms p(90)=109.63ms p(95)=130.8ms
http_req_failed................: 0.00% ✓ 0 ✗ 105
http_req_receiving.............: avg=207.6µs min=140.5µs med=167.8µs max=519.4µs p(90)=301.3µs p(95)=330.6µs
http_req_sending...............: avg=127.56µs min=19.4µs med=25.7µs max=2ms p(90)=59.94µs p(95)=935.56µs
http_req_tls_handshaking.......: avg=0s min=0s med=0s max=0s p(90)=0s p(95)=0s
http_req_waiting...............: avg=89.28ms min=74.79ms med=83.85ms max=227.85ms p(90)=109.38ms p(95)=130.49ms
http_reqs......................: 105 10.490227/s
iteration_duration.............: avg=95.27ms min=80ms med=90.02ms max=233.91ms p(90)=114.62ms p(95)=136ms
iterations.....................: 105 10.490227/s
vus............................: 1 min=1 max=1
vus_max........................: 1 min=1 max=1
🚀 Snapshot Release (alpha)
The latest changes of this PR are available as alpha on npm (based on the declared changesets):
| Package | Version | Info |
|---|---|---|
@graphql-tools/links |
9.0.1-alpha-20231030105549-7632f821 |
npm ↗︎ unpkg ↗︎ |
💻 Website Preview
The latest changes are available as preview in: https://a571770f.graphql-tools.pages.dev
Edited/Blocked Notification
Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.
You can manually request rebase by checking the rebase/retry box above.
⚠️ Warning: custom changes will be lost.