This commit is contained in:
David Kale
2020-09-08 13:25:36 -04:00
parent e4246d2b5b
commit 91fcbb0108
4227 changed files with 416837 additions and 457884 deletions

4
node_modules/jest-validate/LICENSE generated vendored
View File

@@ -1,8 +1,6 @@
MIT License
For Jest software
Copyright (c) 2014-present, Facebook, Inc.
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

View File

@@ -6,5 +6,5 @@
*/
export declare function getValues(validOption: any): any[];
export declare function validationCondition(option: any, validOption: any): boolean;
export declare function multipleValidOptions(...args: Array<any>): any[];
export declare function multipleValidOptions<T extends Array<any>>(...args: T): T[number];
//# sourceMappingURL=condition.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../src/condition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,wBAAgB,SAAS,CAAC,WAAW,EAAE,GAAG,SASzC;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,GAAG,OAAO,CAE1E;AAID,wBAAgB,oBAAoB,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,SAKvD"}
{"version":3,"file":"condition.d.ts","sourceRoot":"","sources":["../src/condition.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,wBAAgB,SAAS,CAAC,WAAW,EAAE,GAAG,SASzC;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,GAAG,OAAO,CAE1E;AAED,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,KAAK,CAAC,GAAG,CAAC,EACvD,GAAG,IAAI,EAAE,CAAC,GACT,CAAC,CAAC,MAAM,CAAC,CAKX"}

View File

@@ -38,8 +38,7 @@ function getValues(validOption) {
function validationCondition(option, validOption) {
return getValues(validOption).some(e => validationConditionSingle(option, e));
} // TODO: This should infer the types of its arguments, and return a union type of the types
// See https://github.com/Microsoft/TypeScript/issues/5453
}
function multipleValidOptions(...args) {
const options = [...args]; // @ts-ignore

View File

@@ -5,7 +5,5 @@
* LICENSE file in the root directory of this source tree.
*/
import { ValidationOptions } from './types';
export declare const deprecationWarning: (config: {
[key: string]: any;
}, option: string, deprecatedOptions: Record<string, Function>, options: ValidationOptions) => boolean;
export declare const deprecationWarning: (config: Record<string, any>, option: string, deprecatedOptions: Record<string, Function>, options: ValidationOptions) => boolean;
//# sourceMappingURL=deprecated.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../src/deprecated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAoB,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAW7D,eAAO,MAAM,kBAAkB;;sGAa9B,CAAC"}
{"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../src/deprecated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAoB,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAW7D,eAAO,MAAM,kBAAkB,mIAa9B,CAAC"}

View File

@@ -13,9 +13,7 @@ declare const _default: {
format: (value: any) => string;
logValidationWarning: (name: string, message: string, comment?: string | null | undefined) => void;
multipleValidOptions: typeof multipleValidOptions;
validate: (config: {
[key: string]: any;
}, options: import("./types").ValidationOptions) => {
validate: (config: Record<string, any>, options: import("./types").ValidationOptions) => {
hasDeprecationWarnings: boolean;
isValid: boolean;
};

View File

@@ -1 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;AAEjD,kBAQE"}
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAC,oBAAoB,EAAC,MAAM,aAAa,CAAC;;;;;;;;;;;;;AAEjD,kBAQE"}

View File

@@ -13,22 +13,14 @@ export declare type DeprecatedOptions = Record<string, Function>;
export declare type ValidationOptions = {
comment?: string;
condition?: (option: any, validOption: any) => boolean;
deprecate?: (config: {
[key: string]: any;
}, option: string, deprecatedOptions: DeprecatedOptions, options: ValidationOptions) => boolean;
deprecate?: (config: Record<string, any>, option: string, deprecatedOptions: DeprecatedOptions, options: ValidationOptions) => boolean;
deprecatedConfig?: DeprecatedOptions;
error?: (option: string, received: any, defaultValue: any, options: ValidationOptions, path?: Array<string>) => void;
exampleConfig: {
[key: string]: any;
};
exampleConfig: Record<string, any>;
recursive?: boolean;
recursiveBlacklist?: Array<string>;
title?: Title;
unknown?: (config: {
[key: string]: any;
}, exampleConfig: {
[key: string]: any;
}, option: string, options: ValidationOptions, path?: Array<string>) => void;
unknown?: (config: Record<string, any>, exampleConfig: Record<string, any>, option: string, options: ValidationOptions, path?: Array<string>) => void;
};
export {};
//# sourceMappingURL=types.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,aAAK,KAAK,GAAG;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAEzD,oBAAY,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,WA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,CAAC,CAAC;AAEzD,oBAAY,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,KAAK,OAAO,CAAC;IACvD,SAAS,CAAC,EAAE,CACV,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,iBAAiB,KACvB,OAAO,CAAC;IACb,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC,KAAK,CAAC,EAAE,CACN,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,GAAG,EACb,YAAY,EAAE,GAAG,EACjB,OAAO,EAAE,iBAAiB,EAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KACjB,IAAI,CAAC;IACV,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kBAAkB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,CACR,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAClC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,iBAAiB,EAC1B,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,KACjB,IAAI,CAAC;CACX,CAAC"}

View File

@@ -5,9 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/
import { ValidationOptions } from './types';
declare const validate: (config: {
[key: string]: any;
}, options: ValidationOptions) => {
declare const validate: (config: Record<string, any>, options: ValidationOptions) => {
hasDeprecationWarnings: boolean;
isValid: boolean;
};

View File

@@ -1 +1 @@
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAuE1C,QAAA,MAAM,QAAQ;;;;;CA0Bb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AA0F1C,QAAA,MAAM,QAAQ;;;CA0Bb,CAAC;AAEF,eAAe,QAAQ,CAAC"}

View File

@@ -7,6 +7,8 @@ exports.default = void 0;
var _defaultConfig = _interopRequireDefault(require('./defaultConfig'));
var _utils = require('./utils');
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
@@ -73,6 +75,21 @@ const _validate = (config, exampleConfig, options, path = []) => {
options
);
hasDeprecationWarnings = hasDeprecationWarnings || isDeprecatedKey;
} else if (allowsMultipleTypes(key)) {
const value = config[key];
if (
typeof options.condition === 'function' &&
typeof options.error === 'function'
) {
if (key === 'maxWorkers' && !isOfTypeStringOrNumber(value)) {
throw new _utils.ValidationError(
'Validation Error',
`${key} has to be of type string or number`,
`maxWorkers=50% or\nmaxWorkers=3`
);
}
}
} else if (Object.hasOwnProperty.call(exampleConfig, key)) {
if (
typeof options.condition === 'function' &&
@@ -105,6 +122,11 @@ const _validate = (config, exampleConfig, options, path = []) => {
};
};
const allowsMultipleTypes = key => key === 'maxWorkers';
const isOfTypeStringOrNumber = value =>
typeof value === 'number' || typeof value === 'string';
const validate = (config, options) => {
hasDeprecationWarnings = false; // Preserve default blacklist entries even with user-supplied blacklist

View File

@@ -5,9 +5,5 @@
* LICENSE file in the root directory of this source tree.
*/
import { ValidationOptions } from './types';
export declare const unknownOptionWarning: (config: {
[s: string]: any;
}, exampleConfig: {
[key: string]: any;
}, option: string, options: ValidationOptions, path?: string[] | undefined) => void;
export declare const unknownOptionWarning: (config: Record<string, any>, exampleConfig: Record<string, any>, option: string, options: ValidationOptions, path?: string[] | undefined) => void;
//# sourceMappingURL=warnings.d.ts.map

View File

@@ -1 +1 @@
{"version":3,"file":"warnings.d.ts","sourceRoot":"","sources":["../src/warnings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAQ1C,eAAO,MAAM,oBAAoB;;;;mFAsBhC,CAAC"}
{"version":3,"file":"warnings.d.ts","sourceRoot":"","sources":["../src/warnings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAQ1C,eAAO,MAAM,oBAAoB,oJAsBhC,CAAC"}

View File

@@ -1,26 +1,19 @@
{
"_args": [
[
"jest-validate@24.8.0",
"/Users/pjquirk/Source/GitHub/actions/labeler"
]
],
"_development": true,
"_from": "jest-validate@24.8.0",
"_id": "jest-validate@24.8.0",
"_from": "jest-validate@^24.9.0",
"_id": "jest-validate@24.9.0",
"_inBundle": false,
"_integrity": "sha512-+/N7VOEMW1Vzsrk3UWBDYTExTPwf68tavEPKDnJzrC6UlHtUDU/fuEdXqFoHzv9XnQ+zW6X3qMZhJ3YexfeLDA==",
"_integrity": "sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ==",
"_location": "/jest-validate",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "range",
"registry": true,
"raw": "jest-validate@24.8.0",
"raw": "jest-validate@^24.9.0",
"name": "jest-validate",
"escapedName": "jest-validate",
"rawSpec": "24.8.0",
"rawSpec": "^24.9.0",
"saveSpec": null,
"fetchSpec": "24.8.0"
"fetchSpec": "^24.9.0"
},
"_requiredBy": [
"/@jest/core",
@@ -28,29 +21,28 @@
"/jest-runtime",
"/jest/jest-cli"
],
"_resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.8.0.tgz",
"_spec": "24.8.0",
"_where": "/Users/pjquirk/Source/GitHub/actions/labeler",
"_resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.9.0.tgz",
"_shasum": "0775c55360d173cd854e40180756d4ff52def8ab",
"_spec": "jest-validate@^24.9.0",
"_where": "/Users/dakale/dev/GitHub/actions/labeler/node_modules/jest/node_modules/jest-cli",
"bugs": {
"url": "https://github.com/facebook/jest/issues"
},
"bundleDependencies": false,
"dependencies": {
"@jest/types": "^24.8.0",
"camelcase": "^5.0.0",
"@jest/types": "^24.9.0",
"camelcase": "^5.3.1",
"chalk": "^2.0.1",
"jest-get-type": "^24.8.0",
"leven": "^2.1.0",
"pretty-format": "^24.8.0"
"jest-get-type": "^24.9.0",
"leven": "^3.1.0",
"pretty-format": "^24.9.0"
},
"deprecated": false,
"description": "Generic configuration validation tool that helps you with warnings, errors and deprecation messages as well as showing users examples of correct configuration.",
"devDependencies": {
"@types/camelcase": "^4.1.0",
"@types/leven": "^2.1.1"
},
"engines": {
"node": ">= 6"
},
"gitHead": "845728f24b3ef41e450595c384e9b5c9fdf248a4",
"gitHead": "9ad0f4bc6b8bdd94989804226c28c9960d9da7d1",
"homepage": "https://github.com/facebook/jest#readme",
"license": "MIT",
"main": "build/index.js",
@@ -64,5 +56,5 @@
"directory": "packages/jest-validate"
},
"types": "build/index.d.ts",
"version": "24.8.0"
"version": "24.9.0"
}

View File

@@ -1,12 +0,0 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build"
},
"references": [
{"path": "../jest-get-type"},
{"path": "../jest-types"},
{"path": "../pretty-format"}
]
}

File diff suppressed because it is too large Load Diff