Skip to content

Commit 69d2198

Browse files
german-swanGerman Swan
andauthored
fix(utils): isAbsolute issue (#1506)
* fix isAbsolute issue * changeset * changeset * remove old line Co-authored-by: German Swan <[email protected]>
1 parent 7ca1e73 commit 69d2198

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/fresh-worms-explain.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-mesh/utils': patch
3+
---
4+
5+
fix readFileWithCache: isAbsolute issue (https://github.com/Urigo/graphql-mesh/issues/1505)

packages/utils/src/read-file-or-url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export async function readFileWithCache<T>(
3030
cache: KeyValueCache,
3131
config?: ReadFileOrUrlOptions
3232
): Promise<T> {
33-
const actualPath = isAbsolute ? filePath : resolve(process.cwd(), filePath);
33+
const actualPath = isAbsolute(filePath) ? filePath : resolve(process.cwd(), filePath);
3434
const cachedObjStr = await cache.get(actualPath);
3535
const stats = await stat(actualPath);
3636
if (cachedObjStr) {

0 commit comments

Comments
 (0)