@file-services/overlay
Advanced tools
Comparing version 5.4.0 to 5.7.0
@@ -48,9 +48,10 @@ "use strict"; | ||
}, | ||
statSync(path) { | ||
statSync: function (path, ...args) { | ||
const { resolvedLowerPath, resolvedUpperPath } = resolvePaths(path); | ||
if (resolvedUpperPath !== undefined) { | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
return upperFs.statSync(resolvedUpperPath); | ||
const stats = upperFs.statSync(resolvedUpperPath, ...args); | ||
if (stats) { | ||
return stats; | ||
} | ||
} | ||
@@ -60,15 +61,13 @@ catch { | ||
} | ||
finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
} | ||
return lowerFs.statSync(resolvedLowerPath); | ||
return lowerFs.statSync(resolvedLowerPath, ...args); | ||
}, | ||
lstatSync(path) { | ||
lstatSync: function lstatSync(path, ...args) { | ||
const { resolvedLowerPath, resolvedUpperPath } = resolvePaths(path); | ||
if (resolvedUpperPath !== undefined) { | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
return upperFs.lstatSync(resolvedUpperPath); | ||
const stats = upperFs.lstatSync(resolvedUpperPath, ...args); | ||
if (stats) { | ||
return stats; | ||
} | ||
} | ||
@@ -78,7 +77,4 @@ catch { | ||
} | ||
finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
} | ||
return lowerFs.lstatSync(resolvedLowerPath); | ||
return lowerFs.lstatSync(resolvedLowerPath, ...args); | ||
}, | ||
@@ -85,0 +81,0 @@ realpathSync(path) { |
{ | ||
"name": "@file-services/overlay", | ||
"description": "Overlay files and directories from one file system on top of another.", | ||
"version": "5.4.0", | ||
"version": "5.7.0", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"test": "yarn test:node && yarn test:browser", | ||
"test": "npm run test:node && npm run test:browser", | ||
"test:node": "mocha \"./dist/test/*.{spec,nodespec}.js\"", | ||
@@ -12,4 +12,4 @@ "test:browser": "mocha-play \"./dist/test/**/*.spec.js\"" | ||
"dependencies": { | ||
"@file-services/types": "^5.4.0", | ||
"@file-services/utils": "^5.4.0" | ||
"@file-services/types": "^5.7.0", | ||
"@file-services/utils": "^5.7.0" | ||
}, | ||
@@ -16,0 +16,0 @@ "files": [ |
@@ -20,3 +20,3 @@ # @file-services/overlay | ||
```sh | ||
yarn add @file-services/overlay | ||
npm i @file-services/overlay | ||
``` | ||
@@ -23,0 +23,0 @@ |
@@ -60,32 +60,30 @@ import type { | ||
} as IBaseFileSystemSyncActions['readFileSync'], | ||
statSync(path) { | ||
statSync: function (path: string, ...args: []) { | ||
const { resolvedLowerPath, resolvedUpperPath } = resolvePaths(path); | ||
if (resolvedUpperPath !== undefined) { | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
return upperFs.statSync(resolvedUpperPath); | ||
const stats = upperFs.statSync(resolvedUpperPath, ...args); | ||
if (stats) { | ||
return stats; | ||
} | ||
} catch { | ||
/**/ | ||
} finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
} | ||
return lowerFs.statSync(resolvedLowerPath); | ||
}, | ||
lstatSync(path) { | ||
return lowerFs.statSync(resolvedLowerPath, ...args); | ||
} as IBaseFileSystemSyncActions['statSync'], | ||
lstatSync: function lstatSync(path: string, ...args: []) { | ||
const { resolvedLowerPath, resolvedUpperPath } = resolvePaths(path); | ||
if (resolvedUpperPath !== undefined) { | ||
const { stackTraceLimit } = Error; | ||
try { | ||
Error.stackTraceLimit = 0; | ||
return upperFs.lstatSync(resolvedUpperPath); | ||
const stats = upperFs.lstatSync(resolvedUpperPath, ...args); | ||
if (stats) { | ||
return stats; | ||
} | ||
} catch { | ||
/**/ | ||
} finally { | ||
Error.stackTraceLimit = stackTraceLimit; | ||
} | ||
} | ||
return lowerFs.lstatSync(resolvedLowerPath); | ||
}, | ||
return lowerFs.lstatSync(resolvedLowerPath, ...args); | ||
} as IBaseFileSystemSyncActions['lstatSync'], | ||
realpathSync(path) { | ||
@@ -92,0 +90,0 @@ const { resolvedLowerPath, resolvedUpperPath } = resolvePaths(path); |
Sorry, the diff of this file is not supported yet
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
42455
746
Updated@file-services/types@^5.7.0
Updated@file-services/utils@^5.7.0