@modern-js/plugin-testing 0.0.0-next-20221104034442 → 0.0.0-next-20221104140607
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 +9 -8
- package/dist/js/modern/cli/index.js +11 -8
- package/dist/js/node/cli/index.js +12 -10
- package/dist/js/treeshaking/cli/index.js +12 -6
- package/package.json +13 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @modern-js/plugin-testing
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-20221104140607
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
refactor:移除在 `@modern-js/core` 中的 server 插件加载逻辑
|
|
9
9
|
- Updated dependencies [c9e800d3]
|
|
10
10
|
- Updated dependencies [15bf09d9]
|
|
11
|
+
- Updated dependencies [a2509bfb]
|
|
11
12
|
- Updated dependencies [decfcd98]
|
|
12
13
|
- Updated dependencies [4369648a]
|
|
13
14
|
- Updated dependencies [edd1cfb1]
|
|
@@ -21,13 +22,13 @@
|
|
|
21
22
|
- Updated dependencies [3bbea92b]
|
|
22
23
|
- Updated dependencies [73cd29dd]
|
|
23
24
|
- Updated dependencies [fcace5b5]
|
|
24
|
-
|
|
25
|
-
- @modern-js/
|
|
26
|
-
- @modern-js/
|
|
27
|
-
- @modern-js/
|
|
28
|
-
- @modern-js/utils@0.0.0-next-
|
|
29
|
-
- @modern-js/plugin@0.0.0-next-
|
|
30
|
-
- @modern-js/babel-compiler@0.0.0-next-
|
|
25
|
+
- Updated dependencies [543be955]
|
|
26
|
+
- @modern-js/runtime@0.0.0-next-20221104140607
|
|
27
|
+
- @modern-js/prod-server@0.0.0-next-20221104140607
|
|
28
|
+
- @modern-js/babel-preset-app@0.0.0-next-20221104140607
|
|
29
|
+
- @modern-js/utils@0.0.0-next-20221104140607
|
|
30
|
+
- @modern-js/plugin@0.0.0-next-20221104140607
|
|
31
|
+
- @modern-js/babel-compiler@0.0.0-next-20221104140607
|
|
31
32
|
|
|
32
33
|
## 1.21.1
|
|
33
34
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
2
|
import { PLUGIN_SCHEMAS, createRuntimeExportsUtils, isApiOnly } from '@modern-js/utils';
|
|
3
|
-
import { getWebpackConfig, WebpackConfigTarget } from '@modern-js/webpack';
|
|
4
3
|
import { testingHooks, getModuleNameMapper, DEFAULT_RESOLVER_PATH } from "../base";
|
|
5
4
|
import { MODERNJS_CONFIG_KEY } from "../constant";
|
|
6
5
|
import TestingBffPlugin from "./bff";
|
|
@@ -58,14 +57,18 @@ export default (() => {
|
|
|
58
57
|
|
|
59
58
|
if (apiOnly) {
|
|
60
59
|
return next(utils);
|
|
61
|
-
}
|
|
60
|
+
} // TODO get alias from builder
|
|
61
|
+
// const webpackConfig = getWebpackConfig(
|
|
62
|
+
// WebpackConfigTarget.CLIENT,
|
|
63
|
+
// appContext,
|
|
64
|
+
// userConfig,
|
|
65
|
+
// );
|
|
66
|
+
// const {
|
|
67
|
+
// resolve: { alias = {} },
|
|
68
|
+
// } = webpackConfig;
|
|
62
69
|
|
|
63
|
-
|
|
64
|
-
const {
|
|
65
|
-
resolve: {
|
|
66
|
-
alias = {}
|
|
67
|
-
}
|
|
68
|
-
} = webpackConfig;
|
|
70
|
+
|
|
71
|
+
const alias = {};
|
|
69
72
|
utils.mergeJestConfig({
|
|
70
73
|
globals: {
|
|
71
74
|
[MODERNJS_CONFIG_KEY]: userConfig
|
|
@@ -9,8 +9,6 @@ var _path = _interopRequireDefault(require("path"));
|
|
|
9
9
|
|
|
10
10
|
var _utils = require("@modern-js/utils");
|
|
11
11
|
|
|
12
|
-
var _webpack = require("@modern-js/webpack");
|
|
13
|
-
|
|
14
12
|
var _base = require("../base");
|
|
15
13
|
|
|
16
14
|
var _constant = require("../constant");
|
|
@@ -78,14 +76,18 @@ var _default = () => {
|
|
|
78
76
|
|
|
79
77
|
if (apiOnly) {
|
|
80
78
|
return next(utils);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
79
|
+
} // TODO get alias from builder
|
|
80
|
+
// const webpackConfig = getWebpackConfig(
|
|
81
|
+
// WebpackConfigTarget.CLIENT,
|
|
82
|
+
// appContext,
|
|
83
|
+
// userConfig,
|
|
84
|
+
// );
|
|
85
|
+
// const {
|
|
86
|
+
// resolve: { alias = {} },
|
|
87
|
+
// } = webpackConfig;
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
const alias = {};
|
|
89
91
|
utils.mergeJestConfig({
|
|
90
92
|
globals: {
|
|
91
93
|
[_constant.MODERNJS_CONFIG_KEY]: userConfig
|
|
@@ -3,7 +3,6 @@ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
|
3
3
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { PLUGIN_SCHEMAS, createRuntimeExportsUtils, isApiOnly } from '@modern-js/utils';
|
|
6
|
-
import { getWebpackConfig, WebpackConfigTarget } from '@modern-js/webpack';
|
|
7
6
|
import { testingHooks, getModuleNameMapper, DEFAULT_RESOLVER_PATH } from "../base";
|
|
8
7
|
import { MODERNJS_CONFIG_KEY } from "../constant";
|
|
9
8
|
import TestingBffPlugin from "./bff";
|
|
@@ -63,8 +62,7 @@ export default (function () {
|
|
|
63
62
|
},
|
|
64
63
|
jestConfig: function () {
|
|
65
64
|
var _jestConfig = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(utils, next) {
|
|
66
|
-
var appContext, userConfig, apiOnly,
|
|
67
|
-
|
|
65
|
+
var appContext, userConfig, apiOnly, alias;
|
|
68
66
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
69
67
|
while (1) {
|
|
70
68
|
switch (_context2.prev = _context2.next) {
|
|
@@ -85,8 +83,16 @@ export default (function () {
|
|
|
85
83
|
return _context2.abrupt("return", next(utils));
|
|
86
84
|
|
|
87
85
|
case 7:
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
// TODO get alias from builder
|
|
87
|
+
// const webpackConfig = getWebpackConfig(
|
|
88
|
+
// WebpackConfigTarget.CLIENT,
|
|
89
|
+
// appContext,
|
|
90
|
+
// userConfig,
|
|
91
|
+
// );
|
|
92
|
+
// const {
|
|
93
|
+
// resolve: { alias = {} },
|
|
94
|
+
// } = webpackConfig;
|
|
95
|
+
alias = {};
|
|
90
96
|
utils.mergeJestConfig({
|
|
91
97
|
globals: _defineProperty({}, MODERNJS_CONFIG_KEY, userConfig),
|
|
92
98
|
moduleNameMapper: getModuleNameMapper(alias),
|
|
@@ -101,7 +107,7 @@ export default (function () {
|
|
|
101
107
|
mergeUserJestConfig(utils);
|
|
102
108
|
return _context2.abrupt("return", next(utils));
|
|
103
109
|
|
|
104
|
-
case
|
|
110
|
+
case 11:
|
|
105
111
|
case "end":
|
|
106
112
|
return _context2.stop();
|
|
107
113
|
}
|
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-20221104140607",
|
|
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,11 @@
|
|
|
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/
|
|
105
|
-
"@modern-js/
|
|
106
|
-
"@modern-js/
|
|
107
|
-
"@modern-js/prod-server": "0.0.0-next-20221104034442",
|
|
102
|
+
"@modern-js/babel-compiler": "0.0.0-next-20221104140607",
|
|
103
|
+
"@modern-js/utils": "0.0.0-next-20221104140607",
|
|
104
|
+
"@modern-js/babel-preset-app": "0.0.0-next-20221104140607",
|
|
105
|
+
"@modern-js/plugin": "0.0.0-next-20221104140607",
|
|
106
|
+
"@modern-js/prod-server": "0.0.0-next-20221104140607",
|
|
108
107
|
"@testing-library/jest-dom": "^5.14.1",
|
|
109
108
|
"@testing-library/react": "^13.4.0",
|
|
110
109
|
"@types/testing-library__jest-dom": "^5.14.3",
|
|
@@ -121,7 +120,7 @@
|
|
|
121
120
|
"peerDependencies": {
|
|
122
121
|
"react": ">=18",
|
|
123
122
|
"react-dom": ">=17",
|
|
124
|
-
"@modern-js/runtime": "^0.0.0-next-
|
|
123
|
+
"@modern-js/runtime": "^0.0.0-next-20221104140607"
|
|
125
124
|
},
|
|
126
125
|
"peerDependenciesMeta": {
|
|
127
126
|
"@modern-js/runtime": {
|
|
@@ -131,12 +130,12 @@
|
|
|
131
130
|
"devDependencies": {
|
|
132
131
|
"react": "^18",
|
|
133
132
|
"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-
|
|
133
|
+
"@modern-js/core": "0.0.0-next-20221104140607",
|
|
134
|
+
"@modern-js/types": "0.0.0-next-20221104140607",
|
|
135
|
+
"@modern-js/runtime": "0.0.0-next-20221104140607",
|
|
136
|
+
"@modern-js/bff-core": "0.0.0-next-20221104140607",
|
|
137
|
+
"@scripts/build": "0.0.0-next-20221104140607",
|
|
138
|
+
"@scripts/jest-config": "0.0.0-next-20221104140607",
|
|
140
139
|
"@types/jest": "^27",
|
|
141
140
|
"@types/supertest": "^2.0.11",
|
|
142
141
|
"@types/node": "^14",
|