@putout/plugin-nodejs 17.7.0 → 18.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.
@@ -22,7 +22,6 @@ export default {
22
22
  getegid: `import {getegid} from 'node:process'`,
23
23
  getgroups: `import {getgroups} from 'node:process'`,
24
24
  allowedNodeEnvironmentFlags: `import {allowedNodeEnvironmentFlags} from 'node:process'`,
25
- assert: `import {assert} from 'node:process'`,
26
25
  features: `import {features} from 'node:process'`,
27
26
  setUncaughtExceptionCaptureCallback: `import {setUncaughtExceptionCaptureCallback} from 'node:process'`,
28
27
  hasUncaughtExceptionCaptureCallback: `import {hasUncaughtExceptionCaptureCallback} from 'node:process'`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@putout/plugin-nodejs",
3
- "version": "17.7.0",
3
+ "version": "18.0.0",
4
4
  "type": "module",
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",
@@ -48,15 +48,15 @@
48
48
  "@putout/plugin-typescript": "*",
49
49
  "@putout/test": "^14.0.0",
50
50
  "c8": "^10.0.0",
51
- "eslint": "^9.0.0",
51
+ "eslint": "v10.0.0-alpha.0",
52
52
  "eslint-plugin-n": "^17.0.0",
53
- "eslint-plugin-putout": "^28.0.0",
53
+ "eslint-plugin-putout": "^29.0.0",
54
54
  "madrun": "^11.0.0",
55
55
  "montag": "^1.2.1",
56
56
  "nodemon": "^3.0.1"
57
57
  },
58
58
  "peerDependencies": {
59
- "putout": ">=40"
59
+ "putout": ">=41"
60
60
  },
61
61
  "license": "MIT",
62
62
  "engines": {
@@ -1,33 +0,0 @@
1
- import process from 'node:process';
2
- import {writeFile} from 'node:fs/promises';
3
-
4
- const {keys} = Object;
5
- const [name, outputFile] = process.argv.slice(2);
6
-
7
- if (!name) {
8
- process.stdout.write('create-declare [name] [output]\n');
9
- process.exit(1);
10
- }
11
-
12
- const data = await import(`${name}/promises`);
13
- const result = {};
14
-
15
- for (const key of keys(data)) {
16
- if (key === 'promises')
17
- continue;
18
-
19
- if (key === 'default')
20
- continue;
21
-
22
- result[key] = `import {${key}} from 'node:${name}/promises'`;
23
- }
24
-
25
- const output = `export default ${JSON.stringify(result, null, 4) + '\n'}`;
26
-
27
- if (outputFile) {
28
- await writeFile(outputFile, output);
29
- process.stdout.write(`✅ ${name}: ${outputFile}: updated successfully\n`);
30
- process.exit(0);
31
- }
32
-
33
- process.stdout.write(output);