@modern-js/plugin-testing 0.0.0-next-1687764171352 → 0.0.0-next-1687766264699
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 +11 -7
- package/dist/cjs/cli/bff/index.js +3 -3
- package/dist/cjs/cli/index.js +7 -3
- package/dist/esm/cli/bff/index.js +2 -3
- package/dist/esm/cli/index.js +4 -4
- package/dist/esm-node/cli/bff/index.js +1 -1
- package/dist/esm-node/cli/index.js +3 -2
- package/dist/types/cli/bff/index.d.ts +2 -3
- package/dist/types/cli/index.d.ts +2 -2
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
# @modern-js/plugin-testing
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-1687766264699
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- @modern-js/
|
|
7
|
+
- 4c4c0ade4: feat: add named exports for all CLI plugins
|
|
8
|
+
|
|
9
|
+
feat: 为各个 CLI 插件添加 named 导出
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [5732c6a08]
|
|
12
|
+
- @modern-js/prod-server@0.0.0-next-1687766264699
|
|
13
|
+
- @modern-js/utils@0.0.0-next-1687766264699
|
|
14
|
+
- @modern-js/runtime@0.0.0-next-1687766264699
|
|
15
|
+
- @modern-js/babel-compiler@0.0.0-next-1687766264699
|
|
16
|
+
- @modern-js/plugin@0.0.0-next-1687766264699
|
|
13
17
|
|
|
14
18
|
## 2.24.0
|
|
15
19
|
|
|
@@ -13,8 +13,8 @@ _export(exports, {
|
|
|
13
13
|
setJestConfigForBFF: function() {
|
|
14
14
|
return setJestConfigForBFF;
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
return
|
|
16
|
+
testingBffPlugin: function() {
|
|
17
|
+
return testingBffPlugin;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
const _interop_require_default = require("@swc/helpers/_/_interop_require_default");
|
|
@@ -109,7 +109,7 @@ const setJestConfigForBFF = async ({ pwd, userConfig, plugins, routes, utils })
|
|
|
109
109
|
}
|
|
110
110
|
utils.setJestConfig(commonConfig);
|
|
111
111
|
};
|
|
112
|
-
const
|
|
112
|
+
const testingBffPlugin = () => ({
|
|
113
113
|
name: "@modern-js/testing-plugin-bff",
|
|
114
114
|
setup(api) {
|
|
115
115
|
return {
|
package/dist/cjs/cli/index.js
CHANGED
|
@@ -13,6 +13,9 @@ _export(exports, {
|
|
|
13
13
|
mergeUserJestConfig: function() {
|
|
14
14
|
return mergeUserJestConfig;
|
|
15
15
|
},
|
|
16
|
+
testingPlugin: function() {
|
|
17
|
+
return testingPlugin;
|
|
18
|
+
},
|
|
16
19
|
default: function() {
|
|
17
20
|
return _default;
|
|
18
21
|
}
|
|
@@ -22,7 +25,7 @@ const _path = /* @__PURE__ */ _interop_require_default._(require("path"));
|
|
|
22
25
|
const _utils = require("@modern-js/utils");
|
|
23
26
|
const _base = require("../base");
|
|
24
27
|
const _constant = require("../constant");
|
|
25
|
-
const _bff =
|
|
28
|
+
const _bff = require("./bff");
|
|
26
29
|
const _test = /* @__PURE__ */ _interop_require_default._(require("./test"));
|
|
27
30
|
const mergeUserJestConfig = (testUtils) => {
|
|
28
31
|
const resolveJestConfig = testUtils.testConfig.jest;
|
|
@@ -30,8 +33,8 @@ const mergeUserJestConfig = (testUtils) => {
|
|
|
30
33
|
testUtils.mergeJestConfig(resolveJestConfig);
|
|
31
34
|
}
|
|
32
35
|
};
|
|
33
|
-
const
|
|
34
|
-
const bffPlugin = (0, _bff.
|
|
36
|
+
const testingPlugin = () => {
|
|
37
|
+
const bffPlugin = (0, _bff.testingBffPlugin)();
|
|
35
38
|
return {
|
|
36
39
|
name: "@modern-js/plugin-testing",
|
|
37
40
|
usePlugins: [
|
|
@@ -123,3 +126,4 @@ const _default = () => {
|
|
|
123
126
|
}
|
|
124
127
|
};
|
|
125
128
|
};
|
|
129
|
+
const _default = testingPlugin;
|
|
@@ -103,7 +103,7 @@ export var setJestConfigForBFF = function() {
|
|
|
103
103
|
return _ref.apply(this, arguments);
|
|
104
104
|
};
|
|
105
105
|
}();
|
|
106
|
-
export
|
|
106
|
+
export var testingBffPlugin = function() {
|
|
107
107
|
return {
|
|
108
108
|
name: "@modern-js/testing-plugin-bff",
|
|
109
109
|
setup: function setup(api) {
|
|
@@ -149,5 +149,4 @@ export default function() {
|
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
|
-
}
|
|
153
|
-
;
|
|
152
|
+
};
|
package/dist/esm/cli/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import path from "path";
|
|
|
5
5
|
import { isApiOnly, mergeAlias, createRuntimeExportsUtils } from "@modern-js/utils";
|
|
6
6
|
import { testingHooks, getModuleNameMapper, DEFAULT_RESOLVER_PATH } from "../base";
|
|
7
7
|
import { MODERNJS_CONFIG_KEY } from "../constant";
|
|
8
|
-
import testingBffPlugin from "./bff";
|
|
8
|
+
import { testingBffPlugin } from "./bff";
|
|
9
9
|
import test from "./test";
|
|
10
10
|
export var mergeUserJestConfig = function(testUtils) {
|
|
11
11
|
var resolveJestConfig = testUtils.testConfig.jest;
|
|
@@ -13,7 +13,7 @@ export var mergeUserJestConfig = function(testUtils) {
|
|
|
13
13
|
testUtils.mergeJestConfig(resolveJestConfig);
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export var testingPlugin = function() {
|
|
17
17
|
var bffPlugin = testingBffPlugin();
|
|
18
18
|
return {
|
|
19
19
|
name: "@modern-js/plugin-testing",
|
|
@@ -139,5 +139,5 @@ export default function() {
|
|
|
139
139
|
};
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
|
-
}
|
|
143
|
-
;
|
|
142
|
+
};
|
|
143
|
+
export default testingPlugin;
|
|
@@ -89,7 +89,7 @@ export const setJestConfigForBFF = async ({ pwd, userConfig, plugins, routes, ut
|
|
|
89
89
|
}
|
|
90
90
|
utils.setJestConfig(commonConfig);
|
|
91
91
|
};
|
|
92
|
-
export
|
|
92
|
+
export const testingBffPlugin = () => ({
|
|
93
93
|
name: "@modern-js/testing-plugin-bff",
|
|
94
94
|
setup(api) {
|
|
95
95
|
return {
|
|
@@ -2,7 +2,7 @@ import path from "path";
|
|
|
2
2
|
import { isApiOnly, mergeAlias, createRuntimeExportsUtils } from "@modern-js/utils";
|
|
3
3
|
import { testingHooks, getModuleNameMapper, DEFAULT_RESOLVER_PATH } from "../base";
|
|
4
4
|
import { MODERNJS_CONFIG_KEY } from "../constant";
|
|
5
|
-
import testingBffPlugin from "./bff";
|
|
5
|
+
import { testingBffPlugin } from "./bff";
|
|
6
6
|
import test from "./test";
|
|
7
7
|
export const mergeUserJestConfig = (testUtils) => {
|
|
8
8
|
const resolveJestConfig = testUtils.testConfig.jest;
|
|
@@ -10,7 +10,7 @@ export const mergeUserJestConfig = (testUtils) => {
|
|
|
10
10
|
testUtils.mergeJestConfig(resolveJestConfig);
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export const testingPlugin = () => {
|
|
14
14
|
const bffPlugin = testingBffPlugin();
|
|
15
15
|
return {
|
|
16
16
|
name: "@modern-js/plugin-testing",
|
|
@@ -103,3 +103,4 @@ export default () => {
|
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
|
+
export default testingPlugin;
|
|
@@ -16,9 +16,8 @@ export declare const setJestConfigForBFF: ({
|
|
|
16
16
|
routes: any[];
|
|
17
17
|
utils: TestConfigOperator;
|
|
18
18
|
}) => Promise<void>;
|
|
19
|
-
declare const
|
|
19
|
+
export declare const testingBffPlugin: () => CliPlugin<{
|
|
20
20
|
hooks: Hooks;
|
|
21
21
|
userConfig: UserConfig;
|
|
22
22
|
normalizedConfig: Required<UserConfig>;
|
|
23
|
-
}>;
|
|
24
|
-
export default _default;
|
|
23
|
+
}>;
|
|
@@ -3,9 +3,9 @@ import { TestConfigOperator } from '../base';
|
|
|
3
3
|
import type { Hooks } from '../base/hook';
|
|
4
4
|
import type { UserConfig } from '../base/config';
|
|
5
5
|
export declare const mergeUserJestConfig: (testUtils: TestConfigOperator) => void;
|
|
6
|
-
declare const
|
|
6
|
+
export declare const testingPlugin: () => CliPlugin<{
|
|
7
7
|
hooks: Hooks;
|
|
8
8
|
userConfig: UserConfig;
|
|
9
9
|
normalizedConfig: Required<UserConfig>;
|
|
10
10
|
}>;
|
|
11
|
-
export default
|
|
11
|
+
export default testingPlugin;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "0.0.0-next-
|
|
18
|
+
"version": "0.0.0-next-1687766264699",
|
|
19
19
|
"jsnext:source": "./src/cli/index.ts",
|
|
20
20
|
"types": "./dist/types/cli/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/cli/index.js",
|
|
@@ -129,15 +129,15 @@
|
|
|
129
129
|
"ts-jest": "^29.1.0",
|
|
130
130
|
"yargs": "^17.0.1",
|
|
131
131
|
"@swc/helpers": "0.5.1",
|
|
132
|
-
"@modern-js/babel-compiler": "0.0.0-next-
|
|
133
|
-
"@modern-js/
|
|
134
|
-
"@modern-js/
|
|
135
|
-
"@modern-js/
|
|
132
|
+
"@modern-js/babel-compiler": "0.0.0-next-1687766264699",
|
|
133
|
+
"@modern-js/plugin": "0.0.0-next-1687766264699",
|
|
134
|
+
"@modern-js/prod-server": "0.0.0-next-1687766264699",
|
|
135
|
+
"@modern-js/utils": "0.0.0-next-1687766264699"
|
|
136
136
|
},
|
|
137
137
|
"peerDependencies": {
|
|
138
138
|
"react": ">=17",
|
|
139
139
|
"react-dom": ">=17",
|
|
140
|
-
"@modern-js/runtime": "0.0.0-next-
|
|
140
|
+
"@modern-js/runtime": "0.0.0-next-1687766264699"
|
|
141
141
|
},
|
|
142
142
|
"peerDependenciesMeta": {
|
|
143
143
|
"@modern-js/runtime": {
|
|
@@ -152,12 +152,12 @@
|
|
|
152
152
|
"@types/node": "^14",
|
|
153
153
|
"@types/yargs": "^17.0.2",
|
|
154
154
|
"typescript": "^5",
|
|
155
|
-
"@modern-js/core": "0.0.0-next-
|
|
156
|
-
"@modern-js/types": "0.0.0-next-
|
|
157
|
-
"@modern-js/runtime": "0.0.0-next-
|
|
158
|
-
"@
|
|
159
|
-
"@
|
|
160
|
-
"@scripts/jest-config": "0.0.0-next-
|
|
155
|
+
"@modern-js/core": "0.0.0-next-1687766264699",
|
|
156
|
+
"@modern-js/types": "0.0.0-next-1687766264699",
|
|
157
|
+
"@modern-js/runtime": "0.0.0-next-1687766264699",
|
|
158
|
+
"@scripts/build": "0.0.0-next-1687766264699",
|
|
159
|
+
"@modern-js/bff-core": "0.0.0-next-1687766264699",
|
|
160
|
+
"@scripts/jest-config": "0.0.0-next-1687766264699"
|
|
161
161
|
},
|
|
162
162
|
"sideEffects": false,
|
|
163
163
|
"modernConfig": {},
|