graphql-upload
Advanced tools
Changelog
16.0.2
node:
URL scheme for Node.js builtin module imports.GraphQLUpload.mjs
.Changelog
16.0.0
Updated the fs-capacitor
dependency to v8, fixing #318.
The type FileUploadCreateReadStreamOptions
from the processRequest.mjs
module now uses types from fs-capacitor
that are slightly more specific.
The API is now ESM in .mjs
files instead of CJS in .js
files, accessible via import
but not require
. To migrate imports:
- import GraphQLUpload from "graphql-upload/GraphQLUpload.js";
+ import GraphQLUpload from "graphql-upload/GraphQLUpload.mjs";
- import graphqlUploadExpress from "graphql-upload/graphqlUploadExpress.js";
+ import graphqlUploadExpress from "graphql-upload/graphqlUploadExpress.mjs";
- import graphqlUploadKoa from "graphql-upload/graphqlUploadKoa.js";
+ import graphqlUploadKoa from "graphql-upload/graphqlUploadKoa.mjs";
- import processRequest from "graphql-upload/processRequest.js";
+ import processRequest from "graphql-upload/processRequest.mjs";
- import Upload from "graphql-upload/Upload.js";
+ import Upload from "graphql-upload/Upload.mjs";
Changelog
15.0.2
ctx
parameter for the Koa middleware created by the function graphqlUploadKoa
, from import("koa").Context
to import("koa").ParameterizedContext
.Changelog
15.0.0
busboy
dependency to v1, fixing #311.
processRequest
and the middleware graphqlUploadExpress
and graphqlUploadKoa
the option maxFileSize
is actually 1 byte less than the amount specified.typescript
dev dependency.processRequest
use the on
method instead of once
to listen for error
events on the busboy
parser, as in edge cases the same parser could have multiple error
events and all must be handled to prevent the Node.js process exiting with an error.processRequest
.processRequest
with a maliciously malformed multipart request.Changelog
14.0.0
Updated Node.js support to ^14.17.0 || ^16.0.0 || >= 18.0.0
.
Updated the graphql
peer dependency to ^16.3.0
.
Updated the http-errors
dependency to v2.
Public modules are now individually listed in the package files
and exports
fields.
Removed the package main index module; deep imports must be used. To migrate imports:
- import { GraphQLUpload } from "graphql-upload";
+ import GraphQLUpload from "graphql-upload/GraphQLUpload.js";
- import { graphqlUploadExpress } from "graphql-upload";
+ import graphqlUploadExpress from "graphql-upload/graphqlUploadExpress.js";
- import { graphqlUploadKoa } from "graphql-upload";
+ import graphqlUploadKoa from "graphql-upload/graphqlUploadKoa.js";
- import { processRequest } from "graphql-upload";
+ import processRequest from "graphql-upload/processRequest.js";
- import { Upload } from "graphql-upload";
+ import Upload from "graphql-upload/Upload.js";
Shortened public module deep import paths, removing the /public/
. To migrate imports:
- import GraphQLUpload from "graphql-upload/public/GraphQLUpload.js";
+ import GraphQLUpload from "graphql-upload/GraphQLUpload.js";
- import graphqlUploadExpress from "graphql-upload/public/graphqlUploadExpress.js";
+ import graphqlUploadExpress from "graphql-upload/graphqlUploadExpress.js";
- import graphqlUploadKoa from "graphql-upload/public/graphqlUploadKoa.js";
+ import graphqlUploadKoa from "graphql-upload/graphqlUploadKoa.js";
- import processRequest from "graphql-upload/public/processRequest.js";
+ import processRequest from "graphql-upload/processRequest.js";
- import Upload from "graphql-upload/public/Upload.js";
+ import Upload from "graphql-upload/Upload.js";
Implemented TypeScript types via JSDoc comments, closing #282.
The GraphQLUpload
scalar no longer uses deprecated GraphQLError
constructor parameters.
types
script.jsdoc-md
dev dependency and the related package scripts, replacing the readme “API” section with a manually written “Exports” section.hard-rejection
dev dependency. Instead, tests are run with the Node.js CLI flag --unhandled-rejections=throw
to make Node.js v14 behave like newer versions.formdata-node
dev dependency. Instead, File
and FormData
are imported from node-fetch
.actions/checkout
to v3.actions/setup-node
to v3..js
file extension in require
paths.Readable
property readableEncoding
instead of _readableState.encoding
in tests.substring
instead of the deprecated string method substr
in tests.license.md
MIT License file, closing #86.Changelog
13.0.0
^12.22.0 || ^14.17.0 || >= 16.0.0
../package
from the package exports
field; the full package.json
filename must be used in a require
path.graphql
peer dependency to 0.13.1 - 16
.processRequest
function with a GraphQL multipart request that has no files.processRequest
function with an unparsable multipart request.form-data
dev dependency with formdata-node
, formdata-node
, and node-abort-controller
and refactored tests to align with web standards.processRequest
function to remove the isobject
dependency.processRequest
function, via #273:
Upload
scalar value createReadStream
method:
error
event when the multipart request is aborted certain ways while the file is uploading.error
event details for multipart request file field parse errors.singleQuote
to the default, false
.Changelog
12.0.0
^12.20 || >= 14.13
..mjs
files instead of CJS in .js
files.package.json
exports
field public subpath folder mapping (deprecated by Node.js) with a subpath pattern. Deep require
paths must now include the .js
file extension.sideEffects
field.actions/checkout
to v2.actions/setup-node
to v2.npm install-test
command.CI
environment variable as it’s set by default.npm-debug.log
from the .gitignore
file as npm v4.2.0+ doesn’t create it in the current working directory.keywords
field.main
field path.jsdoc-md
v10 automatically generates a Prettier formatted readme.test:jsdoc
script that checks the readme API docs are up to date with the source JSDoc.GraphQLUpload
code example to use @graphql-tools/schema
instead of graphql-tools
.apollo-upload-server
.Changelog
11.0.0
^10.13.0 || ^12.0.0 || >= 13.7.0
.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.graphql
peer dependency to 0.13.1 - 15
, fixing #200 via #201.semi
to the default, true
.ignoreStream
function tests for Node.js v14 with a new CountReadableStream
test helper, fixing #209.Promise.allSettled
in the readme “Tips” section.