@putout/operator-filesystem 4.1.0 → 5.0.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.
Files changed (2) hide show
  1. package/README.md +7 -7
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -23,7 +23,7 @@ const [dirPath] = findFile(ast, 'hello');
23
23
  const filePath = createFile(dirPath, 'world.txt', 'hello world');
24
24
  ```
25
25
 
26
- ### `createDirectory(directoryPath: FilePath, name: string): FilePath`
26
+ ### `createDirectory(directoryPath: DirectoryPath, name: string): DirectoryPath`
27
27
 
28
28
  ```js
29
29
  const {operator} = require('putout');
@@ -37,7 +37,7 @@ const [dirPath] = findFile(ast, 'hello');
37
37
  const newDirectoryPath = createDirectory(dirPath, 'world');
38
38
  ```
39
39
 
40
- ### `findFile(filePath: Path|FilePath, name: string | string[]): FilePath[]`
40
+ ### `findFile(directoryPath: DirectoryPath, name: string | string[]): (FilePath | DirectoryPath)[]`
41
41
 
42
42
  ```js
43
43
  const {operator} = require('putout');
@@ -64,7 +64,7 @@ const {findFile} = operator;
64
64
  const coupleFiles = findFile(ast, ['/home/coderaiser', '/home/coderaiser/putout']);
65
65
  ```
66
66
 
67
- ### `getParentDirectory(filePath: FilePath): FilePath|null`
67
+ ### `getParentDirectory(path: FilePath | DirectoryPath): FilePath | null`
68
68
 
69
69
  ```js
70
70
  const {operator} = require('putout');
@@ -83,7 +83,7 @@ dirPath === getParentDirectory(newDirectoryPath);
83
83
  true;
84
84
  ```
85
85
 
86
- ### `getFilename(path: FilePath): string`
86
+ ### `getFilename(path: FilePath | DirectoryPath): string`
87
87
 
88
88
  ```js
89
89
  const {operator} = require('putout');
@@ -125,7 +125,7 @@ const {removeFile} = operator;
125
125
  removeFile(filePath);
126
126
  ```
127
127
 
128
- ### `copyFile(filePath: FilePath, dirPath: FilePath)`
128
+ ### `copyFile(path: FilePath | DirectoryPath, directoryPath: DirectoryPath)`
129
129
 
130
130
  ```js
131
131
  const {operator} = require('putout');
@@ -134,7 +134,7 @@ const {moveFile, copyFile} = operator;
134
134
  copyFile(filePath, dirPath);
135
135
  ```
136
136
 
137
- ### `moveFile(filePath: FilePath, dirPath: FilePath)`
137
+ ### `moveFile(path: FilePath | DirectoryPath, directoryPath: DirectoryPath)`
138
138
 
139
139
  ```js
140
140
  const {operator} = require('putout');
@@ -169,7 +169,7 @@ readFileContent(filePath);
169
169
  'hello';
170
170
  ```
171
171
 
172
- ### `renameFile(filePath: FilePath, name: string)`
172
+ ### `renameFile(path: FilePath | DirectoryPath, name: string)`
173
173
 
174
174
  ```js
175
175
  const {operator} = require('putout');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/operator-filesystem",
3
- "version": "4.1.0",
3
+ "version": "5.0.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",
@@ -11,7 +11,7 @@
11
11
  "changelog": false,
12
12
  "repository": {
13
13
  "type": "git",
14
- "url": "git://github.com/coderaiser/putout.git"
14
+ "url": "git+https://github.com/coderaiser/putout.git"
15
15
  },
16
16
  "scripts": {
17
17
  "test": "madrun test",
@@ -36,13 +36,13 @@
36
36
  "filesystem"
37
37
  ],
38
38
  "devDependencies": {
39
- "@putout/engine-parser": "^10.0.2",
39
+ "@putout/engine-parser": "^11.0.1",
40
40
  "@putout/operator-json": "^2.0.0",
41
- "@putout/test": "^9.0.0",
42
- "c8": "^9.0.0",
41
+ "@putout/test": "^11.0.0",
42
+ "c8": "^10.0.0",
43
43
  "eslint": "^9.0.0",
44
44
  "eslint-plugin-n": "^17.0.0",
45
- "eslint-plugin-putout": "^22.0.0",
45
+ "eslint-plugin-putout": "^23.0.0",
46
46
  "lerna": "^6.0.1",
47
47
  "madrun": "^10.0.0",
48
48
  "montag": "^1.2.1",
@@ -50,7 +50,7 @@
50
50
  "supertape": "^10.0.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "putout": ">=35"
53
+ "putout": ">=36"
54
54
  },
55
55
  "license": "MIT",
56
56
  "engines": {