builtin-modules 3.0.0 → 3.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/index.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ /**
2
+ List of the Node.js builtin modules.
3
+
4
+ @example
5
+ ```
6
+ import builtinModules = require('builtin-modules');
7
+
8
+ console.log(builtinModules);
9
+ //=> ['assert', 'buffer', …]
10
+ ```
11
+ */
12
+ declare const builtinModules: readonly string[];
13
+
14
+ export = builtinModules;
package/index.js CHANGED
@@ -5,6 +5,7 @@ const blacklist = [
5
5
  'sys'
6
6
  ];
7
7
 
8
+ // eslint-disable-next-line node/no-deprecated-api
8
9
  module.exports = (builtinModules || Object.keys(process.binding('natives')))
9
10
  .filter(x => !/^_|^(internal|v8|node-inspect)\/|\//.test(x) && !blacklist.includes(x))
10
11
  .sort();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "builtin-modules",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "List of the Node.js builtin modules",
5
5
  "license": "MIT",
6
6
  "repository": "sindresorhus/builtin-modules",
@@ -13,12 +13,14 @@
13
13
  "node": ">=6"
14
14
  },
15
15
  "scripts": {
16
- "test": "xo && ava",
16
+ "test": "xo && ava && tsd",
17
17
  "make": "node make.js"
18
18
  },
19
19
  "files": [
20
20
  "index.js",
21
+ "index.d.ts",
21
22
  "static.js",
23
+ "static.d.ts",
22
24
  "builtin-modules.json"
23
25
  ],
24
26
  "keywords": [
@@ -34,7 +36,8 @@
34
36
  "names"
35
37
  ],
36
38
  "devDependencies": {
37
- "ava": "*",
38
- "xo": "*"
39
+ "ava": "^1.4.1",
40
+ "tsd": "^0.7.2",
41
+ "xo": "^0.24.0"
39
42
  }
40
43
  }
package/static.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ /**
2
+ Static list of the Node.js builtin modules.
3
+
4
+ @example
5
+ ```
6
+ import builtinModulesStatic = require('builtin-modules/static');
7
+
8
+ console.log(builtinModulesStatic);
9
+ //=> ['assert', 'buffer', …]
10
+ ```
11
+ */
12
+ declare const builtinModulesStatic: readonly string[];
13
+
14
+ export = builtinModulesStatic;