[Snyk] Upgrade koa from 2.16.1 to 3.0.0 #191
Open
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.
Snyk has created this PR to upgrade koa from 2.16.1 to 3.0.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 7 versions ahead of your current version.
The recommended version was released a month ago.
Release notes
Package name: koa
-
3.0.0 - 2025-04-28
- Minimum node v18
- Removes
- For
- Remove special ENOENT support #1861 - this is a big change and will require any file servers to adapt to this change for handling 404s / files not found
- Removes generator deprecation messages. Generators are no longer supported. Koa no longer asserts if generators are used.
- Support custom streams @ KristapsR #1825
- Support WHATWG response bodies #1830 @ kravorkid
- Use asyncLocalStorage to get current context from app, e.g.:
- Handle responses when socket is no longer writable @ titanism @ Azlond #1593
- fix: Do not response Content-Length if Transfer-Encoding is defined #1562 @ charlyzeng
- fix: Set body to 'null' if
- fix: can not get currentContext in error handler (#1758) (Gxkl <gxkl203@gmail.com>)
- Fix exports.defaults in package.json #1630
- Fix leaky handles in tests #1838
- Fix body null checks #1814
- Fix reformatting redirect URLs #1805 #1804
- Fix passing ctx in error handler #1758
- Avoid redos on host and protocol getter
- Replace node query string with URLSearchParams #1828 @ kravorkid
- bump type-is@2
- bump http-errors@2
- bump cookies@0.9.1
- bump statuses@2
- bump supertest@7
-
3.0.0-alpha.5 - 2025-04-06
-
3.0.0-alpha.4 - 2025-03-21
- .req.origin now represents
- Removed special
- .res.set - do not coerce headers to be strings
-
3.0.0-alpha.3 - 2025-02-11
-
3.0.0-alpha.2 - 2024-11-04
- Update
- Remove
- Replace node querystring with
- Remove obsolete
- Add support for web WHATWG #1830
- Update
- Update
- Update
- Fix
- Fix leaky handles in tests #1838
- Fix body null checks #1814
- Fix reformatting redirect URLs #1805 #1804
- Fix passing
- Migrate from
-
3.0.0-alpha.1 - 2023-04-12
-
3.0.0-alpha.0 - 2023-01-02
-
2.16.1 - 2025-04-06
from koa GitHub release notesThis is a major release.
Breaking
.redirect('back'), adds.back(fallback_url)@ fl0w #1115.redirect(), don't render redirect values in anchor ref ff25eb4req.originshould display the origin header if it exists, not the current hostname #1008.originnow aligns with theOriginheader as used in CORS..body=<json>should not overwrite type if type already json #1120Set content-length: 0 if body is explicitly set to null @ ognjenjevremovic #1528
Remove obsolete createAsyncCtxStorageMiddleware #1817
ctx.thrownow requires a format ofctx.throw(status, error, properties). See: https://www.npmjs.com/package/http-errorsNew
const ctx = app.currentContext.Fixes
ctx.type = 'json'andctx.body = null#1059 @ likegunRefactors
Dependencies
fix: don't render redirect values in anchor ref
Breaking Changes:
req.headers.origin.body=<json>does not overwrite.type=if the type is already jsonENOENTerror support - please check your file handling functions3.0.0-alpha.3
breaking changes
http-errorstov2.0.0#1486ctx.thrownow requires a format ofctx.throw(status, error, properties). See: https://www.npmjs.com/package/http-errorsres.redirect('back'), addback()method toctx#1115URLSearchParams#1828createAsyncCtxStorageMiddleware#1817features
updates
cookiesto~0.9.1#1846statusesto^2.0.1supertestto^7.0.0#1841fixes
exports.defaultsinpackage.json#1630ctxin error handler #1758migrations
jestto the native node test runner #1845fix: don't render redirect values in anchor ref
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: