Use husky

This commit is contained in:
Danny McCormick
2019-06-05 11:34:47 -04:00
parent d7b6952411
commit c3f0a8be66
6685 changed files with 919804 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
MIT License
For Jest software
Copyright (c) 2014-present, Facebook, Inc.
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.
+11
View File
@@ -0,0 +1,11 @@
/**
* 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 { CallSite } from 'callsites';
import { SourceMapRegistry } from './types';
declare const _default: (level: number, sourceMaps?: SourceMapRegistry | null | undefined) => CallSite;
export default _default;
//# sourceMappingURL=getCallsite.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"getCallsite.d.ts","sourceRoot":"","sources":["../src/getCallsite.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAkB,EAAC,QAAQ,EAAC,MAAM,WAAW,CAAC;AAE9C,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC;;AAsC1C,wBAgBE"}
+107
View File
@@ -0,0 +1,107 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
exports.default = void 0;
function _gracefulFs() {
const data = _interopRequireDefault(require('graceful-fs'));
_gracefulFs = function _gracefulFs() {
return data;
};
return data;
}
function _callsites() {
const data = _interopRequireDefault(require('callsites'));
_callsites = function _callsites() {
return data;
};
return data;
}
function _sourceMap() {
const data = require('source-map');
_sourceMap = function _sourceMap() {
return data;
};
return data;
}
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
/**
* 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.
*/
// Copied from https://github.com/rexxars/sourcemap-decorate-callsites/blob/5b9735a156964973a75dc62fd2c7f0c1975458e8/lib/index.js#L113-L158
const addSourceMapConsumer = (callsite, consumer) => {
const getLineNumber = callsite.getLineNumber;
const getColumnNumber = callsite.getColumnNumber;
let position = null;
function getPosition() {
if (!position) {
position = consumer.originalPositionFor({
column: getColumnNumber.call(callsite) || -1,
line: getLineNumber.call(callsite) || -1
});
}
return position;
}
Object.defineProperties(callsite, {
getColumnNumber: {
value() {
return getPosition().column || getColumnNumber.call(callsite);
},
writable: false
},
getLineNumber: {
value() {
return getPosition().line || getLineNumber.call(callsite);
},
writable: false
}
});
};
var _default = (level, sourceMaps) => {
const levelAfterThisCall = level + 1;
const stack = (0, _callsites().default)()[levelAfterThisCall];
const sourceMapFileName = sourceMaps && sourceMaps[stack.getFileName() || ''];
if (sourceMapFileName) {
try {
const sourceMap = _gracefulFs().default.readFileSync(
sourceMapFileName,
'utf8'
); // @ts-ignore: Not allowed to pass string
addSourceMapConsumer(
stack,
new (_sourceMap()).SourceMapConsumer(sourceMap)
);
} catch (e) {
// ignore
}
}
return stack;
};
exports.default = _default;
+9
View File
@@ -0,0 +1,9 @@
/**
* 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.
*/
export { default as getCallsite } from './getCallsite';
export { SourceMapRegistry } from './types';
//# sourceMappingURL=index.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,eAAe,CAAC;AACrD,OAAO,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAC"}
+25
View File
@@ -0,0 +1,25 @@
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
Object.defineProperty(exports, 'getCallsite', {
enumerable: true,
get: function get() {
return _getCallsite.default;
}
});
Object.defineProperty(exports, 'SourceMapRegistry', {
enumerable: true,
get: function get() {
return _types.SourceMapRegistry;
}
});
var _getCallsite = _interopRequireDefault(require('./getCallsite'));
var _types = require('./types');
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {default: obj};
}
+10
View File
@@ -0,0 +1,10 @@
/**
* 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.
*/
export declare type SourceMapRegistry = {
[key: string]: string;
};
//# sourceMappingURL=types.d.ts.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,oBAAY,iBAAiB,GAAG;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAC,CAAC"}
+1
View File
@@ -0,0 +1 @@
'use strict';
+63
View File
@@ -0,0 +1,63 @@
{
"_args": [
[
"@jest/source-map@24.3.0",
"C:\\Users\\damccorm\\Documents\\setup-node"
]
],
"_development": true,
"_from": "@jest/source-map@24.3.0",
"_id": "@jest/source-map@24.3.0",
"_inBundle": false,
"_integrity": "sha512-zALZt1t2ou8le/crCeeiRYzvdnTzaIlpOWaet45lNSqNJUnXbppUUFR4ZUAlzgDmKee4Q5P/tKXypI1RiHwgag==",
"_location": "/@jest/source-map",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@jest/source-map@24.3.0",
"name": "@jest/source-map",
"escapedName": "@jest%2fsource-map",
"scope": "@jest",
"rawSpec": "24.3.0",
"saveSpec": null,
"fetchSpec": "24.3.0"
},
"_requiredBy": [
"/@jest/console",
"/jest-runtime",
"/jest-util"
],
"_resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.3.0.tgz",
"_spec": "24.3.0",
"_where": "C:\\Users\\damccorm\\Documents\\setup-node",
"bugs": {
"url": "https://github.com/facebook/jest/issues"
},
"dependencies": {
"callsites": "^3.0.0",
"graceful-fs": "^4.1.15",
"source-map": "^0.6.0"
},
"devDependencies": {
"@types/graceful-fs": "^4.1.2"
},
"engines": {
"node": ">= 6"
},
"gitHead": "3a7a4f3a3f5489ac8e07dcddf76bb949c482ec87",
"homepage": "https://github.com/facebook/jest#readme",
"license": "MIT",
"main": "build/index.js",
"name": "@jest/source-map",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/facebook/jest.git",
"directory": "packages/jest-source-map"
},
"types": "build/index.d.ts",
"version": "24.3.0"
}
+7
View File
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"rootDir": "src",
"outDir": "build"
}
}