builtin-modules 1.0.1 → 3.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.
@@ -1,5 +1,6 @@
1
1
  [
2
2
  "assert",
3
+ "async_hooks",
3
4
  "buffer",
4
5
  "child_process",
5
6
  "cluster",
@@ -12,11 +13,15 @@
12
13
  "events",
13
14
  "fs",
14
15
  "http",
16
+ "http2",
15
17
  "https",
18
+ "inspector",
16
19
  "module",
17
20
  "net",
18
21
  "os",
19
22
  "path",
23
+ "perf_hooks",
24
+ "process",
20
25
  "punycode",
21
26
  "querystring",
22
27
  "readline",
@@ -25,9 +30,11 @@
25
30
  "string_decoder",
26
31
  "timers",
27
32
  "tls",
33
+ "trace_events",
28
34
  "tty",
29
35
  "url",
30
36
  "util",
37
+ "v8",
31
38
  "vm",
32
39
  "zlib"
33
40
  ]
package/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
+ const {builtinModules} = require('module');
2
3
 
3
- var blacklist = [
4
- 'freelist',
4
+ const blacklist = [
5
5
  'sys'
6
6
  ];
7
7
 
8
- module.exports = Object.keys(process.binding('natives')).filter(function (el) {
9
- return !/^_|^internal/.test(el) && blacklist.indexOf(el) === -1;
10
- }).sort();
8
+ module.exports = (builtinModules || Object.keys(process.binding('natives')))
9
+ .filter(x => !/^_|^(internal|v8|node-inspect)\/|\//.test(x) && !blacklist.includes(x))
10
+ .sort();
package/license CHANGED
@@ -1,21 +1,9 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
3
  Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11
6
 
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
14
8
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/package.json CHANGED
@@ -1,39 +1,40 @@
1
1
  {
2
- "name": "builtin-modules",
3
- "version": "1.0.1",
4
- "description": "List of the Node.js builtin modules",
5
- "license": "MIT",
6
- "repository": "sindresorhus/builtin-modules",
7
- "author": {
8
- "name": "Sindre Sorhus",
9
- "email": "sindresorhus@gmail.com",
10
- "url": "sindresorhus.com"
11
- },
12
- "engines": {
13
- "node": ">=0.10.0"
14
- },
15
- "scripts": {
16
- "test": "node test.js",
17
- "make": "node make.js"
18
- },
19
- "files": [
20
- "index.js",
21
- "static.js",
22
- "builtin-modules.json"
23
- ],
24
- "keywords": [
25
- "builtin",
26
- "built-in",
27
- "builtins",
28
- "node",
29
- "modules",
30
- "core",
31
- "bundled",
32
- "list",
33
- "array",
34
- "names"
35
- ],
36
- "devDependencies": {
37
- "ava": "0.0.4"
38
- }
2
+ "name": "builtin-modules",
3
+ "version": "3.0.0",
4
+ "description": "List of the Node.js builtin modules",
5
+ "license": "MIT",
6
+ "repository": "sindresorhus/builtin-modules",
7
+ "author": {
8
+ "name": "Sindre Sorhus",
9
+ "email": "sindresorhus@gmail.com",
10
+ "url": "sindresorhus.com"
11
+ },
12
+ "engines": {
13
+ "node": ">=6"
14
+ },
15
+ "scripts": {
16
+ "test": "xo && ava",
17
+ "make": "node make.js"
18
+ },
19
+ "files": [
20
+ "index.js",
21
+ "static.js",
22
+ "builtin-modules.json"
23
+ ],
24
+ "keywords": [
25
+ "builtin",
26
+ "built-in",
27
+ "builtins",
28
+ "node",
29
+ "modules",
30
+ "core",
31
+ "bundled",
32
+ "list",
33
+ "array",
34
+ "names"
35
+ ],
36
+ "devDependencies": {
37
+ "ava": "*",
38
+ "xo": "*"
39
+ }
39
40
  }
package/readme.md CHANGED
@@ -8,16 +8,16 @@ The list is just a [JSON file](builtin-modules.json) and can be used wherever.
8
8
  ## Install
9
9
 
10
10
  ```
11
- $ npm install --save builtin-modules
11
+ $ npm install builtin-modules
12
12
  ```
13
13
 
14
14
 
15
15
  ## Usage
16
16
 
17
17
  ```js
18
- var builtinModules = require('builtin-modules');
18
+ const builtinModules = require('builtin-modules');
19
19
 
20
- console.log(builinModules);
20
+ console.log(builtinModules);
21
21
  //=> ['assert', 'buffer', ...]
22
22
  ```
23
23
 
@@ -38,4 +38,4 @@ This module also comes bundled with a static array of builtin modules generated
38
38
 
39
39
  ## License
40
40
 
41
- MIT © [Sindre Sorhus](http://sindresorhus.com)
41
+ MIT © [Sindre Sorhus](https://sindresorhus.com)
package/static.js CHANGED
@@ -1,2 +1,2 @@
1
1
  'use strict';
2
- module.exports = require('./builtin-modules.json');
2
+ module.exports = require('./builtin-modules');