@multiplatform.one/config 7.90.6 → 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/lint.mjs +0 -1
- package/package.json +2 -2
- package/src/workspacePublicPackages.spec.ts +36 -1
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
|
+
});
|