@file-services/utils
Advanced tools
Comparing version 0.4.2 to 0.4.3
@@ -42,2 +42,3 @@ "use strict"; | ||
if (typeof nodeValue === 'string') { | ||
ensureDirectorySync(path.dirname(nodePath)); | ||
writeFileSync(nodePath, nodeValue); | ||
@@ -95,2 +96,3 @@ } | ||
if (typeof nodeValue === 'string') { | ||
await ensureDirectory(path.dirname(nodePath)); | ||
await writeFile(nodePath, nodeValue); | ||
@@ -97,0 +99,0 @@ } |
@@ -40,2 +40,3 @@ export function createSyncFileSystem(baseFs) { | ||
if (typeof nodeValue === 'string') { | ||
ensureDirectorySync(path.dirname(nodePath)); | ||
writeFileSync(nodePath, nodeValue); | ||
@@ -92,2 +93,3 @@ } | ||
if (typeof nodeValue === 'string') { | ||
await ensureDirectory(path.dirname(nodePath)); | ||
await writeFile(nodePath, nodeValue); | ||
@@ -94,0 +96,0 @@ } |
{ | ||
"name": "@file-services/utils", | ||
"description": "Common file system utility functions.", | ||
"version": "0.4.2", | ||
"version": "0.4.3", | ||
"main": "cjs/index.js", | ||
@@ -20,3 +20,3 @@ "module": "esm/index.js", | ||
"devDependencies": { | ||
"@file-services/test-kit": "^0.4.2" | ||
"@file-services/test-kit": "^0.4.3" | ||
}, | ||
@@ -35,3 +35,3 @@ "files": [ | ||
"sideEffects": false, | ||
"gitHead": "88ebfe791abdb1403b5f74e0951704332581fd01" | ||
"gitHead": "86cdbd09488503134ccb683d2ded0bfcb04b3ca2" | ||
} |
@@ -46,6 +46,6 @@ import { | ||
ensureDirectorySync(directoryPath) | ||
for (const [nodeName, nodeValue] of Object.entries(contents)) { | ||
const nodePath = path.join(directoryPath, nodeName) | ||
if (typeof nodeValue === 'string') { | ||
ensureDirectorySync(path.dirname(nodePath)) | ||
writeFileSync(nodePath, nodeValue) | ||
@@ -104,6 +104,6 @@ } else { | ||
await ensureDirectory(directoryPath) | ||
for (const [nodeName, nodeValue] of Object.entries(contents)) { | ||
const nodePath = path.join(directoryPath, nodeName) | ||
if (typeof nodeValue === 'string') { | ||
await ensureDirectory(path.dirname(nodePath)) | ||
await writeFile(nodePath, nodeValue) | ||
@@ -110,0 +110,0 @@ } else { |
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
65816
1081