@multiplatform.one/config 9.0.7 → 9.0.8
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/design-lint.mjs +13 -7
- package/package.json +2 -2
package/design-lint.mjs
CHANGED
|
@@ -1100,6 +1100,16 @@ export function inspectDesign(source, filename, projectRoot = process.cwd(), opt
|
|
|
1100
1100
|
return undefined;
|
|
1101
1101
|
return attributeKind(key);
|
|
1102
1102
|
}
|
|
1103
|
+
function copyKindAt(parent, child) {
|
|
1104
|
+
if (ts.isJsxExpression(parent)) return { done: true, kind: elementKind(parent.parent) };
|
|
1105
|
+
if (ts.isJsxAttribute(parent))
|
|
1106
|
+
return { done: true, kind: attributeKind(name(parent.name), parent.parent.parent) };
|
|
1107
|
+
if (!ts.isPropertyAssignment(parent) || parent.initializer !== child) return { done: true };
|
|
1108
|
+
const host = parent.parent.parent;
|
|
1109
|
+
if (name(parent.name) !== "defaultValue" || !tCall(host))
|
|
1110
|
+
return { done: true, kind: propertyKind(parent, host) };
|
|
1111
|
+
return { done: false, next: host };
|
|
1112
|
+
}
|
|
1103
1113
|
function copyKind(node) {
|
|
1104
1114
|
if (ts.isJsxText(node)) return elementKind(node.parent);
|
|
1105
1115
|
let child = node;
|
|
@@ -1107,13 +1117,9 @@ export function inspectDesign(source, filename, projectRoot = process.cwd(), opt
|
|
|
1107
1117
|
while (parent) {
|
|
1108
1118
|
let next = parent;
|
|
1109
1119
|
if (!passesCopy(parent, child)) {
|
|
1110
|
-
|
|
1111
|
-
if (
|
|
1112
|
-
|
|
1113
|
-
if (!ts.isPropertyAssignment(parent) || parent.initializer !== child) return undefined;
|
|
1114
|
-
const host = parent.parent.parent;
|
|
1115
|
-
if (name(parent.name) !== "defaultValue" || !tCall(host)) return propertyKind(parent, host);
|
|
1116
|
-
next = host;
|
|
1120
|
+
const step = copyKindAt(parent, child);
|
|
1121
|
+
if (step.done) return step.kind;
|
|
1122
|
+
next = step.next;
|
|
1117
1123
|
}
|
|
1118
1124
|
child = next;
|
|
1119
1125
|
parent = next.parent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/config",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.8",
|
|
4
4
|
"description": "Shared build and test configuration presets for multiplatform.one",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"config",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"@babel/parser": "^7.29.9",
|
|
123
123
|
"@babel/plugin-transform-block-scoping": "^7.29.7",
|
|
124
124
|
"@babel/traverse": "^7.29.10",
|
|
125
|
-
"@multiplatform.one/utils": "^9.0.
|
|
125
|
+
"@multiplatform.one/utils": "^9.0.8",
|
|
126
126
|
"@tamagui/vite-plugin": "2.7.6",
|
|
127
127
|
"@vitejs/plugin-react": "^6.1.2",
|
|
128
128
|
"dotenv": "^17.4.2",
|