Releases: jaydenseric/graphql-upload
Releases · jaydenseric/graphql-upload
Version 4.0.0-alpha.2
Minor
- Transpile and polyfill for Node.js v6.10+ (down from v7.6+) to support AWS Lambda, fixing #33.
- Modular project structure that works better for native ESM.
- Added tests.
- Set up Travis to test using the latest stable Node.js version and the oldest supported in
package.json
engines
(v6.10). - Added a Travis readme badge.
- Improved error handling, fixing #26:
- Custom errors are thrown or emitted with meaningful messages that are exported so consumers can use
instanceof
with them. - Where it makes sense, errors cause relevant HTTP status codes to be set in middleware.
- Misordered multipart fields cause
processRequest
to throwMapBeforeOperationsUploadError
andFilesBeforeMapUploadError
errors in middleware. - The
map
field provided by the client is used to naively check themaxFiles
option is not exceeded for a speedyMaxFilesUploadError
error in middleware. The real number of files parsed is checked too, incase the request is malformed. - If files are missing from the request the
scalar Upload
promises reject with aFileMissingUploadError
error. - Already if a file exceeds the
maxFileSize
option the file is truncated, the stream emits alimit
event andstream.truncated === true
. Now anerror
event is also emitted with aMaxFileSizeUploadError
. - Aborting requests from the client causes
scalar Upload
promises to reject with aUploadPromiseDisconnectUploadError
error for file upload streams that have not yet been parsed. For streams being parsed anerror
event is emitted with anFileStreamDisconnectUploadError
error andstream.truncated === true
. It is up to consumers to cleanup aborted streams in their resolvers.
- Custom errors are thrown or emitted with meaningful messages that are exported so consumers can use
Patch
- Updated dependencies.
- Smarter Babel config with
.babelrc.js
. - Refactor to use fewer Busboy event listeners.
Version 4.0.0-alpha.1
Major
- New API to support the GraphQL multipart request spec v2.0.0-alpha.2. Files no longer upload to the filesystem; readable streams are used in resolvers instead. Fixes #13 via #22.
- Export a new
Upload
scalar type to use in place of the oldUpload
input type. It represents a file upload promise that resolves an object containingstream
,filename
,mimetype
andencoding
. - Deprecated the
uploadDir
middleware option. graphql
is now a peer dependency.
Minor
- Added new
maxFieldSize
,maxFileSize
andmaxFiles
middleware options.
Patch
- Middleware are now arrow functions.
Version 3.0.0
Major
- Updated Node.js support from v6.4+ to v7.6+.
- Express middleware now passes on errors instead of blocking, via #20.
Patch
- Using Babel directly, dropping Rollup.
- New directory structure for compiled files.
- Module files now have
.mjs
extension. - No longer publish the
src
directory. - No more sourcemaps.
- Use an arrow function for the Koa middleware, to match the Express middleware.
- Compiled code is now prettier.
- Prettier markdown files.
- Updated package keywords.
- Updated an Apollo documentation link in the changelog.
- Readme improvements:
- Added links to badges.
- Removed the inspiration links; they are less relevant to the evolved codebase.
- Fixed an Apollo link.
- Replaced example resolver code with a link to the Apollo upload examples.
Version 2.0.4
Patch
- Updated dependencies.
- Readme tweaks including a new license badge.
Version 2.0.3
Patch
- Updated dependencies.
- Removed
package-lock.json
. Lockfiles are not recommended for packages. - Moved Babel config out of
package.json
to prevent issues when consumers run Babel overnode_modules
. - Readme tweaks and fixes:
- Renamed the
File
input typeUpload
for clarity. - Wording and formatting improvements.
- Covered React Native.
- Documented custom middleware.
- Renamed the
Version 2.0.2
Patch
- Updated dependencies.
- Added a changelog.
- Dropped Yarn in favor of npm@5. Removed
yarn.lock
and updated install instructions. - Set targeted Node version as a string for
babel-preset-env
. - New ESLint config. Dropped Standard Style and began using Prettier.
- Using lint-staged to ensure contributors don't commit lint errors.
- Removed
build:watch
script. Usenpm run build -- --watch
directly.
Version 2.0.1
Patch
- Updated dependencies.
- Support regular requests from clients other than apollo-upload-client again, fixing #4.
- Removed incorrect commas from example GraphQL input type.
Version 2.0.0
Major
- Support
apollo-upload-client
v3 and query batching.
Patch
- Clearer package description.
- Use Standard Style instead of ESLint directly.
Version 1.1.1
- Updated dependencies.
- Simplified linting setup.
Version 1.1.0
Minor
- Exporting a new helper function for processing requests. It can be used to create custom middleware, or middleware for unsupported routers.
- Exporting new Koa middleware.
- Upload directory is ensured on every request now. While slightly less efficient, it prevents major errors when if it is deleted while the server is running.
Patch
- Updated dependencies.
- Documented npm install as well as Yarn.
- Typo fix in the readme.