@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 CHANGED
@@ -1,15 +1,19 @@
1
1
  # @modern-js/plugin-testing
2
2
 
3
- ## 0.0.0-next-1687764171352
3
+ ## 0.0.0-next-1687766264699
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [13354d335]
8
- - @modern-js/runtime@0.0.0-next-1687764171352
9
- - @modern-js/prod-server@0.0.0-next-1687764171352
10
- - @modern-js/babel-compiler@0.0.0-next-1687764171352
11
- - @modern-js/plugin@0.0.0-next-1687764171352
12
- - @modern-js/utils@0.0.0-next-1687764171352
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
- default: function() {
17
- return _default;
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 _default = () => ({
112
+ const testingBffPlugin = () => ({
113
113
  name: "@modern-js/testing-plugin-bff",
114
114
  setup(api) {
115
115
  return {
@@ -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 = /* @__PURE__ */ _interop_require_default._(require("./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 _default = () => {
34
- const bffPlugin = (0, _bff.default)();
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 default function() {
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
+ };
@@ -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 default function() {
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 default () => ({
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 default () => {
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 _default: () => CliPlugin<{
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 _default: () => CliPlugin<{
6
+ export declare const testingPlugin: () => CliPlugin<{
7
7
  hooks: Hooks;
8
8
  userConfig: UserConfig;
9
9
  normalizedConfig: Required<UserConfig>;
10
10
  }>;
11
- export default _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-1687764171352",
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-1687764171352",
133
- "@modern-js/utils": "0.0.0-next-1687764171352",
134
- "@modern-js/plugin": "0.0.0-next-1687764171352",
135
- "@modern-js/prod-server": "0.0.0-next-1687764171352"
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-1687764171352"
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-1687764171352",
156
- "@modern-js/types": "0.0.0-next-1687764171352",
157
- "@modern-js/runtime": "0.0.0-next-1687764171352",
158
- "@modern-js/bff-core": "0.0.0-next-1687764171352",
159
- "@scripts/build": "0.0.0-next-1687764171352",
160
- "@scripts/jest-config": "0.0.0-next-1687764171352"
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": {},