Skip to content

Commit

Permalink
Merge branch 'master' into initialize-context-state-sooner
Browse files Browse the repository at this point in the history
  • Loading branch information
krisstern authored Jan 25, 2023
2 parents a3e0f48 + bec13ec commit 91528e4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
8 changes: 6 additions & 2 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@

3.0.0 /
3.0.0-alpha.0 / 2023-01-02
==================

## Breaking Changes

- Supports node@12+ only.
- Removes generator deprecation messages.
- 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

## Features

- Use asyncLocalStorage to get current context from app, e.g.: `const ctx = app.currentContext`.

## Fixes

- fix: Do not response Content-Length if Transfer-Encoding is defined #1562 @charlyzeng
Expand Down
2 changes: 1 addition & 1 deletion lib/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ module.exports = class Application extends Emitter {
}

/**
* return currnect contenxt from async local storage
* return current context from async local storage
*/
get currentContext () {
if (this.ctxStorage) return this.ctxStorage.getStore()
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"name": "koa",
"version": "2.13.1",
"version": "3.0.0-alpha.0",
"publishConfig": {
"tag": "experimental"
},
"description": "Koa web app framework",
"main": "lib/application.js",
"exports": {
Expand Down

0 comments on commit 91528e4

Please sign in to comment.