@multiplatform.one/config 9.12.0 → 9.12.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.
Files changed (2) hide show
  1. package/design-lint.mjs +27 -1
  2. package/package.json +2 -2
package/design-lint.mjs CHANGED
@@ -1138,6 +1138,32 @@ export function inspectDesign(source, filename, projectRoot = process.cwd(), opt
1138
1138
  return [node.head.text, ...node.templateSpans.map((span) => span.literal.text)].join("{x}");
1139
1139
  return node.text;
1140
1140
  }
1141
+ // WIRE-VALUE (FZ-9256): a literal in the object or array JSON.stringify
1142
+ // serializes is a payload a client parses (an OAuth `invalid_grant` body),
1143
+ // never copy a person reads, so the copy rules skip it.
1144
+ function wirePayload(node) {
1145
+ let child = node;
1146
+ let parent = node.parent;
1147
+ while (
1148
+ parent &&
1149
+ (ts.isPropertyAssignment(parent) ||
1150
+ ts.isObjectLiteralExpression(parent) ||
1151
+ ts.isArrayLiteralExpression(parent))
1152
+ ) {
1153
+ child = parent;
1154
+ parent = parent.parent;
1155
+ }
1156
+ return (
1157
+ !!parent &&
1158
+ child !== node &&
1159
+ ts.isCallExpression(parent) &&
1160
+ parent.arguments[0] === child &&
1161
+ ts.isPropertyAccessExpression(parent.expression) &&
1162
+ ts.isIdentifier(parent.expression.expression) &&
1163
+ parent.expression.expression.text === "JSON" &&
1164
+ parent.expression.name.text === "stringify"
1165
+ );
1166
+ }
1141
1167
  // LC-202 capitals: JSX text beside an expression or element is one part of
1142
1168
  // a longer string ("Continue with {provider}"), so its open ends are not
1143
1169
  // the string's first or last word.
@@ -1166,7 +1192,7 @@ export function inspectDesign(source, filename, projectRoot = process.cwd(), opt
1166
1192
  `${clip(text.match(cssWebPaint)[0])} is CSS React Native cannot draw (LC-206).`,
1167
1193
  );
1168
1194
  }
1169
- if (!context) return;
1195
+ if (!context || wirePayload(node)) return;
1170
1196
  const kind = copyKind(node);
1171
1197
  const joined = textJoins(node);
1172
1198
  if (options.onCopy) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/config",
3
- "version": "9.12.0",
3
+ "version": "9.12.1",
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.12.0",
125
+ "@multiplatform.one/utils": "^9.12.1",
126
126
  "@tamagui/vite-plugin": "2.7.6",
127
127
  "@vitejs/plugin-react": "^6.1.2",
128
128
  "dotenv": "^17.4.2",