@multiplatform.one/config 7.34.4 → 7.36.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 +48 -0
- package/design-lint.mjs +524 -0
- package/lib/index.js +3 -3
- package/lib/{storybook-Dxwh_fl2.js → storybook-Ba0KCHBo.js} +9 -2
- package/lib/storybook.js +1 -1
- package/lib/{tamaguiWorkspacePaths-B6aRC2BU.js → tamaguiWorkspacePaths-DR3dud79.js} +3 -2
- package/lib/{vite-n3XSaftn.js → vite-DkidIRYX.js} +1 -1
- package/lib/vite.js +2 -2
- package/lib/vitest.js +1 -1
- package/lint.mjs +642 -69
- package/package.json +13 -7
- package/src/lint.spec.ts +511 -5
- package/src/phosphorTokenColor.spec.ts +7 -1
- package/src/phosphorTokenColor.ts +3 -2
- package/src/storybook.spec.ts +7 -0
- package/src/storybook.ts +11 -1
- package/types/phosphorTokenColor.d.ts.map +1 -1
package/src/storybook.ts
CHANGED
|
@@ -318,7 +318,9 @@ function mergePackageResolveAliases(
|
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
} else {
|
|
321
|
-
const resolved =
|
|
321
|
+
const resolved =
|
|
322
|
+
resolveSubpathSource(pkgDir, subpath) ??
|
|
323
|
+
exportSourceTarget(pkgDir, pkgJson.exports[exportKey]);
|
|
322
324
|
if (resolved) {
|
|
323
325
|
aliases[`${pkgName}/${subpath}`] = resolved;
|
|
324
326
|
}
|
|
@@ -327,6 +329,14 @@ function mergePackageResolveAliases(
|
|
|
327
329
|
}
|
|
328
330
|
}
|
|
329
331
|
|
|
332
|
+
/** An export entry's `source` file, for subpaths whose name is not their path under src/. */
|
|
333
|
+
function exportSourceTarget(pkgDir: string, entry: unknown): string | undefined {
|
|
334
|
+
const source = (entry as { source?: unknown } | null)?.source;
|
|
335
|
+
if (typeof source !== "string") return undefined;
|
|
336
|
+
const file = path.join(pkgDir, source);
|
|
337
|
+
return fs.existsSync(file) && fs.statSync(file).isFile() ? file : undefined;
|
|
338
|
+
}
|
|
339
|
+
|
|
330
340
|
function resolveSubpathSource(pkgDir: string, subpath: string): string | undefined {
|
|
331
341
|
const candidates = [
|
|
332
342
|
path.join(pkgDir, "src", `${subpath}.storybook.ts`),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"phosphorTokenColor.d.ts","sourceRoot":"","sources":["../src/phosphorTokenColor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"phosphorTokenColor.d.ts","sourceRoot":"","sources":["../src/phosphorTokenColor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAkFnC;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAgBjD;AAkDD;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAkBnD"}
|