Releases: jaydenseric/graphql-upload
Releases · jaydenseric/graphql-upload
Version 8.0.1
Patch
- Updated dev dependencies.
- Removed the package
module
field. Webpack by default resolves extensionless paths the same way Node.js in--experimental-modules
mode does;.mjs
files are preferred. Tools misconfigured or unable to resolve.mjs
can get confused whenmodule
points to an.mjs
ESM file and they attempt to resolve named imports from.js
CJS files. - Updated package scripts and config for the new
husky
version. - Added a package
browserslist
field with the target Node.js version for@babel/preset-env
and removed related config frombabel.config.js
. - Tests now log if the environment is CJS or ESM (
--experimental-modules
) and theNODE_ENV
. - Fixed broken readme API documentation links.
Version 8.0.0
Major
-
New naming that drops “apollo” to reflect the independent and universal nature of the project, fixing #68:
- Changed the package name from
apollo-upload-server
tographql-upload
. - Renamed
apolloUploadKoa
tographqlUploadKoa
. - Renamed
apolloUploadExpress
tographqlUploadExpress
.
To migrate you project from
apollo-upload-server@7.1.0
tographql-upload@8.0.0
:- Run
npm uninstall apollo-upload-server
. - Run
npm install graphql-upload
. - Find and replace:
apolloUploadKoa
→graphqlUploadKoa
.apolloUploadExpress
→graphqlUploadExpress
.
- Changed the package name from
Patch
- Updated dependencies.
- New project logo.
Version 7.1.0
Version 7.0.0
Major
- The
processRequest
function now requires ahttp.ServerResponse
instance as its second argument. - Replaced the previously exported error classes with
http-errors
and snapshot tested error details, via #105. - No longer exporting the
SPEC_URL
constant.
Minor
Upload
scalar promises now resolve with acreateReadStream
method instead of astream
property, via #92.- Accessing an
Upload
scalar promise resolvedstream
property results in a deprecation warning that recommends usingcreateReadStream
instead. It will be removed in a future release. Via #107. - An
Upload
scalar variable can now be used by multiple resolvers, via #92. - Multiple
Upload
scalar variables can now use the same multipart data, via #92. - Malformed requests containing invalid JSON for
operations
ormap
multipart fields cause an appropriate error with a400
status instead of crashing the process, relating to #81 and #95. - Malformed requests missing
operations
,map
and files, or justmap
and files, cause an appropriate error with a400
status instead of hanging, fixing #96. - Tweaked
GraphQLUpload
scalar description to remove details about how it resolves on the server as they are irrelevant to API users. - Tweaked
GraphQLUpload
scalar error messages.
Patch
- Updated dev dependencies.
- Removed the
npm-run-all
dev dependency and made scripts and tests sync for easier debugging, at the cost of slightly longer build times. - Explicitly set
processRequest
default options instead of relying onbusboy
defaults. - Better organized project file structure.
- Configured Prettier to lint
.yml
files. - Ensure the readme Travis build status badge only tracks
master
branch.
Version 6.0.0-alpha.1
Big thanks to new collaborator @mike-marcacci for his help solving tricky bugs and edge-cases!
Major
- Updated Node.js support from v6.10+ to v8.5+ for native ESM, object rest/spread properties, and async functions.
- Removed the
@babel/runtime
dependency and config. - Fixed #45, #77 and #83 via #81:
- Add
error
event listeners to file streams to prevent server crashes on aborted requests or parser errors. - Use
fs-capacitor
to ensure the server doesn’t hang if an uploadawait
is out of order, or is never consumed.
- Add
Minor
- Refactored package scripts to use
prepare
to support installation via Git (e.g.npm install jaydenseric/apollo-upload-server
).
Patch
- Updated dependencies.
- Use single instead of double typographic quotes in error messages.
- Use
babel.config.js
instead of.babelrc.js
. - Enabled
shippedProposals
in@babel/preset-env
config. - Improved testing:
- Use
tap
instead ofava
. Tests no longer transpile on the fly, are faster and AVA no longer dictates the Babel version. - Tests run against the actual dist
.mjs
and.js
files in native ESM (--experimental-modules
) and CJS environments. - Removed
get-port
dev dependency. - Added Express tests.
- Test middleware error response status codes.
- Test behavior of aborted HTTP requests.
- Test that the app can respond if an upload is not handled.
- Test files to upload are created in context, rather than using arbitrary project files, via #89.
- Use
- Improved
package.json
scripts:- Leveraged
npm-run-all
more for parallelism and reduced noise. - Removed the clean script
rimraf
dev dependency in favour of nativerm -rf
. Leaner and faster; we only support *nix now for contributing anyway. - No longer use
cross-env
; contributors with Windows may setup and use a Bash shell. - Renamed the
ESM
environment variable toBABEL_ESM
to be more specific. - Removed linting fix scripts.
- Linting included in the test script; Travis CI will fail PR's with lint errors.
- Custom watch script.
- Leveraged
- Improved ESLint config:
- Simplified ESLint config with
eslint-config-env
. - Removed redundant
eslint-plugin-ava
dev dependency and config. - Undo overriding ESLint ignoring dotfiles by default as there are none now.
- Simplified ESLint config with
- Use
.prettierignore
to leavepackage.json
formatting to npm. - Tweaked package
description
andkeywords
. - Compact package
repository
field. - Improved documentation.
- Readme badge changes to deal with shields.io unreliability:
- Use the official Travis build status badge.
- Use badgen.now.sh for the npm version badge.
- Removed the licence badge. The licence can be found in
package.json
and rarely changes. - Removed the Github issues and stars badges. The readme is most viewed on Github anyway.
changelog.md
version entries now have “Major”, “Minor” and “Patch” subheadings.
Version 5.0.0
Major
graphql
peer dependency range updated to^0.13.1
for native ESM support via.mjs
. It’s a breaking change despite being a semver patch.
Patch
- Updated dependencies.
- More robust npm scripts, with the ability to watch builds and tests together.
- Fixed missing dev dependency for fetching in tests.
- Use
eslint-plugin-ava
. - HTTPS
package.json
author URL. - New readme logo URL that doesn’t need to be updated every version.
Version 4.0.2
Patch
- Temporary solution for importing CommonJS in
.mjs
, fixing reopened #40.
Version 4.0.1
Patch
- Correct imports for vanilla Node.js
--experimental-modules
and.mjs
support, fixing #40.
Version 4.0.0
Includes all the changes from: