egg 3.15.0 → 3.16.1

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
@@ -1,3 +1,5 @@
1
+ English | [简体中文](./README.zh-CN.md)
2
+
1
3
  <div style="text-align:center">
2
4
  <img src="site/public/assets/egg-banner.png" />
3
5
  </div>
@@ -7,7 +9,7 @@
7
9
  [![NPM download](https://img.shields.io/npm/dm/egg.svg?style=flat-square)](https://npmjs.org/package/egg)
8
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)
9
11
 
10
- [![Continuous Integration](https://github.com/eggjs/egg/workflows/Continuous%20integration/badge.svg)](https://github.com/eggjs/egg/actions?query=branch%3Amaster)
12
+ [![Continuous Integration](https://github.com/eggjs/egg/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/egg/actions?query=branch%3Amaster)
11
13
  [![Test coverage](https://img.shields.io/codecov/c/github/eggjs/egg.svg?style=flat-square)](https://codecov.io/gh/eggjs/egg)
12
14
  [![Known Vulnerabilities](https://snyk.io/test/npm/egg/badge.svg?style=flat-square)](https://snyk.io/test/npm/egg)
13
15
  [![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/eggjs?style=flat-square)](https://opencollective.com/eggjs)
package/README.zh-CN.md CHANGED
@@ -1,3 +1,5 @@
1
+ [English](./README.md) | 简体中文
2
+
1
3
  <div style="text-align:center">
2
4
  <img src="site/public/assets/egg-banner.png" />
3
5
  </div>
@@ -6,7 +8,7 @@
6
8
  [![NPM quality](http://npm.packagequality.com/shield/egg.svg?style=flat-square)](http://packagequality.com/#?package=egg)
7
9
  [![NPM download](https://img.shields.io/npm/dm/egg.svg?style=flat-square)](https://npmjs.org/package/egg)
8
10
 
9
- [![Continuous Integration](https://github.com/eggjs/egg/workflows/Continuous%20integration/badge.svg)](https://github.com/eggjs/egg/actions?query=branch%3Amaster)
11
+ [![Continuous Integration](https://github.com/eggjs/egg/actions/workflows/nodejs.yml/badge.svg)](https://github.com/eggjs/egg/actions?query=branch%3Amaster)
10
12
  [![Test coverage](https://img.shields.io/codecov/c/github/eggjs/egg.svg?style=flat-square)](https://codecov.io/gh/eggjs/egg)
11
13
  [![Known Vulnerabilities](https://snyk.io/test/npm/egg/badge.svg?style=flat-square)](https://snyk.io/test/npm/egg)
12
14
  [![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/eggjs?style=flat-square)](https://opencollective.com/eggjs)
@@ -1,7 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const debug = require('debug')('egg:util:messenger:ipc');
3
+ const debug = require('util').debuglog('egg:util:messenger:ipc');
4
4
  const is = require('is-type-of');
5
+ const workerThreads = require('worker_threads');
5
6
  const sendmessage = require('sendmessage');
6
7
  const EventEmitter = require('events');
7
8
 
@@ -22,6 +23,9 @@ class Messenger extends EventEmitter {
22
23
  });
23
24
  this._onMessage = this._onMessage.bind(this);
24
25
  process.on('message', this._onMessage);
26
+ if (!workerThreads.isMainThread) {
27
+ workerThreads.parentPort.on('message', this._onMessage);
28
+ }
25
29
  }
26
30
 
27
31
  /**
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const debug = require('debug')('egg:util:messenger:local');
3
+ const debug = require('util').debuglog('egg:util:messenger:local');
4
4
  const is = require('is-type-of');
5
5
  const EventEmitter = require('events');
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egg",
3
- "version": "3.15.0",
3
+ "version": "3.16.1",
4
4
  "publishConfig": {
5
5
  "tag": "latest"
6
6
  },
@@ -24,7 +24,6 @@
24
24
  "cache-content-type": "^1.0.1",
25
25
  "circular-json-for-egg": "^1.0.0",
26
26
  "cluster-client": "^3.3.0",
27
- "debug": "^4.3.4",
28
27
  "delegates": "^1.0.0",
29
28
  "egg-cluster": "^2.0.0",
30
29
  "egg-cookies": "^2.6.1",
@@ -38,7 +37,7 @@
38
37
  "egg-multipart": "^3.1.0",
39
38
  "egg-onerror": "^2.1.1",
40
39
  "egg-schedule": "^4.0.0",
41
- "egg-security": "^2.11.0",
40
+ "egg-security": "^3.0.0",
42
41
  "egg-session": "^3.3.0",
43
42
  "egg-static": "^2.2.0",
44
43
  "egg-view": "^2.1.3",
@@ -52,7 +51,7 @@
52
51
  "koa-override": "^3.0.0",
53
52
  "ms": "^2.1.3",
54
53
  "on-finished": "^2.4.1",
55
- "sendmessage": "^1.1.0",
54
+ "sendmessage": "^2.0.0",
56
55
  "urllib": "^2.33.0",
57
56
  "urllib-next": "^3.9.0",
58
57
  "utility": "^1.17.0",
@@ -60,22 +59,23 @@
60
59
  },
61
60
  "devDependencies": {
62
61
  "@eggjs/tsconfig": "^1.1.0",
63
- "@types/node": "^18.11.18",
62
+ "@types/node": "^20.1.2",
64
63
  "@umijs/preset-react": "^2.1.6",
65
64
  "address": "^1.2.1",
66
65
  "antd": "^4.23.2",
67
66
  "assert-file": "^1.0.0",
68
67
  "coffee": "^5.4.0",
68
+ "cross-env": "^7.0.3",
69
69
  "dumi": "^1.1.47",
70
70
  "dumi-theme-egg": "^1.2.2",
71
- "egg-bin": "^5",
72
- "egg-mock": "^5.9.2",
71
+ "egg-bin": "^6.4.1",
72
+ "egg-mock": "^5.10.7",
73
73
  "egg-plugin-puml": "^2.4.0",
74
74
  "egg-tracer": "^2.0.0",
75
75
  "egg-view-nunjucks": "^2.3.0",
76
76
  "eslint": "^8.23.1",
77
77
  "eslint-config-egg": "^12.0.0",
78
- "findlinks": "^2.1.0",
78
+ "findlinks": "^2.2.0",
79
79
  "formstream": "^1.1.1",
80
80
  "jsdoc": "^3.6.11",
81
81
  "koa": "^2.13.4",
@@ -83,6 +83,7 @@
83
83
  "node-libs-browser": "^2.2.1",
84
84
  "pedding": "^1.1.0",
85
85
  "prettier": "^2.7.1",
86
+ "puppeteer": "^19.11.1",
86
87
  "react": "^16.14.0",
87
88
  "react-dom": "^16.14.0",
88
89
  "react-router": "^5.3.4",
@@ -91,8 +92,8 @@
91
92
  "spy": "^1.0.0",
92
93
  "supertest": "^6.2.4",
93
94
  "ts-node": "^10.9.1",
94
- "tsd": "^0.25.0",
95
- "typescript": "^4.8.3",
95
+ "tsd": "^0.28.1",
96
+ "typescript": "^5.0.4",
96
97
  "umi": "^3.5.36"
97
98
  },
98
99
  "main": "index.js",
@@ -109,12 +110,14 @@
109
110
  "lint": "eslint app config lib test *.js",
110
111
  "tsd": "tsd",
111
112
  "test": "npm run lint -- --fix && npm run tsd && npm run test-local",
112
- "test-local": "egg-bin test",
113
- "test-local-changed": "egg-bin test --changed",
114
- "cov": "egg-bin cov --timeout 100000",
113
+ "test-local": "egg-bin test --ts false",
114
+ "test-local-changed": "egg-bin test --changed --ts false",
115
+ "cov": "egg-bin cov --timeout 100000 --ts false",
115
116
  "ci": "npm run lint && npm run tsd && npm run cov",
116
- "site:dev": "APP_ROOT=./site dumi dev",
117
- "site:build": "APP_ROOT=./site dumi build",
117
+ "site:dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider APP_ROOT=./site dumi dev",
118
+ "site:devWithNode14-16": "cross-env APP_ROOT=./site dumi dev",
119
+ "site:build": "cross-env NODE_OPTIONS=--openssl-legacy-provider APP_ROOT=./site dumi build",
120
+ "site:buildWithNode14-16": "cross-env APP_ROOT=./site dumi build",
118
121
  "site:prettier": "prettier --config site/.prettierrc --ignore-path site/.prettierignore --write \"site/**/*.{js,jsx,tsx,ts,less,md,json}\"",
119
122
  "puml": "puml . --dest ./site",
120
123
  "commits": "./scripts/commits.sh"