From 8cdf5545b67de07d15631fea991b4fa04fed94c8 Mon Sep 17 00:00:00 2001 From: Julian Coy Date: Sat, 30 Jan 2021 04:55:12 -0500 Subject: [PATCH 1/7] refactor(typescript): upgrade to typescript 4.1, use latest TS to simplify and generalize types --- package-lock.json | 22 +- package.json | 4 +- src/index.d.ts | 1015 ++------------------------------------- typescript_test/test.ts | 69 +-- 4 files changed, 104 insertions(+), 1006 deletions(-) diff --git a/package-lock.json b/package-lock.json index d03f681d6..f30a19bee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6339,18 +6339,26 @@ "dev": true }, "typescript": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", - "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.3.tgz", + "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==", "dev": true }, "typings-tester": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/typings-tester/-/typings-tester-0.2.2.tgz", - "integrity": "sha1-Vkd8Yo2zGBCO44AO32V6/jPy9E8=", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/typings-tester/-/typings-tester-0.3.2.tgz", + "integrity": "sha512-HjGoAM2UoGhmSKKy23TYEKkxlphdJFdix5VvqWFLzH1BJVnnwG38tpC6SXPgqhfFGfHY77RlN1K8ts0dbWBQ7A==", "dev": true, "requires": { - "commander": "^2.9.0" + "commander": "^2.12.2" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } } }, "uglify-js": { diff --git a/package.json b/package.json index e6e7e241a..866f2ed8d 100644 --- a/package.json +++ b/package.json @@ -96,8 +96,8 @@ "mocha": "^2.2.5", "ncp": "^2.0.0", "nyc": "^6.4.0", - "typescript": "^2.9.2", - "typings-tester": "^0.2.0", + "typescript": "^4.1.3", + "typings-tester": "^0.3.2", "uglify-js": "^3.0.20" } } diff --git a/src/index.d.ts b/src/index.d.ts index 5a2cf4301..3677de3e3 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,966 +1,52 @@ export as namespace Reselect; -export type Selector = (state: S) => R; - -export type OutputSelector = Selector & { - resultFunc: C; - recomputations: () => number; - resetRecomputations: () => number; -} - -export type ParametricSelector = (state: S, props: P, ...args: any[]) => R; - -export type OutputParametricSelector = ParametricSelector & { - resultFunc: C; +export type Selector = (state: S, ...params: P) => R; +export type OutputSelector = Selector, Result, Params> & { + resultFunc: Combiner; recomputations: () => number; resetRecomputations: () => number; -} - -/* homogeneous selector parameter types */ - -/* one selector */ -export function createSelector( - selector: Selector, - combiner: (res: R1) => T, -): OutputSelector T>; -export function createSelector( - selector: ParametricSelector, - combiner: (res: R1) => T, -): OutputParametricSelector T>; - -/* two selectors */ -export function createSelector( - selector1: Selector, - selector2: Selector, - combiner: (res1: R1, res2: R2) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - combiner: (res1: R1, res2: R2) => T, -): OutputParametricSelector T>; - -/* three selectors */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - combiner: (res1: R1, res2: R2, res3: R3) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3) => T, -): OutputParametricSelector T>; - -/* four selectors */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4) => T, -): OutputParametricSelector T>; - -/* five selectors */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5) => T, -): OutputParametricSelector T>; - -/* six selectors */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6) => T, -): OutputParametricSelector T>; - -/* seven selectors */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - selector7: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - selector7: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7) => T, -): OutputParametricSelector T>; - -/* eight selectors */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - selector7: Selector, - selector8: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - selector7: ParametricSelector, - selector8: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8) => T, -): OutputParametricSelector T>; - -/* nine selectors */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - selector7: Selector, - selector8: Selector, - selector9: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - selector7: ParametricSelector, - selector8: ParametricSelector, - selector9: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9) => T, -): OutputParametricSelector T>; - -/* ten selectors */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - selector7: Selector, - selector8: Selector, - selector9: Selector, - selector10: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9, res10: R10) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - selector7: ParametricSelector, - selector8: ParametricSelector, - selector9: ParametricSelector, - selector10: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9, res10: R10) => T, -): OutputParametricSelector T>; - -/* eleven selectors */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - selector7: Selector, - selector8: Selector, - selector9: Selector, - selector10: Selector, - selector11: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9, res10: R10, res11: R11) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - selector7: ParametricSelector, - selector8: ParametricSelector, - selector9: ParametricSelector, - selector10: ParametricSelector, - selector11: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9, res10: R10, res11: R11) => T, -): OutputParametricSelector T>; - -/* twelve selectors */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - selector7: Selector, - selector8: Selector, - selector9: Selector, - selector10: Selector, - selector11: Selector, - selector12: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9, res10: R10, res11: R11, res12: R12) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - selector7: ParametricSelector, - selector8: ParametricSelector, - selector9: ParametricSelector, - selector10: ParametricSelector, - selector11: ParametricSelector, - selector12: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9, res10: R10, res11: R11, res12: R12) => T, -): OutputParametricSelector T>; - - -/* array argument */ - -/* one selector */ -export function createSelector( - selectors: [Selector], - combiner: (res: R1) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector], - combiner: (res: R1) => T, -): OutputParametricSelector T>; - -/* two selectors */ -export function createSelector( - selectors: [Selector, - Selector], - combiner: (res1: R1, res2: R2) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, - ParametricSelector], - combiner: (res1: R1, res2: R2) => T, -): OutputParametricSelector T>; - -/* three selectors */ -export function createSelector( - selectors: [Selector, - Selector, - Selector], - combiner: (res1: R1, res2: R2, res3: R3) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, - ParametricSelector, - ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3) => T, -): OutputParametricSelector T>; - -/* four selectors */ -export function createSelector( - selectors: [Selector, - Selector, - Selector, - Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4) => T, -): OutputParametricSelector T>; - -/* five selectors */ -export function createSelector( - selectors: [Selector, - Selector, - Selector, - Selector, - Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5) => T, -): OutputParametricSelector T>; - -/* six selectors */ -export function createSelector( - selectors: [Selector, - Selector, - Selector, - Selector, - Selector, - Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6) => T, -): OutputParametricSelector T>; - -/* seven selectors */ -export function createSelector( - selectors: [Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7) => T, -): OutputParametricSelector T>; - -/* eight selectors */ -export function createSelector( - selectors: [Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8) => T, -): OutputParametricSelector T>; - -/* nine selectors */ -export function createSelector( - selectors: [Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9) => T, -): OutputParametricSelector T>; - -/* ten selectors */ -export function createSelector( - selectors: [Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9, res10: R10) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9, res10: R10) => T, -): OutputParametricSelector T>; - -/* eleven selectors */ -export function createSelector( - selectors: [Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9, res10: R10, res11: R11) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9, res10: R10, res11: R11) => T, -): OutputParametricSelector T>; - -/* twelve selectors */ -export function createSelector( - selectors: [Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector, - Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9, res10: R10, res11: R11, res12: R12) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector, - ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, - res7: R7, res8: R8, res9: R9, res10: R10, res11: R11, res12: R12) => T, -): OutputParametricSelector T>; - -/* heterogeneous selector parameter types */ - -/* one selector */ -export function createSelector( - selector1: Selector, - combiner: (res1: R1) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - combiner: (res1: R1) => T, -): OutputParametricSelector T>; - -/* two selector */ -export function createSelector( - selector1: Selector, - selector2: Selector, - combiner: (res1: R1, res2: R2) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - combiner: (res1: R1, res2: R2) => T, -): OutputParametricSelector T>; - -/* three selector */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - combiner: (res1: R1, res2: R2, res3: R3) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3) => T, -): OutputParametricSelector T>; - -/* four selector */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4) => T, -): OutputParametricSelector T>; - -/* five selector */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5) => T, -): OutputParametricSelector T>; - -/* six selector */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6) => T, -): OutputParametricSelector T>; - -/* seven selector */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - selector7: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - selector7: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7) => T, -): OutputParametricSelector T>; - -/* eight selector */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - selector7: Selector, - selector8: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - selector7: ParametricSelector, - selector8: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8) => T, -): OutputParametricSelector T>; - -/* nine selector */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - selector7: Selector, - selector8: Selector, - selector9: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - selector7: ParametricSelector, - selector8: ParametricSelector, - selector9: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9) => T, -): OutputParametricSelector T>; - -/* ten selector */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - selector7: Selector, - selector8: Selector, - selector9: Selector, - selector10: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9, res10: R10) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - selector7: ParametricSelector, - selector8: ParametricSelector, - selector9: ParametricSelector, - selector10: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9, res10: R10) => T, -): OutputParametricSelector T>; - -/* eleven selector */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - selector7: Selector, - selector8: Selector, - selector9: Selector, - selector10: Selector, - selector11: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9, res10: R10, res11: R11) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - selector7: ParametricSelector, - selector8: ParametricSelector, - selector9: ParametricSelector, - selector10: ParametricSelector, - selector11: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9, res10: R10, res11: R11) => T, -): OutputParametricSelector T>; - -/* twelve selector */ -export function createSelector( - selector1: Selector, - selector2: Selector, - selector3: Selector, - selector4: Selector, - selector5: Selector, - selector6: Selector, - selector7: Selector, - selector8: Selector, - selector9: Selector, - selector10: Selector, - selector11: Selector, - selector12: Selector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9, res10: R10, res11: R11, res12: R12) => T, -): OutputSelector T>; -export function createSelector( - selector1: ParametricSelector, - selector2: ParametricSelector, - selector3: ParametricSelector, - selector4: ParametricSelector, - selector5: ParametricSelector, - selector6: ParametricSelector, - selector7: ParametricSelector, - selector8: ParametricSelector, - selector9: ParametricSelector, - selector10: ParametricSelector, - selector11: ParametricSelector, - selector12: ParametricSelector, - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9, res10: R10, res11: R11, res12: R12) => T, -): OutputParametricSelector T>; - - - -/* array argument */ - - -/* one selector */ -export function createSelector( - selectors: [Selector], - combiner: (res1: R1) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector], - combiner: (res1: R1) => T, -): OutputParametricSelector T>; - -/* two selector */ -export function createSelector( - selectors: [Selector, Selector], - combiner: (res1: R1, res2: R2) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, ParametricSelector], - combiner: (res1: R1, res2: R2) => T, -): OutputParametricSelector T>; - -/* three selector */ -export function createSelector( - selectors: [Selector, Selector, Selector], - combiner: (res1: R1, res2: R2, res3: R3) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, ParametricSelector, ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3) => T, -): OutputParametricSelector T>; - -/* four selector */ -export function createSelector( - selectors: [Selector, Selector, Selector, Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4) => T, -): OutputParametricSelector T>; - -/* five selector */ -export function createSelector( - selectors: [Selector, Selector, Selector, Selector, Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5) => T, -): OutputParametricSelector T>; - -/* six selector */ -export function createSelector( - selectors: [Selector, Selector, Selector, Selector, Selector, Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6) => T, -): OutputParametricSelector T>; - -/* seven selector */ -export function createSelector( - selectors: [Selector, Selector, Selector, Selector, Selector, Selector, Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7) => T, -): OutputParametricSelector T>; - -/* eight selector */ -export function createSelector( - selectors: [Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8) => T, -): OutputParametricSelector T>; - -/* nine selector */ -export function createSelector( - selectors: [Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9) => T, -): OutputParametricSelector T>; - -/* ten selector */ -export function createSelector( - selectors: [Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9, res10: R10) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9, res10: R10) => T, -): OutputParametricSelector T>; - -/* eleven selector */ -export function createSelector( - selectors: [Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9, res10: R10, res11: R11) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9, res10: R10, res11: R11) => T, -): OutputParametricSelector T>; - -/* twelve selector */ -export function createSelector( - selectors: [Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector, Selector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9, res10: R10, res11: R11, res12: R12) => T, -): OutputSelector T>; -export function createSelector( - selectors: [ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector, ParametricSelector], - combiner: (res1: R1, res2: R2, res3: R3, res4: R4, res5: R5, res6: R6, res7: R7, res8: R8, res9: R9, res10: R10, res11: R11, res12: R12) => T, -): OutputParametricSelector T>; - -/* any number of uniform selectors */ -export function createSelector( - selectors: Selector[], - combiner: (...res: R[]) => T, -): OutputSelector T>; -export function createSelector( - selectors: ParametricSelector[], - combiner: (...res: R[]) => T, -): OutputParametricSelector T>; +}; + +type SelectorArray = ReadonlyArray + +type GetStateFromSelector = S extends Selector ? State : never; +type GetStateFromSelectors = + S extends [infer Current, ...infer Other] + ? Current extends Selector + ? Other extends SelectorArray + ? GetStateFromSelector | GetStateFromSelectors + : GetStateFromSelector + : never + : S extends (infer Elem)[] ? GetStateFromSelector : never; + +type GetParamsFromSelector = S extends Selector ? P extends [] ? never : P : never; +type GetParamsFromSelectors = S extends SelectorArray + ? S extends (infer s)[] + ? GetParamsFromSelector + : S extends [infer Current, ...infer Rest] + ? GetParamsFromSelector extends [] + ? GetParamsFromSelectors + : GetParamsFromSelector + : S + : Found; + +type SelectorResultArray = + Rest extends [infer S, ...infer Remaining] + ? S extends Selector + ? Remaining extends SelectorArray + ? [ReturnType, ...SelectorResultArray] + : [ReturnType] + : [] + : Rest extends ((...args: any) => infer S)[] ? S[] : []; + +export function createSelector( + ...items: [...Selectors, (...args: SelectorResultArray) => Result] +): OutputSelector, (...args: SelectorResultArray) => Result>; + +export function createSelector( + selectors: [...Selectors], + combiner: (...args: SelectorResultArray) => Result, +): OutputSelector, (...args: SelectorResultArray) => Result>; export function defaultMemoize( func: F, equalityCheck?: (a: T, b: T, index: number) => boolean, @@ -996,12 +82,7 @@ export function createSelectorCreator( ...rest: any[], ): typeof createSelector; -export function createStructuredSelector( - selectors: {[K in keyof T]: Selector}, - selectorCreator?: typeof createSelector, -): Selector; - -export function createStructuredSelector( - selectors: {[K in keyof T]: ParametricSelector}, +export function createStructuredSelector( + selectors: {[K in keyof Result]: Selector}, selectorCreator?: typeof createSelector, -): ParametricSelector; +): Selector; diff --git a/typescript_test/test.ts b/typescript_test/test.ts index de7955d67..4bc4adaf8 100644 --- a/typescript_test/test.ts +++ b/typescript_test/test.ts @@ -2,8 +2,7 @@ import { createSelector, defaultMemoize, createSelectorCreator, - createStructuredSelector, - ParametricSelector, + createStructuredSelector, Selector, } from '../src/index'; function testSelector() { @@ -85,26 +84,26 @@ function testSelectorAsCombiner() { type Component

= (props: P) => any; -declare function connect(selector: ParametricSelector): +declare function connect(selector: Selector): (component: Component

) => Component

; function testConnect() { connect( createSelector( (state: {foo: string}) => state.foo, - foo => ({foo}), + foo => ({changeUp: foo}), ) )(props => { // typings:expect-error props.bar; - const foo: string = props.foo; + const foo: string = props.changeUp; }); const connected = connect( createSelector( (state: {foo: string}) => state.foo, - (state: never, props: {bar: number}) => props.bar, + (state: {foo: string}, props: {bar: number}) => props.bar, (foo, bar) => ({foo, baz: bar}), ) )(props => { @@ -155,8 +154,8 @@ function testInvalidTypeInCombinator() { // does not allow a large array of heterogeneous parameter type // selectors when the combinator function is typed differently + // typings:expect-error createSelector( - // typings:expect-error [ (state: {testString: string}) => state.testString, (state: {testNumber: number}) => state.testNumber, @@ -167,7 +166,7 @@ function testInvalidTypeInCombinator() { (state: {testString: string}) => state.testString, (state: {testNumber: string}) => state.testNumber, (state: {testStringArray: string[]}) => state.testStringArray, - ], (foo1: string, foo2: number, foo3: boolean, foo4: string, foo5: string, foo6: string, foo7: string, foo8: number, foo9: string[]) => { + ], (foo1, foo2, foo3, foo4, foo5, foo6, foo7, foo8: number, foo9: string[]) => { return {foo1, foo2, foo3, foo4, foo5, foo6, foo7, foo8, foo9}; }); } @@ -177,7 +176,7 @@ function testParametricSelector() { type Props = {bar: number}; // allows heterogeneous parameter type selectors - createSelector( + const heterogeneousSelector = createSelector( (state: {testString: string}) => state.testString, (state: {testNumber: number}) => state.testNumber, (state: {testBoolean: boolean}) => state.testBoolean, @@ -189,11 +188,14 @@ function testParametricSelector() { (state: {testStringArray: string[]}) => state.testStringArray, (foo1: string, foo2: number, foo3: boolean, foo4: string, foo5: string, foo6: string, foo7: string, foo8: string, foo9: string[]) => { return {foo1, foo2, foo3, foo4, foo5, foo6, foo7, foo8, foo9}; - }); + }, + ); + + heterogeneousSelector({testString: 'foo', testBoolean: true, testNumber: 2}) const selector = createSelector( (state: State) => state.foo, - (state: never, props: Props) => props.bar, + (state: State, props: Props) => props.bar, (foo, bar) => ({foo, bar}), ); @@ -207,11 +209,11 @@ function testParametricSelector() { const bar: number = ret.bar; const selector2 = createSelector( - (state) => state.foo, - (state) => state.foo, - (state) => state.foo, - (state) => state.foo, - (state) => state.foo, + (state: any) => state.foo, + (state: any) => state.foo, + (state: any) => state.foo, + (state: any) => state.foo, + (state: any) => state.foo, (state: State, props: Props) => props.bar, (foo1, foo2, foo3, foo4, foo5, bar) => ({ foo1, foo2, foo3, foo4, foo5, bar, @@ -323,7 +325,7 @@ function testArrayArgument() { selector2({foo: 'fizz'}, {bar: 42}); const parametric = createSelector([ - (state: never, props: {bar: number}) => props.bar, + (state: {foo: string}, props: {bar: number}) => props.bar, (state: {foo: string}) => state.foo, (state: {foo: string}) => state.foo, (state: {foo: string}) => state.foo, @@ -337,17 +339,24 @@ function testArrayArgument() { return {foo1, foo2, foo3, foo4, foo5, foo6, foo7, foo8, bar}; }); + interface TestState { + testString: string + testNumber: number + testBoolean: boolean + testStringArray: string[] + } + // allows a large array of heterogeneous parameter type selectors const correctlyTypedArraySelector = createSelector([ - (state: {testString: string}) => state.testString, - (state: {testNumber: number}) => state.testNumber, - (state: {testBoolean: boolean}) => state.testBoolean, - (state: {testString: string}) => state.testString, - (state: {testString: string}) => state.testString, - (state: {testString: string}) => state.testString, - (state: {testString: string}) => state.testString, - (state: {testString: string}) => state.testString, - (state: {testStringArray: string[]}) => state.testStringArray, + (state: TestState) => state.testString, + (state: TestState) => state.testNumber, + (state: TestState) => state.testBoolean, + (state: TestState) => state.testString, + (state: TestState) => state.testString, + (state: TestState) => state.testString, + (state: TestState) => state.testString, + (state: TestState) => state.testString, + (state: TestState) => state.testStringArray, ], (foo1: string, foo2: number, foo3: boolean, foo4: string, foo5: string, foo6: string, foo7: string, foo8: string, foo9: string[]) => { return {foo1, foo2, foo3, foo4, foo5, foo6, foo7, foo8, foo9}; @@ -387,7 +396,7 @@ function testDefaultMemoize() { if (index === 0) return a === b; - return a.toString() === b.toString(); + return `${a}` === `${b}`; } ); @@ -428,7 +437,7 @@ function testCreateSelectorCreator() { if (index === 0) return a === b; - return a.toString() === b.toString(); + return `${a}` === `${b}`; }); } @@ -481,11 +490,11 @@ function testDynamicArrayArgument() { createSelector(data.map(obj => () => obj.val1), (...vals: string[]) => 0) // typings:expect-error - createSelector(data.map(obj => () => obj.val1), (...vals: number[]) => 0) + createSelector(data.map(obj => () => obj.val1), (...args: number[]) => 0) const s = createSelector(data.map(obj => (state: {}, fld: keyof Elem) => obj[fld]), (...vals) => vals.join(',')); s({}, 'val1'); s({}, 'val2'); // typings:expect-error s({}, 'val3'); -} \ No newline at end of file +} From 7f5800ea7e2b9b06274fb1ec44de30c93675f330 Mon Sep 17 00:00:00 2001 From: Julian Coy Date: Sat, 30 Jan 2021 04:59:15 -0500 Subject: [PATCH 2/7] Fix import ordering in test file --- typescript_test/test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/typescript_test/test.ts b/typescript_test/test.ts index 4bc4adaf8..8bec0765f 100644 --- a/typescript_test/test.ts +++ b/typescript_test/test.ts @@ -2,7 +2,8 @@ import { createSelector, defaultMemoize, createSelectorCreator, - createStructuredSelector, Selector, + createStructuredSelector, + Selector, } from '../src/index'; function testSelector() { From b2b13badfc8658fab0ead6397726440ec3b9499e Mon Sep 17 00:00:00 2001 From: Julian Coy Date: Sat, 30 Jan 2021 05:08:28 -0500 Subject: [PATCH 3/7] Removed unnecessary homogenization of state parameter in tests --- typescript_test/test.ts | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/typescript_test/test.ts b/typescript_test/test.ts index 8bec0765f..e1ed0df65 100644 --- a/typescript_test/test.ts +++ b/typescript_test/test.ts @@ -340,24 +340,17 @@ function testArrayArgument() { return {foo1, foo2, foo3, foo4, foo5, foo6, foo7, foo8, bar}; }); - interface TestState { - testString: string - testNumber: number - testBoolean: boolean - testStringArray: string[] - } - // allows a large array of heterogeneous parameter type selectors const correctlyTypedArraySelector = createSelector([ - (state: TestState) => state.testString, - (state: TestState) => state.testNumber, - (state: TestState) => state.testBoolean, - (state: TestState) => state.testString, - (state: TestState) => state.testString, - (state: TestState) => state.testString, - (state: TestState) => state.testString, - (state: TestState) => state.testString, - (state: TestState) => state.testStringArray, + (state: {testString: string}) => state.testString, + (state: {testNumber: number}) => state.testNumber, + (state: {testBoolean: boolean}) => state.testBoolean, + (state: {testString: string}) => state.testString, + (state: {testString: string}) => state.testString, + (state: {testString: string}) => state.testString, + (state: {testString: string}) => state.testString, + (state: {testString: string}) => state.testString, + (state: {testStringArray: string[]}) => state.testStringArray, ], (foo1: string, foo2: number, foo3: boolean, foo4: string, foo5: string, foo6: string, foo7: string, foo8: string, foo9: string[]) => { return {foo1, foo2, foo3, foo4, foo5, foo6, foo7, foo8, foo9}; From 3bcfa03687a76348d91d34c4633d047a66f3afb3 Mon Sep 17 00:00:00 2001 From: Julian Coy Date: Sat, 30 Jan 2021 05:12:27 -0500 Subject: [PATCH 4/7] Remove incorrect flag used during minification --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 866f2ed8d..249a33bcd 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "scripts": { "compile:commonjs": "better-npm-run compile:commonjs", - "compile:umdmin": "uglifyjs dist/reselect.js -mt -o dist/reselect.min.js", + "compile:umdmin": "uglifyjs dist/reselect.js -m -o dist/reselect.min.js", "compile:umd": "better-npm-run compile:umd", "compile:es": "babel -d es/ src/", "compile": "npm run compile:commonjs && npm run compile:umd && npm run compile:umdmin && npm run compile:es", From a55ca72894c4131160a1e420cc6b8b03503b2a23 Mon Sep 17 00:00:00 2001 From: Julian Coy Date: Sat, 30 Jan 2021 06:33:52 -0500 Subject: [PATCH 5/7] Upgraded from typings-tester to dtslint --- package-lock.json | 1384 +++++++++++++++++++++++++++- package.json | 7 +- src/index.d.ts | 6 +- types/index.d.ts | 1 + {typescript_test => types}/test.ts | 84 +- types/tsconfig.json | 14 + typescript_test/tsconfig.json | 7 - 7 files changed, 1412 insertions(+), 91 deletions(-) create mode 120000 types/index.d.ts rename {typescript_test => types}/test.ts (91%) create mode 100644 types/tsconfig.json delete mode 100644 typescript_test/tsconfig.json diff --git a/package-lock.json b/package-lock.json index f30a19bee..3d2b7907f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,70 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@definitelytyped/header-parser": { + "version": "0.0.66", + "resolved": "https://registry.npmjs.org/@definitelytyped/header-parser/-/header-parser-0.0.66.tgz", + "integrity": "sha512-7OW3yyZETfOrbseU2WhiFD9XEue5I/iAgXe9FG4rs1USD2rmB+RVxTLQVJ4kmtgGy+QrR6fJS1/cs8LgGaZh6Q==", + "dev": true, + "requires": { + "@definitelytyped/typescript-versions": "^0.0.66", + "@types/parsimmon": "^1.10.1", + "parsimmon": "^1.13.0" + } + }, + "@definitelytyped/typescript-versions": { + "version": "0.0.66", + "resolved": "https://registry.npmjs.org/@definitelytyped/typescript-versions/-/typescript-versions-0.0.66.tgz", + "integrity": "sha512-zm6ypaRWaps+734OlgbtNUdl2VlbDg+lgm1ZiiVZu7QpuCcCMfiyanJL0uQESPaoh2VkbHQbRP6gDugFpMKh6g==", + "dev": true + }, + "@definitelytyped/utils": { + "version": "0.0.66", + "resolved": "https://registry.npmjs.org/@definitelytyped/utils/-/utils-0.0.66.tgz", + "integrity": "sha512-J5/SNb0cISss1DIso7++ngzZ5EYdnosvjUgyHueQGRhnoV/jdLqtIlI4RDsk08CkeAG7V9PyIz0fA715DvogCw==", + "dev": true, + "requires": { + "@definitelytyped/typescript-versions": "^0.0.66", + "@types/node": "^12.12.29", + "charm": "^1.0.2", + "fs-extra": "^8.1.0", + "fstream": "^1.0.12", + "npm-registry-client": "^8.6.0", + "tar": "^2.2.2", + "tar-stream": "^2.1.4" + }, + "dependencies": { + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + } + } + }, + "@types/node": { + "version": "12.19.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.19.15.tgz", + "integrity": "sha512-lowukE3GUI+VSYSu6VcBXl14d61Rp5hA1D+61r16qnwC0lYNSqdxcvRh0pswejorHfS+HgwBasM8jLXz0/aOsw==", + "dev": true + }, + "@types/parsimmon": { + "version": "1.10.6", + "resolved": "https://registry.npmjs.org/@types/parsimmon/-/parsimmon-1.10.6.tgz", + "integrity": "sha512-FwAQwMRbkhx0J6YELkwIpciVzCcgEqXEbIrIn3a2P5d3kGEHQ3wVhlN3YdVepYP+bZzCYO6OjmD4o9TGOZ40rA==", + "dev": true + }, "acorn": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.4.tgz", @@ -72,6 +136,24 @@ "micromatch": "^2.1.5" } }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", + "dev": true, + "optional": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "dev": true, + "optional": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, "argparse": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", @@ -538,6 +620,12 @@ "integrity": "sha1-yz8+PHMtwPAe5wtAPzAuYddwmDg=", "dev": true }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true + }, "bcrypt-pbkdf": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", @@ -594,6 +682,15 @@ } } }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "dev": true, + "requires": { + "inherits": "~2.0.0" + } + }, "boom": { "version": "0.4.2", "resolved": "https://registry.npmjs.org/boom/-/boom-0.4.2.tgz", @@ -626,12 +723,34 @@ "repeat-element": "^1.1.2" } }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "buffer-shims": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=", "dev": true }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "builtins": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", + "integrity": "sha1-y5T662HIaWRR2zZTThQi+U8K7og=", + "dev": true + }, "caller-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", @@ -647,6 +766,12 @@ "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", "dev": true }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, "caseless": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.6.0.tgz", @@ -677,6 +802,15 @@ "supports-color": "^2.0.0" } }, + "charm": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/charm/-/charm-1.0.2.tgz", + "integrity": "sha1-it02cVOm2aWBMxBSxAkJkdqZXjU=", + "dev": true, + "requires": { + "inherits": "^2.0.1" + } + }, "chokidar": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-1.6.1.tgz", @@ -716,6 +850,51 @@ "integrity": "sha1-sjTKIJsp72b8UY2bmNWEewDt8Ao=", "dev": true }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -738,6 +917,21 @@ "urlgrey": "0.4.0" } }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "combined-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-0.0.7.tgz", @@ -748,6 +942,12 @@ "delayed-stream": "0.0.5" } }, + "command-exists": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/command-exists/-/command-exists-1.2.9.tgz", + "integrity": "sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w==", + "dev": true + }, "commander": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", @@ -774,6 +974,13 @@ "typedarray": "^0.0.6" } }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", + "dev": true, + "optional": true + }, "convert-source-map": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.4.0.tgz", @@ -1026,6 +1233,12 @@ "ms": "0.7.2" } }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, "deep-eql": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-0.1.3.tgz", @@ -1083,6 +1296,13 @@ "dev": true, "optional": true }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", + "dev": true, + "optional": true + }, "detect-indent": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", @@ -1114,6 +1334,101 @@ "integrity": "sha1-vXWcNXqqcDZeAclrewvsCKbg2Uk=", "dev": true }, + "dts-critic": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/dts-critic/-/dts-critic-3.3.4.tgz", + "integrity": "sha512-OjLTrSBCFbi1tDAiOXcP7G20W3HI3eIzkpSpLwvH7oDFZYdqFCMe9lsNhMZFXqsNcSTpRg3+PBS4fF27+h1qew==", + "dev": true, + "requires": { + "@definitelytyped/header-parser": "^0.0.66", + "command-exists": "^1.2.8", + "rimraf": "^3.0.2", + "semver": "^6.2.0", + "tmp": "^0.2.1", + "yargs": "^15.3.1" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "dtslint": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/dtslint/-/dtslint-4.0.6.tgz", + "integrity": "sha512-bj5EaTeAqVXDHo/ut8oTRN/hZNTVKTAsNkavyH/T7XeDU/bqrctlYJmQo2HWJzPDoNCjq6NdVgvOnmQBGmSHsg==", + "dev": true, + "requires": { + "@definitelytyped/header-parser": "^0.0.66", + "@definitelytyped/typescript-versions": "^0.0.66", + "@definitelytyped/utils": "^0.0.66", + "dts-critic": "^3.3.4", + "fs-extra": "^6.0.1", + "json-stable-stringify": "^1.0.1", + "strip-json-comments": "^2.0.1", + "tslint": "5.14.0", + "yargs": "^15.1.0" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + } + } + }, "duplexer": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", @@ -1130,6 +1445,21 @@ "jsbn": "~0.1.0" } }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, "es5-ext": { "version": "0.10.14", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.14.tgz", @@ -1428,6 +1758,18 @@ "integrity": "sha1-4QgOBljjALBilJkMxw4VAiNf1VA=", "dev": true }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", @@ -1475,6 +1817,16 @@ "repeat-string": "^1.5.2" } }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, "flat-cache": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.2.2.tgz", @@ -1522,6 +1874,23 @@ "mime": "~1.2.11" } }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true + }, + "fs-extra": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", + "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "fs-readdir-recursive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz", @@ -2646,6 +3015,41 @@ } } }, + "fstream": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "dev": true, + "optional": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, "generate-function": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", @@ -2661,6 +3065,12 @@ "is-property": "^1.0.0" } }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "getpass": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.6.tgz", @@ -2751,6 +3161,12 @@ "integrity": "sha1-Dqd0NxXbjY3ixe3hd14bRayFwC8=", "dev": true }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, "har-validator": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-2.0.6.tgz", @@ -2763,6 +3179,15 @@ "pinkie-promise": "^2.0.0" } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", @@ -2772,6 +3197,19 @@ "ansi-regex": "^2.0.0" } }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", + "dev": true, + "optional": true + }, "hawk": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/hawk/-/hawk-1.1.1.tgz", @@ -2802,6 +3240,12 @@ "os-tmpdir": "^1.0.1" } }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, "http-signature": { "version": "0.10.1", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-0.10.1.tgz", @@ -2814,6 +3258,12 @@ "ctype": "0.5.3" } }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true + }, "ignore": { "version": "3.2.5", "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.2.5.tgz", @@ -2889,6 +3339,15 @@ "dev": true, "optional": true }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "is-dotfile": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.2.tgz", @@ -3120,6 +3579,12 @@ "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, "json-stable-stringify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", @@ -3141,6 +3606,15 @@ "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", "dev": true }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", @@ -3208,6 +3682,15 @@ "type-check": "~0.3.2" } }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, "lodash": { "version": "4.17.15", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", @@ -3410,6 +3893,18 @@ "integrity": "sha1-baWhdmjEs91ZYjvaEc9/pMH2Cm8=", "dev": true }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, "normalize-path": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.0.1.tgz", @@ -3417,29 +3912,257 @@ "dev": true, "optional": true }, - "number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true + "npm-package-arg": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz", + "integrity": "sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg==", + "dev": true, + "requires": { + "hosted-git-info": "^2.7.1", + "osenv": "^0.1.5", + "semver": "^5.6.0", + "validate-npm-package-name": "^3.0.0" + } }, - "nyc": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-6.6.1.tgz", - "integrity": "sha1-L2AUYQpXBwAhxMBn6bnjMKI6xqc=", + "npm-registry-client": { + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.6.0.tgz", + "integrity": "sha512-Qs6P6nnopig+Y8gbzpeN/dkt+n7IyVd8f45NTMotGk6Qo7GfBmzwYx6jRLoOOgKiMnaQfYxsuyQlD8Mc3guBhg==", "dev": true, "requires": { - "append-transform": "^0.4.0", - "arrify": "^1.0.1", - "caching-transform": "^1.0.0", - "convert-source-map": "^1.1.2", - "default-require-extensions": "^1.0.0", - "find-cache-dir": "^0.1.1", - "find-up": "^1.1.2", - "foreground-child": "^1.5.1", - "glob": "^7.0.3", - "istanbul": "^0.4.3", - "md5-hex": "^1.2.0", + "concat-stream": "^1.5.2", + "graceful-fs": "^4.1.6", + "normalize-package-data": "~1.0.1 || ^2.0.0", + "npm-package-arg": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0", + "npmlog": "2 || ^3.1.0 || ^4.0.0", + "once": "^1.3.3", + "request": "^2.74.0", + "retry": "^0.10.0", + "safe-buffer": "^5.1.1", + "semver": "2 >=2.2.1 || 3.x || 4 || 5", + "slide": "^1.1.3", + "ssri": "^5.2.4" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "dev": true, + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "mime-db": { + "version": "1.45.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", + "integrity": "sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==", + "dev": true + }, + "mime-types": { + "version": "2.1.28", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.28.tgz", + "integrity": "sha512-0TO2yJ5YHYr7M2zzT7gDU1tbwHxEUWBCLt0lscSNpcdAfFyJOVEpRYNS7EXVcTLNj/25QO8gulHC5JtTzSE2UQ==", + "dev": true, + "requires": { + "mime-db": "1.45.0" + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "dev": true + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + } + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "dev": true, + "optional": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "nyc": { + "version": "6.6.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-6.6.1.tgz", + "integrity": "sha1-L2AUYQpXBwAhxMBn6bnjMKI6xqc=", + "dev": true, + "requires": { + "append-transform": "^0.4.0", + "arrify": "^1.0.1", + "caching-transform": "^1.0.0", + "convert-source-map": "^1.1.2", + "default-require-extensions": "^1.0.0", + "find-cache-dir": "^0.1.1", + "find-up": "^1.1.2", + "foreground-child": "^1.5.1", + "glob": "^7.0.3", + "istanbul": "^0.4.3", + "md5-hex": "^1.2.0", "micromatch": "^2.3.7", "mkdirp": "^0.5.0", "pkg-up": "^1.0.0", @@ -5778,6 +6501,16 @@ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, "output-file-sync": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/output-file-sync/-/output-file-sync-1.1.2.tgz", @@ -5789,6 +6522,30 @@ "object-assign": "^4.1.0" } }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, "parse-glob": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", @@ -5802,6 +6559,18 @@ "is-glob": "^2.0.0" } }, + "parsimmon": { + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/parsimmon/-/parsimmon-1.16.0.tgz", + "integrity": "sha512-tekGDz2Lny27SQ/5DzJdIK0lqsWwZ667SCLFIDCxaZM7VNgQjyKLbaL7FYPKpbjdxNAXFV/mSxkq5D2fnkW4pA==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", @@ -5814,6 +6583,18 @@ "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", "dev": true }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", @@ -5872,6 +6653,12 @@ "integrity": "sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=", "dev": true }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", @@ -5997,6 +6784,18 @@ "tunnel-agent": "~0.4.0" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, "require-uncached": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", @@ -6007,6 +6806,16 @@ "resolve-from": "^1.0.0" } }, + "resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "requires": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + } + }, "resolve-from": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", @@ -6032,6 +6841,12 @@ "through": "~2.3.4" } }, + "retry": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz", + "integrity": "sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q=", + "dev": true + }, "rimraf": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.1.tgz", @@ -6056,6 +6871,24 @@ "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=", "dev": true }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", @@ -6075,6 +6908,13 @@ "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", "dev": true }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true, + "optional": true + }, "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", @@ -6087,6 +6927,12 @@ "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", "dev": true }, + "slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc=", + "dev": true + }, "sntp": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/sntp/-/sntp-0.2.4.tgz", @@ -6112,6 +6958,38 @@ "source-map": "^0.5.6" } }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", + "dev": true + }, "split": { "version": "0.2.10", "resolved": "https://registry.npmjs.org/split/-/split-0.2.10.tgz", @@ -6158,6 +7036,15 @@ } } }, + "ssri": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-5.3.0.tgz", + "integrity": "sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.1" + } + }, "stream-combiner": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz", @@ -6259,6 +7146,71 @@ "through": "~2.3.4" } }, + "tar": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "dev": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.12", + "inherits": "2" + } + }, + "tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "requires": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "bl": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.3.tgz", + "integrity": "sha512-fs4G6/Hu4/EE+F75J8DuN/0IpQqNjAdC7aEQv7Qt8MHGUH7Ckv2MwTEEeN9QehD0pfIDkMI1bkHYkKy7xHyKIg==", + "dev": true, + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + } + } + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "requires": { + "safe-buffer": "~5.2.0" + } + } + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -6271,6 +7223,65 @@ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, + "tmp": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", + "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", + "dev": true, + "requires": { + "rimraf": "^3.0.0" + }, + "dependencies": { + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, "to-fast-properties": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.2.tgz", @@ -6304,6 +7315,141 @@ "integrity": "sha1-OTvnMKlEb9Hq1tpZoBQwjzbCics=", "dev": true }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tslint": { + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.14.0.tgz", + "integrity": "sha512-IUla/ieHVnB8Le7LdQFRGlVJid2T/gaJe5VkjzRVSRR6pA2ODYrnfR1hmxi+5+au9l50jBwpbBL34txgv4NnTQ==", + "dev": true, + "requires": { + "babel-code-frame": "^6.22.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^3.2.0", + "glob": "^7.1.1", + "js-yaml": "^3.7.0", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.29.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, "tunnel-agent": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.4.3.tgz", @@ -6344,23 +7490,6 @@ "integrity": "sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==", "dev": true }, - "typings-tester": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/typings-tester/-/typings-tester-0.3.2.tgz", - "integrity": "sha512-HjGoAM2UoGhmSKKy23TYEKkxlphdJFdix5VvqWFLzH1BJVnnwG38tpC6SXPgqhfFGfHY77RlN1K8ts0dbWBQ7A==", - "dev": true, - "requires": { - "commander": "^2.12.2" - }, - "dependencies": { - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - } - } - }, "uglify-js": { "version": "3.4.2", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.2.tgz", @@ -6385,6 +7514,29 @@ } } }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } + } + }, "urlgrey": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/urlgrey/-/urlgrey-0.4.0.tgz", @@ -6415,6 +7567,25 @@ "user-home": "^1.1.1" } }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "validate-npm-package-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", + "integrity": "sha1-X6kS2B630MdK/BQN5zF/DKffQ34=", + "dev": true, + "requires": { + "builtins": "^1.0.3" + } + }, "verror": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/verror/-/verror-1.3.6.tgz", @@ -6424,12 +7595,82 @@ "extsprintf": "1.0.2" } }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "optional": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", @@ -6450,6 +7691,75 @@ "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", "dev": true + }, + "y18n": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "dev": true + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } } diff --git a/package.json b/package.json index 249a33bcd..c88095b34 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ } }, "test:typescript": { - "command": "typings-tester --dir typescript_test" + "command": "dtslint --expectOnly types" }, "compile:commonjs": { "command": "babel -d lib/ src/ && ncp ./src/index.d.ts ./lib/index.d.ts", @@ -89,6 +89,7 @@ "chai": "^3.0.0", "codecov.io": "^0.1.6", "coveralls": "^2.11.4", + "dtslint": "^4.0.6", "eslint": "^2.11", "eslint-plugin-react": "^5.1.1", "lodash.memoize": "^4.1.0", @@ -97,7 +98,7 @@ "ncp": "^2.0.0", "nyc": "^6.4.0", "typescript": "^4.1.3", - "typings-tester": "^0.3.2", "uglify-js": "^3.0.20" - } + }, + "types": "./src/index.d.ts" } diff --git a/src/index.d.ts b/src/index.d.ts index 3677de3e3..cc43238ad 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,6 +1,8 @@ +// Minimum TypeScript Version: 4.2 + export as namespace Reselect; -export type Selector = (state: S, ...params: P) => R; +export type Selector = [P] extends [never] ? (state: S) => R : (state: S, ...params: P) => R; export type OutputSelector = Selector, Result, Params> & { resultFunc: Combiner; recomputations: () => number; @@ -20,7 +22,7 @@ type GetStateFromSelectors = : S extends (infer Elem)[] ? GetStateFromSelector : never; type GetParamsFromSelector = S extends Selector ? P extends [] ? never : P : never; -type GetParamsFromSelectors = S extends SelectorArray +export type GetParamsFromSelectors = S extends SelectorArray ? S extends (infer s)[] ? GetParamsFromSelector : S extends [infer Current, ...infer Rest] diff --git a/types/index.d.ts b/types/index.d.ts new file mode 120000 index 000000000..4a4b76034 --- /dev/null +++ b/types/index.d.ts @@ -0,0 +1 @@ +../src/index.d.ts \ No newline at end of file diff --git a/typescript_test/test.ts b/types/test.ts similarity index 91% rename from typescript_test/test.ts rename to types/test.ts index e1ed0df65..c6aa4884a 100644 --- a/typescript_test/test.ts +++ b/types/test.ts @@ -20,10 +20,10 @@ function testSelector() { const foo: string = selector({foo: 'bar'}); - // typings:expect-error + // $ExpectError selector({foo: 'bar'}, {prop: 'value'}); - // typings:expect-error + // $ExpectError const num: number = selector({foo: 'bar'}); // allows heterogeneous parameter type input selectors @@ -46,15 +46,15 @@ function testNestedSelector() { (state: State) => state.baz, ({foo, bar}, baz) => { const foo1: string = foo; - // typings:expect-error + // $ExpectError const foo2: number = foo; const bar1: number = bar; - // typings:expect-error + // $ExpectError const bar2: string = bar; const baz1: boolean = baz; - // typings:expect-error + // $ExpectError const baz2: string = baz; }, ) @@ -74,10 +74,10 @@ function testSelectorAsCombiner() { subSelector, ); - // typings:expect-error + // $ExpectError selector({foo: ''}); - // typings:expect-error + // $ExpectError const n: number = selector({bar: {foo: ''}}); const s: string = selector({bar: {foo: ''}}); @@ -85,8 +85,8 @@ function testSelectorAsCombiner() { type Component

= (props: P) => any; -declare function connect(selector: Selector): - (component: Component

) => Component

; +declare function connect(selector: Selector): + (component: Component) => Component

; function testConnect() { connect( @@ -95,7 +95,7 @@ function testConnect() { foo => ({changeUp: foo}), ) )(props => { - // typings:expect-error + // $ExpectError props.bar; const foo: string = props.changeUp; @@ -105,31 +105,31 @@ function testConnect() { createSelector( (state: {foo: string}) => state.foo, (state: {foo: string}, props: {bar: number}) => props.bar, - (foo, bar) => ({foo, baz: bar}), + (foo, bar) => ({foo, baz: !!bar}), ) )(props => { const foo: string = props.foo; const bar: number = props.bar; - const baz: number = props.baz; - // typings:expect-error + const baz: boolean = props.baz; + // $ExpectError props.fizz; }); connected({bar: 42}); - // typings:expect-error + // $ExpectError connected({bar: 42, baz: 123}); } function testInvalidTypeInCombinator() { - // typings:expect-error + // $ExpectError createSelector( (state: {foo: string}) => state.foo, (foo: number) => foo, ); - // typings:expect-error createSelector( + // $ExpectError (state: {foo: string, bar: number, baz: boolean}) => state.foo, state => state.bar, state => state.baz, @@ -148,14 +148,14 @@ function testInvalidTypeInCombinator() { (state: {testString: string}) => state.testString, (state: {testNumber: string}) => state.testNumber, (state: {testStringArray: string[]}) => state.testStringArray, - // typings:expect-error + // $ExpectError (foo1: string, foo2: number, foo3: boolean, foo4: string, foo5: string, foo6: string, foo7: string, foo8: number, foo9: string[]) => { return {foo1, foo2, foo3, foo4, foo5, foo6, foo7, foo8, foo9}; }); // does not allow a large array of heterogeneous parameter type // selectors when the combinator function is typed differently - // typings:expect-error + // $ExpectError createSelector( [ (state: {testString: string}) => state.testString, @@ -200,9 +200,9 @@ function testParametricSelector() { (foo, bar) => ({foo, bar}), ); - // typings:expect-error + // $ExpectError selector({foo: 'fizz'}); - // typings:expect-error + // $ExpectError selector({foo: 'fizz'}, {bar: 'baz'}); const ret = selector({foo: 'fizz'}, {bar: 42}); @@ -228,7 +228,7 @@ function testArrayArgument() { const selector = createSelector([ (state: {foo: string}) => state.foo, (state: {foo: string}) => state.foo, - (state: never, props: {bar: number}) => props.bar, + (state, props: {bar: number}) => props.bar, ], (foo1, foo2, bar) => ({foo1, foo2, bar})); const ret = selector({foo: 'fizz'}, {bar: 42}); @@ -236,12 +236,12 @@ function testArrayArgument() { const foo2: string = ret.foo2; const bar: number = ret.bar; - // typings:expect-error + // $ExpectError createSelector([ (state: {foo: string}) => state.foo, ]); - // typings:expect-error + // $ExpectError createSelector([ (state: {foo: string}) => state.foo, (state: {foo: string}) => state.foo, @@ -263,7 +263,7 @@ function testArrayArgument() { }); - // typings:expect-error + // $ExpectError createSelector([ (state: {foo: string}) => state.foo, (state: {foo: string}) => state.foo, @@ -279,7 +279,7 @@ function testArrayArgument() { }); - // typings:expect-error + // $ExpectError createSelector([ (state: {foo: string}) => state.foo, state => state.foo, @@ -318,11 +318,11 @@ function testArrayArgument() { const foo7: string = ret.foo7; const foo8: string = ret.foo8; const foo9: string = ret.foo9; - // typings:expect-error + // $ExpectError ret.foo10; } - // typings:expect-error + // $ExpectError selector2({foo: 'fizz'}, {bar: 42}); const parametric = createSelector([ @@ -356,7 +356,7 @@ function testArrayArgument() { return {foo1, foo2, foo3, foo4, foo5, foo6, foo7, foo8, foo9}; }); - // typings:expect-error + // $ExpectError parametric({foo: 'fizz'}); { @@ -370,7 +370,7 @@ function testArrayArgument() { const foo7: string = ret.foo7; const foo8: string = ret.foo8; const bar: number = ret.bar; - // typings:expect-error + // $ExpectError ret.foo9; } } @@ -381,7 +381,7 @@ function testDefaultMemoize() { const memoized = defaultMemoize(func); const ret0: number = memoized('42'); - // typings:expect-error + // $ExpectError const ret1: string = memoized('42'); const memoized2 = defaultMemoize( @@ -408,23 +408,23 @@ function testCreateSelectorCreator() { ); const value: string = selector({foo: 'fizz'}); - // typings:expect-error + // $ExpectError selector({foo: 'fizz'}, {bar: 42}); const parametric = createSelector( (state: {foo: string}) => state.foo, - (state: never, props: {bar: number}) => props.bar, + (state: any, props: {bar: number}) => props.bar, (foo, bar) => ({foo, bar}), ); - // typings:expect-error + // $ExpectError parametric({foo: 'fizz'}); const ret = parametric({foo: 'fizz'}, {bar: 42}); const foo: string = ret.foo; const bar: number = ret.bar; - // typings:expect-error + // $ExpectError createSelectorCreator(defaultMemoize, 1); createSelectorCreator(defaultMemoize, (a: T, b: T, index: number) => { @@ -448,24 +448,24 @@ function testCreateStructuredSelector() { const foo: string = res.foo; const bar: number = res.bar; - // typings:expect-error + // $ExpectError selector({bar: '42'}); - // typings:expect-error + // $ExpectError selector({foo: '42'}, {bar: 42}); - // typings:expect-error createStructuredSelector<{foo: string}, {bar: number}>({ + // $ExpectError bar: (state: {baz: boolean}) => 1 }); - // typings:expect-error createStructuredSelector<{foo: string}, {bar: number}>({ + // $ExpectError bar: state => state.foo }); - // typings:expect-error createStructuredSelector<{foo: string}, {bar: number}>({ + // $ExpectError baz: state => state.foo }); } @@ -479,16 +479,16 @@ function testDynamicArrayArgument() { createSelector(data.map(obj => () => obj.val1), (...vals) => vals.join(',')); - // typings:expect-error + // $ExpectError createSelector(data.map(obj => () => obj.val1), (vals) => vals.join(',')) createSelector(data.map(obj => () => obj.val1), (...vals: string[]) => 0) - // typings:expect-error + // $ExpectError createSelector(data.map(obj => () => obj.val1), (...args: number[]) => 0) const s = createSelector(data.map(obj => (state: {}, fld: keyof Elem) => obj[fld]), (...vals) => vals.join(',')); s({}, 'val1'); s({}, 'val2'); - // typings:expect-error + // $ExpectError s({}, 'val3'); } diff --git a/types/tsconfig.json b/types/tsconfig.json new file mode 100644 index 000000000..a9b72f27b --- /dev/null +++ b/types/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": ["es6"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "noEmit": true, + + "baseUrl": ".", + "paths": { "src": ["."] } + } +} diff --git a/typescript_test/tsconfig.json b/typescript_test/tsconfig.json deleted file mode 100644 index 60c9bf63f..000000000 --- a/typescript_test/tsconfig.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "noImplicitAny": true, - "strictNullChecks": true - } -} From bd7c7f593da8c2dcc1c7ec2c9656d0d28f38498b Mon Sep 17 00:00:00 2001 From: Julian Coy Date: Sat, 30 Jan 2021 06:53:21 -0500 Subject: [PATCH 6/7] Updated node versions in CI to 10,12,14,15 --- .travis.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index e2a91c7ab..f20921ec8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,9 @@ language: node_js node_js: - - "0.12" - - "4" - - "5" - - "6" - - "7" + - "10" + - "12" + - "14" + - "15" script: - npm run lint - npm test From 66fcf9000bc173ca1f168656d2611e8448ecc188 Mon Sep 17 00:00:00 2001 From: Julian Coy Date: Sat, 30 Jan 2021 07:02:04 -0500 Subject: [PATCH 7/7] Removed types field from package.json --- package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/package.json b/package.json index c88095b34..bd16e20f6 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,5 @@ "nyc": "^6.4.0", "typescript": "^4.1.3", "uglify-js": "^3.0.20" - }, - "types": "./src/index.d.ts" + } }