Comparing version 2.13.0 to 2.13.1
2.13.1 / 2021-01-04 | ||
================== | ||
**fixes** | ||
* [[`b5472f4`](http://github.com/koajs/koa/commit/b5472f4cbb87349becae36b4a9ad5f76a825abb8)] - fix: make ESM transpiled CommonJS play nice for TS folks, fix #1513 (#1518) (miwnwski <<m@iwnw.ski>>) | ||
* [[`68d97d6`](http://github.com/koajs/koa/commit/68d97d69e4536065504bf9ef1e348a66b3f35709)] - fix: fixed order of vulnerability disclosure addresses (niftylettuce <<niftylettuce@gmail.com>>) | ||
**others** | ||
* [[`b4398f5`](http://github.com/koajs/koa/commit/b4398f5d68f9546167419f394a686afdcb5e10e2)] - correct verb tense in doc (#1512) (Matan Shavit <<71092861+matanshavit@users.noreply.github.com>>) | ||
* [[`39e1a5a`](http://github.com/koajs/koa/commit/39e1a5a380aa2bbc4e2d164e8e4bf37cfd512516)] - fixed multiple grammatical errors in docs. (#1497) (Hridayesh Sharma <<vyasriday7@gmail.com>>) | ||
* [[`aeb5d19`](http://github.com/koajs/koa/commit/aeb5d1984dcc5f8e3386f8f9724807ae6f3aa1c4)] - docs: added niftylettuce@gmail.com to vulnerability disclosure (niftylettuce <<niftylettuce@gmail.com>>) | ||
* [[`6e1093b`](http://github.com/koajs/koa/commit/6e1093be27b41135c8e67fce108743d54e9cab67)] - docs: remove babel from readme (#1494) (miwnwski <<m@iwnw.ski>>) | ||
* [[`38cb591`](http://github.com/koajs/koa/commit/38cb591254ff5f65a04e8fb57be293afe697c46e)] - docs: update specific for auto response status (AlbertAZ1992 <<ziyuximing@163.com>>) | ||
* [[`2224cd9`](http://github.com/koajs/koa/commit/2224cd9b6a648e7ac2eb27eac332e7d6de7db26c)] - docs: remove babel ref. (#1488) (Imed Jaberi <<imed_jebari@hotmail.fr>>) | ||
* [[`d51f983`](http://github.com/koajs/koa/commit/d51f98328c3b84493cc6bda0732aabb69e20e3a1)] - docs: fix assert example for response (#1489) (Imed Jaberi <<imed_jebari@hotmail.fr>>) | ||
* [[`f8b49b8`](http://github.com/koajs/koa/commit/f8b49b859363ad6c3d9ea5c11ee62341407ceafd)] - chore: fix grammatical and spelling errors in comments and tests (#1490) (Matt Kubej <<mkubej@gmail.com>>) | ||
* [[`d1c9263`](http://github.com/koajs/koa/commit/d1c92638c95d799df2fdff5576b96fc43a62813f)] - deps: update depd >> v2.0.0 (#1482) (imed jaberi <<imed_jebari@hotmail.fr>>) | ||
2.13.0 / 2020-06-21 | ||
@@ -3,0 +21,0 @@ ================== |
@@ -214,2 +214,11 @@ | ||
} | ||
/** | ||
* Help TS users comply to CommonJS, ESM, bundler mismatch. | ||
* @see https://github.com/koajs/koa/issues/1513 | ||
*/ | ||
static get default() { | ||
return Application; | ||
} | ||
}; | ||
@@ -282,2 +291,3 @@ | ||
*/ | ||
module.exports.HttpError = HttpError; |
@@ -149,3 +149,3 @@ | ||
/** | ||
* Set pathname, retaining the query-string when present. | ||
* Set pathname, retaining the query string when present. | ||
* | ||
@@ -167,3 +167,3 @@ * @param {String} path | ||
/** | ||
* Get parsed query-string. | ||
* Get parsed query string. | ||
* | ||
@@ -181,3 +181,3 @@ * @return {Object} | ||
/** | ||
* Set query-string as an object. | ||
* Set query string as an object. | ||
* | ||
@@ -205,3 +205,3 @@ * @param {Object} obj | ||
/** | ||
* Set querystring. | ||
* Set query string. | ||
* | ||
@@ -223,3 +223,3 @@ * @param {String} str | ||
/** | ||
* Get the search string. Same as the querystring | ||
* Get the search string. Same as the query string | ||
* except it includes the leading ?. | ||
@@ -414,3 +414,3 @@ * | ||
/** | ||
* Short-hand for: | ||
* Shorthand for: | ||
* | ||
@@ -431,3 +431,3 @@ * this.protocol == 'https' | ||
* | ||
* For example if the value were "client, proxy1, proxy2" | ||
* For example if the value was "client, proxy1, proxy2" | ||
* you would receive the array `["client", "proxy1", "proxy2"]` | ||
@@ -505,2 +505,3 @@ * where "proxy2" is the furthest down-stream. | ||
*/ | ||
get accept() { | ||
@@ -516,2 +517,3 @@ return this._accept || (this._accept = accepts(this.req)); | ||
*/ | ||
set accept(obj) { | ||
@@ -619,3 +621,3 @@ this._accept = obj; | ||
* Check if the incoming request contains the "Content-Type" | ||
* header field, and it contains any of the give mime `type`s. | ||
* header field and if it contains any of the given mime `type`s. | ||
* If there is no request body, `null` is returned. | ||
@@ -622,0 +624,0 @@ * If there is no content type, `false` is returned. |
@@ -436,2 +436,3 @@ | ||
*/ | ||
has(field) { | ||
@@ -445,3 +446,3 @@ return typeof this.res.hasHeader === 'function' | ||
/** | ||
* Set header `field` to `val`, or pass | ||
* Set header `field` to `val` or pass | ||
* an object of header fields. | ||
@@ -569,4 +570,5 @@ * | ||
/** | ||
* Flush any set headers, and begin the body | ||
* Flush any set headers and begin the body | ||
*/ | ||
flushHeaders() { | ||
@@ -583,2 +585,3 @@ this.res.flushHeaders(); | ||
*/ | ||
/* istanbul ignore else */ | ||
@@ -585,0 +588,0 @@ if (util.inspect.custom) { |
{ | ||
"name": "koa", | ||
"version": "2.13.0", | ||
"version": "2.13.1", | ||
"description": "Koa web app framework", | ||
@@ -41,3 +41,3 @@ "main": "lib/application.js", | ||
"delegates": "^1.0.0", | ||
"depd": "^1.1.2", | ||
"depd": "^2.0.0", | ||
"destroy": "^1.0.4", | ||
@@ -44,0 +44,0 @@ "encodeurl": "^1.0.2", |
@@ -163,36 +163,2 @@ <img src="/docs/logo.png" alt="Koa middleware framework for nodejs"/> | ||
## Babel setup | ||
If you're not using `node v7.6+`, we recommend setting up `babel` with [`@babel/preset-env`](https://babeljs.io/docs/en/next/babel-preset-env): | ||
```bash | ||
$ npm install @babel/register @babel/preset-env @babel/cli --save-dev | ||
``` | ||
In development, you'll want to use [`@babel/register`](https://babeljs.io/docs/en/next/babel-register): | ||
```bash | ||
node --require @babel/register <your-entry-file> | ||
``` | ||
In production, you'll want to build your files with [`@babel/cli`](https://babeljs.io/docs/en/babel-cli). Suppose you are compiling a folder `src` and you wanted the output to go to a new folder `dist` with non-javascript files copied: | ||
```bash | ||
babel src --out-dir dist --copy-files | ||
``` | ||
And have your `.babelrc` setup: | ||
```json | ||
{ | ||
"presets": [ | ||
["@babel/preset-env", { | ||
"targets": { | ||
"node": true | ||
} | ||
}] | ||
] | ||
} | ||
``` | ||
## Troubleshooting | ||
@@ -211,5 +177,3 @@ | ||
To report a security vulnerability, please do not open an issue, as this notifies attackers | ||
of the vulnerability. Instead, please email [dead_horse](mailto:heyiyu.deadhorse@gmail.com) and [jonathanong](mailto:me@jongleberry.com) to | ||
disclose. | ||
To report a security vulnerability, please do not open an issue, as this notifies attackers of the vulnerability. Instead, please email [dead_horse](mailto:heyiyu.deadhorse@gmail.com), [jonathanong](mailto:me@jongleberry.com), and [niftylettuce](mailto:niftylettuce@gmail.com) to disclose. | ||
@@ -216,0 +180,0 @@ ## Authors |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
89882
1590
290
Updateddepd@^2.0.0