Skip to content

Version 17.1.0

Latest

Choose a tag to compare

@jaydenseric jaydenseric released this 21 Jul 03:27

Minor

  • Updated the graphql peer dependency to ^16.3.0 || ^17.0.0, fixing #394.
  • Updated the optional peer dependency @types/koa to ^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/express from 4.0.29 - 5 to 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/checkout to v7.
    • Updated actions/setup-node to v7.
  • Migrated config for TypeScript v7 and fixed new TypeScript errors in tests.
  • Avoid using the TypeScript type any in tests.
  • Updated VS Code workspace settings.
  • Renamed the test helper directory from test to test-helpers and removed the custom glob from the package script tests.
  • Use the Node.js test runner to enforce code coverage:
    • Removed the dev dependency coverage-node.
    • Updated the package script test.
  • 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.
  • 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.
  • Added an internal helper function requestFinished for 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 abortMarker type from string text to a Uint8Array byte sequence.
    • Use a new test helper function isAbortError, with tests.
    • Added tests.
  • Removed the test helper class CountReadableStream and refactored the function ignoreStream tests.
  • Test that GraphQLUpload is 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 getDefaultHighWaterMark from node:stream to avoid hardcoded assumptions about chunk sizes.
    • Replaced strictEqual assertions of true with ok.
    • Replaced @ts-ignore comments with better code or @ts-expect-error comments.
    • Improved comments.
  • 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.