8000 Releases · koajs/koa · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Releases: koajs/koa

v3.0.0

28 Apr 00:40
Compare
Choose a tag to compare

This is a major release.

Breaking

  • Minimum node v18
  • Removes .redirect('back'), adds .back(fallback_url) @fl0w #1115
  • For .redirect(), don't render redirect values in anchor ref ff25eb4
  • req.origin should display the origin header if it exists, not the current hostname #1008. origin now aligns with the Origin header as used in CORS.
  • .body=<json> should not overwrite type if type already json #1120
  • 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.
    Set content-length: 0 if body is explicitly set to null @ognjenjevremovic #1528
    Remove obsolete createAsyncCtxStorageMiddleware #1817
  • ctx.throw now requires a format of ctx.throw(status, error, properties). See: https://www.npmjs.com/package/http-errors

New

  • Support custom streams @KristapsR #1825
  • Support WHATWG response bodies #1830 @kravorkid
  • Use asyncLocalStorage to get current context from app, e.g.: const ctx = app.currentContext.

Fixes

  • 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 ctx.type = 'json' and ctx.body = null #1059 @likegun
  • 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

Refactors

Dependencies

  • bump type-is@2
  • bump http-errors@2
  • bump cookies@0.9.1
  • bump statuses@2
  • bump supertest@7

3.0.0-alpha.5

06 Apr 21:43
Compare
Choose a tag to compare

fix: don't render redirect values in anchor ref

v2.16.1

06 Apr 21:41
Compare
Choose a tag to compare

fix: don't render redirect values in anchor ref

3.0.0-alpha.4

21 Mar 07:37
Compare
Choose a tag to compare
3.0.0-alpha.4 Pre-release
Pre-release

Breaking Changes:

  • .req.origin now represents req.headers.origin
  • .body=<json> does not overwrite .type= if the type is already json
  • Removed special ENOENT error support - please check your file handling functions
  • .res.set - do not coerce headers to be strings

2.16.0

27 Feb 05:56
399cb6b
Compare
Choose a tag to compare

This is a backported release to fix core underlying issue with HEAD requests when using http2.createSecureServer. See discussion at #1593 and #1547.

  • fix missing cleanup, if response socket is no longer writeable (issue 1547) (#1593) 399cb6b

2.15.4

12 Feb 14:12
2.15.4
5f294bb
8000
Compare
Choose a tag to compare

Full Changelog: 2.15.3...2.15.4

Fix: avoid redos on host and protocol getter, see GHSA-593f-38f6-jp5m

3.0.0-alpha.2

04 Nov 05:10
Compare
Choose a tag to compare
3.0.0-alpha.2 Pre-release
Pre-release

breaking changes

  • Update http-errors to v2.0.0 #1486
  • Remove res.redirect('back'), add back() method to ctx #1115
  • Replace node querystring with URLSearchParams #1828
  • Remove obsolete createAsyncCtxStorageMiddleware #1817

features

  • Add support for web WHATWG #1830

updates

  • Update cookies to ~0.9.1 #1846
  • Update statuses to ^2.0.1
  • Update supertest to ^7.0.0 #1841

fixes

  • 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

migrations

  • Migrate from jest to the native node test runner #1845
0