diff --git a/package.json b/package.json index 192c933..becfd0b 100644 --- a/package.json +++ b/package.json @@ -23,14 +23,15 @@ "url-transformers": "^0.0.10" }, "devDependencies": { - "prettier": "^1.15.3", + "prettier": "^2.4.1", "rollup": "^2.7.2", "rollup-plugin-auto-external": "^2.0.0", - "rollup-plugin-typescript2": "^0.27.0", + "rollup-plugin-typescript2": "^0.30.0", "source-map-support": "^0.5.9", + "tslib": "^2.3.1", "tslint": "^5.11.0", "tslint-language-service": "^0.9.9", "tslint-no-unused": "^0.2.0-alpha.1", - "typescript": "^3.2.2" + "typescript": "^4.4.4" } } diff --git a/src/helpers/flow.ts b/src/helpers/flow.ts new file mode 100644 index 0000000..e6aa6ae --- /dev/null +++ b/src/helpers/flow.ts @@ -0,0 +1,116 @@ +// Copied from +// https://github.com/gcanti/fp-ts/blob/master/src/function.ts#L230 +/** + * @function + * @since 2.11.5 + */ +export function flow, B>(ab: (...a: A) => B): (...a: A) => B; +export function flow, B, C>( + ab: (...a: A) => B, + bc: (b: B) => C, +): (...a: A) => C; +export function flow, B, C, D>( + ab: (...a: A) => B, + bc: (b: B) => C, + cd: (c: C) => D, +): (...a: A) => D; +export function flow, B, C, D, E>( + ab: (...a: A) => B, + bc: (b: B) => C, + cd: (c: C) => D, + de: (d: D) => E, +): (...a: A) => E; +export function flow, B, C, D, E, F>( + ab: (...a: A) => B, + bc: (b: B) => C, + cd: (c: C) => D, + de: (d: D) => E, + ef: (e: E) => F, +): (...a: A) => F; +export function flow, B, C, D, E, F, G>( + ab: (...a: A) => B, + bc: (b: B) => C, + cd: (c: C) => D, + de: (d: D) => E, + ef: (e: E) => F, + fg: (f: F) => G, +): (...a: A) => G; +export function flow, B, C, D, E, F, G, H>( + ab: (...a: A) => B, + bc: (b: B) => C, + cd: (c: C) => D, + de: (d: D) => E, + ef: (e: E) => F, + fg: (f: F) => G, + gh: (g: G) => H, +): (...a: A) => H; +export function flow, B, C, D, E, F, G, H, I>( + ab: (...a: A) => B, + bc: (b: B) => C, + cd: (c: C) => D, + de: (d: D) => E, + ef: (e: E) => F, + fg: (f: F) => G, + gh: (g: G) => H, + hi: (h: H) => I, +): (...a: A) => I; +export function flow, B, C, D, E, F, G, H, I, J>( + ab: (...a: A) => B, + bc: (b: B) => C, + cd: (c: C) => D, + de: (d: D) => E, + ef: (e: E) => F, + fg: (f: F) => G, + gh: (g: G) => H, + hi: (h: H) => I, + ij: (i: I) => J, +): (...a: A) => J; +export function flow( + ab: Function, + bc?: Function, + cd?: Function, + de?: Function, + ef?: Function, + fg?: Function, + gh?: Function, + hi?: Function, + ij?: Function, +): unknown { + switch (arguments.length) { + case 1: + return ab; + case 2: + return function (this: unknown) { + return bc!(ab.apply(this, arguments)); + }; + case 3: + return function (this: unknown) { + return cd!(bc!(ab.apply(this, arguments))); + }; + case 4: + return function (this: unknown) { + return de!(cd!(bc!(ab.apply(this, arguments)))); + }; + case 5: + return function (this: unknown) { + return ef!(de!(cd!(bc!(ab.apply(this, arguments))))); + }; + case 6: + return function (this: unknown) { + return fg!(ef!(de!(cd!(bc!(ab.apply(this, arguments)))))); + }; + case 7: + return function (this: unknown) { + return gh!(fg!(ef!(de!(cd!(bc!(ab.apply(this, arguments))))))); + }; + case 8: + return function (this: unknown) { + return hi!(gh!(fg!(ef!(de!(cd!(bc!(ab.apply(this, arguments)))))))); + }; + case 9: + return function (this: unknown) { + return ij!(hi!(gh!(fg!(ef!(de!(cd!(bc!(ab.apply(this, arguments))))))))); + }; + } + return; +} diff --git a/src/helpers/pipe.ts b/src/helpers/pipe.ts deleted file mode 100644 index 86d970a..0000000 --- a/src/helpers/pipe.ts +++ /dev/null @@ -1,70 +0,0 @@ -// Copied from -// https://github.com/gcanti/fp-ts/blob/42870714ebcae4ecf132291c687c845b6837b7d2/src/function.ts#L207 -/** - * @function - * @since 1.0.0 - */ -export function pipe(ab: (a: A) => B, bc: (b: B) => C): (a: A) => C; -export function pipe(ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D): (a: A) => D; -export function pipe( - ab: (a: A) => B, - bc: (b: B) => C, - cd: (c: C) => D, - de: (d: D) => E, -): (a: A) => E; -export function pipe( - ab: (a: A) => B, - bc: (b: B) => C, - cd: (c: C) => D, - de: (d: D) => E, - ef: (e: E) => F, -): (a: A) => F; -export function pipe( - ab: (a: A) => B, - bc: (b: B) => C, - cd: (c: C) => D, - de: (d: D) => E, - ef: (e: E) => F, - fg: (f: F) => G, -): (a: A) => G; -export function pipe( - ab: (a: A) => B, - bc: (b: B) => C, - cd: (c: C) => D, - de: (d: D) => E, - ef: (e: E) => F, - fg: (f: F) => G, - gh: (g: G) => H, -): (a: A) => H; -export function pipe( - ab: (a: A) => B, - bc: (b: B) => C, - cd: (c: C) => D, - de: (d: D) => E, - ef: (e: E) => F, - fg: (f: F) => G, - gh: (g: G) => H, - hi: (h: H) => I, -): (a: A) => I; -export function pipe( - ab: (a: A) => B, - bc: (b: B) => C, - cd: (c: C) => D, - de: (d: D) => E, - ef: (e: E) => F, - fg: (f: F) => G, - gh: (g: G) => H, - hi: (h: H) => I, - ij: (i: I) => J, -): (a: A) => J; -export function pipe(...fns: Function[]): Function { - const len = fns.length - 1; - // tslint:disable-next-line no-any - return function(this: any, x: any) { - let y = x; - for (let i = 0; i <= len; i++) { - y = fns[i].call(this, y); - } - return y; - }; -} diff --git a/src/index.ts b/src/index.ts index b63d649..13eaaa5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,12 +2,8 @@ import { ParsedUrlQueryInput } from 'querystring'; import { addQueryToUrl } from 'url-transformers'; import { pickBy } from './helpers'; +import { flow } from './helpers/flow'; import { catMaybesDictionary, mapValueIfDefined } from './helpers/maybe'; -import { pipe } from './helpers/pipe'; - -// Omit is only available from TS 3.5 onwards -// tslint:disable-next-line -type Omit = Pick>; // https://docs.imgix.com/apis/url/size/fit export enum ImgixFit { @@ -39,6 +35,25 @@ export enum ImgixFormat { blurhash = 'blurhash', } +export enum ImgixBlendMode { + normal = 'normal', + darken = 'darken', + multiply = 'multiply', + burn = 'burn', + lighten = 'lighten', + screen = 'screen', + dodge = 'dodge', + overlay = 'overlay', + softlight = 'softlight', + hardlight = 'hardlight', + difference = 'difference', + exclusion = 'exclusion', + color = 'color', + hue = 'hue', + saturation = 'saturation', + luminosity = 'luminosity', +} + // https://docs.imgix.com/apis/url/size/crop export type ImgixCrop = Partial< Record< @@ -75,6 +90,22 @@ export type ImgixRect = { h: number; }; +type Combinations = T extends String + ? T | `${T},${Exclude}` + : never; + +// https://docs.imgix.com/apis/rendering/watermark/mark-align +export type ImgixMarkAlignBase = 'top' | 'middle' | 'bottom' | 'left' | 'center' | 'right'; +// The api allows the user to combine the align values with a comma +type ImgixMarkAlign = Combinations; + +export enum ImgixTxtClip { + start = 'start', + middle = 'middle', + end = 'end', + ellipsis = 'ellipsis', +} + // https://docs.imgix.com/apis/url export type ImgixUrlQueryParams = { ar?: ImgixAspectRatio; @@ -93,21 +124,50 @@ export type ImgixUrlQueryParams = { faceindex?: number; facepad?: number; 'min-h'?: number; + 'mark-w'?: number; + 'mark-align'?: ImgixMarkAlign; + 'mark-pad'?: number; + 'mark-y'?: number; + mark64?: string; + 'mark-x'?: number; + blend64?: string; + txt64?: string; + 'txt-color'?: string; + 'txt-size'?: number; + 'txt-align'?: ImgixMarkAlign; + 'txt-font'?: string; + 'txt-pad'?: number; + 'txt-width'?: number; + 'txt-clip'?: ImgixTxtClip; + 'blend-align'?: ImgixMarkAlign; + 'blend-mode'?: ImgixBlendMode; + 'blend-pad'?: number; + 'blend-alpha'?: number; + mask?: string; + 'blend-w'?: number; + 'blend-x'?: number; fm?: ImgixFormat; }; -export type QueryParamsInput = Omit & { minH?: number }; +type KebabToCamelCase = S extends `${infer T}-${infer U}` + ? `${T}${Capitalize>}` + : S; + +export type QueryParamsInput = { + [K in keyof ImgixUrlQueryParams as KebabToCamelCase]: ImgixUrlQueryParams[K]; +}; const pickTrueInObject = (obj: Record): Partial> => pickBy(obj, (_key, value): value is true => value); -const pickTrueObjectKeys = pipe( +const pickTrueObjectKeys = flow( pickTrueInObject, // tslint:disable-next-line no-unbound-method Object.keys, ); + const undefinedIfEmptyString = (str: string): string | undefined => (str === '' ? undefined : str); const joinWithComma = (strs: string[]) => strs.join(','); -const serializeImgixUrlQueryParamListValue = pipe( +const serializeImgixUrlQueryParamListValue = flow( pickTrueObjectKeys, joinWithComma, undefinedIfEmptyString, @@ -115,34 +175,52 @@ const serializeImgixUrlQueryParamListValue = pipe( const mapToSerializedListValueIfDefined = mapValueIfDefined(serializeImgixUrlQueryParamListValue); -const serializeImgixUrlQueryParamValues = (query: QueryParamsInput): ParsedUrlQueryInput => - pipe( - (): Record => ({ - ar: mapValueIfDefined((ar: ImgixAspectRatio) => `${ar.w}:${ar.h}`)(query.ar), - dpr: query.dpr, - auto: mapToSerializedListValueIfDefined(query.auto), - fit: query.fit, - w: query.w, - h: query.h, - rect: mapValueIfDefined((rect: ImgixRect) => `${rect.x},${rect.y},${rect.w},${rect.h}`)( - query.rect, - ), - q: query.q, - cs: query.cs, - crop: mapToSerializedListValueIfDefined(query.crop), - bg: query.bg, - ch: mapToSerializedListValueIfDefined(query.ch), - blur: query.blur, - faceindex: query.faceindex, - facepad: query.facepad, - 'min-h': query.minH, - fm: query.fm, - }), - catMaybesDictionary, - )({}); +const serializeImgixUrlQueryParamValues = (query: QueryParamsInput): ParsedUrlQueryInput => { + const imgixUrlQueryParams: Record = { + ar: mapValueIfDefined((ar: ImgixAspectRatio) => `${ar.w}:${ar.h}`)(query.ar), + dpr: query.dpr, + auto: mapToSerializedListValueIfDefined(query.auto), + fit: query.fit, + w: query.w, + h: query.h, + rect: mapValueIfDefined((rect: ImgixRect) => `${rect.x},${rect.y},${rect.w},${rect.h}`)( + query.rect, + ), + q: query.q, + cs: query.cs, + crop: mapToSerializedListValueIfDefined(query.crop), + bg: query.bg, + ch: mapToSerializedListValueIfDefined(query.ch), + blur: query.blur, + faceindex: query.faceindex, + facepad: query.facepad, + 'min-h': query.minH, + 'mark-w': query.markW, + 'mark-align': query.markAlign, + 'mark-pad': query.markPad, + 'mark-y': query.markY, + mark64: query.mark64, + blend64: query.blend64, + txt64: query.txt64, + 'txt-color': query.txtColor, + 'txt-size': query.txtSize, + 'txt-align': query.txtAlign, + 'txt-pad': query.txtPad, + 'txt-width': query.txtWidth, + 'txt-clip': query.txtClip, + fm: query.fm, + 'txt-font': query.txtFont, + 'blend-mode': query.blendMode, + 'blend-alpha': query.blendAlpha, + 'blend-pad': query.blendPad, + 'blend-w': query.blendW, + mask: query.mask, + 'blend-align': query.blendAlign, + 'blend-x': query.blendX, + 'mark-x': query.markX, + }; + return catMaybesDictionary(imgixUrlQueryParams); +}; export const buildImgixUrl = (url: string) => - pipe( - serializeImgixUrlQueryParamValues, - query => addQueryToUrl(query)(url), - ); + flow(serializeImgixUrlQueryParamValues, (query) => addQueryToUrl(query)(url)); diff --git a/yarn.lock b/yarn.lock index 7dbc8a0..527bd62 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,19 +2,13 @@ # yarn lockfile v1 -"@rollup/pluginutils@^3.0.8": - version "3.0.9" - resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.0.9.tgz#aa6adca2c45e5a1b950103a999e3cddfe49fd775" - integrity sha512-TLZavlfPAZYI7v33wQh4mTP6zojne14yok3DNSLcjoG/Hirxfkonn6icP5rrNWRn8nZsirJBFFpijVOJzkUHDg== +"@rollup/pluginutils@^4.1.0": + version "4.1.1" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.1.1.tgz#1d4da86dd4eded15656a57d933fda2b9a08d47ec" + integrity sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ== dependencies: - "@types/estree" "0.0.39" - estree-walker "^1.0.1" - micromatch "^4.0.2" - -"@types/estree@0.0.39": - version "0.0.39" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" - integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== + estree-walker "^2.0.1" + picomatch "^2.2.2" "@types/node@^14.14.16": version "14.14.31" @@ -67,13 +61,6 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -braces@^3.0.1: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" @@ -167,23 +154,16 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -estree-walker@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" - integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== +estree-walker@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== esutils@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b" integrity sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - find-cache-dir@^3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" @@ -225,6 +205,11 @@ fsevents@~2.1.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + glob@^7.1.1: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" @@ -254,6 +239,13 @@ has-flag@^3.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + hosted-git-info@^2.1.4: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" @@ -277,10 +269,12 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-core-module@^2.2.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.0.tgz#0321336c3d0925e497fd97f5d95cb114a5ccd548" + integrity sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw== + dependencies: + has "^1.0.3" js-tokens@^3.0.2: version "3.0.2" @@ -331,14 +325,6 @@ make-dir@^3.0.2: dependencies: semver "^6.0.0" -micromatch@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.2.tgz#4fcb0999bf9fbc2fcbdd212f6d629b9a56c39259" - integrity sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== - dependencies: - braces "^3.0.1" - picomatch "^2.0.5" - minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" @@ -424,10 +410,10 @@ path-type@^3.0.0: dependencies: pify "^3.0.0" -picomatch@^2.0.5: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== +picomatch@^2.2.2: + version "2.3.0" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== pify@^3.0.0: version "3.0.0" @@ -441,10 +427,10 @@ pkg-dir@^4.1.0: dependencies: find-up "^4.0.0" -prettier@^1.15.3: - version "1.15.3" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.3.tgz#1feaac5bdd181237b54dbe65d874e02a1472786a" - integrity sha512-gAU9AGAPMaKb3NNSUUuhhFAS7SCO4ALTN4nRIn6PJ075Qd28Yn2Ig2ahEJWdJwJmlEBTUfC7mMUSFy8MwsOCfg== +prettier@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c" + integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA== read-pkg@^3.0.0: version "3.0.0" @@ -455,11 +441,12 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -resolve@1.15.1: - version "1.15.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.15.1.tgz#27bdcdeffeaf2d6244b95bb0f9f4b4653451f3e8" - integrity sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w== +resolve@1.20.0: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== dependencies: + is-core-module "^2.2.0" path-parse "^1.0.6" resolve@^1.10.0, resolve@^1.3.2: @@ -479,16 +466,16 @@ rollup-plugin-auto-external@^2.0.0: safe-resolve "^1.0.0" semver "^5.5.0" -rollup-plugin-typescript2@^0.27.0: - version "0.27.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.27.0.tgz#95ff96f9e07d5000a9d2df4d76b548f9a1f83511" - integrity sha512-SRKG/Canve3cxBsqhY1apIBznqnX9X/WU3Lrq3XSwmTmFqccj3+//logLXFEmp+PYFNllSVng+f4zjqRTPKNkA== +rollup-plugin-typescript2@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.30.0.tgz#1cc99ac2309bf4b9d0a3ebdbc2002aecd56083d3" + integrity sha512-NUFszIQyhgDdhRS9ya/VEmsnpTe+GERDMmFo0Y+kf8ds51Xy57nPNGglJY+W6x1vcouA7Au7nsTgsLFj2I0PxQ== dependencies: - "@rollup/pluginutils" "^3.0.8" + "@rollup/pluginutils" "^4.1.0" find-cache-dir "^3.3.1" fs-extra "8.1.0" - resolve "1.15.1" - tslib "1.11.1" + resolve "1.20.0" + tslib "2.1.0" rollup@^2.7.2: version "2.7.6" @@ -585,18 +572,21 @@ supports-color@^5.3.0: dependencies: has-flag "^3.0.0" -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" +tslib@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" + integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== -tslib@1.11.1, tslib@^1.8.0, tslib@^1.8.1: +tslib@^1.8.0, tslib@^1.8.1: version "1.11.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35" integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA== +tslib@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" + integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== + tslint-language-service@^0.9.9: version "0.9.9" resolved "https://registry.yarnpkg.com/tslint-language-service/-/tslint-language-service-0.9.9.tgz#f546dc38483979e6fb3cfa59584ad8525b3ad4da" @@ -634,10 +624,10 @@ tsutils@^2.27.2: dependencies: tslib "^1.8.1" -typescript@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.2.2.tgz#fe8101c46aa123f8353523ebdcf5730c2ae493e5" - integrity sha512-VCj5UiSyHBjwfYacmDuc/NOk4QQixbE+Wn7MFJuS0nRuPQbof132Pw4u53dm264O8LPc2MVsc7RJNml5szurkg== +typescript@^4.4.4: + version "4.4.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" + integrity sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA== universalify@^0.1.0: version "0.1.2"