@putout/operator-filesystem 2.9.0 → 2.9.1
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 +3 -2
- package/package.json +1 -1
package/lib/filesystem.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const {join} = require('node:path');
|
|
3
4
|
const tryCatch = require('try-catch');
|
|
4
5
|
const {types} = require('putout');
|
|
5
6
|
|
|
@@ -112,7 +113,7 @@ module.exports.moveFile = (filePath, dirPath) => {
|
|
|
112
113
|
.split('/')
|
|
113
114
|
.pop();
|
|
114
115
|
|
|
115
|
-
const newFilename =
|
|
116
|
+
const newFilename = join(dirname, basename);
|
|
116
117
|
|
|
117
118
|
maybeRemoveFile(dirPath, newFilename);
|
|
118
119
|
|
|
@@ -131,7 +132,7 @@ module.exports.copyFile = (filePath, dirPath) => {
|
|
|
131
132
|
.split('/')
|
|
132
133
|
.pop();
|
|
133
134
|
|
|
134
|
-
const newFilename =
|
|
135
|
+
const newFilename = join(dirname, basename);
|
|
135
136
|
const [hasContent, content] = getFileContent(filePath);
|
|
136
137
|
|
|
137
138
|
const copiedFile = ObjectExpression([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/operator-filesystem",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.1",
|
|
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",
|