Skip to content

Releases: jaydenseric/graphql-upload

Version 11.0.0

25 May 05:21
Compare
Choose a tag to compare

Major

  • Updated Node.js support to ^10.13.0 || ^12.0.0 || >= 13.7.0.
  • Added a package exports field with conditional exports to support native ESM in Node.js and keep internal code private, whilst avoiding the dual package hazard. Published files have been reorganized, so previously undocumented deep imports will need to be rewritten according to the newly documented paths.
  • Updated dev dependencies, some of which require newer Node.js versions than previously supported.

Patch

  • Updated the graphql peer dependency to 0.13.1 - 15, fixing #200 via #201.
  • Updated Prettier related package scripts.
  • Configured Prettier option semi to the default, true.
  • Ensure GitHub Actions run on pull request.
  • Also run GitHub Actions with Node.js v14.
  • Fixed the ignoreStream function tests for Node.js v14 with a new CountReadableStream test helper, fixing #209.
  • Minor JSDoc wording tweak for consistency.
  • Mention Promise.allSettled in the readme “Tips” section.
  • Updated MDN Web Docs links.

Version 10.0.0

27 Jan 07:12
Compare
Choose a tag to compare

Major

  • Updated Node.js support from v8.10+ to v10+, as earlier versions have reached end-of-life.
  • Updated the fs-capacitor dependency to v6, which now requires Node.js v10+, via #179.
  • Updated dev dependencies, some of which now require Node.js v10+.
  • Replaced the tap dev dependency with test-director, coverage-node, and hard-rejection to improve the dev experience and reduce the dev install size by ~75.7 MB. These new dev dependencies require Node.js v10+.
  • Reorganized files. This is only a breaking change for projects using undocumented deep imports.
  • Removed now redundant Node.js version compatibility logic in the processRequest function.
  • The processRequest function now places references to instances of the now exported and documented Upload class in the GraphQL operation for the GraphQLUpload scalar to derive its value, and the GraphQLUpload scalar now throws a GraphQLError when it parses an invalid value, fixing #175 via #181.
  • The GraphQLUpload scalar parseLiteral and serialize methods now throw GraphQLError (instead of Error) instances, with tweaked messages.

Minor

  • The createReadStream function in resolved file uploads now accepts options to configure the encoding and high water mark, fixing #177 via #179.

Patch

  • Removed the now redundant eslint-plugin-import-order-alphabetical and express-async-handler dev dependencies.
  • Stop using husky and lint-staged.
  • Use isobject for checking if values are enumerable, non-array objects.
  • Tests have been massively reorganized, refactored, and improved.
  • Test the GraphQLUpload scalar.
  • Test the ignoreStream function.
  • Moved the Upload class to its own file.
  • Added JSDoc for the Upload class instance property file.
  • Test the Upload class.
  • Improved JSDoc FileUpload typedef description.
  • Removed now redundant eslint-disable-next-line comments.
  • Use strict mode for scripts.

Version 9.0.0

03 Dec 08:28
Compare
Choose a tag to compare

Major

  • Updated Node.js support from v8.5+ to v8.10+, to match what the eslint dev dependency now supports. This is unlikely to be a breaking change for the published package.
  • Removed the Upload scalar promise resolved stream property that has been deprecated since v7, along with associated tests.
  • ESM is no longer published, due to CJS/ESM compatibility issues across recent Node.js versions, via #169.
  • The file structure and non-index file exports have changed. This should only affect projects using undocumented deep imports.

Minor

  • Updated the fs-capacitor dependency to v4 to support Node.js v13, making required changes to the source and tests, via #166.
  • JSDoc comments are now included in the published code.
  • Several anonymous functions have been named, for better error stack traces.
  • Setup GitHub Sponsors funding:
    • Added .github/funding.yml to display a sponsor button in GitHub.
    • Added a package.json funding field to enable npm CLI funding features.

Patch

  • Updated dev dependencies.
  • Removed the .nycrc.json file:
    • tap now ignores test files by default.
    • The lib/test-helpers directory is now ignored using tap CLI arguments due to tapjs/node-tap#612.
  • Removed the esm and mjs package tags; they will be added back once native ESM is properly supported.
  • Updated JSDoc code examples to use CJS instead of ESM, as native ESM is not yet properly supported.
  • No longer test fs-capacitor implementation details such as temp file creation and cleanup.
  • Commented the reasons for several istanbul ignore next comments.

Version 8.1.0

10 Oct 00:43
Compare
Choose a tag to compare

Minor

  • processRequest now throws an appropriate error when a multipart field value exceeds the configured size limit, fixing #159.
  • When the file size limit is exceeded, mention how many bytes the limit is in the stream error message.
  • Added a new processRequest option to the graphqlUploadExpress and graphqlUploadKoa middleware, for improved testing without mocks or spies which are difficult to achieve with ESM.

Patch

  • Updated dependencies.
  • Due to updated dependencies: Lint fixes, removed redundant eslint-disable-next-line comments, and regenerated the readme.
  • Documented koa-graphql as known to be compatible, via #156.
  • Fixed a readme typo, via #161.
  • Use GitHub Actions instead of Travis for CI.
  • Removed package-lock.json from .gitignore and .prettierignore, as it’s disabled in .npmrc anyway.
  • New file structure.
  • Explicitly defined main exports (instead of using export * from) to prevent accidental public exposure of internal APIs.
  • Moved JSDoc typedefs into the index main entry file, alphabetically sorted.
  • Nicer Browserslist query syntax.
  • Replaced the isObject helper with a smarter and tested isEnumerableObject.
  • Removed the isString helper.
  • Enforced 100% code coverage for tests, and improved processRequest internals and tests (including a new test using vanilla Node.js HTTP), fixing #130 via #162.
  • Removed a workaround from the startServer test helper.
  • Added a new ProcessRequestFunction JSDoc type, and applied it to processRequest.
  • Renamed the UploadOptions JSDoc type to ProcessRequestOptions.
  • Misc. documentation improvements.

Version 8.0.7

12 Jun 14:13
Compare
Choose a tag to compare

Patch

  • Updated dependencies.
  • Handle invalid object paths in map multipart field entries, fixing #154.
  • Import WriteStream from fs-capacitor as a named rather than default import.

Version 8.0.6

26 Apr 00:38
Compare
Choose a tag to compare

Patch

  • Updated dependencies.
  • Allow batched operations again, fixing #142.
  • Simplify tests by writing JSON as strings instead of using JSON.stringify.
  • Use async middleware with express-async-handler for Express tests.
  • Removed unintended maxFiles config in certain tests.
  • Added the Open Graph image design to the logo Sketch file.

Version 8.0.5

05 Apr 03:17
Compare
Choose a tag to compare

Patch

  • Updated dependencies.
  • Handle invalid types in multipart fields and respond with meaningful HTTP 400 errors, via #139:
    • Invalid operations type.
    • Invalid map type.
    • Invalid map entry type.
    • Invalid map entry array item type.
  • Additionally test current Node.js v8 and v10 versions with Travis.
  • Reduced the size of the published package.json by moving dev tool config to files. This also prevents editor extensions such as Prettier and ESLint from detecting config and attempting to operate when opening package files installed in node_modules.
  • Removed the watch dev dependency and watch script.
  • Simplified the prepublishOnly script.
  • Change to the classic TAP reporter for tests.
  • Add apollo-server-koa and apollo-server-express back to the compatible environments list in the readme, now that they use the current version of this package.

Version 8.0.4

15 Jan 22:06
Compare
Choose a tag to compare

Patch

Version 8.0.3

10 Jan 01:17
Compare
Choose a tag to compare

Patch

Version 8.0.2

17 Nov 22:36
Compare
Choose a tag to compare

Patch

  • Updated dev dependencies.
  • Fixed hanging when a request with a large payload has an “immediate” error, such as a malformed request, fixing #123 via #124.
  • Moved JSDoc type definitions to the end of files to make it easier to open to the code.