@modern-js/plugin-testing 0.0.0-next-20221021092811 → 0.0.0-next-20221027082629
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/CHANGELOG.md +44 -20
- package/dist/js/modern/cli/bff/app.js +1 -1
- package/dist/js/modern/cli/bff/index.js +1 -2
- package/dist/js/node/cli/bff/app.js +1 -1
- package/dist/js/node/cli/bff/index.js +1 -2
- package/dist/js/treeshaking/cli/bff/app.js +1 -1
- package/dist/js/treeshaking/cli/bff/index.js +5 -8
- package/dist/types/cli/bff/app.d.ts +2 -1
- package/dist/types/cli/bff/index.d.ts +2 -1
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,25 +1,49 @@
|
|
|
1
1
|
# @modern-js/plugin-testing
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
- Updated dependencies [
|
|
10
|
-
- Updated dependencies [
|
|
11
|
-
- Updated dependencies [
|
|
12
|
-
- Updated dependencies [
|
|
13
|
-
- Updated dependencies [
|
|
14
|
-
- Updated dependencies [
|
|
15
|
-
- Updated dependencies [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- @modern-js/
|
|
19
|
-
- @modern-js/
|
|
20
|
-
- @modern-js/
|
|
21
|
-
- @modern-js/
|
|
22
|
-
- @modern-js/
|
|
3
|
+
## 0.0.0-next-20221027082629
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- cc971eabf: refactor: move server plugin load logic in `@modern-js/core`
|
|
8
|
+
refactor:移除在 `@modern-js/core` 中的 server 插件加载逻辑
|
|
9
|
+
- Updated dependencies [c9e800d39]
|
|
10
|
+
- Updated dependencies [decfcd989]
|
|
11
|
+
- Updated dependencies [4369648ae]
|
|
12
|
+
- Updated dependencies [cc971eabf]
|
|
13
|
+
- Updated dependencies [b8bbe036c]
|
|
14
|
+
- Updated dependencies [d5a31df78]
|
|
15
|
+
- Updated dependencies [8b8e1bb57]
|
|
16
|
+
- Updated dependencies [3bbea92b2]
|
|
17
|
+
- Updated dependencies [fcace5b5b]
|
|
18
|
+
- @modern-js/runtime@0.0.0-next-20221027082629
|
|
19
|
+
- @modern-js/prod-server@0.0.0-next-20221027082629
|
|
20
|
+
- @modern-js/babel-preset-app@0.0.0-next-20221027082629
|
|
21
|
+
- @modern-js/utils@0.0.0-next-20221027082629
|
|
22
|
+
- @modern-js/plugin@0.0.0-next-20221027082629
|
|
23
|
+
- @modern-js/webpack@0.0.0-next-20221027082629
|
|
24
|
+
- @modern-js/babel-compiler@0.0.0-next-20221027082629
|
|
25
|
+
|
|
26
|
+
## 1.21.0
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [f51c59a]
|
|
31
|
+
- Updated dependencies [4c1f3a4]
|
|
32
|
+
- Updated dependencies [17d1672]
|
|
33
|
+
- Updated dependencies [4c1f3a4]
|
|
34
|
+
- Updated dependencies [8f3674a]
|
|
35
|
+
- Updated dependencies [c40fc4b]
|
|
36
|
+
- Updated dependencies [28f0a4f]
|
|
37
|
+
- Updated dependencies [b0597e3]
|
|
38
|
+
- Updated dependencies [519965e]
|
|
39
|
+
- Updated dependencies [67d80b7]
|
|
40
|
+
- @modern-js/runtime@1.21.0
|
|
41
|
+
- @modern-js/prod-server@1.21.0
|
|
42
|
+
- @modern-js/webpack@1.21.0
|
|
43
|
+
- @modern-js/plugin@1.21.0
|
|
44
|
+
- @modern-js/utils@1.21.0
|
|
45
|
+
- @modern-js/babel-preset-app@1.21.0
|
|
46
|
+
- @modern-js/babel-compiler@1.21.0
|
|
23
47
|
|
|
24
48
|
## 1.20.1
|
|
25
49
|
|
|
@@ -102,12 +102,11 @@ export default (() => ({
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
const userConfig = api.useResolvedConfigContext();
|
|
105
|
-
const plugins = appContext.plugins.map(p => p.server).filter(Boolean);
|
|
106
105
|
await setJestConfigForBFF({
|
|
107
106
|
pwd,
|
|
108
107
|
userConfig,
|
|
109
|
-
plugins,
|
|
110
108
|
routes: appContext.serverRoutes,
|
|
109
|
+
plugins: appContext.serverInternalPlugins,
|
|
111
110
|
utils
|
|
112
111
|
});
|
|
113
112
|
return next(utils);
|
|
@@ -119,12 +119,11 @@ var _default = () => ({
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
const userConfig = api.useResolvedConfigContext();
|
|
122
|
-
const plugins = appContext.plugins.map(p => p.server).filter(Boolean);
|
|
123
122
|
await setJestConfigForBFF({
|
|
124
123
|
pwd,
|
|
125
124
|
userConfig,
|
|
126
|
-
plugins,
|
|
127
125
|
routes: appContext.serverRoutes,
|
|
126
|
+
plugins: appContext.serverInternalPlugins,
|
|
128
127
|
utils
|
|
129
128
|
});
|
|
130
129
|
return next(utils);
|
|
@@ -103,7 +103,7 @@ export default (function () {
|
|
|
103
103
|
return {
|
|
104
104
|
jestConfig: function () {
|
|
105
105
|
var _jestConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(utils, next) {
|
|
106
|
-
var appContext, pwd, userConfig
|
|
106
|
+
var appContext, pwd, userConfig;
|
|
107
107
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
108
108
|
while (1) {
|
|
109
109
|
switch (_context2.prev = _context2.next) {
|
|
@@ -120,22 +120,19 @@ export default (function () {
|
|
|
120
120
|
|
|
121
121
|
case 4:
|
|
122
122
|
userConfig = api.useResolvedConfigContext();
|
|
123
|
-
|
|
124
|
-
return p.server;
|
|
125
|
-
}).filter(Boolean);
|
|
126
|
-
_context2.next = 8;
|
|
123
|
+
_context2.next = 7;
|
|
127
124
|
return setJestConfigForBFF({
|
|
128
125
|
pwd: pwd,
|
|
129
126
|
userConfig: userConfig,
|
|
130
|
-
plugins: plugins,
|
|
131
127
|
routes: appContext.serverRoutes,
|
|
128
|
+
plugins: appContext.serverInternalPlugins,
|
|
132
129
|
utils: utils
|
|
133
130
|
});
|
|
134
131
|
|
|
135
|
-
case
|
|
132
|
+
case 7:
|
|
136
133
|
return _context2.abrupt("return", next(utils));
|
|
137
134
|
|
|
138
|
-
case
|
|
135
|
+
case 8:
|
|
139
136
|
case "end":
|
|
140
137
|
return _context2.stop();
|
|
141
138
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node/http" />
|
|
3
3
|
/// <reference types="@modern-js/prod-server/src/type" />
|
|
4
|
+
import { InternalPlugins } from '@modern-js/types';
|
|
4
5
|
export declare const isInHandler: () => boolean;
|
|
5
|
-
declare const createApp: (pwd: string, config: any, plugins:
|
|
6
|
+
declare const createApp: (pwd: string, config: any, plugins: InternalPlugins, routes: any[]) => Promise<(req: import("http").IncomingMessage, res: import("http").ServerResponse, next?: (() => void) | undefined) => void>;
|
|
6
7
|
declare const getApp: () => (req: import("http").IncomingMessage, res: import("http").ServerResponse, next?: (() => void) | undefined) => void;
|
|
7
8
|
declare const closeServer: () => Promise<void>;
|
|
8
9
|
export { createApp, getApp, closeServer };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { CliPlugin } from '@modern-js/core';
|
|
2
|
+
import { InternalPlugins } from '@modern-js/types';
|
|
2
3
|
import { TestConfigOperator } from '../../base';
|
|
3
4
|
export declare const setJestConfigForBFF: ({
|
|
4
5
|
pwd,
|
|
@@ -9,7 +10,7 @@ export declare const setJestConfigForBFF: ({
|
|
|
9
10
|
}: {
|
|
10
11
|
pwd: string;
|
|
11
12
|
userConfig: any;
|
|
12
|
-
plugins:
|
|
13
|
+
plugins: InternalPlugins;
|
|
13
14
|
routes: any[];
|
|
14
15
|
utils: TestConfigOperator;
|
|
15
16
|
}) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "0.0.0-next-
|
|
14
|
+
"version": "0.0.0-next-20221027082629",
|
|
15
15
|
"jsnext:source": "./src/index.ts",
|
|
16
16
|
"types": "./dist/types/index.d.ts",
|
|
17
17
|
"main": "./dist/js/node/index.js",
|
|
@@ -99,12 +99,12 @@
|
|
|
99
99
|
"@modern-js-reduck/plugin-effects": "^1.0.2",
|
|
100
100
|
"@modern-js-reduck/plugin-immutable": "^1.0.1",
|
|
101
101
|
"@modern-js-reduck/store": "^1.0.3",
|
|
102
|
-
"@modern-js/babel-compiler": "0.0.0-next-
|
|
103
|
-
"@modern-js/utils": "0.0.0-next-
|
|
104
|
-
"@modern-js/webpack": "0.0.0-next-
|
|
105
|
-
"@modern-js/babel-preset-app": "0.0.0-next-
|
|
106
|
-
"@modern-js/plugin": "0.0.0-next-
|
|
107
|
-
"@modern-js/prod-server": "0.0.0-next-
|
|
102
|
+
"@modern-js/babel-compiler": "0.0.0-next-20221027082629",
|
|
103
|
+
"@modern-js/utils": "0.0.0-next-20221027082629",
|
|
104
|
+
"@modern-js/webpack": "0.0.0-next-20221027082629",
|
|
105
|
+
"@modern-js/babel-preset-app": "0.0.0-next-20221027082629",
|
|
106
|
+
"@modern-js/plugin": "0.0.0-next-20221027082629",
|
|
107
|
+
"@modern-js/prod-server": "0.0.0-next-20221027082629",
|
|
108
108
|
"@testing-library/jest-dom": "^5.14.1",
|
|
109
109
|
"@testing-library/react": "^13.4.0",
|
|
110
110
|
"@types/testing-library__jest-dom": "^5.14.3",
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"peerDependencies": {
|
|
122
122
|
"react": ">=18",
|
|
123
123
|
"react-dom": ">=17",
|
|
124
|
-
"@modern-js/runtime": "^0.0.0-next-
|
|
124
|
+
"@modern-js/runtime": "^0.0.0-next-20221027082629"
|
|
125
125
|
},
|
|
126
126
|
"peerDependenciesMeta": {
|
|
127
127
|
"@modern-js/runtime": {
|
|
@@ -131,12 +131,12 @@
|
|
|
131
131
|
"devDependencies": {
|
|
132
132
|
"react": "^18",
|
|
133
133
|
"react-dom": "^18",
|
|
134
|
-
"@modern-js/core": "0.0.0-next-
|
|
135
|
-
"@modern-js/types": "0.0.0-next-
|
|
136
|
-
"@modern-js/runtime": "0.0.0-next-
|
|
137
|
-
"@modern-js/bff-core": "0.0.0-next-
|
|
138
|
-
"@scripts/build": "0.0.0-next-
|
|
139
|
-
"@scripts/jest-config": "0.0.0-next-
|
|
134
|
+
"@modern-js/core": "0.0.0-next-20221027082629",
|
|
135
|
+
"@modern-js/types": "0.0.0-next-20221027082629",
|
|
136
|
+
"@modern-js/runtime": "0.0.0-next-20221027082629",
|
|
137
|
+
"@modern-js/bff-core": "0.0.0-next-20221027082629",
|
|
138
|
+
"@scripts/build": "0.0.0-next-20221027082629",
|
|
139
|
+
"@scripts/jest-config": "0.0.0-next-20221027082629",
|
|
140
140
|
"@types/jest": "^27",
|
|
141
141
|
"@types/supertest": "^2.0.11",
|
|
142
142
|
"@types/node": "^14",
|