@multiplatform.one/config 7.90.5 → 8.0.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/README.md +2 -2
- package/design-lint.mjs +0 -3
- package/lint.mjs +0 -1
- package/package.json +2 -2
- package/src/workspacePublicPackages.spec.ts +36 -1
package/README.md
CHANGED
|
@@ -169,8 +169,8 @@ MPO app gets them (LC-192):
|
|
|
169
169
|
`placeholder`, `t()` keys and `defaultValue`, and every value in a string
|
|
170
170
|
catalog under `i18n/`, `locales/` or `localizations/`, JSON included) is
|
|
171
171
|
sentence case (`copy-title-case`), never hedges a plural with "(s)"
|
|
172
|
-
(`copy-plural`)
|
|
173
|
-
|
|
172
|
+
(`copy-plural`) and carries no em dash except the lone placeholder "—"
|
|
173
|
+
(`copy-em-dash`, all LC-202).
|
|
174
174
|
- `user-words` (LC-203) rejects implementation words in UI copy. The house list
|
|
175
175
|
is `houseBannedWords`; a baseline's `bannedWords` replaces it for that app,
|
|
176
176
|
and its `properNames` lists the names `copy-title-case` leaves alone.
|
package/design-lint.mjs
CHANGED
|
@@ -170,7 +170,6 @@ const surfacePaint =
|
|
|
170
170
|
export const harvestRules = [
|
|
171
171
|
"api-vocabulary",
|
|
172
172
|
"art-tint",
|
|
173
|
-
"copy-ampersand",
|
|
174
173
|
"copy-em-dash",
|
|
175
174
|
"copy-plural",
|
|
176
175
|
"copy-title-case",
|
|
@@ -332,8 +331,6 @@ export function copyFindings(text, { error = false, bannedWords, properNames } =
|
|
|
332
331
|
"copy-plural",
|
|
333
332
|
`${quoted} hedges a plural; count through t()'s plural form (LC-202).`,
|
|
334
333
|
]);
|
|
335
|
-
if (/(?:^|\s)&(?:\s|$)/.test(value))
|
|
336
|
-
found.push(["copy-ampersand", `${quoted} uses "&"; write "and" (LC-202).`]);
|
|
337
334
|
if (titleCase(value, properNames ?? houseProperNames))
|
|
338
335
|
found.push(["copy-title-case", `${quoted} is Title Case; UI copy is sentence case (LC-202).`]);
|
|
339
336
|
const word = value.match(bannedPattern(bannedWords ?? houseBannedWords) ?? /$^/)?.[0];
|
package/lint.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "Shared build and test configuration presets for multiplatform.one",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"config",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"@babel/parser": "^7.29.9",
|
|
119
119
|
"@babel/plugin-transform-block-scoping": "^7.29.7",
|
|
120
120
|
"@babel/traverse": "^7.29.10",
|
|
121
|
-
"@multiplatform.one/utils": "^
|
|
121
|
+
"@multiplatform.one/utils": "^8.0.0",
|
|
122
122
|
"@tamagui/vite-plugin": "2.7.6",
|
|
123
123
|
"@vitejs/plugin-react": "^6.1.2",
|
|
124
124
|
"dotenv": "^17.4.2",
|
|
@@ -108,7 +108,7 @@ describe("publicPackageViteSourceAliases", () => {
|
|
|
108
108
|
"@multiplatform.one/frappe-ui/dependsOn": pub("frappe-ui/src/dependsOn.ts"),
|
|
109
109
|
"@multiplatform.one/frappe-ui/formActions": pub("frappe-ui/src/formEngine/formActions.ts"),
|
|
110
110
|
"@multiplatform.one/platform/file": pub("platform/src/file/index.ts"),
|
|
111
|
-
"@multiplatform.one/frappe-ui/
|
|
111
|
+
"@multiplatform.one/frappe-ui/desk": pub("frappe-ui/src/desk/index.ts"),
|
|
112
112
|
});
|
|
113
113
|
});
|
|
114
114
|
|
|
@@ -311,3 +311,38 @@ describe("resolveWorkspaceNativeEntry", () => {
|
|
|
311
311
|
expect(resolveWorkspaceNativeEntry(root)).toBe(path.join(root, "dist/esm/index.native.js"));
|
|
312
312
|
});
|
|
313
313
|
});
|
|
314
|
+
|
|
315
|
+
describe("theme's ./devtools entry", () => {
|
|
316
|
+
// The Storybook manager bundles this entry from dist against its own React 18
|
|
317
|
+
// and does not globalize react/jsx-runtime, so no file in the graph may
|
|
318
|
+
// compile to the automatic runtime.
|
|
319
|
+
it("keeps every .tsx in its graph on the classic JSX runtime", () => {
|
|
320
|
+
const root = pub("theme");
|
|
321
|
+
const manifest = JSON.parse(fs.readFileSync(path.join(root, "package.json"), "utf8"));
|
|
322
|
+
const entry = resolveExportSource(root, manifest.exports["./devtools"]);
|
|
323
|
+
expect(entry).toBeDefined();
|
|
324
|
+
const seen = new Set<string>();
|
|
325
|
+
const queue = [entry!];
|
|
326
|
+
while (queue.length) {
|
|
327
|
+
const file = queue.pop()!;
|
|
328
|
+
if (seen.has(file)) continue;
|
|
329
|
+
seen.add(file);
|
|
330
|
+
const text = fs.readFileSync(file, "utf8");
|
|
331
|
+
for (const [, spec] of text.matchAll(/(?:from|import)\s+"(\.[^"]+)"/g)) {
|
|
332
|
+
const base = path.resolve(path.dirname(file), spec);
|
|
333
|
+
const next = ["", ".ts", ".tsx", "/index.ts", "/index.tsx"]
|
|
334
|
+
.map((ext) => base + ext)
|
|
335
|
+
.find((candidate) => fs.existsSync(candidate) && fs.statSync(candidate).isFile());
|
|
336
|
+
if (next) queue.push(next);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
const tsx = [...seen].filter((file) => file.endsWith(".tsx"));
|
|
340
|
+
expect(tsx.map((file) => path.basename(file)).sort()).toEqual(
|
|
341
|
+
expect.arrayContaining(["ColorLineVisualizer.tsx", "knobIcons.tsx"]),
|
|
342
|
+
);
|
|
343
|
+
const automatic = tsx.filter(
|
|
344
|
+
(file) => !/@jsxRuntime classic/.test(fs.readFileSync(file, "utf8")),
|
|
345
|
+
);
|
|
346
|
+
expect(automatic.map((file) => path.relative(root, file))).toEqual([]);
|
|
347
|
+
});
|
|
348
|
+
});
|