stuff
This commit is contained in:
18
buildfiles/node_modules/is-core-module/.eslintrc
generated
vendored
Normal file
18
buildfiles/node_modules/is-core-module/.eslintrc
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"extends": "@ljharb",
|
||||
"root": true,
|
||||
"rules": {
|
||||
"func-style": 1,
|
||||
"operator-linebreak": [2, "before"],
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": "test/**",
|
||||
"rules": {
|
||||
"global-require": 0,
|
||||
"max-lines-per-function": 0,
|
||||
"no-negated-condition": 0,
|
||||
},
|
||||
},
|
||||
],
|
||||
}
|
12
buildfiles/node_modules/is-core-module/.github/FUNDING.yml
generated
vendored
Normal file
12
buildfiles/node_modules/is-core-module/.github/FUNDING.yml
generated
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [ljharb]
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
tidelift: npm/is-core-module
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
15
buildfiles/node_modules/is-core-module/.github/workflows/rebase.yml
generated
vendored
Normal file
15
buildfiles/node_modules/is-core-module/.github/workflows/rebase.yml
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
name: Automatic Rebase
|
||||
|
||||
on: [pull_request_target]
|
||||
|
||||
jobs:
|
||||
_:
|
||||
name: "Automatic Rebase"
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: ljharb/rebase@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
14
buildfiles/node_modules/is-core-module/.github/workflows/require-allow-edits.yml
generated
vendored
Normal file
14
buildfiles/node_modules/is-core-module/.github/workflows/require-allow-edits.yml
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
name: Require “Allow Edits”
|
||||
|
||||
on: [pull_request_target]
|
||||
|
||||
jobs:
|
||||
_:
|
||||
name: "Require “Allow Edits”"
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: ljharb/require-allow-edits@main
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
15
buildfiles/node_modules/is-core-module/.travis.yml
generated
vendored
Normal file
15
buildfiles/node_modules/is-core-module/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
version: ~> 1.0
|
||||
language: node_js
|
||||
os:
|
||||
- linux
|
||||
import:
|
||||
- ljharb/travis-ci:node/all.yml
|
||||
- ljharb/travis-ci:node/pretest.yml
|
||||
- ljharb/travis-ci:node/posttest.yml
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- node_js: "0.7"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
||||
- node_js: "0.5"
|
||||
env: TEST=true ALLOW_FAILURE=true
|
48
buildfiles/node_modules/is-core-module/CHANGELOG.md
generated
vendored
Normal file
48
buildfiles/node_modules/is-core-module/CHANGELOG.md
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [v2.1.0](https://github.com/meandavejustice/is-core-module/compare/v2.0.0...v2.1.0) - 2020-11-04
|
||||
|
||||
### Commits
|
||||
|
||||
- [Dev Deps] update `eslint` [`5e0034e`](https://github.com/meandavejustice/is-core-module/commit/5e0034eae57c09c8f1bd769f502486a00f56c6e4)
|
||||
- [New] Add `diagnostics_channel` [`c2d83d0`](https://github.com/meandavejustice/is-core-module/commit/c2d83d0a0225a1a658945d9bab7036ea347d29ec)
|
||||
|
||||
## [v2.0.0](https://github.com/meandavejustice/is-core-module/compare/v1.0.2...v2.0.0) - 2020-09-29
|
||||
|
||||
### Commits
|
||||
|
||||
- v2 implementation [`865aeb5`](https://github.com/meandavejustice/is-core-module/commit/865aeb5ca0e90248a3dfff5d7622e4751fdeb9cd)
|
||||
- Only apps should have lockfiles [`5a5e660`](https://github.com/meandavejustice/is-core-module/commit/5a5e660d568e37eb44e17fb1ebb12a105205fc2b)
|
||||
- Initial commit for v2 [`5a51524`](https://github.com/meandavejustice/is-core-module/commit/5a51524e06f92adece5fbb138c69b7b9748a2348)
|
||||
- Tests [`116eae4`](https://github.com/meandavejustice/is-core-module/commit/116eae4fccd01bc72c1fd3cc4b7561c387afc496)
|
||||
- [meta] add `auto-changelog` [`c24388b`](https://github.com/meandavejustice/is-core-module/commit/c24388bee828d223040519d1f5b226ca35beee63)
|
||||
- [actions] add "Automatic Rebase" and "require allow edits" actions [`34292db`](https://github.com/meandavejustice/is-core-module/commit/34292dbcbadae0868aff03c22dbd8b7b8a11558a)
|
||||
- [Tests] add `npm run lint` [`4f9eeee`](https://github.com/meandavejustice/is-core-module/commit/4f9eeee7ddff10698bbf528620f4dc8d4fa3e697)
|
||||
- [readme] fix travis badges, https all URLs [`e516a73`](https://github.com/meandavejustice/is-core-module/commit/e516a73b0dccce20938c432b1ba512eae8eff9e9)
|
||||
- [meta] create FUNDING.yml [`1aabebc`](https://github.com/meandavejustice/is-core-module/commit/1aabebca98d01f8a04e46bc2e2520fa93cf21ac6)
|
||||
- [Fix] `domain`: domain landed sometime > v0.7.7 and <= v0.7.12 [`2df7d37`](https://github.com/meandavejustice/is-core-module/commit/2df7d37595d41b15eeada732b706b926c2771655)
|
||||
- [Fix] `sys`: worked in 0.6, not 0.7, and 0.8+ [`a75c134`](https://github.com/meandavejustice/is-core-module/commit/a75c134229e1e9441801f6b73f6a52489346eb65)
|
||||
|
||||
## [v1.0.2](https://github.com/meandavejustice/is-core-module/compare/v1.0.1...v1.0.2) - 2014-09-28
|
||||
|
||||
### Commits
|
||||
|
||||
- simpler [`66fe90f`](https://github.com/meandavejustice/is-core-module/commit/66fe90f9771581b9adc0c3900baa52c21b5baea2)
|
||||
|
||||
## [v1.0.1](https://github.com/meandavejustice/is-core-module/compare/v1.0.0...v1.0.1) - 2014-09-28
|
||||
|
||||
### Commits
|
||||
|
||||
- remove stupid [`f21f906`](https://github.com/meandavejustice/is-core-module/commit/f21f906f882c2bd656a5fc5ed6fbe48ddaffb2ac)
|
||||
- update readme [`1eff0ec`](https://github.com/meandavejustice/is-core-module/commit/1eff0ec69798d1ec65771552d1562911e90a8027)
|
||||
|
||||
## v1.0.0 - 2014-09-28
|
||||
|
||||
### Commits
|
||||
|
||||
- init [`48e5e76`](https://github.com/meandavejustice/is-core-module/commit/48e5e76cac378fddb8c1f7d4055b8dfc943d6b96)
|
20
buildfiles/node_modules/is-core-module/LICENSE
generated
vendored
Normal file
20
buildfiles/node_modules/is-core-module/LICENSE
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Dave Justice
|
||||
|
||||
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.
|
37
buildfiles/node_modules/is-core-module/README.md
generated
vendored
Normal file
37
buildfiles/node_modules/is-core-module/README.md
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
# is-core-module <sup>[![Version Badge][2]][1]</sup>
|
||||
|
||||
[![Build Status][3]][4]
|
||||
[![dependency status][5]][6]
|
||||
[![dev dependency status][7]][8]
|
||||
[![License][license-image]][license-url]
|
||||
[![Downloads][downloads-image]][downloads-url]
|
||||
|
||||
[![npm badge][11]][1]
|
||||
|
||||
Is this specifier a node.js core module? Optionally provide a node version to check; defaults to the current node version.
|
||||
|
||||
## Example
|
||||
|
||||
```js
|
||||
var isCore = require('is-core-module');
|
||||
var assert = require('assert');
|
||||
assert(isCore('fs'));
|
||||
assert(!isCore('butts'));
|
||||
```
|
||||
|
||||
## Tests
|
||||
Clone the repo, `npm install`, and run `npm test`
|
||||
|
||||
[1]: https://npmjs.org/package/is-core-module
|
||||
[2]: https://versionbadg.es/inspect-js/is-core-module.svg
|
||||
[3]: https://travis-ci.com/inspect-js/is-core-module.svg
|
||||
[4]: https://travis-ci.com/inspect-js/is-core-module
|
||||
[5]: https://david-dm.org/inspect-js/is-core-module.svg
|
||||
[6]: https://david-dm.org/inspect-js/is-core-module
|
||||
[7]: https://david-dm.org/inspect-js/is-core-module/dev-status.svg
|
||||
[8]: https://david-dm.org/inspect-js/is-core-module#info=devDependencies
|
||||
[11]: https://nodei.co/npm/is-core-module.png?downloads=true&stars=true
|
||||
[license-image]: https://img.shields.io/npm/l/is-core-module.svg
|
||||
[license-url]: LICENSE
|
||||
[downloads-image]: https://img.shields.io/npm/dm/is-core-module.svg
|
||||
[downloads-url]: https://npm-stat.com/charts.html?package=is-core-module
|
80
buildfiles/node_modules/is-core-module/core.json
generated
vendored
Normal file
80
buildfiles/node_modules/is-core-module/core.json
generated
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
{
|
||||
"assert": true,
|
||||
"assert/strict": ">= 15",
|
||||
"async_hooks": ">= 8",
|
||||
"buffer_ieee754": "< 0.9.7",
|
||||
"buffer": true,
|
||||
"child_process": true,
|
||||
"cluster": true,
|
||||
"console": true,
|
||||
"constants": true,
|
||||
"crypto": true,
|
||||
"_debug_agent": ">= 1 && < 8",
|
||||
"_debugger": "< 8",
|
||||
"dgram": true,
|
||||
"diagnostics_channel": ">= 15.1",
|
||||
"dns": true,
|
||||
"dns/promises": ">= 15",
|
||||
"domain": ">= 0.7.12",
|
||||
"events": true,
|
||||
"freelist": "< 6",
|
||||
"fs": true,
|
||||
"fs/promises": [">= 10 && < 10.1", ">= 14"],
|
||||
"_http_agent": ">= 0.11.1",
|
||||
"_http_client": ">= 0.11.1",
|
||||
"_http_common": ">= 0.11.1",
|
||||
"_http_incoming": ">= 0.11.1",
|
||||
"_http_outgoing": ">= 0.11.1",
|
||||
"_http_server": ">= 0.11.1",
|
||||
"http": true,
|
||||
"http2": ">= 8.8",
|
||||
"https": true,
|
||||
"inspector": ">= 8.0.0",
|
||||
"_linklist": "< 8",
|
||||
"module": true,
|
||||
"net": true,
|
||||
"node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
|
||||
"node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
|
||||
"node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
|
||||
"os": true,
|
||||
"path": true,
|
||||
"perf_hooks": ">= 8.5",
|
||||
"process": ">= 1",
|
||||
"punycode": true,
|
||||
"querystring": true,
|
||||
"readline": true,
|
||||
"repl": true,
|
||||
"smalloc": ">= 0.11.5 && < 3",
|
||||
"_stream_duplex": ">= 0.9.4",
|
||||
"_stream_transform": ">= 0.9.4",
|
||||
"_stream_wrap": ">= 1.4.1",
|
||||
"_stream_passthrough": ">= 0.9.4",
|
||||
"_stream_readable": ">= 0.9.4",
|
||||
"_stream_writable": ">= 0.9.4",
|
||||
"stream": true,
|
||||
"stream/promises": ">= 15",
|
||||
"string_decoder": true,
|
||||
"sys": [">= 0.6 && < 0.7", ">= 0.8"],
|
||||
"timers": true,
|
||||
"timers/promises": ">= 15",
|
||||
"_tls_common": ">= 0.11.13",
|
||||
"_tls_legacy": ">= 0.11.3 && < 10",
|
||||
"_tls_wrap": ">= 0.11.3",
|
||||
"tls": true,
|
||||
"trace_events": ">= 10",
|
||||
"tty": true,
|
||||
"url": true,
|
||||
"util": true,
|
||||
"v8/tools/arguments": ">= 10 && < 12",
|
||||
"v8/tools/codemap": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
|
||||
"v8/tools/consarray": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
|
||||
"v8/tools/csvparser": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
|
||||
"v8/tools/logreader": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
|
||||
"v8/tools/profile_view": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
|
||||
"v8/tools/splaytree": [">= 4.4.0 && < 5", ">= 5.2.0 && < 12"],
|
||||
"v8": ">= 1",
|
||||
"vm": true,
|
||||
"wasi": ">= 13.4 && < 13.5",
|
||||
"worker_threads": ">= 11.7",
|
||||
"zlib": true
|
||||
}
|
69
buildfiles/node_modules/is-core-module/index.js
generated
vendored
Normal file
69
buildfiles/node_modules/is-core-module/index.js
generated
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
'use strict';
|
||||
|
||||
var has = require('has');
|
||||
|
||||
function specifierIncluded(current, specifier) {
|
||||
var nodeParts = current.split('.');
|
||||
var parts = specifier.split(' ');
|
||||
var op = parts.length > 1 ? parts[0] : '=';
|
||||
var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
|
||||
|
||||
for (var i = 0; i < 3; ++i) {
|
||||
var cur = parseInt(nodeParts[i] || 0, 10);
|
||||
var ver = parseInt(versionParts[i] || 0, 10);
|
||||
if (cur === ver) {
|
||||
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
||||
}
|
||||
if (op === '<') {
|
||||
return cur < ver;
|
||||
}
|
||||
if (op === '>=') {
|
||||
return cur >= ver;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return op === '>=';
|
||||
}
|
||||
|
||||
function matchesRange(current, range) {
|
||||
var specifiers = range.split(/ ?&& ?/);
|
||||
if (specifiers.length === 0) {
|
||||
return false;
|
||||
}
|
||||
for (var i = 0; i < specifiers.length; ++i) {
|
||||
if (!specifierIncluded(current, specifiers[i])) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function versionIncluded(nodeVersion, specifierValue) {
|
||||
if (typeof specifierValue === 'boolean') {
|
||||
return specifierValue;
|
||||
}
|
||||
|
||||
var current = typeof nodeVersion === 'undefined'
|
||||
? process.versions && process.versions.node && process.versions.node
|
||||
: nodeVersion;
|
||||
|
||||
if (typeof current !== 'string') {
|
||||
throw new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required');
|
||||
}
|
||||
|
||||
if (specifierValue && typeof specifierValue === 'object') {
|
||||
for (var i = 0; i < specifierValue.length; ++i) {
|
||||
if (matchesRange(current, specifierValue[i])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return matchesRange(current, specifierValue);
|
||||
}
|
||||
|
||||
var data = require('./core.json');
|
||||
|
||||
module.exports = function isCore(x, nodeVersion) {
|
||||
return has(data, x) && versionIncluded(nodeVersion, data[x]);
|
||||
};
|
91
buildfiles/node_modules/is-core-module/package.json
generated
vendored
Normal file
91
buildfiles/node_modules/is-core-module/package.json
generated
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
{
|
||||
"_from": "is-core-module@^2.1.0",
|
||||
"_id": "is-core-module@2.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-YcV7BgVMRFRua2FqQzKtTDMz8iCuLEyGKjr70q8Zm1yy2qKcurbFEd79PAdHV77oL3NrAaOVQIbMmiHQCHB7ZA==",
|
||||
"_location": "/is-core-module",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "is-core-module@^2.1.0",
|
||||
"name": "is-core-module",
|
||||
"escapedName": "is-core-module",
|
||||
"rawSpec": "^2.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/resolve"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.1.0.tgz",
|
||||
"_shasum": "a4cc031d9b1aca63eecbd18a650e13cb4eeab946",
|
||||
"_spec": "is-core-module@^2.1.0",
|
||||
"_where": "/home/shihaam/www/freezer.shihaam.me/node_modules/resolve",
|
||||
"author": {
|
||||
"name": "Jordan Harband",
|
||||
"email": "ljharb@gmail.com"
|
||||
},
|
||||
"auto-changelog": {
|
||||
"output": "CHANGELOG.md",
|
||||
"template": "keepachangelog",
|
||||
"unreleased": false,
|
||||
"commitLimit": false,
|
||||
"backfillLimit": false,
|
||||
"hideCredit": true
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/inspect-js/is-core-module/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Is this specifier a node.js core module?",
|
||||
"devDependencies": {
|
||||
"@ljharb/eslint-config": "^17.2.0",
|
||||
"aud": "^1.1.2",
|
||||
"auto-changelog": "^2.2.1",
|
||||
"eslint": "^7.12.1",
|
||||
"tape": "^5.0.1"
|
||||
},
|
||||
"exports": {
|
||||
".": [
|
||||
{
|
||||
"default": "./index.js"
|
||||
},
|
||||
"./index.js"
|
||||
],
|
||||
"./package.json": "./package.json"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
},
|
||||
"homepage": "https://github.com/inspect-js/is-core-module",
|
||||
"keywords": [
|
||||
"core",
|
||||
"modules",
|
||||
"module",
|
||||
"npm",
|
||||
"node",
|
||||
"dependencies"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "is-core-module",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/inspect-js/is-core-module.git"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"posttest": "aud --production",
|
||||
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
|
||||
"pretest": "npm run lint",
|
||||
"test": "npm run tests-only",
|
||||
"tests-only": "tape test",
|
||||
"version": "auto-changelog && git add CHANGELOG.md"
|
||||
},
|
||||
"version": "2.1.0"
|
||||
}
|
83
buildfiles/node_modules/is-core-module/test/index.js
generated
vendored
Normal file
83
buildfiles/node_modules/is-core-module/test/index.js
generated
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
'use strict';
|
||||
|
||||
var test = require('tape');
|
||||
var keys = require('object-keys');
|
||||
var isCore = require('../');
|
||||
var data = require('../core.json');
|
||||
|
||||
test('core modules', function (t) {
|
||||
t.test('isCore()', function (st) {
|
||||
st.ok(isCore('fs'));
|
||||
st.ok(isCore('net'));
|
||||
st.ok(isCore('http'));
|
||||
|
||||
st.ok(!isCore('seq'));
|
||||
st.ok(!isCore('../'));
|
||||
|
||||
st.ok(!isCore('toString'));
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('core list', function (st) {
|
||||
var cores = keys(data);
|
||||
st.plan(cores.length);
|
||||
|
||||
for (var i = 0; i < cores.length; ++i) {
|
||||
var mod = cores[i];
|
||||
var requireFunc = function () { require(mod); }; // eslint-disable-line no-loop-func
|
||||
if (isCore(mod)) {
|
||||
st.doesNotThrow(requireFunc, mod + ' supported; requiring does not throw');
|
||||
} else {
|
||||
st['throws'](requireFunc, mod + ' not supported; requiring throws');
|
||||
}
|
||||
}
|
||||
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('core via repl module', { skip: !data.repl }, function (st) {
|
||||
var libs = require('repl')._builtinLibs; // eslint-disable-line no-underscore-dangle
|
||||
if (!libs) {
|
||||
st.skip('module.builtinModules does not exist');
|
||||
} else {
|
||||
for (var i = 0; i < libs.length; ++i) {
|
||||
var mod = libs[i];
|
||||
st.ok(data[mod], mod + ' is a core module');
|
||||
st.doesNotThrow(
|
||||
function () { require(mod); }, // eslint-disable-line no-loop-func
|
||||
'requiring ' + mod + ' does not throw'
|
||||
);
|
||||
}
|
||||
}
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.test('core via builtinModules list', { skip: !data.module }, function (st) {
|
||||
var libs = require('module').builtinModules;
|
||||
if (!libs) {
|
||||
st.skip('module.builtinModules does not exist');
|
||||
} else {
|
||||
var excludeList = [
|
||||
'_debug_agent',
|
||||
'v8/tools/tickprocessor-driver',
|
||||
'v8/tools/SourceMap',
|
||||
'v8/tools/tickprocessor',
|
||||
'v8/tools/profile'
|
||||
];
|
||||
for (var i = 0; i < libs.length; ++i) {
|
||||
var mod = libs[i];
|
||||
if (excludeList.indexOf(mod) === -1) {
|
||||
st.ok(data[mod], mod + ' is a core module');
|
||||
st.doesNotThrow(
|
||||
function () { require(mod); }, // eslint-disable-line no-loop-func
|
||||
'requiring ' + mod + ' does not throw'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
st.end();
|
||||
});
|
||||
|
||||
t.end();
|
||||
});
|
Reference in New Issue
Block a user