@modern-js/plugin-testing 2.5.0 → 2.6.0

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,5 +1,24 @@
1
1
  # @modern-js/plugin-testing
2
2
 
3
+ ## 2.6.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [671477d]
8
+ - Updated dependencies [36164a2]
9
+ - Updated dependencies [e1f799e]
10
+ - Updated dependencies [7915ab3]
11
+ - Updated dependencies [a909ad1]
12
+ - Updated dependencies [49fa0b1]
13
+ - Updated dependencies [0fe658a]
14
+ - Updated dependencies [1906d7b]
15
+ - @modern-js/runtime@2.6.0
16
+ - @modern-js/prod-server@2.6.0
17
+ - @modern-js/utils@2.6.0
18
+ - @modern-js/babel-preset-app@2.6.0
19
+ - @modern-js/babel-compiler@2.6.0
20
+ - @modern-js/plugin@2.6.0
21
+
3
22
  ## 2.5.0
4
23
 
5
24
  ### Patch Changes
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -13,6 +13,10 @@ var __copyProps = (to, from, except, desc) => {
13
13
  return to;
14
14
  };
15
15
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
+ // If the importer is in node compatibility mode or this is not an ESM
17
+ // file that has been converted to a CommonJS file using a Babel-
18
+ // compatible transform (i.e. "__esModule" has not been set), then set
19
+ // "default" to the CommonJS "module.exports" for node compatibility.
16
20
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
17
21
  mod
18
22
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -13,6 +13,10 @@ var __copyProps = (to, from, except, desc) => {
13
13
  return to;
14
14
  };
15
15
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
+ // If the importer is in node compatibility mode or this is not an ESM
17
+ // file that has been converted to a CommonJS file using a Babel-
18
+ // compatible transform (i.e. "__esModule" has not been set), then set
19
+ // "default" to the CommonJS "module.exports" for node compatibility.
16
20
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
17
21
  mod
18
22
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -66,6 +70,8 @@ var cli_default = () => {
66
70
  return {
67
71
  source: {
68
72
  alias: {
73
+ // The module-tools alias configuration is different and more specific than app-tools.
74
+ // So for the time being, the @ alias is configured here.
69
75
  "@": import_path.default.join(appContext.appDirectory, "src"),
70
76
  "@modern-js/runtime/testing": testingExportsUtils.getPath()
71
77
  }
@@ -97,6 +103,7 @@ var cli_default = () => {
97
103
  testEnvironment: "jsdom",
98
104
  resolver: import_base.DEFAULT_RESOLVER_PATH,
99
105
  rootDir: appContext.appDirectory || process.cwd(),
106
+ // testMatch bug on windows, issue: https://github.com/facebook/jest/issues/7914
100
107
  testMatch: [
101
108
  `<rootDir>/src/**/*.test.[jt]s?(x)`,
102
109
  `<rootDir>/tests/**/*.test.[jt]s?(x)`
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  };
19
19
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -17,6 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  return to;
18
18
  };
19
19
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
20
24
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
21
25
  mod
22
26
  ));
@@ -28,7 +28,7 @@ function resolvePlugins(features) {
28
28
  }
29
29
  Object.keys(features).forEach((feature) => {
30
30
  if (allowedFeatures.includes(feature)) {
31
- const curPluginRes = require(`@modern-js/runtime/plugins`)[feature]({
31
+ const curPluginRes = require("@modern-js/runtime/plugins")[feature]({
32
32
  ...features[feature]
33
33
  });
34
34
  plugins.push(curPluginRes);
@@ -189,6 +189,8 @@ var cli_default = function() {
189
189
  return {
190
190
  source: {
191
191
  alias: {
192
+ // The module-tools alias configuration is different and more specific than app-tools.
193
+ // So for the time being, the @ alias is configured here.
192
194
  "@": path.join(appContext.appDirectory, "src"),
193
195
  "@modern-js/runtime/testing": testingExportsUtils.getPath()
194
196
  }
@@ -231,6 +233,7 @@ var cli_default = function() {
231
233
  testEnvironment: "jsdom",
232
234
  resolver: DEFAULT_RESOLVER_PATH,
233
235
  rootDir: appContext.appDirectory || process.cwd(),
236
+ // testMatch bug on windows, issue: https://github.com/facebook/jest/issues/7914
234
237
  testMatch: [
235
238
  "<rootDir>/src/**/*.test.[jt]s?(x)",
236
239
  "<rootDir>/tests/**/*.test.[jt]s?(x)"
@@ -46,6 +46,8 @@ var cli_default = () => {
46
46
  return {
47
47
  source: {
48
48
  alias: {
49
+ // The module-tools alias configuration is different and more specific than app-tools.
50
+ // So for the time being, the @ alias is configured here.
49
51
  "@": path.join(appContext.appDirectory, "src"),
50
52
  "@modern-js/runtime/testing": testingExportsUtils.getPath()
51
53
  }
@@ -77,6 +79,7 @@ var cli_default = () => {
77
79
  testEnvironment: "jsdom",
78
80
  resolver: DEFAULT_RESOLVER_PATH,
79
81
  rootDir: appContext.appDirectory || process.cwd(),
82
+ // testMatch bug on windows, issue: https://github.com/facebook/jest/issues/7914
80
83
  testMatch: [
81
84
  `<rootDir>/src/**/*.test.[jt]s?(x)`,
82
85
  `<rootDir>/tests/**/*.test.[jt]s?(x)`
@@ -6,7 +6,7 @@ function resolvePlugins(features) {
6
6
  }
7
7
  Object.keys(features).forEach((feature) => {
8
8
  if (allowedFeatures.includes(feature)) {
9
- const curPluginRes = require(`@modern-js/runtime/plugins`)[feature]({
9
+ const curPluginRes = require("@modern-js/runtime/plugins")[feature]({
10
10
  ...features[feature]
11
11
  });
12
12
  plugins.push(curPluginRes);
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.5.0",
14
+ "version": "2.6.0",
15
15
  "jsnext:source": "./src/cli/index.ts",
16
16
  "types": "./dist/types/cli/index.d.ts",
17
17
  "main": "./dist/cjs/cli/index.js",
@@ -106,16 +106,16 @@
106
106
  "jest": "^27.0.6",
107
107
  "ts-jest": "^27.0.4",
108
108
  "yargs": "^17.0.1",
109
- "@modern-js/babel-compiler": "2.5.0",
110
- "@modern-js/utils": "2.5.0",
111
- "@modern-js/babel-preset-app": "2.5.0",
112
- "@modern-js/plugin": "2.5.0",
113
- "@modern-js/prod-server": "2.5.0"
109
+ "@modern-js/babel-compiler": "2.6.0",
110
+ "@modern-js/utils": "2.6.0",
111
+ "@modern-js/babel-preset-app": "2.6.0",
112
+ "@modern-js/plugin": "2.6.0",
113
+ "@modern-js/prod-server": "2.6.0"
114
114
  },
115
115
  "peerDependencies": {
116
116
  "react": ">=17",
117
117
  "react-dom": ">=17",
118
- "@modern-js/runtime": "^2.5.0"
118
+ "@modern-js/runtime": "^2.6.0"
119
119
  },
120
120
  "peerDependenciesMeta": {
121
121
  "@modern-js/runtime": {
@@ -132,12 +132,12 @@
132
132
  "@jest/types": "^27.0.6",
133
133
  "jest": "^27",
134
134
  "typescript": "^4",
135
- "@modern-js/core": "2.5.0",
136
- "@modern-js/types": "2.5.0",
137
- "@modern-js/runtime": "2.5.0",
138
- "@modern-js/bff-core": "2.5.0",
139
- "@scripts/build": "2.5.0",
140
- "@scripts/jest-config": "2.5.0"
135
+ "@modern-js/core": "2.6.0",
136
+ "@modern-js/runtime": "2.6.0",
137
+ "@modern-js/bff-core": "2.6.0",
138
+ "@scripts/build": "2.6.0",
139
+ "@modern-js/types": "2.6.0",
140
+ "@scripts/jest-config": "2.6.0"
141
141
  },
142
142
  "sideEffects": false,
143
143
  "modernConfig": {},