Upgrade roc-package-web-app to use Koa@2 #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
roc-repo
version andjest
,roc.config.js
was adjustedKoa@1
->Koa@2
roc-package-web-app
to be Koa@2 compatiblekoa-accesslog
has been deleted due to incompatibility, now the package uses local implementation (refsrc/app/middlewares/accesslog.js
)src/app/middlewares
koa-errors
->koa-error
This is a breaking change, middlewares need to be now defined as async functions instead of generators. An API did not change so Im not sure if there are any changes required in packages like:
roc-package-web-app-dev
,roc-package-web-app-react(-dev)
. Upgrading those packages to use this one would be also a breaking change.However, the package should not break the current apps - just throw a warning that generators will be deprecated in
Koa v3
.Only tested it with
examples/web-app/client-server
, however more advanced test cases might be needed.Had problems with testing
createServer
since it was breaking Jest and stoped executing test cases.Need some help with actions required (if there are any regarding other packages) and prerelease process/plan. And review if the changes are sane of course 🙃