@modern-js/plugin-testing 2.20.0 → 2.21.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @modern-js/plugin-testing
2
2
 
3
+ ## 2.21.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 5424051: fix: the proxy should not recreated when exists
8
+ fix: proxy server 不应该被重新创建当存在时
9
+ - 26dcf3a: chore: bump typescript to v5 in devDependencies
10
+
11
+ chore: 升级 devDependencies 中的 typescript 版本到 v5
12
+
13
+ - 8b7c6d4: chore: update reduck
14
+ chore: 更新 reduck
15
+ - ad78387: chore(deps): bump babel-related dependencies to latest version
16
+
17
+ chore(deps): 升级 babel 相关依赖到最新版本
18
+
19
+ - Updated dependencies [cfc5bda]
20
+ - Updated dependencies [e81eeaf]
21
+ - Updated dependencies [26dcf3a]
22
+ - Updated dependencies [0a1aa3b]
23
+ - Updated dependencies [056627f]
24
+ - Updated dependencies [8b7c6d4]
25
+ - Updated dependencies [807f04a]
26
+ - Updated dependencies [0fc15ca]
27
+ - Updated dependencies [43b4e83]
28
+ - Updated dependencies [ad78387]
29
+ - @modern-js/prod-server@2.21.0
30
+ - @modern-js/runtime@2.21.0
31
+ - @modern-js/utils@2.21.0
32
+ - @modern-js/babel-compiler@2.21.0
33
+ - @modern-js/babel-preset-app@2.21.0
34
+ - @modern-js/plugin@2.21.0
35
+
3
36
  ## 2.20.0
4
37
 
5
38
  ### Patch Changes
@@ -30,6 +30,9 @@ const setJestConfigForBFF = async ({ pwd, userConfig, plugins, routes, utils })
30
30
  testMatch: [
31
31
  `**/api/**/*.test.[jt]s`
32
32
  ],
33
+ modulePathIgnorePatterns: [
34
+ "config.test.ts"
35
+ ],
33
36
  globals: {
34
37
  [_constant.bff_info_key]: {
35
38
  appDir: pwd,
@@ -23,6 +23,9 @@ export var setJestConfigForBFF = function() {
23
23
  testMatch: [
24
24
  "**/api/**/*.test.[jt]s"
25
25
  ],
26
+ modulePathIgnorePatterns: [
27
+ "config.test.ts"
28
+ ],
26
29
  globals: _define_property({}, bff_info_key, {
27
30
  appDir: pwd,
28
31
  modernUserConfig: userConfig,
@@ -14,6 +14,9 @@ export const setJestConfigForBFF = async ({ pwd, userConfig, plugins, routes, ut
14
14
  testMatch: [
15
15
  `**/api/**/*.test.[jt]s`
16
16
  ],
17
+ modulePathIgnorePatterns: [
18
+ "config.test.ts"
19
+ ],
17
20
  globals: {
18
21
  [bff_info_key]: {
19
22
  appDir: pwd,
@@ -5,7 +5,6 @@ import { TestConfigOperator } from './testConfigOperator';
5
5
  /**
6
6
  * Parse jest config
7
7
  */
8
-
9
8
  declare const getJestUtils: (testConfig: TestConfig) => TestConfigOperator;
10
9
  declare const patchConfig: (testOperator: TestConfigOperator) => Promise<JestConfigTypes.InitialOptions>;
11
10
  export declare const DEFAULT_RESOLVER_PATH: string;
@@ -2,5 +2,4 @@ import { TestConfigOperator } from '../testConfigOperator';
2
2
  /**
3
3
  * Merge config from testConfig.jest
4
4
  */
5
-
6
5
  export declare const patchAssetsModule: (testOperator: TestConfigOperator) => void;
@@ -1,3 +1,2 @@
1
1
  declare const _default: "test-file-stub";
2
-
3
2
  export default _default;
@@ -2,5 +2,4 @@ import { TestConfigOperator } from '../testConfigOperator';
2
2
  /**
3
3
  * Map `TestConfig.transformer` to jest config
4
4
  */
5
-
6
5
  export declare const patchTransformer: (testOperator: TestConfigOperator) => void;
@@ -1,5 +1,4 @@
1
1
  import { JestConfig, TestConfig } from '../types';
2
-
3
2
  declare class TestConfigOperator {
4
3
  private _testConfig;
5
4
  private _jestConfig;
@@ -16,5 +15,4 @@ declare class TestConfigOperator {
16
15
  }): void;
17
16
  getFinalConfig(): any;
18
17
  }
19
-
20
18
  export { TestConfigOperator };
@@ -14,12 +14,10 @@ type Argv = Omit<Config.Argv, '_' | '$0'>;
14
14
  /**
15
15
  * Node API: execute jest
16
16
  */
17
-
18
17
  export declare function runJest(config: Argv, pwd?: string): Promise<void>;
19
18
  /**
20
19
  * Node API: run test
21
20
  */
22
-
23
21
  export declare function runTest(api: PluginAPI<{
24
22
  hooks: Hooks;
25
23
  userConfig: UserConfig;
@@ -6,7 +6,6 @@ interface TSConfig {
6
6
  /**
7
7
  * Read `compilerOptions` in the current pwd's tsconfig.json file
8
8
  */
9
-
10
9
  export declare const readCompilerOptions: (pwd?: string, filename?: string) => TSConfig['compilerOptions'];
11
10
  export declare const getModuleNameMapper: (alias: any) => any;
12
11
  export {};
@@ -16,11 +16,9 @@ export declare const setJestConfigForBFF: ({
16
16
  routes: any[];
17
17
  utils: TestConfigOperator;
18
18
  }) => Promise<void>;
19
-
20
19
  declare const _default: () => CliPlugin<{
21
20
  hooks: Hooks;
22
21
  userConfig: UserConfig;
23
22
  normalizedConfig: Required<UserConfig>;
24
23
  }>;
25
-
26
24
  export default _default;
@@ -1,3 +1,2 @@
1
1
  declare const _default: (mockApiInfosByFile: Record<string, any[]>) => void;
2
-
3
2
  export default _default;
@@ -3,11 +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
-
7
6
  declare const _default: () => CliPlugin<{
8
7
  hooks: Hooks;
9
8
  userConfig: UserConfig;
10
9
  normalizedConfig: Required<UserConfig>;
11
10
  }>;
12
-
13
11
  export default _default;
@@ -4,7 +4,6 @@ interface CreateAppProps {
4
4
  entry?: string;
5
5
  children?: React.ReactElement;
6
6
  }
7
-
8
7
  declare class ModernRuntime {
9
8
  private options;
10
9
  constructor(options: UserConfig<{
@@ -21,7 +20,5 @@ declare class ModernRuntime {
21
20
  }>): void;
22
21
  createApp(props?: CreateAppProps): React.ComponentType<any>;
23
22
  }
24
-
25
23
  declare const _default: ModernRuntime;
26
-
27
24
  export default _default;
@@ -1,5 +1,3 @@
1
1
  import { render } from '@testing-library/react';
2
-
3
2
  declare const _default: typeof render;
4
-
5
3
  export default _default;
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.20.0",
18
+ "version": "2.21.0",
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",
@@ -97,12 +97,12 @@
97
97
  }
98
98
  },
99
99
  "dependencies": {
100
- "@babel/core": "^7.18.0",
101
- "@babel/preset-env": "^7.18.0",
102
- "@modern-js-reduck/plugin-auto-actions": "^1.0.2",
103
- "@modern-js-reduck/plugin-effects": "^1.0.2",
104
- "@modern-js-reduck/plugin-immutable": "^1.0.1",
105
- "@modern-js-reduck/store": "^1.0.3",
100
+ "@babel/core": "^7.21.8",
101
+ "@babel/preset-env": "^7.21.5",
102
+ "@modern-js-reduck/plugin-auto-actions": "^1.1.10",
103
+ "@modern-js-reduck/plugin-effects": "^1.1.10",
104
+ "@modern-js-reduck/plugin-immutable": "^1.1.10",
105
+ "@modern-js-reduck/store": "^1.1.10",
106
106
  "@testing-library/jest-dom": "^5.14.1",
107
107
  "@testing-library/react": "^13.4.0",
108
108
  "@types/testing-library__jest-dom": "^5.14.3",
@@ -114,19 +114,19 @@
114
114
  "jest": "^29.5.0",
115
115
  "jest-environment-jsdom": "^29.5.0",
116
116
  "@jest/types": "^29.5.0",
117
- "ts-jest": "^29.0.5",
117
+ "ts-jest": "^29.1.0",
118
118
  "yargs": "^17.0.1",
119
119
  "@swc/helpers": "0.5.1",
120
- "@modern-js/babel-compiler": "2.20.0",
121
- "@modern-js/utils": "2.20.0",
122
- "@modern-js/babel-preset-app": "2.20.0",
123
- "@modern-js/plugin": "2.20.0",
124
- "@modern-js/prod-server": "2.20.0"
120
+ "@modern-js/babel-compiler": "2.21.0",
121
+ "@modern-js/utils": "2.21.0",
122
+ "@modern-js/babel-preset-app": "2.21.0",
123
+ "@modern-js/plugin": "2.21.0",
124
+ "@modern-js/prod-server": "2.21.0"
125
125
  },
126
126
  "peerDependencies": {
127
127
  "react": ">=17",
128
128
  "react-dom": ">=17",
129
- "@modern-js/runtime": "^2.20.0"
129
+ "@modern-js/runtime": "^2.21.0"
130
130
  },
131
131
  "peerDependenciesMeta": {
132
132
  "@modern-js/runtime": {
@@ -140,13 +140,13 @@
140
140
  "@types/supertest": "^2.0.11",
141
141
  "@types/node": "^14",
142
142
  "@types/yargs": "^17.0.2",
143
- "typescript": "^4",
144
- "@modern-js/core": "2.20.0",
145
- "@modern-js/types": "2.20.0",
146
- "@modern-js/runtime": "2.20.0",
147
- "@modern-js/bff-core": "2.20.0",
148
- "@scripts/build": "2.20.0",
149
- "@scripts/jest-config": "2.20.0"
143
+ "typescript": "^5",
144
+ "@modern-js/core": "2.21.0",
145
+ "@modern-js/types": "2.21.0",
146
+ "@modern-js/runtime": "2.21.0",
147
+ "@modern-js/bff-core": "2.21.0",
148
+ "@scripts/build": "2.21.0",
149
+ "@scripts/jest-config": "2.21.0"
150
150
  },
151
151
  "sideEffects": false,
152
152
  "modernConfig": {},