Releases: jaydenseric/graphql-upload
Releases · jaydenseric/graphql-upload
Version 11.0.0
Major
- Updated Node.js support to
^10.13.0 || ^12.0.0 || >= 13.7.0. - Added a package
exportsfield 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
graphqlpeer dependency to0.13.1 - 15, fixing #200 via #201. - Updated Prettier related package scripts.
- Configured Prettier option
semito the default,true. - Ensure GitHub Actions run on pull request.
- Also run GitHub Actions with Node.js v14.
- Fixed the
ignoreStreamfunction tests for Node.js v14 with a newCountReadableStreamtest helper, fixing #209. - Minor JSDoc wording tweak for consistency.
- Mention
Promise.allSettledin the readme “Tips” section. - Updated MDN Web Docs links.
Version 10.0.0
Major
- Updated Node.js support from v8.10+ to v10+, as earlier versions have reached end-of-life.
- Updated the
fs-capacitordependency to v6, which now requires Node.js v10+, via #179. - Updated dev dependencies, some of which now require Node.js v10+.
- Replaced the
tapdev dependency withtest-director,coverage-node, andhard-rejectionto 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
processRequestfunction. - The
processRequestfunction now places references to instances of the now exported and documentedUploadclass in the GraphQL operation for theGraphQLUploadscalar to derive its value, and theGraphQLUploadscalar now throws aGraphQLErrorwhen it parses an invalid value, fixing #175 via #181. - The
GraphQLUploadscalarparseLiteralandserializemethods now throwGraphQLError(instead ofError) instances, with tweaked messages.
Minor
- The
createReadStreamfunction 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-alphabeticalandexpress-async-handlerdev dependencies. - Stop using
huskyandlint-staged. - Use
isobjectfor checking if values are enumerable, non-array objects. - Tests have been massively reorganized, refactored, and improved.
- Test the
GraphQLUploadscalar. - Test the
ignoreStreamfunction. - Moved the
Uploadclass to its own file. - Added JSDoc for the
Uploadclass instance propertyfile. - Test the
Uploadclass. - Improved JSDoc
FileUploadtypedef description. - Removed now redundant
eslint-disable-next-linecomments. - Use strict mode for scripts.
Version 9.0.0
Major
- Updated Node.js support from v8.5+ to v8.10+, to match what the
eslintdev dependency now supports. This is unlikely to be a breaking change for the published package. - Removed the
Uploadscalar promise resolvedstreamproperty 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-capacitordependency 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.ymlto display a sponsor button in GitHub. - Added a
package.jsonfundingfield to enable npm CLI funding features.
- Added
Patch
- Updated dev dependencies.
- Removed the
.nycrc.jsonfile:tapnow ignores test files by default.- The
lib/test-helpersdirectory is now ignored usingtapCLI arguments due to tapjs/node-tap#612.
- Removed the
esmandmjspackage 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-capacitorimplementation details such as temp file creation and cleanup. - Commented the reasons for several
istanbul ignore nextcomments.
Version 8.1.0
Minor
processRequestnow 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
processRequestoption to thegraphqlUploadExpressandgraphqlUploadKoamiddleware, 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-linecomments, and regenerated the readme. - Documented
koa-graphqlas known to be compatible, via #156. - Fixed a readme typo, via #161.
- Use GitHub Actions instead of Travis for CI.
- Removed
package-lock.jsonfrom.gitignoreand.prettierignore, as it’s disabled in.npmrcanyway. - 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
isObjecthelper with a smarter and testedisEnumerableObject. - Removed the
isStringhelper. - Enforced 100% code coverage for tests, and improved
processRequestinternals and tests (including a new test using vanilla Node.js HTTP), fixing #130 via #162. - Removed a workaround from the
startServertest helper. - Added a new
ProcessRequestFunctionJSDoc type, and applied it toprocessRequest. - Renamed the
UploadOptionsJSDoc type toProcessRequestOptions. - Misc. documentation improvements.
Version 8.0.7
Patch
- Updated dependencies.
- Handle invalid object paths in
mapmultipart field entries, fixing #154. - Import
WriteStreamfromfs-capacitoras a named rather than default import.
Version 8.0.6
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-handlerfor Express tests. - Removed unintended
maxFilesconfig in certain tests. - Added the Open Graph image design to the logo Sketch file.
Version 8.0.5
Patch
- Updated dependencies.
- Handle invalid types in multipart fields and respond with meaningful HTTP 400 errors, via #139:
- Invalid
operationstype. - Invalid
maptype. - Invalid
mapentry type. - Invalid
mapentry array item type.
- Invalid
- Additionally test current Node.js v8 and v10 versions with Travis.
- Reduced the size of the published
package.jsonby 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 innode_modules. - Removed the
watchdev dependency andwatchscript. - Simplified the
prepublishOnlyscript. - Change to the
classicTAP reporter for tests. - Add
apollo-server-koaandapollo-server-expressback to the compatible environments list in the readme, now that they use the current version of this package.
Version 8.0.4
Patch
- Updated the
fs-capacitordependency to v2, fixing #131 via #132.
Version 8.0.3
Patch
- Updated dependencies. The
busboyupdate contains a bug fix for.pipe()on file streams. - Use jsDelivr for the readme logo instead of RawGit as they are shutting down.