Updated the files.
This commit is contained in:
parent
1553e6b971
commit
753967d4f5
23418 changed files with 3784666 additions and 0 deletions
20
my-app/node_modules/builtins/License
generated
vendored
Executable file
20
my-app/node_modules/builtins/License
generated
vendored
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
Copyright (c) 2015 Julian Gruber <julian@juliangruber.com>
|
||||
|
||||
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:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
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.
|
||||
39
my-app/node_modules/builtins/Readme.md
generated
vendored
Executable file
39
my-app/node_modules/builtins/Readme.md
generated
vendored
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
# builtins
|
||||
|
||||
[](https://github.com/juliangruber/builtins/actions/workflows/ci.yml)
|
||||
|
||||
List of node.js [builtin modules](http://nodejs.org/api/).
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
const builtins = require('builtins')
|
||||
```
|
||||
|
||||
Get list of core modules for current Node.js version:
|
||||
|
||||
```js
|
||||
assert(builtins().includes('http'))
|
||||
```
|
||||
|
||||
Get list of core modules for specific Node.js version:
|
||||
|
||||
```js
|
||||
assert(builtins({ version: '6.0.0' }).includes('http'))
|
||||
```
|
||||
|
||||
Get list of core modules present in one or mode Node.js versions:
|
||||
|
||||
```js
|
||||
assert(builtins({ version: '*' }).includes('worker_threads'))
|
||||
```
|
||||
|
||||
Add experimental modules to the list:
|
||||
|
||||
```js
|
||||
assert(builtins({ experimental: true }).includes('wasi'))
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
80
my-app/node_modules/builtins/index.js
generated
vendored
Executable file
80
my-app/node_modules/builtins/index.js
generated
vendored
Executable file
|
|
@ -0,0 +1,80 @@
|
|||
'use strict'
|
||||
|
||||
const semver = require('semver')
|
||||
|
||||
const permanentModules = [
|
||||
'assert',
|
||||
'buffer',
|
||||
'child_process',
|
||||
'cluster',
|
||||
'console',
|
||||
'constants',
|
||||
'crypto',
|
||||
'dgram',
|
||||
'dns',
|
||||
'domain',
|
||||
'events',
|
||||
'fs',
|
||||
'http',
|
||||
'https',
|
||||
'module',
|
||||
'net',
|
||||
'os',
|
||||
'path',
|
||||
'punycode',
|
||||
'querystring',
|
||||
'readline',
|
||||
'repl',
|
||||
'stream',
|
||||
'string_decoder',
|
||||
'sys',
|
||||
'timers',
|
||||
'tls',
|
||||
'tty',
|
||||
'url',
|
||||
'util',
|
||||
'vm',
|
||||
'zlib'
|
||||
]
|
||||
|
||||
const versionLockedModules = {
|
||||
freelist: '<6.0.0',
|
||||
v8: '>=1.0.0',
|
||||
process: '>=1.1.0',
|
||||
inspector: '>=8.0.0',
|
||||
async_hooks: '>=8.1.0',
|
||||
http2: '>=8.4.0',
|
||||
perf_hooks: '>=8.5.0',
|
||||
trace_events: '>=10.0.0',
|
||||
worker_threads: '>=12.0.0',
|
||||
'node:test': '>=18.0.0'
|
||||
}
|
||||
|
||||
const experimentalModules = {
|
||||
worker_threads: '>=10.5.0',
|
||||
wasi: '>=12.16.0',
|
||||
diagnostics_channel: '^14.17.0 || >=15.1.0'
|
||||
}
|
||||
|
||||
module.exports = ({ version = process.version, experimental = false } = {}) => {
|
||||
const builtins = [...permanentModules]
|
||||
|
||||
for (const [name, semverRange] of Object.entries(versionLockedModules)) {
|
||||
if (version === '*' || semver.satisfies(version, semverRange)) {
|
||||
builtins.push(name)
|
||||
}
|
||||
}
|
||||
|
||||
if (experimental) {
|
||||
for (const [name, semverRange] of Object.entries(experimentalModules)) {
|
||||
if (
|
||||
!builtins.includes(name) &&
|
||||
(version === '*' || semver.satisfies(version, semverRange))
|
||||
) {
|
||||
builtins.push(name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return builtins
|
||||
}
|
||||
20
my-app/node_modules/builtins/package.json
generated
vendored
Executable file
20
my-app/node_modules/builtins/package.json
generated
vendored
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "builtins",
|
||||
"version": "5.0.1",
|
||||
"description": "List of node.js builtin modules",
|
||||
"repository": "juliangruber/builtins",
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"files": [],
|
||||
"scripts": {
|
||||
"test": "prettier-standard && standard && node-core-test"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": "^7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"node-core-test": "^1.4.0",
|
||||
"prettier-standard": "^15.0.1",
|
||||
"standard": "^14.3.4"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue