@vue-macros/api
Advanced tools
Comparing version 0.10.3 to 0.10.4
@@ -28,3 +28,3 @@ // src/index.ts | ||
// src/ts/resolve-file.ts | ||
import { existsSync } from "node:fs"; | ||
import { lstatSync } from "node:fs"; | ||
import path from "node:path"; | ||
@@ -37,4 +37,8 @@ var resolveTSFileId = (id, importer) => { | ||
const filePath = path.resolve(importer2, "..", id2); | ||
if (!existsSync(filePath)) return; | ||
return filePath; | ||
try { | ||
const stat = lstatSync(filePath); | ||
if (stat.isFile()) return filePath; | ||
} catch { | ||
return; | ||
} | ||
} | ||
@@ -1370,3 +1374,3 @@ return tryResolve(id, importer) || tryResolve(`${id}.ts`, importer) || tryResolve(`${id}.d.ts`, importer) || tryResolve(`${id}/index`, importer) || tryResolve(`${id}/index.ts`, importer) || tryResolve(`${id}/index.d.ts`, importer); | ||
// src/resolve.ts | ||
import { existsSync as existsSync2 } from "node:fs"; | ||
import { existsSync } from "node:fs"; | ||
import { readFile as readFile2 } from "node:fs/promises"; | ||
@@ -1418,3 +1422,3 @@ import path2 from "node:path"; | ||
); | ||
if (isDts(resolved2) && existsSync2(resolved2)) return resolved2; | ||
if (isDts(resolved2) && existsSync(resolved2)) return resolved2; | ||
} | ||
@@ -1426,3 +1430,3 @@ } | ||
if (!resolvedIds) return; | ||
const resolved = resolvedIds.find((id2) => isDts(id2) && existsSync2(id2)); | ||
const resolved = resolvedIds.find((id2) => isDts(id2) && existsSync(id2)); | ||
if (resolved) return resolved; | ||
@@ -1433,3 +1437,3 @@ } else { | ||
const entry = path2.resolve(pkgRoot, types); | ||
if (existsSync2(entry)) return entry; | ||
if (existsSync(entry)) return entry; | ||
} | ||
@@ -1455,3 +1459,3 @@ } catch { | ||
if (!resolved) return; | ||
if (existsSync2(resolved)) { | ||
if (existsSync(resolved)) { | ||
collectReferencedFile(importer, resolved); | ||
@@ -1461,3 +1465,3 @@ return withResolveCache(id, importer, resolved); | ||
resolved = await tryResolve(resolved, importer); | ||
if (resolved && existsSync2(resolved)) { | ||
if (resolved && existsSync(resolved)) { | ||
collectReferencedFile(importer, resolved); | ||
@@ -1464,0 +1468,0 @@ return withResolveCache(id, importer, resolved); |
{ | ||
"name": "@vue-macros/api", | ||
"version": "0.10.3", | ||
"version": "0.10.4", | ||
"description": "General API for Vue Macros.", | ||
@@ -43,3 +43,3 @@ "type": "module", | ||
"dependencies": { | ||
"@babel/types": "^7.25.0", | ||
"@babel/types": "^7.25.2", | ||
"resolve.exports": "^2.0.2", | ||
@@ -46,0 +46,0 @@ "@vue-macros/common": "1.12.2" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
127696
3338
Updated@babel/types@^7.25.2