@putout/operator-filesystem 3.2.0 → 3.3.0
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/lib/filesystem.js +5 -0
- package/package.json +1 -1
package/lib/filesystem.js
CHANGED
|
@@ -265,6 +265,11 @@ module.exports.readFileContent = (filePath) => {
|
|
|
265
265
|
module.exports.writeFileContent = writeFileContent;
|
|
266
266
|
|
|
267
267
|
function writeFileContent(filePath, content) {
|
|
268
|
+
const fileType = getFileType(filePath);
|
|
269
|
+
|
|
270
|
+
if (fileType === 'directory')
|
|
271
|
+
return;
|
|
272
|
+
|
|
268
273
|
const filename = getFilename(filePath);
|
|
269
274
|
|
|
270
275
|
maybeFS.writeFileContent(filename, content);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/operator-filesystem",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "🐊Putout operator adds ability to filesystem referenced variables that was not defined",
|