@putout/plugin-nodejs 4.3.0 → 4.4.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 +11 -10
- package/lib/declare/index.js +1 -0
- package/lib/declare/modules/events.json +12 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -129,16 +129,17 @@ process.exit();
|
|
|
129
129
|
|
|
130
130
|
Add declarations to built-in node.js modules:
|
|
131
131
|
|
|
132
|
-
- [child_process](https://nodejs.org/dist/latest-
|
|
133
|
-
- [
|
|
134
|
-
- [
|
|
135
|
-
- [
|
|
136
|
-
- [
|
|
137
|
-
- [
|
|
138
|
-
- [
|
|
139
|
-
- [
|
|
140
|
-
- [
|
|
141
|
-
- [
|
|
132
|
+
- [child_process](https://nodejs.org/dist/latest-v18.x/docs/api/child_process.html);
|
|
133
|
+
- [events](https://nodejs.org/dist/latest-v18.x/docs/api/events.html);
|
|
134
|
+
- [fs](https://nodejs.org/dist/latest-v18.x/docs/api/fs.html);
|
|
135
|
+
- [path](https://nodejs.org/dist/latest-v18.x/docs/api/path.html);
|
|
136
|
+
- [process](https://nodejs.org/dist/latest-v18.x/docs/api/process.html);
|
|
137
|
+
- [module](https://nodejs.org/dist/latest-v18.x/docs/api/module.html);
|
|
138
|
+
- [stream](https://nodejs.org/dist/latest-v18.x/docs/api/stream.html);
|
|
139
|
+
- [os](https://nodejs.org/dist/latest-v18.x/docs/api/os.html);
|
|
140
|
+
- [url](https://nodejs.org/dist/latest-v18.x/docs/api/url.html);
|
|
141
|
+
- [util](https://nodejs.org/dist/latest-v18.x/docs/api/util.html);
|
|
142
|
+
- [zlib](https://nodejs.org/dist/latest-v18.x/docs/api/zlib.html);
|
|
142
143
|
|
|
143
144
|
#### ❌ Example of incorrect code
|
|
144
145
|
|
package/lib/declare/index.js
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"once": "import {once} from 'events'",
|
|
3
|
+
"on": "import {on} from 'events'",
|
|
4
|
+
"getEventListeners": "import {getEventListeners} from 'events'",
|
|
5
|
+
"EventEmitter": "import {EventEmitter} from 'events'",
|
|
6
|
+
"captureRejectionSymbol": "import {captureRejectionSymbol} from 'events'",
|
|
7
|
+
"captureRejections": "import {captureRejections} from 'events'",
|
|
8
|
+
"EventEmitterAsyncResource": "import {EventEmitterAsyncResource} from 'events'",
|
|
9
|
+
"defaultMaxListeners": "import {defaultMaxListeners} from 'events'",
|
|
10
|
+
"setMaxListeners": "import {setMaxListeners} from 'events'",
|
|
11
|
+
"listenerCount": "import {listenerCount} from 'events'"
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-nodejs",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "🐊Putout plugin adds ability to transform code to new API of Node.js",
|
|
7
7
|
"homepage": "https://github.com/coderaiser/putout/tree/master/packages/plugin-nodejs#readme",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"release": false,
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"c8": "^7.5.0",
|
|
36
36
|
"eslint": "^8.0.1",
|
|
37
37
|
"eslint-plugin-node": "^11.0.0",
|
|
38
|
-
"eslint-plugin-putout": "^
|
|
39
|
-
"lerna": "^
|
|
38
|
+
"eslint-plugin-putout": "^15.0.0",
|
|
39
|
+
"lerna": "^5.0.0",
|
|
40
40
|
"madrun": "^9.0.0",
|
|
41
41
|
"montag": "^1.2.1",
|
|
42
42
|
"nodemon": "^2.0.1"
|