@putout/plugin-nodejs 11.9.1 → 11.10.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 +26 -1
- package/lib/convert-esm-to-commonjs/index.js +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -15,7 +15,32 @@
|
|
|
15
15
|
npm i putout @putout/plugin-nodejs -D
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Rules
|
|
19
|
+
|
|
20
|
+
- ✅ [add-node-prefix][#add-node-prefix];
|
|
21
|
+
- ✅ [convert-buffer-to-buffer-alloc][#convert-buffer-to-buffer-alloc];
|
|
22
|
+
- ✅ [convert-commonjs-to-esm-commons][#convert-commonjs-to-esm-commons];
|
|
23
|
+
- ✅ [convert-commonjs-to-esm-exports][#convert-commonjs-to-esm-exports];
|
|
24
|
+
- ✅ [convert-commonjs-to-esm-require][#convert-commonjs-to-esm-require];
|
|
25
|
+
- ✅ [convert-commonjs-to-esm.js][#convert-commonjs-to-esm.js];
|
|
26
|
+
- ✅ [convert-dirname-to-url][#convert-dirname-to-url];
|
|
27
|
+
- ✅ [convert-esm-to-commonjs][#convert-esm-to-commonjs];
|
|
28
|
+
- ✅ [convert-exports-to-module-exports][#convert-exports-to-module-exports];
|
|
29
|
+
- ✅ [convert-fs-promises][#convert-fs-promises];
|
|
30
|
+
- ✅ [convert-promisify-to-fs-promises][#convert-promisify-to-fs-promises];
|
|
31
|
+
- ✅ [convert-top-level-return][#convert-top-level-return];
|
|
32
|
+
- ✅ [convert-url-to-dirname][#convert-url-to-dirname];
|
|
33
|
+
- ✅ [declare][#declare];
|
|
34
|
+
- ✅ [declare-after-require][#declare-after-require];
|
|
35
|
+
- ✅ [remove-process-exit][#remove-process-exit];
|
|
36
|
+
- ✅ [remove-useless-promisify][#remove-useless-promisify];
|
|
37
|
+
- ✅ [rename-file-cjs-to-js][#rename-file-cjs-to-js];
|
|
38
|
+
- ✅ [rename-file-mjs-to-js][#rename-file-mjs-to-js];
|
|
39
|
+
- ✅ [strict-mode][#strict-mode];
|
|
40
|
+
- ✅ [cjs-file][#cjs-file];
|
|
41
|
+
- ✅ [mjs-file][#mjs-file];
|
|
42
|
+
|
|
43
|
+
## Config
|
|
19
44
|
|
|
20
45
|
```json
|
|
21
46
|
{
|
|
@@ -7,7 +7,7 @@ module.exports.report = () => `Use 'CommonJS' instead of 'ESM'`;
|
|
|
7
7
|
|
|
8
8
|
module.exports.replace = () => ({
|
|
9
9
|
'export default __a': 'module.exports = __a',
|
|
10
|
-
'export class __a {}': 'module.exports.__a = class __a {}',
|
|
10
|
+
'export class __a {__body}': 'module.exports.__a = class __a {__body}',
|
|
11
11
|
'export function __a(__args) {}': replaceFn,
|
|
12
12
|
'export async function __a(__args) {}': replaceFn,
|
|
13
13
|
'export const __a = __b': 'module.exports.__a = __b',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@putout/plugin-nodejs",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.10.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",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"nodejs"
|
|
40
40
|
],
|
|
41
41
|
"devDependencies": {
|
|
42
|
+
"@putout/eslint-flat": "^2.0.0",
|
|
42
43
|
"@putout/plugin-declare": "*",
|
|
43
44
|
"@putout/plugin-putout": "*",
|
|
44
45
|
"@putout/plugin-typescript": "*",
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
},
|
|
58
59
|
"license": "MIT",
|
|
59
60
|
"engines": {
|
|
60
|
-
"node": ">=18"
|
|
61
|
+
"node": ">=18.6"
|
|
61
62
|
},
|
|
62
63
|
"publishConfig": {
|
|
63
64
|
"access": "public"
|