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
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 to0.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 newCountReadableStream
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
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 withtest-director
,coverage-node
, andhard-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 documentedUpload
class in the GraphQL operation for theGraphQLUpload
scalar to derive its value, and theGraphQLUpload
scalar now throws aGraphQLError
when it parses an invalid value, fixing #175 via #181. - The
GraphQLUpload
scalarparseLiteral
andserialize
methods now throwGraphQLError
(instead ofError
) 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
andexpress-async-handler
dev dependencies. - Stop using
husky
andlint-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 propertyfile
. - 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
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 resolvedstream
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.
- Added
Patch
- Updated dev dependencies.
- Removed the
.nycrc.json
file:tap
now ignores test files by default.- The
lib/test-helpers
directory is now ignored usingtap
CLI arguments due to tapjs/node-tap#612.
- Removed the
esm
andmjs
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
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 thegraphqlUploadExpress
andgraphqlUploadKoa
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 testedisEnumerableObject
. - 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 toprocessRequest
. - Renamed the
UploadOptions
JSDoc type toProcessRequestOptions
. - Misc. documentation improvements.
Version 8.0.7
Patch
- Updated dependencies.
- Handle invalid object paths in
map
multipart field entries, fixing #154. - Import
WriteStream
fromfs-capacitor
as 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-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
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.
- Invalid
- 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 innode_modules
. - Removed the
watch
dev dependency andwatch
script. - Simplified the
prepublishOnly
script. - Change to the
classic
TAP reporter for tests. - Add
apollo-server-koa
andapollo-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
Patch
- Updated the
fs-capacitor
dependency to v2, fixing #131 via #132.
Version 8.0.3
Patch
- Updated dependencies. The
busboy
update contains a bug fix for.pipe()
on file streams. - Use jsDelivr for the readme logo instead of RawGit as they are shutting down.