Minor
- Updated the
graphqlpeer dependency to^16.3.0 || ^17.0.0, fixing #394. - Updated the optional peer dependency
@types/koato^2.11.4 || ^3.0.0. Koa v3 is now supported.
Patch
- Added the package field
devEngines; the supported Node.js versions for developing this package are now^22.13.0 || ^24.0.0 || >=26.0.0. - Changed the optional peer dependency
@types/expressfrom4.0.29 - 5to the equivalent^4.0.29 || ^5.0.0. - Updated dev dependencies.
- Updated GitHub Actions CI config:
- Run tests with Node.js v18, v20, v22, v24, v26.
- Test Node.js versions prior to v22 with GraphQL v16 and polyfills.
- Updated
actions/checkoutto v7. - Updated
actions/setup-nodeto v7.
- Migrated config for TypeScript v7 and fixed new TypeScript errors in tests.
- Avoid using the TypeScript type
anyin tests. - Updated VS Code workspace settings.
- Renamed the test helper directory from
testtotest-helpersand removed the custom glob from the package scripttests. - Use the Node.js test runner to enforce code coverage:
- Removed the dev dependency
coverage-node. - Updated the package script
test.
- Removed the dev dependency
- Improved the function
graphqlUploadExpress:- Fixed the middleware hanging if a multipart request disconnects before finishing, and added related tests.
[!IMPORTANT]
This is a critical bugfix. After updating, test that aborted GraphQL multipart requests are handled appropriately in your Express app. See how the Express middleware in this repo is tested.
- Fixed monkey patching of the Express response method
send; it now correctly returns the Express response instead of void. - More detailed JSDoc description.
- Fixed the middleware hanging if a multipart request disconnects before finishing, and added related tests.
- Improved the function
graphqlUploadKoa:- Fixed the middleware hanging if a multipart request disconnects before finishing, and added related tests.
[!IMPORTANT]
This is a critical bugfix. After updating, test that aborted GraphQL multipart requests are handled appropriately in your Koa app. See how the Koa middleware in this repo is tested.
- More detailed JSDoc description.
- Fixed the middleware hanging if a multipart request disconnects before finishing, and added related tests.
- Added an internal helper function
requestFinishedfor waiting for a request to finish (either because it disconnects early, or it finishes uploading), with tests, replacing separate (and in some places buggy) code in middleware and tests. - Improved the test helper function
abortingMultipartRequest:- Removed the dev dependency
form-data-encoder. - It now works with more than just text files.
- Changed the parameter
abortMarkertype fromstringtext to aUint8Arraybyte sequence. - Use a new test helper function
isAbortError, with tests. - Added tests.
- Removed the dev dependency
- Removed the test helper class
CountReadableStreamand refactored the functionignoreStreamtests. - Test that
GraphQLUploadis a GraphQL scalar. - Improved tests:
- Polyfills to support old Node.js versions are now loaded using the Node.js CLI option
--import, instead of side effect imports in test modules. - Use
getDefaultHighWaterMarkfromnode:streamto avoid hardcoded assumptions about chunk sizes. - Replaced
strictEqualassertions oftruewithok. - Replaced
@ts-ignorecomments with better code or@ts-expect-errorcomments. - Improved comments.
- Polyfills to support old Node.js versions are now loaded using the Node.js CLI option
- Updated various documentation links.
- Fixed various JSDoc description typos.
- Fixed changelog entry typos for v4.0.0-alpha.2, v6.0.0-alpha.1, v12.0.0, and v17.0.0.