egg 3.24.1 → 3.25.0

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/README.md CHANGED
@@ -9,12 +9,11 @@ English | [简体中文](./README.zh-CN.md)
9
9
  [![NPM download](https://img.shields.io/npm/dm/egg.svg?style=flat-square)](https://npmjs.org/package/egg)
10
10
  [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Feggjs%2Fegg.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Feggjs%2Fegg?ref=badge_shield)
11
11
 
12
- [![Continuous Integration](https://github.com/eggjs/egg/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/egg/actions?query=branch%3Amaster)
12
+ [![Continuous Integration](https://github.com/eggjs/egg/actions/workflows/nodejs-3.x.yml/badge.svg)](https://github.com/eggjs/egg/actions?query=branch%3A3.x)
13
13
  [![Test coverage](https://img.shields.io/codecov/c/github/eggjs/egg.svg?style=flat-square)](https://codecov.io/gh/eggjs/egg)
14
14
  [![Known Vulnerabilities](https://snyk.io/test/npm/egg/badge.svg?style=flat-square)](https://snyk.io/test/npm/egg)
15
15
  [![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/eggjs?style=flat-square)](https://opencollective.com/eggjs)
16
16
 
17
-
18
17
  ## Features
19
18
 
20
19
  - Built-in Process Management
@@ -62,5 +61,4 @@ To become a contributor, please follow our [contributing guide](CONTRIBUTING.md)
62
61
 
63
62
  [MIT](LICENSE)
64
63
 
65
-
66
- [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Feggjs%2Fegg.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Feggjs%2Fegg?ref=badge_large)
64
+ [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Feggjs%2Fegg.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Feggjs%2Fegg?ref=badge_large)
@@ -304,6 +304,7 @@ module.exports = appInfo => {
304
304
  * @property {Number} httpsAgent.maxSockets - https agent max socket number of one host, default is `Number.MAX_SAFE_INTEGER` @ses https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER
305
305
  * @property {Number} httpsAgent.maxFreeSockets - https agent max free socket number of one host, default is 256.
306
306
  * @property {Boolean} useHttpClientNext - use urllib@3 HttpClient
307
+ * @property {Boolean} allowH2 - Allow to use HTTP2 first, only work on `useHttpClientNext = true`
307
308
  */
308
309
  config.httpclient = {
309
310
  enableDNSCache: false,
@@ -326,6 +327,7 @@ module.exports = appInfo => {
326
327
  maxFreeSockets: 256,
327
328
  },
328
329
  useHttpClientNext: false,
330
+ // allowH2: false,
329
331
  };
330
332
 
331
333
  /**
package/index.d.ts CHANGED
@@ -296,16 +296,18 @@ declare module 'egg' {
296
296
  request?: HttpClientRequestOptions | RequestOptionsOld;
297
297
  /** Whether enable dns cache */
298
298
  enableDNSCache?: boolean;
299
- /** Enable proxy request, default is false. */
299
+ /** Enable proxy request. Default is `false`. */
300
300
  enableProxy?: boolean;
301
- /** proxy agent uri or options, default is null. */
301
+ /** proxy agent uri or options. Default is `null`. */
302
302
  proxy?: string | { [key: string]: any };
303
303
  /** DNS cache lookup interval */
304
304
  dnsCacheLookupInterval?: number;
305
305
  /** DNS cache max age */
306
306
  dnsCacheMaxLength?: number;
307
- /** use urllib@3 HttpClient */
307
+ /** use urllib@3 HttpClient. Default is `false` */
308
308
  useHttpClientNext?: boolean;
309
+ /** Allow to use HTTP2 first, only work on `useHttpClientNext = true`. Default is `false` */
310
+ allowH2?: boolean;
309
311
  }
310
312
 
311
313
  export interface EggAppConfig {
@@ -8,6 +8,7 @@ class HttpClientNext extends HttpClient {
8
8
  super({
9
9
  app,
10
10
  defaultArgs: config.request,
11
+ allowH2: config.allowH2,
11
12
  });
12
13
  this.app = app;
13
14
  }
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "egg",
3
- "version": "3.24.1",
3
+ "version": "3.25.0",
4
4
  "publishConfig": {
5
- "tag": "latest"
5
+ "tag": "release-3.x",
6
+ "access": "public"
6
7
  },
7
8
  "description": "A web framework's framework for Node.js",
8
9
  "keywords": [
@@ -54,7 +55,7 @@
54
55
  "onelogger": "^1.0.0",
55
56
  "sendmessage": "^2.0.0",
56
57
  "urllib": "^2.33.0",
57
- "urllib-next": "npm:urllib@^3.22.4",
58
+ "urllib-next": "npm:urllib@^3.26.0",
58
59
  "utility": "^2.1.0",
59
60
  "ylru": "^1.3.2"
60
61
  },