@absolutejs/absolute 0.19.0-beta.774 → 0.19.0-beta.775
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/dist/cli/index.js +12 -5
- package/package.json +7 -7
package/dist/cli/index.js
CHANGED
|
@@ -1247,18 +1247,25 @@ const resolveRuntimePackageEntry = (runtimeDir: string, specifier: string) => {
|
|
|
1247
1247
|
if (!packageSpecifier) return specifier;
|
|
1248
1248
|
|
|
1249
1249
|
const packageDir = join(runtimeDir, "node_modules", ...packageSpecifier.split("/"));
|
|
1250
|
-
const
|
|
1250
|
+
const subpath = specifier.slice(packageSpecifier.length);
|
|
1251
|
+
const subPackageDir = subpath ? join(packageDir, ...subpath.slice(1).split("/")) : null;
|
|
1252
|
+
const resolvedPackageDir =
|
|
1253
|
+
subPackageDir && existsSync(join(subPackageDir, "package.json"))
|
|
1254
|
+
? subPackageDir
|
|
1255
|
+
: packageDir;
|
|
1256
|
+
const packageJsonPath = join(resolvedPackageDir, "package.json");
|
|
1251
1257
|
if (!existsSync(packageJsonPath)) return pathToFileURL(packageDir).href;
|
|
1252
1258
|
|
|
1253
1259
|
const pkg = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
|
|
1254
|
-
const
|
|
1255
|
-
const exportKey = subpath ? "." + subpath : ".";
|
|
1260
|
+
const exportKey = resolvedPackageDir === subPackageDir ? "." : subpath ? "." + subpath : ".";
|
|
1256
1261
|
const rootExport = pkg.exports?.[exportKey];
|
|
1257
1262
|
const entry =
|
|
1258
1263
|
(typeof rootExport === "string" ? rootExport : rootExport?.default) ??
|
|
1259
|
-
(
|
|
1264
|
+
(resolvedPackageDir === subPackageDir || !subpath
|
|
1265
|
+
? (pkg.module ?? pkg.main ?? "index.js")
|
|
1266
|
+
: "." + subpath);
|
|
1260
1267
|
|
|
1261
|
-
return pathToFileURL(join(
|
|
1268
|
+
return pathToFileURL(join(resolvedPackageDir, entry)).href;
|
|
1262
1269
|
};
|
|
1263
1270
|
|
|
1264
1271
|
const rewriteRuntimeModuleSpecifiers = (runtimeDir: string) => {
|
package/package.json
CHANGED
|
@@ -186,12 +186,12 @@
|
|
|
186
186
|
"main": "./dist/index.js",
|
|
187
187
|
"name": "@absolutejs/absolute",
|
|
188
188
|
"optionalDependencies": {
|
|
189
|
-
"@absolutejs/native-darwin-arm64": "0.19.0-beta.
|
|
190
|
-
"@absolutejs/native-darwin-x64": "0.19.0-beta.
|
|
191
|
-
"@absolutejs/native-linux-arm64": "0.19.0-beta.
|
|
192
|
-
"@absolutejs/native-linux-x64": "0.19.0-beta.
|
|
193
|
-
"@absolutejs/native-windows-arm64": "0.19.0-beta.
|
|
194
|
-
"@absolutejs/native-windows-x64": "0.19.0-beta.
|
|
189
|
+
"@absolutejs/native-darwin-arm64": "0.19.0-beta.775",
|
|
190
|
+
"@absolutejs/native-darwin-x64": "0.19.0-beta.775",
|
|
191
|
+
"@absolutejs/native-linux-arm64": "0.19.0-beta.775",
|
|
192
|
+
"@absolutejs/native-linux-x64": "0.19.0-beta.775",
|
|
193
|
+
"@absolutejs/native-windows-arm64": "0.19.0-beta.775",
|
|
194
|
+
"@absolutejs/native-windows-x64": "0.19.0-beta.775"
|
|
195
195
|
},
|
|
196
196
|
"overrides": {
|
|
197
197
|
"@typescript-eslint/utils": "8.56.1"
|
|
@@ -344,5 +344,5 @@
|
|
|
344
344
|
]
|
|
345
345
|
}
|
|
346
346
|
},
|
|
347
|
-
"version": "0.19.0-beta.
|
|
347
|
+
"version": "0.19.0-beta.775"
|
|
348
348
|
}
|