@multiplatform.one/config 7.84.3 → 7.84.4
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/lib/index.js +2 -2
- package/lib/{storybook-8fDh89nY.js → storybook-CfmAuOrU.js} +1 -1
- package/lib/storybook.js +1 -1
- package/lib/{vite-CC7eGxtQ.js → vite-W2LL_nGt.js} +1 -1
- package/lib/vite.js +2 -2
- package/lib/{workspacePublicPackages-uFiITxJO.js → workspacePublicPackages-CodgZ6JU.js} +23 -16
- package/package.json +2 -2
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as createViteConfig } from "./vite-
|
|
1
|
+
import { t as createViteConfig } from "./vite-W2LL_nGt.js";
|
|
2
2
|
import { i as phosphorTokenColorPlugin, n as tamaguiWorkspacePathsFile, t as ensureTamaguiWorkspacePaths } from "./tamaguiWorkspacePaths-DR3dud79.js";
|
|
3
|
-
import { t as createStorybookViteConfig } from "./storybook-
|
|
3
|
+
import { t as createStorybookViteConfig } from "./storybook-CfmAuOrU.js";
|
|
4
4
|
import { createVitestConfig } from "./vitest.js";
|
|
5
5
|
|
|
6
6
|
export { createStorybookViteConfig, createViteConfig, createVitestConfig, ensureTamaguiWorkspacePaths, phosphorTokenColorPlugin, tamaguiWorkspacePathsFile };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as phosphorTokenColorPlugin, t as ensureTamaguiWorkspacePaths } from "./tamaguiWorkspacePaths-DR3dud79.js";
|
|
2
|
-
import { c as withSingletonDepAliases, r as resolvePackageMainSource, t as discoverPublicPackageRoots } from "./workspacePublicPackages-
|
|
2
|
+
import { c as withSingletonDepAliases, r as resolvePackageMainSource, t as discoverPublicPackageRoots } from "./workspacePublicPackages-CodgZ6JU.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
package/lib/storybook.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as phosphorTokenColorPlugin, t as ensureTamaguiWorkspacePaths } from "./tamaguiWorkspacePaths-DR3dud79.js";
|
|
2
|
-
import { c as withSingletonDepAliases, i as resolveWorkspaceNativeEntry, o as lookupTamaguiModules, s as resolveConfig, t as discoverPublicPackageRoots } from "./workspacePublicPackages-
|
|
2
|
+
import { c as withSingletonDepAliases, i as resolveWorkspaceNativeEntry, o as lookupTamaguiModules, s as resolveConfig, t as discoverPublicPackageRoots } from "./workspacePublicPackages-CodgZ6JU.js";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import fs from "node:fs";
|
|
5
5
|
import path from "node:path";
|
package/lib/vite.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as readPublicConfigKeys, i as publicConfigPlugin, n as phosphorNativeIconBase, r as phosphorNativeIconBaseId, t as createViteConfig } from "./vite-
|
|
1
|
+
import { a as readPublicConfigKeys, i as publicConfigPlugin, n as phosphorNativeIconBase, r as phosphorNativeIconBaseId, t as createViteConfig } from "./vite-W2LL_nGt.js";
|
|
2
2
|
import { i as phosphorTokenColorPlugin } from "./tamaguiWorkspacePaths-DR3dud79.js";
|
|
3
|
-
import { a as staleNativeDistSource, i as resolveWorkspaceNativeEntry, n as publicPackageViteSourceAliases, t as discoverPublicPackageRoots } from "./workspacePublicPackages-
|
|
3
|
+
import { a as staleNativeDistSource, i as resolveWorkspaceNativeEntry, n as publicPackageViteSourceAliases, t as discoverPublicPackageRoots } from "./workspacePublicPackages-CodgZ6JU.js";
|
|
4
4
|
|
|
5
5
|
export { createViteConfig, discoverPublicPackageRoots, phosphorNativeIconBase, phosphorNativeIconBaseId, phosphorTokenColorPlugin, publicConfigPlugin, publicPackageViteSourceAliases, readPublicConfigKeys, resolveWorkspaceNativeEntry, staleNativeDistSource };
|
|
@@ -206,7 +206,7 @@ const webConditionOrder = [
|
|
|
206
206
|
"require"
|
|
207
207
|
];
|
|
208
208
|
const skippedConditions = new Set(["types", "react-native"]);
|
|
209
|
-
const tsSourcePattern = /\.
|
|
209
|
+
const tsSourcePattern = /\.[cm]?tsx?$/;
|
|
210
210
|
function collectExportTargets(target, out) {
|
|
211
211
|
if (typeof target === "string") {
|
|
212
212
|
out.push(target);
|
|
@@ -246,6 +246,26 @@ function declaredExportTarget(pkgDir, target) {
|
|
|
246
246
|
const runtime = candidates.find((c) => !c.endsWith(".d.ts"));
|
|
247
247
|
return runtime ? path.resolve(pkgDir, runtime) : void 0;
|
|
248
248
|
}
|
|
249
|
+
function directoryPatternAlias(pkgDir, target) {
|
|
250
|
+
const targets = [];
|
|
251
|
+
collectExportTargets(target, targets);
|
|
252
|
+
const dirTarget = targets.find((t) => t.endsWith("/*"));
|
|
253
|
+
if (!dirTarget) return void 0;
|
|
254
|
+
const dir = path.resolve(pkgDir, dirTarget.slice(0, -2));
|
|
255
|
+
return fs.existsSync(dir) && fs.statSync(dir).isDirectory() ? dir : void 0;
|
|
256
|
+
}
|
|
257
|
+
function subpathAlias(pkgDir, key, target) {
|
|
258
|
+
if (key === "." || key === "./package.json" || !key.startsWith("./")) return void 0;
|
|
259
|
+
if (key.endsWith("/*")) {
|
|
260
|
+
const pattern = key.slice(2, -2);
|
|
261
|
+
if (pattern.includes("*")) return void 0;
|
|
262
|
+
const dir = directoryPatternAlias(pkgDir, target);
|
|
263
|
+
return dir ? [pattern, dir] : void 0;
|
|
264
|
+
}
|
|
265
|
+
if (key.includes("*")) return void 0;
|
|
266
|
+
const file = resolveExportSource(pkgDir, target) ?? declaredExportTarget(pkgDir, target);
|
|
267
|
+
return file ? [key.slice(2), file] : void 0;
|
|
268
|
+
}
|
|
249
269
|
/**
|
|
250
270
|
* Vite `resolve.alias` entries for one package's `exports` subpaths:
|
|
251
271
|
* `<name>/<subpath>` → its source file, and a `./dir/*` pattern → the directory.
|
|
@@ -254,21 +274,8 @@ function packageSubpathSourceAliases(pkgName, pkgDir, exportsField) {
|
|
|
254
274
|
const aliases = {};
|
|
255
275
|
if (!exportsField || typeof exportsField !== "object" || Array.isArray(exportsField)) return aliases;
|
|
256
276
|
for (const [key, target] of Object.entries(exportsField)) {
|
|
257
|
-
|
|
258
|
-
if (
|
|
259
|
-
const pattern = key.slice(2, -2);
|
|
260
|
-
if (pattern.includes("*")) continue;
|
|
261
|
-
const targets = [];
|
|
262
|
-
collectExportTargets(target, targets);
|
|
263
|
-
const dirTarget = targets.find((t) => t.endsWith("/*"));
|
|
264
|
-
if (!dirTarget) continue;
|
|
265
|
-
const dir = path.resolve(pkgDir, dirTarget.slice(0, -2));
|
|
266
|
-
if (fs.existsSync(dir) && fs.statSync(dir).isDirectory()) aliases[`${pkgName}/${pattern}`] = dir;
|
|
267
|
-
continue;
|
|
268
|
-
}
|
|
269
|
-
if (key.includes("*")) continue;
|
|
270
|
-
const file = resolveExportSource(pkgDir, target) ?? declaredExportTarget(pkgDir, target);
|
|
271
|
-
if (file) aliases[`${pkgName}/${key.slice(2)}`] = file;
|
|
277
|
+
const alias = subpathAlias(pkgDir, key, target);
|
|
278
|
+
if (alias) aliases[`${pkgName}/${alias[0]}`] = alias[1];
|
|
272
279
|
}
|
|
273
280
|
return aliases;
|
|
274
281
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@multiplatform.one/config",
|
|
3
|
-
"version": "7.84.
|
|
3
|
+
"version": "7.84.4",
|
|
4
4
|
"description": "Shared build and test configuration presets for multiplatform.one",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"config",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"access": "public"
|
|
115
115
|
},
|
|
116
116
|
"dependencies": {
|
|
117
|
-
"@multiplatform.one/utils": "^7.84.
|
|
117
|
+
"@multiplatform.one/utils": "^7.84.4",
|
|
118
118
|
"@tamagui/vite-plugin": "2.7.6",
|
|
119
119
|
"@vitejs/plugin-react": "^6.1.2",
|
|
120
120
|
"dotenv": "^17.4.2",
|