@putout/plugin-nodejs 3.2.0 → 4.1.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/README.md +29 -5
- package/lib/declare/index.js +19 -0
- package/lib/declare/modules/child_process.json +9 -0
- package/lib/declare/modules/fs-promises.json +31 -0
- package/lib/declare/modules/fs.json +100 -0
- package/lib/declare/modules/module.json +10 -0
- package/lib/declare/modules/os.json +21 -0
- package/lib/declare/modules/path.json +16 -0
- package/lib/declare/modules/process.json +55 -0
- package/lib/declare/modules/stream.json +14 -0
- package/lib/declare/modules/url.json +7 -0
- package/lib/declare/modules/util.json +14 -0
- package/lib/declare/modules/zlib.json +40 -0
- package/lib/index.js +1 -0
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[NPMIMGURL]: https://img.shields.io/npm/v/@putout/plugin-nodejs.svg?style=flat&longCache=true
|
|
4
4
|
[NPMURL]: https://npmjs.org/package/@putout/plugin-nodejs "npm"
|
|
5
5
|
|
|
6
|
-
🐊[
|
|
6
|
+
🐊[**Putout**](https://github.com/coderaiser/putout) plugin adds ability to transform to new [nodejs](https://nodejs.org/en/) API and apply best practices.
|
|
7
7
|
|
|
8
8
|
## Install
|
|
9
9
|
|
|
@@ -32,10 +32,6 @@ npm i putout @putout/plugin-nodejs -D
|
|
|
32
32
|
|
|
33
33
|
Convert [fs.promises](https://nodejs.org/dist/latest-v15.x/docs/api/fs.html#fs_fs_promises_api) into form that will be simpler to use and convert from in `ESM` to:
|
|
34
34
|
|
|
35
|
-
```
|
|
36
|
-
import {readFile} from 'fs/promises';
|
|
37
|
-
```
|
|
38
|
-
|
|
39
35
|
#### ❌ Example of incorrect code
|
|
40
36
|
|
|
41
37
|
```js
|
|
@@ -125,6 +121,34 @@ return;
|
|
|
125
121
|
process.exit();
|
|
126
122
|
```
|
|
127
123
|
|
|
124
|
+
### declare
|
|
125
|
+
|
|
126
|
+
Add declarations to built-in node.js modules:
|
|
127
|
+
|
|
128
|
+
- [child_process](https://nodejs.org/dist/latest-v16.x/docs/api/child_process.html);
|
|
129
|
+
- [fs](https://nodejs.org/dist/latest-v16.x/docs/api/fs.html);
|
|
130
|
+
- [path](https://nodejs.org/dist/latest-v16.x/docs/api/path.html);
|
|
131
|
+
- [process](https://nodejs.org/dist/latest-v16.x/docs/api/process.html);
|
|
132
|
+
- [module](https://nodejs.org/dist/latest-v16.x/docs/api/module.html);
|
|
133
|
+
- [stream](https://nodejs.org/dist/latest-v16.x/docs/api/stream.html);
|
|
134
|
+
- [os](https://nodejs.org/dist/latest-v16.x/docs/api/os.html);
|
|
135
|
+
- [url](https://nodejs.org/dist/latest-v16.x/docs/api/url.html);
|
|
136
|
+
- [util](https://nodejs.org/dist/latest-v16.x/docs/api/util.html);
|
|
137
|
+
- [zlib](https://nodejs.org/dist/latest-v16.x/docs/api/zlib.html);
|
|
138
|
+
|
|
139
|
+
#### ❌ Example of incorrect code
|
|
140
|
+
|
|
141
|
+
```js
|
|
142
|
+
await readFile('hello.txt', 'utf8');
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### ✅ Example of correct code
|
|
146
|
+
|
|
147
|
+
```js
|
|
148
|
+
import {readFile} from 'fs/promises';
|
|
149
|
+
await readFile('hello.txt', 'utf8');
|
|
150
|
+
```
|
|
151
|
+
|
|
128
152
|
## License
|
|
129
153
|
|
|
130
154
|
MIT
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const {operator} = require('putout');
|
|
4
|
+
const {declare} = operator;
|
|
5
|
+
|
|
6
|
+
module.exports = declare({
|
|
7
|
+
...require('./modules/fs'),
|
|
8
|
+
...require('./modules/fs-promises'),
|
|
9
|
+
...require('./modules/path'),
|
|
10
|
+
...require('./modules/process'),
|
|
11
|
+
...require('./modules/module'),
|
|
12
|
+
...require('./modules/stream'),
|
|
13
|
+
...require('./modules/os'),
|
|
14
|
+
...require('./modules/zlib'),
|
|
15
|
+
...require('./modules/url'),
|
|
16
|
+
...require('./modules/util'),
|
|
17
|
+
...require('./modules/child_process'),
|
|
18
|
+
});
|
|
19
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"exec": "import {exec} from 'child_process'",
|
|
3
|
+
"execFile": "import {execFile} from 'child_process'",
|
|
4
|
+
"execFileSync": "import {execFileSync} from 'child_process'",
|
|
5
|
+
"execSync": "import {execSync} from 'child_process'",
|
|
6
|
+
"fork": "import {fork} from 'child_process'",
|
|
7
|
+
"spawn": "import {spawn} from 'child_process'",
|
|
8
|
+
"spawnSync": "import {spawnSync} from 'child_process'"
|
|
9
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"access": "import {access} from 'fs/promises'",
|
|
3
|
+
"copyFile": "import {copyFile} from 'fs/promises'",
|
|
4
|
+
"cp": "import {cp} from 'fs/promises'",
|
|
5
|
+
"open": "import {open} from 'fs/promises'",
|
|
6
|
+
"opendir": "import {opendir} from 'fs/promises'",
|
|
7
|
+
"rename": "import {rename} from 'fs/promises'",
|
|
8
|
+
"truncate": "import {truncate} from 'fs/promises'",
|
|
9
|
+
"rm": "import {rm} from 'fs/promises'",
|
|
10
|
+
"rmdir": "import {rmdir} from 'fs/promises'",
|
|
11
|
+
"mkdir": "import {mkdir} from 'fs/promises'",
|
|
12
|
+
"readdir": "import {readdir} from 'fs/promises'",
|
|
13
|
+
"readlink": "import {readlink} from 'fs/promises'",
|
|
14
|
+
"symlink": "import {symlink} from 'fs/promises'",
|
|
15
|
+
"lstat": "import {lstat} from 'fs/promises'",
|
|
16
|
+
"stat": "import {stat} from 'fs/promises'",
|
|
17
|
+
"link": "import {link} from 'fs/promises'",
|
|
18
|
+
"unlink": "import {unlink} from 'fs/promises'",
|
|
19
|
+
"chmod": "import {chmod} from 'fs/promises'",
|
|
20
|
+
"lchmod": "import {lchmod} from 'fs/promises'",
|
|
21
|
+
"lchown": "import {lchown} from 'fs/promises'",
|
|
22
|
+
"chown": "import {chown} from 'fs/promises'",
|
|
23
|
+
"utimes": "import {utimes} from 'fs/promises'",
|
|
24
|
+
"lutimes": "import {lutimes} from 'fs/promises'",
|
|
25
|
+
"realpath": "import {realpath} from 'fs/promises'",
|
|
26
|
+
"mkdtemp": "import {mkdtemp} from 'fs/promises'",
|
|
27
|
+
"writeFile": "import {writeFile} from 'fs/promises'",
|
|
28
|
+
"appendFile": "import {appendFile} from 'fs/promises'",
|
|
29
|
+
"readFile": "import {readFile} from 'fs/promises'",
|
|
30
|
+
"watch": "import {watch} from 'fs/promises'"
|
|
31
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"appendFile": "import {appendFile} from 'fs'",
|
|
3
|
+
"appendFileSync": "import {appendFileSync} from 'fs'",
|
|
4
|
+
"access": "import {access} from 'fs'",
|
|
5
|
+
"accessSync": "import {accessSync} from 'fs'",
|
|
6
|
+
"chown": "import {chown} from 'fs'",
|
|
7
|
+
"chownSync": "import {chownSync} from 'fs'",
|
|
8
|
+
"chmod": "import {chmod} from 'fs'",
|
|
9
|
+
"chmodSync": "import {chmodSync} from 'fs'",
|
|
10
|
+
"close": "import {close} from 'fs'",
|
|
11
|
+
"closeSync": "import {closeSync} from 'fs'",
|
|
12
|
+
"copyFile": "import {copyFile} from 'fs'",
|
|
13
|
+
"copyFileSync": "import {copyFileSync} from 'fs'",
|
|
14
|
+
"cp": "import {cp} from 'fs'",
|
|
15
|
+
"cpSync": "import {cpSync} from 'fs'",
|
|
16
|
+
"createReadStream": "import {createReadStream} from 'fs'",
|
|
17
|
+
"createWriteStream": "import {createWriteStream} from 'fs'",
|
|
18
|
+
"exists": "import {exists} from 'fs'",
|
|
19
|
+
"existsSync": "import {existsSync} from 'fs'",
|
|
20
|
+
"fchown": "import {fchown} from 'fs'",
|
|
21
|
+
"fchownSync": "import {fchownSync} from 'fs'",
|
|
22
|
+
"fchmod": "import {fchmod} from 'fs'",
|
|
23
|
+
"fchmodSync": "import {fchmodSync} from 'fs'",
|
|
24
|
+
"fdatasync": "import {fdatasync} from 'fs'",
|
|
25
|
+
"fdatasyncSync": "import {fdatasyncSync} from 'fs'",
|
|
26
|
+
"fstat": "import {fstat} from 'fs'",
|
|
27
|
+
"fstatSync": "import {fstatSync} from 'fs'",
|
|
28
|
+
"fsync": "import {fsync} from 'fs'",
|
|
29
|
+
"fsyncSync": "import {fsyncSync} from 'fs'",
|
|
30
|
+
"ftruncate": "import {ftruncate} from 'fs'",
|
|
31
|
+
"ftruncateSync": "import {ftruncateSync} from 'fs'",
|
|
32
|
+
"futimes": "import {futimes} from 'fs'",
|
|
33
|
+
"futimesSync": "import {futimesSync} from 'fs'",
|
|
34
|
+
"lchown": "import {lchown} from 'fs'",
|
|
35
|
+
"lchownSync": "import {lchownSync} from 'fs'",
|
|
36
|
+
"lchmod": "import {lchmod} from 'fs'",
|
|
37
|
+
"lchmodSync": "import {lchmodSync} from 'fs'",
|
|
38
|
+
"link": "import {link} from 'fs'",
|
|
39
|
+
"linkSync": "import {linkSync} from 'fs'",
|
|
40
|
+
"lstat": "import {lstat} from 'fs'",
|
|
41
|
+
"lstatSync": "import {lstatSync} from 'fs'",
|
|
42
|
+
"lutimes": "import {lutimes} from 'fs'",
|
|
43
|
+
"lutimesSync": "import {lutimesSync} from 'fs'",
|
|
44
|
+
"mkdir": "import {mkdir} from 'fs'",
|
|
45
|
+
"mkdirSync": "import {mkdirSync} from 'fs'",
|
|
46
|
+
"mkdtemp": "import {mkdtemp} from 'fs'",
|
|
47
|
+
"mkdtempSync": "import {mkdtempSync} from 'fs'",
|
|
48
|
+
"open": "import {open} from 'fs'",
|
|
49
|
+
"openSync": "import {openSync} from 'fs'",
|
|
50
|
+
"opendir": "import {opendir} from 'fs'",
|
|
51
|
+
"opendirSync": "import {opendirSync} from 'fs'",
|
|
52
|
+
"readdir": "import {readdir} from 'fs'",
|
|
53
|
+
"readdirSync": "import {readdirSync} from 'fs'",
|
|
54
|
+
"read": "import {read} from 'fs'",
|
|
55
|
+
"readSync": "import {readSync} from 'fs'",
|
|
56
|
+
"readv": "import {readv} from 'fs'",
|
|
57
|
+
"readvSync": "import {readvSync} from 'fs'",
|
|
58
|
+
"readFile": "import {readFile} from 'fs'",
|
|
59
|
+
"readFileSync": "import {readFileSync} from 'fs'",
|
|
60
|
+
"readlink": "import {readlink} from 'fs'",
|
|
61
|
+
"readlinkSync": "import {readlinkSync} from 'fs'",
|
|
62
|
+
"realpath": "import {realpath} from 'fs'",
|
|
63
|
+
"realpathSync": "import {realpathSync} from 'fs'",
|
|
64
|
+
"rename": "import {rename} from 'fs'",
|
|
65
|
+
"renameSync": "import {renameSync} from 'fs'",
|
|
66
|
+
"rm": "import {rm} from 'fs'",
|
|
67
|
+
"rmSync": "import {rmSync} from 'fs'",
|
|
68
|
+
"rmdir": "import {rmdir} from 'fs'",
|
|
69
|
+
"rmdirSync": "import {rmdirSync} from 'fs'",
|
|
70
|
+
"stat": "import {stat} from 'fs'",
|
|
71
|
+
"statSync": "import {statSync} from 'fs'",
|
|
72
|
+
"symlink": "import {symlink} from 'fs'",
|
|
73
|
+
"symlinkSync": "import {symlinkSync} from 'fs'",
|
|
74
|
+
"truncate": "import {truncate} from 'fs'",
|
|
75
|
+
"truncateSync": "import {truncateSync} from 'fs'",
|
|
76
|
+
"unwatchFile": "import {unwatchFile} from 'fs'",
|
|
77
|
+
"unlink": "import {unlink} from 'fs'",
|
|
78
|
+
"unlinkSync": "import {unlinkSync} from 'fs'",
|
|
79
|
+
"utimes": "import {utimes} from 'fs'",
|
|
80
|
+
"utimesSync": "import {utimesSync} from 'fs'",
|
|
81
|
+
"watch": "import {watch} from 'fs'",
|
|
82
|
+
"watchFile": "import {watchFile} from 'fs'",
|
|
83
|
+
"writeFile": "import {writeFile} from 'fs'",
|
|
84
|
+
"writeFileSync": "import {writeFileSync} from 'fs'",
|
|
85
|
+
"write": "import {write} from 'fs'",
|
|
86
|
+
"writeSync": "import {writeSync} from 'fs'",
|
|
87
|
+
"writev": "import {writev} from 'fs'",
|
|
88
|
+
"writevSync": "import {writevSync} from 'fs'",
|
|
89
|
+
"Dir": "import {Dir} from 'fs'",
|
|
90
|
+
"Dirent": "import {Dirent} from 'fs'",
|
|
91
|
+
"Stats": "import {Stats} from 'fs'",
|
|
92
|
+
"ReadStream": "import {ReadStream} from 'fs'",
|
|
93
|
+
"WriteStream": "import {WriteStream} from 'fs'",
|
|
94
|
+
"FileReadStream": "import {FileReadStream} from 'fs'",
|
|
95
|
+
"FileWriteStream": "import {FileWriteStream} from 'fs'",
|
|
96
|
+
"F_OK": "import {F_OK} from 'fs'",
|
|
97
|
+
"R_OK": "import {R_OK} from 'fs'",
|
|
98
|
+
"W_OK": "import {W_OK} from 'fs'",
|
|
99
|
+
"X_OK": "import {X_OK} from 'fs'"
|
|
100
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"builtinModules": "import {builtinModules} from 'module'",
|
|
3
|
+
"globalPaths": "import {globalPaths} from 'module'",
|
|
4
|
+
"createRequire": "import {createRequire} from 'module'",
|
|
5
|
+
"syncBuiltinESMExports": "import {syncBuiltinESMExports} from 'module'",
|
|
6
|
+
"Module": "import {Module} from 'module'",
|
|
7
|
+
"runMain": "import {runMain} from 'module'",
|
|
8
|
+
"findSourceMap": "import {findSourceMap} from 'module'",
|
|
9
|
+
"SourceMap": "import {SourceMap} from 'module'"
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"arch": "import {arch} from 'os'",
|
|
3
|
+
"cpus": "import {cpus} from 'os'",
|
|
4
|
+
"endianness": "import {endianness} from 'os'",
|
|
5
|
+
"freemem": "import {freemem} from 'os'",
|
|
6
|
+
"getPriority": "import {getPriority} from 'os'",
|
|
7
|
+
"homedir": "import {homedir} from 'os'",
|
|
8
|
+
"hostname": "import {hostname} from 'os'",
|
|
9
|
+
"loadavg": "import {loadavg} from 'os'",
|
|
10
|
+
"networkInterfaces": "import {networkInterfaces} from 'os'",
|
|
11
|
+
"platform": "import {platform} from 'os'",
|
|
12
|
+
"release": "import {release} from 'os'",
|
|
13
|
+
"setPriority": "import {setPriority} from 'os'",
|
|
14
|
+
"tmpdir": "import {tmpdir} from 'os'",
|
|
15
|
+
"totalmem": "import {totalmem} from 'os'",
|
|
16
|
+
"userInfo": "import {userInfo} from 'os'",
|
|
17
|
+
"uptime": "import {uptime} from 'os'",
|
|
18
|
+
"constants": "import {constants} from 'os'",
|
|
19
|
+
"EOL": "import {EOL} from 'os'",
|
|
20
|
+
"devNull": "import {devNull} from 'os'"
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"resolve": "import {resolve} from 'path'",
|
|
3
|
+
"normalize": "import {normalize} from 'path'",
|
|
4
|
+
"isAbsolute": "import {isAbsolute} from 'path'",
|
|
5
|
+
"join": "import {join} from 'path'",
|
|
6
|
+
"relative": "import {relative} from 'path'",
|
|
7
|
+
"toNamespacedPath": "import {toNamespacedPath} from 'path'",
|
|
8
|
+
"dirname": "import {dirname} from 'path'",
|
|
9
|
+
"basename": "import {basename} from 'path'",
|
|
10
|
+
"extname": "import {extname} from 'path'",
|
|
11
|
+
"format": "import {format} from 'path'",
|
|
12
|
+
"sep": "import {sep} from 'path'",
|
|
13
|
+
"delimiter": "import {delimiter} from 'path'",
|
|
14
|
+
"win32": "import {win32} from 'path'",
|
|
15
|
+
"posix": "import {posix} from 'path'"
|
|
16
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"arch": "import {arch} from 'process'",
|
|
3
|
+
"platform": "import {platform} from 'process'",
|
|
4
|
+
"release": "import {release} from 'process'",
|
|
5
|
+
"moduleLoadList": "import {moduleLoadList} from 'process'",
|
|
6
|
+
"binding": "import {binding} from 'process'",
|
|
7
|
+
"domain": "import {domain} from 'process'",
|
|
8
|
+
"config": "import {config} from 'process'",
|
|
9
|
+
"dlopen": "import {dlopen} from 'process'",
|
|
10
|
+
"uptime": "import {uptime} from 'process'",
|
|
11
|
+
"reallyExit": "import {reallyExit} from 'process'",
|
|
12
|
+
"cpuUsage": "import {cpuUsage} from 'process'",
|
|
13
|
+
"resourceUsage": "import {resourceUsage} from 'process'",
|
|
14
|
+
"memoryUsage": "import {memoryUsage} from 'process'",
|
|
15
|
+
"kill": "import {kill} from 'process'",
|
|
16
|
+
"exit": "import {exit} from 'process'",
|
|
17
|
+
"openStdin": "import {openStdin} from 'process'",
|
|
18
|
+
"getuid": "import {getuid} from 'process'",
|
|
19
|
+
"geteuid": "import {geteuid} from 'process'",
|
|
20
|
+
"getgid": "import {getgid} from 'process'",
|
|
21
|
+
"getegid": "import {getegid} from 'process'",
|
|
22
|
+
"getgroups": "import {getgroups} from 'process'",
|
|
23
|
+
"allowedNodeEnvironmentFlags": "import {allowedNodeEnvironmentFlags} from 'process'",
|
|
24
|
+
"assert": "import {assert} from 'process'",
|
|
25
|
+
"features": "import {features} from 'process'",
|
|
26
|
+
"setUncaughtExceptionCaptureCallback": "import {setUncaughtExceptionCaptureCallback} from 'process'",
|
|
27
|
+
"hasUncaughtExceptionCaptureCallback": "import {hasUncaughtExceptionCaptureCallback} from 'process'",
|
|
28
|
+
"emitWarning": "import {emitWarning} from 'process'",
|
|
29
|
+
"nextTick": "import {nextTick} from 'process'",
|
|
30
|
+
"stdout": "import {stdout} from 'process'",
|
|
31
|
+
"stdin": "import {stdin} from 'process'",
|
|
32
|
+
"stderr": "import {stderr} from 'process'",
|
|
33
|
+
"abort": "import {abort} from 'process'",
|
|
34
|
+
"umask": "import {umask} from 'process'",
|
|
35
|
+
"chdir": "import {chdir} from 'process'",
|
|
36
|
+
"cwd": "import {cwd} from 'process'",
|
|
37
|
+
"initgroups": "import {initgroups} from 'process'",
|
|
38
|
+
"setgroups": "import {setgroups} from 'process'",
|
|
39
|
+
"setegid": "import {setegid} from 'process'",
|
|
40
|
+
"seteuid": "import {seteuid} from 'process'",
|
|
41
|
+
"setgid": "import {setgid} from 'process'",
|
|
42
|
+
"setuid": "import {setuid} from 'process'",
|
|
43
|
+
"title": "import {title} from 'process'",
|
|
44
|
+
"argv": "import {argv} from 'process'",
|
|
45
|
+
"execArgv": "import {execArgv} from 'process'",
|
|
46
|
+
"pid": "import {pid} from 'process'",
|
|
47
|
+
"ppid": "import {ppid} from 'process'",
|
|
48
|
+
"execPath": "import {execPath} from 'process'",
|
|
49
|
+
"debugPort": "import {debugPort} from 'process'",
|
|
50
|
+
"hrtime": "import {hrtime} from 'process'",
|
|
51
|
+
"argv0": "import {argv0} from 'process'",
|
|
52
|
+
"throwDeprecation": "import {throwDeprecation} from 'process'",
|
|
53
|
+
"setSourceMapsEnabled": "import {setSourceMapsEnabled} from 'process'",
|
|
54
|
+
"mainModule": "import {mainModule} from 'process'"
|
|
55
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"isDisturbed": "import {isDisturbed} from 'stream'",
|
|
3
|
+
"Readable": "import {Readable} from 'stream'",
|
|
4
|
+
"Writable": "import {Writable} from 'stream'",
|
|
5
|
+
"Duplex": "import {Duplex} from 'stream'",
|
|
6
|
+
"Transform": "import {Transform} from 'stream'",
|
|
7
|
+
"PassThrough": "import {PassThrough} from 'stream'",
|
|
8
|
+
"pipeline": "import {pipeline} from 'stream'",
|
|
9
|
+
"addAbortSignal": "import {addAbortSignal} from 'stream'",
|
|
10
|
+
"finished": "import {finished} from 'stream'",
|
|
11
|
+
"destroy": "import {destroy} from 'stream'",
|
|
12
|
+
"compose": "import {compose} from 'stream'",
|
|
13
|
+
"Stream": "import {Stream} from 'stream'"
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"domainToASCII": "import {domainToASCII} from 'url'",
|
|
3
|
+
"domainToUnicode": "import {domainToUnicode} from 'url'",
|
|
4
|
+
"pathToFileURL": "import {pathToFileURL} from 'url'",
|
|
5
|
+
"fileURLToPath": "import {fileURLToPath} from 'url'",
|
|
6
|
+
"urlToHttpOptions": "import {urlToHttpOptions} from 'url'"
|
|
7
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"callbackify": "import {callbackify} from 'util'",
|
|
3
|
+
"formatWithOptions": "import {formatWithOptions} from 'util'",
|
|
4
|
+
"getSystemErrorMap": "import {getSystemErrorMap} from 'util'",
|
|
5
|
+
"getSystemErrorName": "import {getSystemErrorName} from 'util'",
|
|
6
|
+
"inherits": "import {inherits} from 'util'",
|
|
7
|
+
"inspect": "import {inspect} from 'util'",
|
|
8
|
+
"isDeepStrictEqual": "import {isDeepStrictEqual} from 'util'",
|
|
9
|
+
"promisify": "import {promisify} from 'util'",
|
|
10
|
+
"stripVTControlCharacters": "import {stripVTControlCharacters} from 'util'",
|
|
11
|
+
"toUSVString": "import {toUSVString} from 'util'",
|
|
12
|
+
"TextDecoder": "import {TextDecoder} from 'util'",
|
|
13
|
+
"TextEncoder": "import {TextEncoder} from 'util'"
|
|
14
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Deflate": "import {Deflate} from 'zlib'",
|
|
3
|
+
"Inflate": "import {Inflate} from 'zlib'",
|
|
4
|
+
"Gzip": "import {Gzip} from 'zlib'",
|
|
5
|
+
"Gunzip": "import {Gunzip} from 'zlib'",
|
|
6
|
+
"DeflateRaw": "import {DeflateRaw} from 'zlib'",
|
|
7
|
+
"InflateRaw": "import {InflateRaw} from 'zlib'",
|
|
8
|
+
"Unzip": "import {Unzip} from 'zlib'",
|
|
9
|
+
"BrotliCompress": "import {BrotliCompress} from 'zlib'",
|
|
10
|
+
"BrotliDecompress": "import {BrotliDecompress} from 'zlib'",
|
|
11
|
+
"deflate": "import {deflate} from 'zlib'",
|
|
12
|
+
"deflateSync": "import {deflateSync} from 'zlib'",
|
|
13
|
+
"gzip": "import {gzip} from 'zlib'",
|
|
14
|
+
"gzipSync": "import {gzipSync} from 'zlib'",
|
|
15
|
+
"deflateRaw": "import {deflateRaw} from 'zlib'",
|
|
16
|
+
"deflateRawSync": "import {deflateRawSync} from 'zlib'",
|
|
17
|
+
"unzip": "import {unzip} from 'zlib'",
|
|
18
|
+
"unzipSync": "import {unzipSync} from 'zlib'",
|
|
19
|
+
"inflate": "import {inflate} from 'zlib'",
|
|
20
|
+
"inflateSync": "import {inflateSync} from 'zlib'",
|
|
21
|
+
"gunzip": "import {gunzip} from 'zlib'",
|
|
22
|
+
"gunzipSync": "import {gunzipSync} from 'zlib'",
|
|
23
|
+
"inflateRaw": "import {inflateRaw} from 'zlib'",
|
|
24
|
+
"inflateRawSync": "import {inflateRawSync} from 'zlib'",
|
|
25
|
+
"brotliCompress": "import {brotliCompress} from 'zlib'",
|
|
26
|
+
"brotliCompressSync": "import {brotliCompressSync} from 'zlib'",
|
|
27
|
+
"brotliDecompress": "import {brotliDecompress} from 'zlib'",
|
|
28
|
+
"brotliDecompressSync": "import {brotliDecompressSync} from 'zlib'",
|
|
29
|
+
"createDeflate": "import {createDeflate} from 'zlib'",
|
|
30
|
+
"createInflate": "import {createInflate} from 'zlib'",
|
|
31
|
+
"createDeflateRaw": "import {createDeflateRaw} from 'zlib'",
|
|
32
|
+
"createInflateRaw": "import {createInflateRaw} from 'zlib'",
|
|
33
|
+
"createGzip": "import {createGzip} from 'zlib'",
|
|
34
|
+
"createGunzip": "import {createGunzip} from 'zlib'",
|
|
35
|
+
"createUnzip": "import {createUnzip} from 'zlib'",
|
|
36
|
+
"createBrotliCompress": "import {createBrotliCompress} from 'zlib'",
|
|
37
|
+
"createBrotliDecompress": "import {createBrotliDecompress} from 'zlib'",
|
|
38
|
+
"constants": "import {constants} from 'zlib'",
|
|
39
|
+
"codes": "import {codes} from 'zlib'"
|
|
40
|
+
}
|
package/lib/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-nodejs",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "putout plugin adds ability to transform code to new API of Node.js",
|
|
@@ -35,17 +35,18 @@
|
|
|
35
35
|
"c8": "^7.5.0",
|
|
36
36
|
"eslint": "^8.0.1",
|
|
37
37
|
"eslint-plugin-node": "^11.0.0",
|
|
38
|
-
"eslint-plugin-putout": "^
|
|
38
|
+
"eslint-plugin-putout": "^14.0.0",
|
|
39
39
|
"lerna": "^4.0.0",
|
|
40
40
|
"madrun": "^9.0.0",
|
|
41
|
+
"montag": "^1.2.1",
|
|
41
42
|
"nodemon": "^2.0.1"
|
|
42
43
|
},
|
|
43
44
|
"peerDependencies": {
|
|
44
|
-
"putout": ">=
|
|
45
|
+
"putout": ">=25"
|
|
45
46
|
},
|
|
46
47
|
"license": "MIT",
|
|
47
48
|
"engines": {
|
|
48
|
-
"node": ">=
|
|
49
|
+
"node": ">=16"
|
|
49
50
|
},
|
|
50
51
|
"publishConfig": {
|
|
51
52
|
"access": "public"
|