This commit is contained in:
Stephen Franceschelli 2019-07-30 13:41:05 -04:00
parent 596a6da241
commit c1a589c5b6
7078 changed files with 1882834 additions and 319 deletions

32
node_modules/jest-pnp-resolver/README.md generated vendored Normal file
View file

@ -0,0 +1,32 @@
# <img src="https://github.com/facebook/jest/blob/master/website/static/img/jest.png" height="40" align="right" /> [Plug'n'Play](https://github.com/yarnpkg/rfcs/pull/101) resolver for Jest
[![npm version](https://img.shields.io/npm/v/jest-pnp-resolver.svg)](https://www.npmjs.com/package/jest-pnp-resolver)
[![node version](https://img.shields.io/node/v/jest-pnp-resolver.svg)](https://www.npmjs.com/package/jest-pnp-resolver)
*This plugin is also available for Rollup ([rollup-plugin-pnp-resolve](https://github.com/arcanis/rollup-plugin-pnp-resolve)), TypeScript ([ts-pnp](https://github.com/arcanis/ts-pnp)), and Webpack ([pnp-webpack-plugin](https://github.com/arcanis/pnp-webpack-plugin))*
## Installation
```
yarn add -D jest-pnp-resolver
```
## Usage
Simply add the resolver to your configuration. For example, a minimal `jest.config.js` would be as such:
```js
module.exports = {
resolver: require.resolve(`jest-pnp-resolver`)
};
```
## License (MIT)
> **Copyright © 2016 Maël Nison**
>
> 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.

10
node_modules/jest-pnp-resolver/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,10 @@
type JestResolverOptions = {
basedir: string;
defaultResolver: (request: string, opts: any) => string,
extensions?: Array<string>,
};
export default function resolve(
request: string,
options: JestResolverOptions,
): string;

41
node_modules/jest-pnp-resolver/index.js generated vendored Normal file
View file

@ -0,0 +1,41 @@
let pnp;
try {
pnp = require(`pnpapi`);
} catch (error) {
// not in PnP; not a problem
}
let defaultResolver;
function requireDefaultResolver() {
if (!defaultResolver) {
try {
defaultResolver = require(`jest-resolve/build/defaultResolver`).default;
} catch (error) {
defaultResolver = require(`jest-resolve/build/default_resolver`).default;
}
}
return defaultResolver;
}
module.exports = (request, options) => {
const {basedir, defaultResolver, extensions} = options;
if (pnp) {
const resolution = pnp.resolveRequest(request, `${basedir}/`, {extensions});
// When the request is a native module, Jest expects to get the string back unmodified, but pnp returns null instead.
if (resolution === null)
return request;
return resolution;
} else {
if (!defaultResolver)
defaultResolver = requireDefaultResolver();
return defaultResolver(request, options);
}
};

56
node_modules/jest-pnp-resolver/package.json generated vendored Normal file
View file

@ -0,0 +1,56 @@
{
"_from": "jest-pnp-resolver@^1.2.1",
"_id": "jest-pnp-resolver@1.2.1",
"_inBundle": false,
"_integrity": "sha512-pgFw2tm54fzgYvc/OHrnysABEObZCUNFnhjoRjaVOCN8NYc032/gVjPaHD4Aq6ApkSieWtfKAFQtmDKAmhupnQ==",
"_location": "/jest-pnp-resolver",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "jest-pnp-resolver@^1.2.1",
"name": "jest-pnp-resolver",
"escapedName": "jest-pnp-resolver",
"rawSpec": "^1.2.1",
"saveSpec": null,
"fetchSpec": "^1.2.1"
},
"_requiredBy": [
"/jest-resolve"
],
"_resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.1.tgz",
"_shasum": "ecdae604c077a7fbc70defb6d517c3c1c898923a",
"_spec": "jest-pnp-resolver@^1.2.1",
"_where": "E:\\github\\setup-java\\node_modules\\jest-resolve",
"bugs": {
"url": "https://github.com/arcanis/jest-pnp-resolver/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "plug'n'play resolver for Webpack",
"engines": {
"node": ">=6"
},
"homepage": "https://github.com/arcanis/jest-pnp-resolver",
"keywords": [
"jest",
"yarn",
"plugnplay",
"pnp"
],
"license": "MIT",
"name": "jest-pnp-resolver",
"peerDependencies": {
"jest-resolve": "*"
},
"peerDependenciesMeta": {
"jest-resolve": {
"optional": true
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/arcanis/jest-pnp-resolver.git"
},
"version": "1.2.1"
}