Add node modules and compiled JavaScript from main (#57)
Co-authored-by: Oliver King <oking3@uncc.edu>
This commit is contained in:
parent
d893f27da9
commit
7f7e5ba5ea
6750 changed files with 1745644 additions and 10860 deletions
21
node_modules/jest-resolve-dependencies/LICENSE
generated
vendored
Normal file
21
node_modules/jest-resolve-dependencies/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) Facebook, Inc. and its affiliates.
|
||||
|
||||
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.
|
30
node_modules/jest-resolve-dependencies/build/index.d.ts
generated
vendored
Normal file
30
node_modules/jest-resolve-dependencies/build/index.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,30 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
import type { Config } from '@jest/types';
|
||||
import type { FS as HasteFS } from 'jest-haste-map';
|
||||
import type { ResolveModuleConfig, ResolverType } from 'jest-resolve';
|
||||
import { SnapshotResolver } from 'jest-snapshot';
|
||||
declare namespace DependencyResolver {
|
||||
type ResolvedModule = {
|
||||
file: Config.Path;
|
||||
dependencies: Array<Config.Path>;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* DependencyResolver is used to resolve the direct dependencies of a module or
|
||||
* to retrieve a list of all transitive inverse dependencies.
|
||||
*/
|
||||
declare class DependencyResolver {
|
||||
private _hasteFS;
|
||||
private _resolver;
|
||||
private _snapshotResolver;
|
||||
constructor(resolver: ResolverType, hasteFS: HasteFS, snapshotResolver: SnapshotResolver);
|
||||
resolve(file: Config.Path, options?: ResolveModuleConfig): Array<Config.Path>;
|
||||
resolveInverseModuleMap(paths: Set<Config.Path>, filter: (file: Config.Path) => boolean, options?: ResolveModuleConfig): Array<DependencyResolver.ResolvedModule>;
|
||||
resolveInverse(paths: Set<Config.Path>, filter: (file: Config.Path) => boolean, options?: ResolveModuleConfig): Array<Config.Path>;
|
||||
}
|
||||
export = DependencyResolver;
|
158
node_modules/jest-resolve-dependencies/build/index.js
generated
vendored
Normal file
158
node_modules/jest-resolve-dependencies/build/index.js
generated
vendored
Normal file
|
@ -0,0 +1,158 @@
|
|||
'use strict';
|
||||
|
||||
function _jestSnapshot() {
|
||||
const data = require('jest-snapshot');
|
||||
|
||||
_jestSnapshot = function () {
|
||||
return data;
|
||||
};
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function _defineProperty(obj, key, value) {
|
||||
if (key in obj) {
|
||||
Object.defineProperty(obj, key, {
|
||||
value: value,
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
writable: true
|
||||
});
|
||||
} else {
|
||||
obj[key] = value;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* DependencyResolver is used to resolve the direct dependencies of a module or
|
||||
* to retrieve a list of all transitive inverse dependencies.
|
||||
*/
|
||||
|
||||
/* eslint-disable-next-line no-redeclare */
|
||||
class DependencyResolver {
|
||||
constructor(resolver, hasteFS, snapshotResolver) {
|
||||
_defineProperty(this, '_hasteFS', void 0);
|
||||
|
||||
_defineProperty(this, '_resolver', void 0);
|
||||
|
||||
_defineProperty(this, '_snapshotResolver', void 0);
|
||||
|
||||
this._resolver = resolver;
|
||||
this._hasteFS = hasteFS;
|
||||
this._snapshotResolver = snapshotResolver;
|
||||
}
|
||||
|
||||
resolve(file, options) {
|
||||
const dependencies = this._hasteFS.getDependencies(file);
|
||||
|
||||
if (!dependencies) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return dependencies.reduce((acc, dependency) => {
|
||||
if (this._resolver.isCoreModule(dependency)) {
|
||||
return acc;
|
||||
}
|
||||
|
||||
let resolvedDependency;
|
||||
|
||||
try {
|
||||
resolvedDependency = this._resolver.resolveModule(
|
||||
file,
|
||||
dependency,
|
||||
options
|
||||
);
|
||||
} catch {
|
||||
try {
|
||||
resolvedDependency = this._resolver.getMockModule(file, dependency);
|
||||
} catch {
|
||||
// leave resolvedDependency as undefined if nothing can be found
|
||||
}
|
||||
}
|
||||
|
||||
if (resolvedDependency) {
|
||||
acc.push(resolvedDependency);
|
||||
}
|
||||
|
||||
return acc;
|
||||
}, []);
|
||||
}
|
||||
|
||||
resolveInverseModuleMap(paths, filter, options) {
|
||||
if (!paths.size) {
|
||||
return [];
|
||||
}
|
||||
|
||||
const collectModules = (related, moduleMap, changed) => {
|
||||
const visitedModules = new Set();
|
||||
const result = [];
|
||||
|
||||
while (changed.size) {
|
||||
changed = new Set(
|
||||
moduleMap.reduce((acc, module) => {
|
||||
if (
|
||||
visitedModules.has(module.file) ||
|
||||
!module.dependencies.some(dep => changed.has(dep))
|
||||
) {
|
||||
return acc;
|
||||
}
|
||||
|
||||
const file = module.file;
|
||||
|
||||
if (filter(file)) {
|
||||
result.push(module);
|
||||
related.delete(file);
|
||||
}
|
||||
|
||||
visitedModules.add(file);
|
||||
acc.push(file);
|
||||
return acc;
|
||||
}, [])
|
||||
);
|
||||
}
|
||||
|
||||
return result.concat(
|
||||
Array.from(related).map(file => ({
|
||||
dependencies: [],
|
||||
file
|
||||
}))
|
||||
);
|
||||
};
|
||||
|
||||
const relatedPaths = new Set();
|
||||
const changed = new Set();
|
||||
|
||||
for (const path of paths) {
|
||||
if (this._hasteFS.exists(path)) {
|
||||
const modulePath = (0, _jestSnapshot().isSnapshotPath)(path)
|
||||
? this._snapshotResolver.resolveTestPath(path)
|
||||
: path;
|
||||
changed.add(modulePath);
|
||||
|
||||
if (filter(modulePath)) {
|
||||
relatedPaths.add(modulePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const modules = [];
|
||||
|
||||
for (const file of this._hasteFS.getAbsoluteFileIterator()) {
|
||||
modules.push({
|
||||
dependencies: this.resolve(file, options),
|
||||
file
|
||||
});
|
||||
}
|
||||
|
||||
return collectModules(relatedPaths, modules, changed);
|
||||
}
|
||||
|
||||
resolveInverse(paths, filter, options) {
|
||||
return this.resolveInverseModuleMap(paths, filter, options).map(
|
||||
module => module.file
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = DependencyResolver;
|
29
node_modules/jest-resolve-dependencies/package.json
generated
vendored
Normal file
29
node_modules/jest-resolve-dependencies/package.json
generated
vendored
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"name": "jest-resolve-dependencies",
|
||||
"version": "26.4.2",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/facebook/jest.git",
|
||||
"directory": "packages/jest-resolve-dependencies"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
"dependencies": {
|
||||
"@jest/types": "^26.3.0",
|
||||
"jest-regex-util": "^26.0.0",
|
||||
"jest-snapshot": "^26.4.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"jest-haste-map": "^26.3.0",
|
||||
"jest-resolve": "^26.4.0",
|
||||
"jest-runtime": "^26.4.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10.14.2"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"gitHead": "2586a798260886c28b6d28256cdfe354e039d5d1"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue