koa 2.12.0 → 2.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/History.md +62 -0
- package/Readme.md +1 -37
- package/dist/koa.mjs +4 -0
- package/lib/application.js +22 -6
- package/lib/context.js +7 -1
- package/lib/request.js +10 -8
- package/lib/response.js +7 -3
- package/package.json +31 -17
package/History.md
CHANGED
|
@@ -1,4 +1,66 @@
|
|
|
1
1
|
|
|
2
|
+
2.13.2 / 2021-09-24
|
|
3
|
+
==================
|
|
4
|
+
|
|
5
|
+
**fixes**
|
|
6
|
+
* [[`04acf02`](http://github.com/koajs/koa/commit/04acf0281a5dcb3fd463d4c8537984c686d0b96f)] - fix: nodejs deprecated api <DEP0148> (#1585) (#1588) (hyj1991 <<yeekwanvong@gmail.com>>)
|
|
7
|
+
|
|
8
|
+
**others**
|
|
9
|
+
* [[`3435e78`](http://github.com/koajs/koa/commit/3435e7864a59cca2835ebaad96c4eda801b99b24)] - lint++ (jongleberry <<jonathanrichardong@gmail.com>>)
|
|
10
|
+
* [[`2cd6618`](http://github.com/koajs/koa/commit/2cd66182f46965f1d824c24826e85df251cca3d2)] - Fix grammar mistake (#1527) (Matheus Souza <<37983247+souzasmatheus@users.noreply.github.com>>)
|
|
11
|
+
* [[`16ab46e`](http://github.com/koajs/koa/commit/16ab46e9f2b5411fd1c50312ac03719f0a90df61)] - chore: upgrade koa-convert dependency to ^2.0.0 (#1535) (Christian Rodemeyer <<atombrenner@users.noreply.github.com>>)
|
|
12
|
+
* [[`65113ca`](http://github.com/koajs/koa/commit/65113ca38af634e4b1002d5bc40917cc09a7b7c6)] - Fix jsdoc types for constructor (#1541) (Piotr Kuczynski <<piotr.kuczynski@gmail.com>>)
|
|
13
|
+
* [[`03e6317`](http://github.com/koajs/koa/commit/03e6317df24d2dce0c1f08869326149f766f1e41)] - :arrow_up: debug (jongleberry <<jonathanrichardong@gmail.com>>)
|
|
14
|
+
* [[`b37a2d0`](http://github.com/koajs/koa/commit/b37a2d09c137d9a553a0bdf8589b60c7f6425160)] - :arrow_up: eslint dependencies (jongleberry <<jonathanrichardong@gmail.com>>)
|
|
15
|
+
* [[`4a410cc`](http://github.com/koajs/koa/commit/4a410cc2fbd923868cac6a622f12cc652586abee)] - migrate assert.deepEqual => .deepStrictEqual (jongleberry <<jonathanrichardong@gmail.com>>)
|
|
16
|
+
* [[`4545b59`](http://github.com/koajs/koa/commit/4545b59aa521e377a4ebb0ccbb8abec01981fbf4)] - test: switch tests to jest (jongleberry <<jonathanrichardong@gmail.com>>)
|
|
17
|
+
* [[`596cfd5`](http://github.com/koajs/koa/commit/596cfd542ccd1d89d97453e29cf499d49a82e743)] - migrate assert.strict => .strictEqual (jongleberry <<jonathanrichardong@gmail.com>>)
|
|
18
|
+
* [[`be3e8b6`](http://github.com/koajs/koa/commit/be3e8b68ab58d469f0f450284528dbef32e2d7ba)] - test: switch to github actions (jongleberry <<jonathanrichardong@gmail.com>>)
|
|
19
|
+
* [[`a2570e3`](http://github.com/koajs/koa/commit/a2570e3ee622cfa5214c2f756ea03b3b7143dbf7)] - package: update bench scripts (jongleberry <<jonathanrichardong@gmail.com>>)
|
|
20
|
+
* [[`000acf0`](http://github.com/koajs/koa/commit/000acf06ab3e37006569addc8ace5c0a4365daa1)] - npm: enable package-lock (jongleberry <<jonathanrichardong@gmail.com>>)
|
|
21
|
+
* [[`47fdbca`](http://github.com/koajs/koa/commit/47fdbca8b1c3999c5726f54531f8b47640a65a6f)] - delete benchmarks (jongleberry <<jonathanrichardong@gmail.com>>)
|
|
22
|
+
* [[`0056f90`](http://github.com/koajs/koa/commit/0056f901e89fd0781067b2c9592fd5909f9ba94a)] - Create dependabot.yml (jongleberry <<jonathanrichardong@gmail.com>>)
|
|
23
|
+
* [[`698ce0a`](http://github.com/koajs/koa/commit/698ce0afbfac6480400625729a4b8fc4b4203fdc)] - test: fix typo in status.js (Ikko Ashimine <<eltociear@gmail.com>>)
|
|
24
|
+
* [[`eb51cf5`](http://github.com/koajs/koa/commit/eb51cf5fb35b39592a050b25fd261a574f547cfa)] - doc: app.keys needs to be long enought and random (#1520) (Yiyu He <<dead_horse@qq.com>>)
|
|
25
|
+
|
|
26
|
+
2.13.1 / 2021-01-04
|
|
27
|
+
==================
|
|
28
|
+
|
|
29
|
+
**fixes**
|
|
30
|
+
* [[`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>>)
|
|
31
|
+
* [[`68d97d6`](http://github.com/koajs/koa/commit/68d97d69e4536065504bf9ef1e348a66b3f35709)] - fix: fixed order of vulnerability disclosure addresses (niftylettuce <<niftylettuce@gmail.com>>)
|
|
32
|
+
|
|
33
|
+
**others**
|
|
34
|
+
* [[`b4398f5`](http://github.com/koajs/koa/commit/b4398f5d68f9546167419f394a686afdcb5e10e2)] - correct verb tense in doc (#1512) (Matan Shavit <<71092861+matanshavit@users.noreply.github.com>>)
|
|
35
|
+
* [[`39e1a5a`](http://github.com/koajs/koa/commit/39e1a5a380aa2bbc4e2d164e8e4bf37cfd512516)] - fixed multiple grammatical errors in docs. (#1497) (Hridayesh Sharma <<vyasriday7@gmail.com>>)
|
|
36
|
+
* [[`aeb5d19`](http://github.com/koajs/koa/commit/aeb5d1984dcc5f8e3386f8f9724807ae6f3aa1c4)] - docs: added niftylettuce@gmail.com to vulnerability disclosure (niftylettuce <<niftylettuce@gmail.com>>)
|
|
37
|
+
* [[`6e1093b`](http://github.com/koajs/koa/commit/6e1093be27b41135c8e67fce108743d54e9cab67)] - docs: remove babel from readme (#1494) (miwnwski <<m@iwnw.ski>>)
|
|
38
|
+
* [[`38cb591`](http://github.com/koajs/koa/commit/38cb591254ff5f65a04e8fb57be293afe697c46e)] - docs: update specific for auto response status (AlbertAZ1992 <<ziyuximing@163.com>>)
|
|
39
|
+
* [[`2224cd9`](http://github.com/koajs/koa/commit/2224cd9b6a648e7ac2eb27eac332e7d6de7db26c)] - docs: remove babel ref. (#1488) (Imed Jaberi <<imed_jebari@hotmail.fr>>)
|
|
40
|
+
* [[`d51f983`](http://github.com/koajs/koa/commit/d51f98328c3b84493cc6bda0732aabb69e20e3a1)] - docs: fix assert example for response (#1489) (Imed Jaberi <<imed_jebari@hotmail.fr>>)
|
|
41
|
+
* [[`f8b49b8`](http://github.com/koajs/koa/commit/f8b49b859363ad6c3d9ea5c11ee62341407ceafd)] - chore: fix grammatical and spelling errors in comments and tests (#1490) (Matt Kubej <<mkubej@gmail.com>>)
|
|
42
|
+
* [[`d1c9263`](http://github.com/koajs/koa/commit/d1c92638c95d799df2fdff5576b96fc43a62813f)] - deps: update depd >> v2.0.0 (#1482) (imed jaberi <<imed_jebari@hotmail.fr>>)
|
|
43
|
+
|
|
44
|
+
2.13.0 / 2020-06-21
|
|
45
|
+
==================
|
|
46
|
+
|
|
47
|
+
**features**
|
|
48
|
+
* [[`bbcde76`](http://github.com/koajs/koa/commit/bbcde76f5cb5b67bbcd3201791cf0ef648fd3a8b)] - feat: support esm (#1474) (ZYSzys <<zhangyongsheng@youzan.com>>)
|
|
49
|
+
|
|
50
|
+
**others**
|
|
51
|
+
* [[`20e58cf`](http://github.com/koajs/koa/commit/20e58cf3e4f20fc5d5886df1d0ac6dd8c33bd202)] - test: imporve coverage to 100% (dead-horse <<dead_horse@qq.com>>)
|
|
52
|
+
* [[`4a40d63`](http://github.com/koajs/koa/commit/4a40d633c4b4a203c6656078f9952ccef65c5875)] - build: use prepare instead of prepublish (dead-horse <<dead_horse@qq.com>>)
|
|
53
|
+
* [[`226ba8c`](http://github.com/koajs/koa/commit/226ba8c8e81e83da48e7bf137be3f146d03f40b8)] - build: use prepublish instead of prepack (dead-horse <<dead_horse@qq.com>>)
|
|
54
|
+
|
|
55
|
+
2.12.1 / 2020-06-13
|
|
56
|
+
==================
|
|
57
|
+
|
|
58
|
+
**fixes**
|
|
59
|
+
* [[`e2030c7`](http://github.com/koajs/koa/commit/e2030c7249c7ae24e28158d8eae405a02fefc9f8)] - fix: Improve checks for Error in onerror handlers (#1468) (Julien Wajsberg <<felash@gmail.com>>)
|
|
60
|
+
|
|
61
|
+
**others**
|
|
62
|
+
* [[`5208c5e`](http://github.com/koajs/koa/commit/5208c5e15d35b3653fce6b8ed68d09865abea843)] - chore: Use single console.error() statement in error handler (#1471) (Mike Vosseller <<michael.vosseller@gmail.com>>)
|
|
63
|
+
|
|
2
64
|
2.12.0 / 2020-05-18
|
|
3
65
|
==================
|
|
4
66
|
|
package/Readme.md
CHANGED
|
@@ -160,40 +160,6 @@ Learn more about the application object in the [Application API Reference](docs/
|
|
|
160
160
|
- [FAQ](docs/faq.md)
|
|
161
161
|
- [API documentation](docs/api/index.md)
|
|
162
162
|
|
|
163
|
-
## Babel setup
|
|
164
|
-
|
|
165
|
-
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):
|
|
166
|
-
|
|
167
|
-
```bash
|
|
168
|
-
$ npm install @babel/register @babel/preset-env @babel/cli --save-dev
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
In development, you'll want to use [`@babel/register`](https://babeljs.io/docs/en/next/babel-register):
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
node --require @babel/register <your-entry-file>
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
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:
|
|
178
|
-
|
|
179
|
-
```bash
|
|
180
|
-
babel src --out-dir dist --copy-files
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
And have your `.babelrc` setup:
|
|
184
|
-
|
|
185
|
-
```json
|
|
186
|
-
{
|
|
187
|
-
"presets": [
|
|
188
|
-
["@babel/preset-env", {
|
|
189
|
-
"targets": {
|
|
190
|
-
"node": true
|
|
191
|
-
}
|
|
192
|
-
}]
|
|
193
|
-
]
|
|
194
|
-
}
|
|
195
|
-
```
|
|
196
|
-
|
|
197
163
|
## Troubleshooting
|
|
198
164
|
|
|
199
165
|
Check the [Troubleshooting Guide](docs/troubleshooting.md) or [Debugging Koa](docs/guide.md#debugging-koa) in
|
|
@@ -207,9 +173,7 @@ $ npm test
|
|
|
207
173
|
|
|
208
174
|
## Reporting vulnerabilities
|
|
209
175
|
|
|
210
|
-
To report a security vulnerability, please do not open an issue, as this notifies attackers
|
|
211
|
-
of the vulnerability. Instead, please email [dead_horse](mailto:heyiyu.deadhorse@gmail.com) and [jonathanong](mailto:me@jongleberry.com) to
|
|
212
|
-
disclose.
|
|
176
|
+
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.
|
|
213
177
|
|
|
214
178
|
## Authors
|
|
215
179
|
|
package/dist/koa.mjs
ADDED
package/lib/application.js
CHANGED
|
@@ -41,8 +41,8 @@ module.exports = class Application extends Emitter {
|
|
|
41
41
|
* @param {string[]} [options.keys] Signed cookie keys
|
|
42
42
|
* @param {boolean} [options.proxy] Trust proxy headers
|
|
43
43
|
* @param {number} [options.subdomainOffset] Subdomain offset
|
|
44
|
-
* @param {
|
|
45
|
-
* @param {
|
|
44
|
+
* @param {string} [options.proxyIpHeader] Proxy IP header, defaults to X-Forwarded-For
|
|
45
|
+
* @param {number} [options.maxIpsCount] Max IPs read from proxy IP header, default to 0 (means infinity)
|
|
46
46
|
*
|
|
47
47
|
*/
|
|
48
48
|
|
|
@@ -59,6 +59,8 @@ module.exports = class Application extends Emitter {
|
|
|
59
59
|
this.context = Object.create(context);
|
|
60
60
|
this.request = Object.create(request);
|
|
61
61
|
this.response = Object.create(response);
|
|
62
|
+
// util.inspect.custom support for node 6+
|
|
63
|
+
/* istanbul ignore else */
|
|
62
64
|
if (util.inspect.custom) {
|
|
63
65
|
this[util.inspect.custom] = this.inspect;
|
|
64
66
|
}
|
|
@@ -195,15 +197,28 @@ module.exports = class Application extends Emitter {
|
|
|
195
197
|
*/
|
|
196
198
|
|
|
197
199
|
onerror(err) {
|
|
198
|
-
|
|
200
|
+
// When dealing with cross-globals a normal `instanceof` check doesn't work properly.
|
|
201
|
+
// See https://github.com/koajs/koa/issues/1466
|
|
202
|
+
// We can probably remove it once jest fixes https://github.com/facebook/jest/issues/2549.
|
|
203
|
+
const isNativeError =
|
|
204
|
+
Object.prototype.toString.call(err) === '[object Error]' ||
|
|
205
|
+
err instanceof Error;
|
|
206
|
+
if (!isNativeError) throw new TypeError(util.format('non-error thrown: %j', err));
|
|
199
207
|
|
|
200
208
|
if (404 === err.status || err.expose) return;
|
|
201
209
|
if (this.silent) return;
|
|
202
210
|
|
|
203
211
|
const msg = err.stack || err.toString();
|
|
204
|
-
console.error();
|
|
205
|
-
|
|
206
|
-
|
|
212
|
+
console.error(`\n${msg.replace(/^/gm, ' ')}\n`);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Help TS users comply to CommonJS, ESM, bundler mismatch.
|
|
217
|
+
* @see https://github.com/koajs/koa/issues/1513
|
|
218
|
+
*/
|
|
219
|
+
|
|
220
|
+
static get default() {
|
|
221
|
+
return Application;
|
|
207
222
|
}
|
|
208
223
|
};
|
|
209
224
|
|
|
@@ -272,4 +287,5 @@ function respond(ctx) {
|
|
|
272
287
|
* Make HttpError available to consumers of the library so that consumers don't
|
|
273
288
|
* have a direct dependency upon `http-errors`
|
|
274
289
|
*/
|
|
290
|
+
|
|
275
291
|
module.exports.HttpError = HttpError;
|
package/lib/context.js
CHANGED
|
@@ -110,7 +110,13 @@ const proto = module.exports = {
|
|
|
110
110
|
// to node-style callbacks.
|
|
111
111
|
if (null == err) return;
|
|
112
112
|
|
|
113
|
-
|
|
113
|
+
// When dealing with cross-globals a normal `instanceof` check doesn't work properly.
|
|
114
|
+
// See https://github.com/koajs/koa/issues/1466
|
|
115
|
+
// We can probably remove it once jest fixes https://github.com/facebook/jest/issues/2549.
|
|
116
|
+
const isNativeError =
|
|
117
|
+
Object.prototype.toString.call(err) === '[object Error]' ||
|
|
118
|
+
err instanceof Error;
|
|
119
|
+
if (!isNativeError) err = new Error(util.format('non-error thrown: %j', err));
|
|
114
120
|
|
|
115
121
|
let headerSent = false;
|
|
116
122
|
if (this.headerSent || !this.writable) {
|
package/lib/request.js
CHANGED
|
@@ -146,7 +146,7 @@ module.exports = {
|
|
|
146
146
|
},
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
|
-
* Set pathname, retaining the query
|
|
149
|
+
* Set pathname, retaining the query string when present.
|
|
150
150
|
*
|
|
151
151
|
* @param {String} path
|
|
152
152
|
* @api public
|
|
@@ -163,7 +163,7 @@ module.exports = {
|
|
|
163
163
|
},
|
|
164
164
|
|
|
165
165
|
/**
|
|
166
|
-
* Get parsed query
|
|
166
|
+
* Get parsed query string.
|
|
167
167
|
*
|
|
168
168
|
* @return {Object}
|
|
169
169
|
* @api public
|
|
@@ -176,7 +176,7 @@ module.exports = {
|
|
|
176
176
|
},
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
|
-
* Set query
|
|
179
|
+
* Set query string as an object.
|
|
180
180
|
*
|
|
181
181
|
* @param {Object} obj
|
|
182
182
|
* @api public
|
|
@@ -199,7 +199,7 @@ module.exports = {
|
|
|
199
199
|
},
|
|
200
200
|
|
|
201
201
|
/**
|
|
202
|
-
* Set
|
|
202
|
+
* Set query string.
|
|
203
203
|
*
|
|
204
204
|
* @param {String} str
|
|
205
205
|
* @api public
|
|
@@ -216,7 +216,7 @@ module.exports = {
|
|
|
216
216
|
},
|
|
217
217
|
|
|
218
218
|
/**
|
|
219
|
-
* Get the search string. Same as the
|
|
219
|
+
* Get the search string. Same as the query string
|
|
220
220
|
* except it includes the leading ?.
|
|
221
221
|
*
|
|
222
222
|
* @return {String}
|
|
@@ -406,7 +406,7 @@ module.exports = {
|
|
|
406
406
|
},
|
|
407
407
|
|
|
408
408
|
/**
|
|
409
|
-
*
|
|
409
|
+
* Shorthand for:
|
|
410
410
|
*
|
|
411
411
|
* this.protocol == 'https'
|
|
412
412
|
*
|
|
@@ -422,7 +422,7 @@ module.exports = {
|
|
|
422
422
|
* When `app.proxy` is `true`, parse
|
|
423
423
|
* the "X-Forwarded-For" ip address list.
|
|
424
424
|
*
|
|
425
|
-
* For example if the value
|
|
425
|
+
* For example if the value was "client, proxy1, proxy2"
|
|
426
426
|
* you would receive the array `["client", "proxy1", "proxy2"]`
|
|
427
427
|
* where "proxy2" is the furthest down-stream.
|
|
428
428
|
*
|
|
@@ -495,6 +495,7 @@ module.exports = {
|
|
|
495
495
|
* @return {Object}
|
|
496
496
|
* @api private
|
|
497
497
|
*/
|
|
498
|
+
|
|
498
499
|
get accept() {
|
|
499
500
|
return this._accept || (this._accept = accepts(this.req));
|
|
500
501
|
},
|
|
@@ -505,6 +506,7 @@ module.exports = {
|
|
|
505
506
|
* @param {Object}
|
|
506
507
|
* @api private
|
|
507
508
|
*/
|
|
509
|
+
|
|
508
510
|
set accept(obj) {
|
|
509
511
|
this._accept = obj;
|
|
510
512
|
},
|
|
@@ -607,7 +609,7 @@ module.exports = {
|
|
|
607
609
|
|
|
608
610
|
/**
|
|
609
611
|
* Check if the incoming request contains the "Content-Type"
|
|
610
|
-
* header field
|
|
612
|
+
* header field and if it contains any of the given mime `type`s.
|
|
611
613
|
* If there is no request body, `null` is returned.
|
|
612
614
|
* If there is no content type, `false` is returned.
|
|
613
615
|
* Otherwise, it returns the first `type` that matches.
|
package/lib/response.js
CHANGED
|
@@ -433,6 +433,7 @@ module.exports = {
|
|
|
433
433
|
* @return {boolean}
|
|
434
434
|
* @api public
|
|
435
435
|
*/
|
|
436
|
+
|
|
436
437
|
has(field) {
|
|
437
438
|
return typeof this.res.hasHeader === 'function'
|
|
438
439
|
? this.res.hasHeader(field)
|
|
@@ -441,7 +442,7 @@ module.exports = {
|
|
|
441
442
|
},
|
|
442
443
|
|
|
443
444
|
/**
|
|
444
|
-
* Set header `field` to `val
|
|
445
|
+
* Set header `field` to `val` or pass
|
|
445
446
|
* an object of header fields.
|
|
446
447
|
*
|
|
447
448
|
* Examples:
|
|
@@ -564,19 +565,22 @@ module.exports = {
|
|
|
564
565
|
},
|
|
565
566
|
|
|
566
567
|
/**
|
|
567
|
-
* Flush any set headers
|
|
568
|
+
* Flush any set headers and begin the body
|
|
568
569
|
*/
|
|
570
|
+
|
|
569
571
|
flushHeaders() {
|
|
570
572
|
this.res.flushHeaders();
|
|
571
573
|
}
|
|
572
574
|
};
|
|
573
575
|
|
|
574
576
|
/**
|
|
575
|
-
* Custom inspection implementation for
|
|
577
|
+
* Custom inspection implementation for node 6+.
|
|
576
578
|
*
|
|
577
579
|
* @return {Object}
|
|
578
580
|
* @api public
|
|
579
581
|
*/
|
|
582
|
+
|
|
583
|
+
/* istanbul ignore else */
|
|
580
584
|
if (util.inspect.custom) {
|
|
581
585
|
module.exports[util.inspect.custom] = module.exports.inspect;
|
|
582
586
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koa",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.2",
|
|
4
4
|
"description": "Koa web app framework",
|
|
5
5
|
"main": "lib/application.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"require": "./lib/application.js",
|
|
9
|
+
"import": "./dist/koa.mjs"
|
|
10
|
+
},
|
|
11
|
+
"./*": "./*.js",
|
|
12
|
+
"./*.js": "./*.js",
|
|
13
|
+
"./package": "./package.json",
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
6
16
|
"scripts": {
|
|
7
|
-
"test": "
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
17
|
+
"test": "jest --forceExit",
|
|
18
|
+
"lint": "eslint --ignore-path .gitignore .",
|
|
19
|
+
"authors": "git log --format='%aN <%aE>' | sort -u > AUTHORS",
|
|
20
|
+
"build": "gen-esm-wrapper . ./dist/koa.mjs",
|
|
21
|
+
"prepare": "npm run build"
|
|
12
22
|
},
|
|
13
23
|
"repository": "koajs/koa",
|
|
14
24
|
"keywords": [
|
|
@@ -27,9 +37,9 @@
|
|
|
27
37
|
"content-disposition": "~0.5.2",
|
|
28
38
|
"content-type": "^1.0.4",
|
|
29
39
|
"cookies": "~0.8.0",
|
|
30
|
-
"debug": "
|
|
40
|
+
"debug": "^4.3.2",
|
|
31
41
|
"delegates": "^1.0.0",
|
|
32
|
-
"depd": "^
|
|
42
|
+
"depd": "^2.0.0",
|
|
33
43
|
"destroy": "^1.0.4",
|
|
34
44
|
"encodeurl": "^1.0.2",
|
|
35
45
|
"escape-html": "^1.0.3",
|
|
@@ -38,7 +48,7 @@
|
|
|
38
48
|
"http-errors": "^1.6.3",
|
|
39
49
|
"is-generator-function": "^1.0.7",
|
|
40
50
|
"koa-compose": "^4.1.0",
|
|
41
|
-
"koa-convert": "^
|
|
51
|
+
"koa-convert": "^2.0.0",
|
|
42
52
|
"on-finished": "^2.3.0",
|
|
43
53
|
"only": "~0.0.2",
|
|
44
54
|
"parseurl": "^1.3.2",
|
|
@@ -47,21 +57,25 @@
|
|
|
47
57
|
"vary": "^1.1.2"
|
|
48
58
|
},
|
|
49
59
|
"devDependencies": {
|
|
50
|
-
"
|
|
51
|
-
"eslint": "^6.5.1",
|
|
60
|
+
"eslint": "^7.32.0",
|
|
52
61
|
"eslint-config-koa": "^2.0.0",
|
|
53
|
-
"eslint-config-standard": "^
|
|
62
|
+
"eslint-config-standard": "^16.0.3",
|
|
54
63
|
"eslint-plugin-import": "^2.18.2",
|
|
55
|
-
"eslint-plugin-node": "^
|
|
56
|
-
"eslint-plugin-promise": "^
|
|
57
|
-
"eslint-plugin-standard": "^
|
|
58
|
-
"
|
|
64
|
+
"eslint-plugin-node": "^11.1.0",
|
|
65
|
+
"eslint-plugin-promise": "^5.1.0",
|
|
66
|
+
"eslint-plugin-standard": "^5.0.0",
|
|
67
|
+
"gen-esm-wrapper": "^1.0.6",
|
|
68
|
+
"jest": "^27.0.6",
|
|
59
69
|
"supertest": "^3.1.0"
|
|
60
70
|
},
|
|
61
71
|
"engines": {
|
|
62
72
|
"node": "^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4"
|
|
63
73
|
},
|
|
64
74
|
"files": [
|
|
75
|
+
"dist",
|
|
65
76
|
"lib"
|
|
66
|
-
]
|
|
77
|
+
],
|
|
78
|
+
"jest": {
|
|
79
|
+
"testEnvironment": "node"
|
|
80
|
+
}
|
|
67
81
|
}
|