@modern-js/plugin-v2 2.68.2-alpha.0 → 2.68.2-alpha.1
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.
|
@@ -30,8 +30,14 @@ const mergeConfig = (configs) => (0, import_lodash.mergeWith)({}, ...configs, (t
|
|
|
30
30
|
if ((0, import_utils.isOverriddenConfigKey)(key)) {
|
|
31
31
|
return source !== null && source !== void 0 ? source : target;
|
|
32
32
|
}
|
|
33
|
-
if ((
|
|
34
|
-
|
|
33
|
+
if (Array.isArray(target) || Array.isArray(source)) {
|
|
34
|
+
if (target === void 0) {
|
|
35
|
+
return source;
|
|
36
|
+
}
|
|
37
|
+
if (source === void 0) {
|
|
38
|
+
return target;
|
|
39
|
+
}
|
|
40
|
+
const targetArray = Array.isArray(target) ? target : [];
|
|
35
41
|
return (0, import_lodash.unionWith)(targetArray, source, import_lodash.isEqual);
|
|
36
42
|
}
|
|
37
43
|
if ((0, import_lodash.isFunction)(target) || (0, import_lodash.isFunction)(source)) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
2
2
|
import { _ as _type_of } from "@swc/helpers/_/_type_of";
|
|
3
3
|
import { isOverriddenConfigKey } from "@modern-js/utils";
|
|
4
|
-
import {
|
|
4
|
+
import { isEqual, isFunction, mergeWith, unionWith } from "@modern-js/utils/lodash";
|
|
5
5
|
var mergeConfig = function(configs) {
|
|
6
6
|
return mergeWith.apply(void 0, [
|
|
7
7
|
{}
|
|
@@ -13,8 +13,14 @@ var mergeConfig = function(configs) {
|
|
|
13
13
|
if (isOverriddenConfigKey(key)) {
|
|
14
14
|
return source !== null && source !== void 0 ? source : target;
|
|
15
15
|
}
|
|
16
|
-
if (isArray(source)) {
|
|
17
|
-
|
|
16
|
+
if (Array.isArray(target) || Array.isArray(source)) {
|
|
17
|
+
if (target === void 0) {
|
|
18
|
+
return source;
|
|
19
|
+
}
|
|
20
|
+
if (source === void 0) {
|
|
21
|
+
return target;
|
|
22
|
+
}
|
|
23
|
+
var targetArray = Array.isArray(target) ? target : [];
|
|
18
24
|
return unionWith(targetArray, source, isEqual);
|
|
19
25
|
}
|
|
20
26
|
if (isFunction(target) || isFunction(source)) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isOverriddenConfigKey } from "@modern-js/utils";
|
|
2
|
-
import {
|
|
2
|
+
import { isEqual, isFunction, mergeWith, unionWith } from "@modern-js/utils/lodash";
|
|
3
3
|
const mergeConfig = (configs) => mergeWith({}, ...configs, (target, source, key) => {
|
|
4
4
|
if (key === "designSystem" || key === "tailwindcss" && typeof source === "object") {
|
|
5
5
|
return mergeWith({}, target !== null && target !== void 0 ? target : {}, source !== null && source !== void 0 ? source : {});
|
|
@@ -7,8 +7,14 @@ const mergeConfig = (configs) => mergeWith({}, ...configs, (target, source, key)
|
|
|
7
7
|
if (isOverriddenConfigKey(key)) {
|
|
8
8
|
return source !== null && source !== void 0 ? source : target;
|
|
9
9
|
}
|
|
10
|
-
if (isArray(source)) {
|
|
11
|
-
|
|
10
|
+
if (Array.isArray(target) || Array.isArray(source)) {
|
|
11
|
+
if (target === void 0) {
|
|
12
|
+
return source;
|
|
13
|
+
}
|
|
14
|
+
if (source === void 0) {
|
|
15
|
+
return target;
|
|
16
|
+
}
|
|
17
|
+
const targetArray = Array.isArray(target) ? target : [];
|
|
12
18
|
return unionWith(targetArray, source, isEqual);
|
|
13
19
|
}
|
|
14
20
|
if (isFunction(target) || isFunction(source)) {
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.68.2-alpha.
|
|
18
|
+
"version": "2.68.2-alpha.1",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
"@swc/helpers": "^0.5.17",
|
|
83
83
|
"jiti": "1.21.7",
|
|
84
84
|
"@rsbuild/core": "1.4.4",
|
|
85
|
-
"@modern-js/
|
|
85
|
+
"@modern-js/utils": "2.68.1",
|
|
86
86
|
"@modern-js/runtime-utils": "2.68.1",
|
|
87
|
-
"@modern-js/
|
|
87
|
+
"@modern-js/types": "2.68.1"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@types/jest": "^29",
|