diff --git a/History.md b/History.md index 1905e22f8..ec48837f1 100644 --- a/History.md +++ b/History.md @@ -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 diff --git a/lib/application.js b/lib/application.js index 0ab828a15..306dc2bfb 100644 --- a/lib/application.js +++ b/lib/application.js @@ -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() diff --git a/package.json b/package.json index 2ae6d55eb..4b4fcaf5d 100644 --- a/package.json +++ b/package.json @@ -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": {