From d848b358a8ca5797340e56346631b9831fca2132 Mon Sep 17 00:00:00 2001 From: alexanderknapstein Date: Tue, 26 Feb 2019 12:05:06 +0100 Subject: [PATCH 01/16] include url for default routes within match --- package-lock.json | 28 ++++++++++++++----- packages/router/package-lock.json | 3 +- .../router/src/components/switch/switch.tsx | 1 + packages/router/src/utils/match-path.ts | 3 +- 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 491c12e..c555a7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3918,12 +3918,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -3938,17 +3940,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -4065,7 +4070,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -4077,6 +4083,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4091,6 +4098,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4098,12 +4106,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -4122,6 +4132,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -4202,7 +4213,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -4214,6 +4226,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -4335,6 +4348,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", diff --git a/packages/router/package-lock.json b/packages/router/package-lock.json index a6b308d..5399982 100644 --- a/packages/router/package-lock.json +++ b/packages/router/package-lock.json @@ -16,8 +16,7 @@ "@stencil/state-tunnel": { "version": "0.0.9-1", "resolved": "https://registry.npmjs.org/@stencil/state-tunnel/-/state-tunnel-0.0.9-1.tgz", - "integrity": "sha512-Dn04TXjwM+H+1HB6R5B9WwLOKTq/kT/YIwGtAAxiAwYFCugiSWZuE2vf3I8dkCLlEetib5/QAz9MYJ4H4BRKZg==", - "dev": true + "integrity": "sha512-Dn04TXjwM+H+1HB6R5B9WwLOKTq/kT/YIwGtAAxiAwYFCugiSWZuE2vf3I8dkCLlEetib5/QAz9MYJ4H4BRKZg==" }, "ansi-align": { "version": "2.0.0", diff --git a/packages/router/src/components/switch/switch.tsx b/packages/router/src/components/switch/switch.tsx index 77b81be..d3b9e69 100644 --- a/packages/router/src/components/switch/switch.tsx +++ b/packages/router/src/components/switch/switch.tsx @@ -18,6 +18,7 @@ function getUniqueId() { } function getMatch(pathname: string, url: any, exact: boolean) { + url = (typeof url === undefined) ? pathname : url; return matchPath(pathname, { path: url, exact: exact, diff --git a/packages/router/src/utils/match-path.ts b/packages/router/src/utils/match-path.ts index 4a4a27f..6bb88bd 100644 --- a/packages/router/src/utils/match-path.ts +++ b/packages/router/src/utils/match-path.ts @@ -48,9 +48,10 @@ export function matchPath(pathname: string, options: MatchOptions = {}): null | if (!match) { return null; } - const [ url, ...values ] = match; const isExact = pathname === url; + console.log(pathname); + console.log(url); if (exact && !isExact) { return null; From d77e80439a03abed9a4359f521eae797f74f2dcc Mon Sep 17 00:00:00 2001 From: Alexander Knapstein Date: Fri, 8 Mar 2019 11:33:34 +0100 Subject: [PATCH 02/16] fixed string literal "undefined" --- packages/router/src/components/switch/switch.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/router/src/components/switch/switch.tsx b/packages/router/src/components/switch/switch.tsx index d3b9e69..ecbecb7 100644 --- a/packages/router/src/components/switch/switch.tsx +++ b/packages/router/src/components/switch/switch.tsx @@ -18,7 +18,7 @@ function getUniqueId() { } function getMatch(pathname: string, url: any, exact: boolean) { - url = (typeof url === undefined) ? pathname : url; + url = (typeof url === "undefined") ? pathname : url; return matchPath(pathname, { path: url, exact: exact, From 361c4052d151c0c11e2d3061582d9705f9bd025e Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Fri, 5 Apr 2019 11:46:37 -0500 Subject: [PATCH 03/16] wip --- packages/router/package.json | 2 +- packages/router/src/components.d.ts | 273 +++++++++--------- .../async-content/async-content.tsx | 2 +- .../router/src/components/prompt/prompt.tsx | 2 +- .../src/components/redirect/redirect.tsx | 2 +- .../src/components/route-link/route-link.tsx | 9 +- .../components/route-title/route-title.tsx | 4 +- .../router/src/components/route/route.tsx | 2 +- .../router/src/components/router/router.tsx | 14 +- .../router/src/components/switch/switch.tsx | 14 +- packages/router/src/global/active-router.tsx | 6 +- .../src/utils/__tests__/createHref-test.ts | 24 +- .../router/src/utils/createBrowserHistory.ts | 47 ++- .../router/src/utils/createHashHistory.ts | 54 ++-- .../router/src/utils/createScrollHistory.ts | 38 ++- packages/router/src/utils/dom-utils.ts | 21 +- packages/router/src/utils/location-utils.ts | 4 +- packages/router/src/utils/log.ts | 7 +- packages/router/src/utils/match-path.ts | 10 +- packages/router/src/utils/path-to-regex.ts | 24 +- packages/router/src/utils/uuid.ts | 6 - packages/router/tsconfig.json | 4 +- 22 files changed, 267 insertions(+), 302 deletions(-) delete mode 100644 packages/router/src/utils/uuid.ts diff --git a/packages/router/package.json b/packages/router/package.json index 83b1b36..5724a79 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -2,7 +2,7 @@ "name": "@stencil/router", "version": "0.3.2", "description": "Stencil Router", - "module": "dist/esm/index.js", + "module": "dist/index.mjs", "main": "dist/index.js", "unpkg": "dist/stencilrouter.js", "types": "dist/types/index.d.ts", diff --git a/packages/router/src/components.d.ts b/packages/router/src/components.d.ts index fb42669..01773dd 100644 --- a/packages/router/src/components.d.ts +++ b/packages/router/src/components.d.ts @@ -1,12 +1,12 @@ -/** -* This is an autogenerated file created by the Stencil compiler. -* It contains typing information for all components that exist in this project. -*/ /* tslint:disable */ +/** + * This is an autogenerated file created by the Stencil compiler. + * It contains typing information for all components that exist in this project. + */ -import '@stencil/core'; -import '@stencil/state-tunnel'; +import { HTMLStencilElement, JSXBase } from '@stencil/core/internal'; +import { JSX } from '@stencil/core'; import { HistoryType, LocationSegments, @@ -20,36 +20,24 @@ import { export namespace Components { - interface StencilAsyncContent { 'documentLocation'?: string; } - interface StencilAsyncContentAttributes extends StencilHTMLAttributes { - 'documentLocation'?: string; - } - - interface StencilRouterPrompt { - 'history'?: RouterHistory; - 'message': string | Prompt; - 'when': boolean; - } - interface StencilRouterPromptAttributes extends StencilHTMLAttributes { - 'history'?: RouterHistory; - 'message'?: string | Prompt; - 'when'?: boolean; - } - - interface StencilRouterRedirect { - 'history'?: RouterHistory; - 'root'?: string; - 'url'?: string; - } - interface StencilRouterRedirectAttributes extends StencilHTMLAttributes { + interface StencilRoute { + 'component'?: string; + 'componentProps'?: { [key: string]: any }; + 'componentUpdated'?: (options: RouteViewOptions) => void; + 'exact': boolean; + 'group': string | null; 'history'?: RouterHistory; - 'root'?: string; - 'url'?: string; + 'historyType'?: HistoryType; + 'location'?: LocationSegments; + 'match': MatchResults | null; + 'routeRender'?: (props: RouteRenderProps) => any; + 'routeViewsUpdated'?: (options: RouteViewOptions) => void; + 'scrollTopOffset'?: number; + 'url'?: string | string[]; } - interface StencilRouteLink { 'activeClass': string; 'anchorClass'?: string; @@ -73,7 +61,54 @@ export namespace Components { 'url'?: string; 'urlMatch'?: Path; } - interface StencilRouteLinkAttributes extends StencilHTMLAttributes { + interface StencilRouteSwitch { + 'group': string; + 'location'?: LocationSegments; + 'routeViewsUpdated'?: (options: RouteViewOptions) => void; + 'scrollTopOffset'?: number; + } + interface StencilRouteTitle { + 'pageTitle': string; + 'titleSuffix': string; + } + interface StencilRouter { + 'historyType': HistoryType; + 'root': string; + 'scrollTopOffset'?: number; + 'titleSuffix': string; + } + interface StencilRouterPrompt { + 'history'?: RouterHistory; + 'message': string | Prompt; + 'when': boolean; + } + interface StencilRouterRedirect { + 'history'?: RouterHistory; + 'root'?: string; + 'url'?: string; + } +} + +declare namespace LocalJSX { + interface StencilAsyncContent extends JSXBase.HTMLAttributes { + 'documentLocation'?: string; + } + interface StencilRoute extends JSXBase.HTMLAttributes { + 'component'?: string; + 'componentProps'?: { [key: string]: any }; + 'componentUpdated'?: (options: RouteViewOptions) => void; + 'exact'?: boolean; + 'group'?: string | null; + 'history'?: RouterHistory; + 'historyType'?: HistoryType; + 'location'?: LocationSegments; + 'match'?: MatchResults | null; + 'routeRender'?: (props: RouteRenderProps) => any; + 'routeViewsUpdated'?: (options: RouteViewOptions) => void; + 'scrollTopOffset'?: number; + 'url'?: string | string[]; + } + interface StencilRouteLink extends JSXBase.HTMLAttributes { 'activeClass'?: string; 'anchorClass'?: string; 'anchorId'?: string; @@ -96,97 +131,65 @@ export namespace Components { 'url'?: string; 'urlMatch'?: Path; } - - interface StencilRouteTitle { - 'pageTitle': string; - 'titleSuffix': string; - } - interface StencilRouteTitleAttributes extends StencilHTMLAttributes { - 'pageTitle'?: string; - 'titleSuffix'?: string; - } - - interface StencilRoute { - 'component'?: string; - 'componentProps'?: { [key: string]: any }; - 'componentUpdated'?: (options: RouteViewOptions) => void; - 'exact': boolean; - 'group': string | null; - 'history'?: RouterHistory; - 'historyType'?: HistoryType; - 'location'?: LocationSegments; - 'match': MatchResults | null; - 'routeRender'?: (props: RouteRenderProps) => any; - 'routeViewsUpdated'?: (options: RouteViewOptions) => void; - 'scrollTopOffset'?: number; - 'url'?: string | string[]; - } - interface StencilRouteAttributes extends StencilHTMLAttributes { - 'component'?: string; - 'componentProps'?: { [key: string]: any }; - 'componentUpdated'?: (options: RouteViewOptions) => void; - 'exact'?: boolean; - 'group'?: string | null; - 'history'?: RouterHistory; - 'historyType'?: HistoryType; + interface StencilRouteSwitch extends JSXBase.HTMLAttributes { + 'group'?: string; 'location'?: LocationSegments; - 'match'?: MatchResults | null; - 'routeRender'?: (props: RouteRenderProps) => any; 'routeViewsUpdated'?: (options: RouteViewOptions) => void; 'scrollTopOffset'?: number; - 'url'?: string | string[]; } - - interface StencilRouter { - 'historyType': HistoryType; - 'root': string; - 'scrollTopOffset'?: number; - 'titleSuffix': string; + interface StencilRouteTitle extends JSXBase.HTMLAttributes { + 'pageTitle'?: string; + 'titleSuffix'?: string; } - interface StencilRouterAttributes extends StencilHTMLAttributes { + interface StencilRouter extends JSXBase.HTMLAttributes { 'historyType'?: HistoryType; 'root'?: string; 'scrollTopOffset'?: number; 'titleSuffix'?: string; } - - interface StencilRouteSwitch { - 'group': string; - 'location'?: LocationSegments; - 'routeViewsUpdated'?: (options: RouteViewOptions) => void; - 'scrollTopOffset'?: number; + interface StencilRouterPrompt extends JSXBase.HTMLAttributes { + 'history'?: RouterHistory; + 'message'?: string | Prompt; + 'when'?: boolean; } - interface StencilRouteSwitchAttributes extends StencilHTMLAttributes { - 'group'?: string; - 'location'?: LocationSegments; - 'routeViewsUpdated'?: (options: RouteViewOptions) => void; - 'scrollTopOffset'?: number; + interface StencilRouterRedirect extends JSXBase.HTMLAttributes { + 'history'?: RouterHistory; + 'root'?: string; + 'url'?: string; } -} -declare global { - interface StencilElementInterfaces { + interface ElementInterfaces { 'StencilAsyncContent': Components.StencilAsyncContent; - 'StencilRouterPrompt': Components.StencilRouterPrompt; - 'StencilRouterRedirect': Components.StencilRouterRedirect; + 'StencilRoute': Components.StencilRoute; 'StencilRouteLink': Components.StencilRouteLink; + 'StencilRouteSwitch': Components.StencilRouteSwitch; 'StencilRouteTitle': Components.StencilRouteTitle; - 'StencilRoute': Components.StencilRoute; 'StencilRouter': Components.StencilRouter; - 'StencilRouteSwitch': Components.StencilRouteSwitch; + 'StencilRouterPrompt': Components.StencilRouterPrompt; + 'StencilRouterRedirect': Components.StencilRouterRedirect; } - interface StencilIntrinsicElements { - 'stencil-async-content': Components.StencilAsyncContentAttributes; - 'stencil-router-prompt': Components.StencilRouterPromptAttributes; - 'stencil-router-redirect': Components.StencilRouterRedirectAttributes; - 'stencil-route-link': Components.StencilRouteLinkAttributes; - 'stencil-route-title': Components.StencilRouteTitleAttributes; - 'stencil-route': Components.StencilRouteAttributes; - 'stencil-router': Components.StencilRouterAttributes; - 'stencil-route-switch': Components.StencilRouteSwitchAttributes; + interface IntrinsicElements { + 'StencilAsyncContent': LocalJSX.StencilAsyncContent; + 'StencilRoute': LocalJSX.StencilRoute; + 'StencilRouteLink': LocalJSX.StencilRouteLink; + 'StencilRouteSwitch': LocalJSX.StencilRouteSwitch; + 'StencilRouteTitle': LocalJSX.StencilRouteTitle; + 'StencilRouter': LocalJSX.StencilRouter; + 'StencilRouterPrompt': LocalJSX.StencilRouterPrompt; + 'StencilRouterRedirect': LocalJSX.StencilRouterRedirect; } +} +export { LocalJSX as JSX }; +declare module "@stencil/core" { + export namespace JSX { + interface ElementInterfaces extends LocalJSX.ElementInterfaces {} + interface IntrinsicElements extends LocalJSX.IntrinsicElements {} + } +} + +declare global { interface HTMLStencilAsyncContentElement extends Components.StencilAsyncContent, HTMLStencilElement {} var HTMLStencilAsyncContentElement: { @@ -194,16 +197,10 @@ declare global { new (): HTMLStencilAsyncContentElement; }; - interface HTMLStencilRouterPromptElement extends Components.StencilRouterPrompt, HTMLStencilElement {} - var HTMLStencilRouterPromptElement: { - prototype: HTMLStencilRouterPromptElement; - new (): HTMLStencilRouterPromptElement; - }; - - interface HTMLStencilRouterRedirectElement extends Components.StencilRouterRedirect, HTMLStencilElement {} - var HTMLStencilRouterRedirectElement: { - prototype: HTMLStencilRouterRedirectElement; - new (): HTMLStencilRouterRedirectElement; + interface HTMLStencilRouteElement extends Components.StencilRoute, HTMLStencilElement {} + var HTMLStencilRouteElement: { + prototype: HTMLStencilRouteElement; + new (): HTMLStencilRouteElement; }; interface HTMLStencilRouteLinkElement extends Components.StencilRouteLink, HTMLStencilElement {} @@ -212,59 +209,55 @@ declare global { new (): HTMLStencilRouteLinkElement; }; + interface HTMLStencilRouteSwitchElement extends Components.StencilRouteSwitch, HTMLStencilElement {} + var HTMLStencilRouteSwitchElement: { + prototype: HTMLStencilRouteSwitchElement; + new (): HTMLStencilRouteSwitchElement; + }; + interface HTMLStencilRouteTitleElement extends Components.StencilRouteTitle, HTMLStencilElement {} var HTMLStencilRouteTitleElement: { prototype: HTMLStencilRouteTitleElement; new (): HTMLStencilRouteTitleElement; }; - interface HTMLStencilRouteElement extends Components.StencilRoute, HTMLStencilElement {} - var HTMLStencilRouteElement: { - prototype: HTMLStencilRouteElement; - new (): HTMLStencilRouteElement; - }; - interface HTMLStencilRouterElement extends Components.StencilRouter, HTMLStencilElement {} var HTMLStencilRouterElement: { prototype: HTMLStencilRouterElement; new (): HTMLStencilRouterElement; }; - interface HTMLStencilRouteSwitchElement extends Components.StencilRouteSwitch, HTMLStencilElement {} - var HTMLStencilRouteSwitchElement: { - prototype: HTMLStencilRouteSwitchElement; - new (): HTMLStencilRouteSwitchElement; + interface HTMLStencilRouterPromptElement extends Components.StencilRouterPrompt, HTMLStencilElement {} + var HTMLStencilRouterPromptElement: { + prototype: HTMLStencilRouterPromptElement; + new (): HTMLStencilRouterPromptElement; }; + interface HTMLStencilRouterRedirectElement extends Components.StencilRouterRedirect, HTMLStencilElement {} + var HTMLStencilRouterRedirectElement: { + prototype: HTMLStencilRouterRedirectElement; + new (): HTMLStencilRouterRedirectElement; + }; interface HTMLElementTagNameMap { 'stencil-async-content': HTMLStencilAsyncContentElement - 'stencil-router-prompt': HTMLStencilRouterPromptElement - 'stencil-router-redirect': HTMLStencilRouterRedirectElement + 'stencil-route': HTMLStencilRouteElement 'stencil-route-link': HTMLStencilRouteLinkElement + 'stencil-route-switch': HTMLStencilRouteSwitchElement 'stencil-route-title': HTMLStencilRouteTitleElement - 'stencil-route': HTMLStencilRouteElement 'stencil-router': HTMLStencilRouterElement - 'stencil-route-switch': HTMLStencilRouteSwitchElement + 'stencil-router-prompt': HTMLStencilRouterPromptElement + 'stencil-router-redirect': HTMLStencilRouterRedirectElement } interface ElementTagNameMap { 'stencil-async-content': HTMLStencilAsyncContentElement; - 'stencil-router-prompt': HTMLStencilRouterPromptElement; - 'stencil-router-redirect': HTMLStencilRouterRedirectElement; + 'stencil-route': HTMLStencilRouteElement; 'stencil-route-link': HTMLStencilRouteLinkElement; + 'stencil-route-switch': HTMLStencilRouteSwitchElement; 'stencil-route-title': HTMLStencilRouteTitleElement; - 'stencil-route': HTMLStencilRouteElement; 'stencil-router': HTMLStencilRouterElement; - 'stencil-route-switch': HTMLStencilRouteSwitchElement; - } - - - export namespace JSX { - export interface Element {} - export interface IntrinsicElements extends StencilIntrinsicElements { - [tagName: string]: any; - } + 'stencil-router-prompt': HTMLStencilRouterPromptElement; + 'stencil-router-redirect': HTMLStencilRouterRedirectElement; } - export interface HTMLAttributes extends StencilHTMLAttributes {} - } + diff --git a/packages/router/src/components/async-content/async-content.tsx b/packages/router/src/components/async-content/async-content.tsx index 3eb9404..35de1a3 100644 --- a/packages/router/src/components/async-content/async-content.tsx +++ b/packages/router/src/components/async-content/async-content.tsx @@ -1,4 +1,4 @@ -import { Component, Prop, State, Watch, ComponentInterface } from '@stencil/core'; +import { Component, Prop, State, Watch, ComponentInterface, h } from '@stencil/core'; @Component({ tag: 'stencil-async-content' diff --git a/packages/router/src/components/prompt/prompt.tsx b/packages/router/src/components/prompt/prompt.tsx index 83f13e7..0eaea20 100644 --- a/packages/router/src/components/prompt/prompt.tsx +++ b/packages/router/src/components/prompt/prompt.tsx @@ -6,7 +6,7 @@ import ActiveRouter from '../../global/active-router'; tag: 'stencil-router-prompt' }) export class StencilRouterPrompt implements ComponentInterface { - @Element() el!: HTMLStencilElement; + @Element() el!: HTMLElement; @Prop() when = true; @Prop() message: string | Prompt = ''; @Prop() history?: RouterHistory; diff --git a/packages/router/src/components/redirect/redirect.tsx b/packages/router/src/components/redirect/redirect.tsx index 369fd69..e12d8b5 100644 --- a/packages/router/src/components/redirect/redirect.tsx +++ b/packages/router/src/components/redirect/redirect.tsx @@ -15,7 +15,7 @@ function getUrl(url: string, root: string) { tag: 'stencil-router-redirect' }) export class Redirect implements ComponentInterface { - @Element() el!: HTMLStencilElement; + @Element() el!: HTMLElement; @Prop() history?: RouterHistory; @Prop() root?: string; diff --git a/packages/router/src/components/route-link/route-link.tsx b/packages/router/src/components/route-link/route-link.tsx index 5286126..e5da8d8 100644 --- a/packages/router/src/components/route-link/route-link.tsx +++ b/packages/router/src/components/route-link/route-link.tsx @@ -1,13 +1,12 @@ -import { Component, Prop, State, Watch, Element, ComponentInterface } from '@stencil/core'; +import { Component, Prop, State, Watch, Element, ComponentInterface, h } from '@stencil/core'; import { matchPath } from '../../utils/match-path'; import { isModifiedEvent } from '../../utils/dom-utils'; import { RouterHistory, Listener, LocationSegments, MatchResults, Path } from '../../global/interfaces'; import ActiveRouter from '../../global/active-router'; -function getUrl(url: string, root: string) { - +const getUrl = (url: string, root: string) => { // Don't allow double slashes - if(url.charAt(0) == '/' && root.charAt(root.length - 1) == '/') { + if (url.charAt(0) == '/' && root.charAt(root.length - 1) == '/') { return root.slice(0, root.length-1) + url; } return root + url; @@ -22,7 +21,7 @@ function getUrl(url: string, root: string) { tag: 'stencil-route-link' }) export class RouteLink implements ComponentInterface { - @Element() el!: HTMLStencilElement; + @Element() el!: HTMLElement; unsubscribe: Listener = () => { return; }; diff --git a/packages/router/src/components/route-title/route-title.tsx b/packages/router/src/components/route-title/route-title.tsx index aedb8a9..a92f655 100644 --- a/packages/router/src/components/route-title/route-title.tsx +++ b/packages/router/src/components/route-title/route-title.tsx @@ -11,10 +11,10 @@ import ActiveRouter from '../../global/active-router'; tag: 'stencil-route-title' }) export class RouteTitle implements ComponentInterface { - @Element() el!: HTMLStencilElement; + @Element() el!: HTMLElement; @Prop() titleSuffix: string = ''; @Prop() pageTitle: string = ''; - + @Watch('pageTitle') updateDocumentTitle() { document.title = `${this.pageTitle}${this.titleSuffix || ''}`; diff --git a/packages/router/src/components/route/route.tsx b/packages/router/src/components/route/route.tsx index fc0248c..3c95757 100644 --- a/packages/router/src/components/route/route.tsx +++ b/packages/router/src/components/route/route.tsx @@ -1,4 +1,4 @@ -import { Component, Prop, Element, Watch, ComponentInterface } from '@stencil/core'; +import { Component, Prop, Element, Watch, ComponentInterface, h } from '@stencil/core'; import { matchPath, matchesAreEqual } from '../../utils/match-path'; import { RouterHistory, LocationSegments, MatchResults, RouteViewOptions, HistoryType, RouteRenderProps } from '../../global/interfaces'; import ActiveRouter from '../../global/active-router'; diff --git a/packages/router/src/components/router/router.tsx b/packages/router/src/components/router/router.tsx index d566a1b..499cadf 100644 --- a/packages/router/src/components/router/router.tsx +++ b/packages/router/src/components/router/router.tsx @@ -1,11 +1,11 @@ -import { Component, Prop, State, ComponentInterface } from '@stencil/core'; +import { Component, Prop, State, ComponentInterface, getWindow, h } from '@stencil/core'; import createHistory from '../../utils/createBrowserHistory'; import createHashHistory from '../../utils/createHashHistory'; import { LocationSegments, HistoryType, RouterHistory, RouteViewOptions } from '../../global/interfaces'; import ActiveRouter, { ActiveRouterState } from '../../global/active-router'; import { QueueApi } from '@stencil/core/dist/declarations'; -function getLocation(location: LocationSegments, root: string): LocationSegments { +const getLocation = (location: LocationSegments, root: string): LocationSegments => { // Remove the root URL if found at beginning of string const pathname = location.pathname.indexOf(root) == 0 ? '/' + location.pathname.slice(root.length) : @@ -17,7 +17,7 @@ function getLocation(location: LocationSegments, root: string): LocationSegments }; } -const HISTORIES: { [key in HistoryType]: () => RouterHistory } = { +const HISTORIES: { [key in HistoryType]: (win: Window) => RouterHistory } = { 'browser': createHistory, 'hash': createHashHistory }; @@ -31,6 +31,7 @@ const HISTORIES: { [key in HistoryType]: () => RouterHistory } = { tag: 'stencil-router' }) export class Router implements ComponentInterface { + win = getWindow(this); @Prop() root: string = '/'; @Prop({ context: 'isServer' }) private isServer!: boolean; @Prop({ context: 'queue'}) queue!: QueueApi; @@ -46,7 +47,7 @@ export class Router implements ComponentInterface { @State() history?: RouterHistory; componentWillLoad() { - this.history = HISTORIES[this.historyType](); + this.history = HISTORIES[this.historyType](this.win); this.history.listen(async (location: LocationSegments) => { location = getLocation(location, this.root); @@ -73,17 +74,16 @@ export class Router implements ComponentInterface { if (this.history.action === 'POP' && Array.isArray(this.history.location.scrollPosition)) { return this.queue.write(() => { if (this.history && this.history.location && Array.isArray(this.history.location.scrollPosition)) { - window.scrollTo(this.history.location.scrollPosition[0], this.history.location.scrollPosition[1]); + this.win.scrollTo(this.history.location.scrollPosition[0], this.history.location.scrollPosition[1]); } }); } // okay, the frame has passed. Go ahead and render now return this.queue.write(() => { - window.scrollTo(0, scrollToLocation); + this.win.scrollTo(0, scrollToLocation); }); } - render() { if (!this.location || !this.history) { return; diff --git a/packages/router/src/components/switch/switch.tsx b/packages/router/src/components/switch/switch.tsx index 77b81be..7fff283 100644 --- a/packages/router/src/components/switch/switch.tsx +++ b/packages/router/src/components/switch/switch.tsx @@ -1,5 +1,4 @@ -import uuidv4 from '../../utils/uuid'; -import { Component, Prop, Element, Watch, ComponentInterface } from '@stencil/core'; +import { Component, Prop, Element, Watch, ComponentInterface, h } from '@stencil/core'; import { QueueApi } from '@stencil/core/dist/declarations'; import { LocationSegments, MatchResults, RouteViewOptions } from '../../global/interfaces'; import ActiveRouter from '../../global/active-router'; @@ -10,14 +9,11 @@ interface Child { match: MatchResults | null } -function getUniqueId() { - if (window.crypto) { - return uuidv4(); - } +const getUniqueId = () => { return ((Math.random() * 10e16).toString().match(/.{4}/g) || []).join('-'); } -function getMatch(pathname: string, url: any, exact: boolean) { +const getMatch = (pathname: string, url: any, exact: boolean) => { return matchPath(pathname, { path: url, exact: exact, @@ -25,7 +21,7 @@ function getMatch(pathname: string, url: any, exact: boolean) { }); } -function isHTMLStencilRouteElement(element: Element): element is HTMLStencilRouteElement { +const isHTMLStencilRouteElement = (element: Element): element is HTMLStencilRouteElement => { return element.tagName.toLowerCase() === 'stencil-route'; } @@ -33,7 +29,7 @@ function isHTMLStencilRouteElement(element: Element): element is HTMLStencilRout tag: 'stencil-route-switch' }) export class RouteSwitch implements ComponentInterface { - @Element() el!: HTMLStencilElement; + @Element() el!: HTMLElement; @Prop({ context: 'queue'}) queue!: QueueApi; diff --git a/packages/router/src/global/active-router.tsx b/packages/router/src/global/active-router.tsx index ddd9783..7945991 100644 --- a/packages/router/src/global/active-router.tsx +++ b/packages/router/src/global/active-router.tsx @@ -1,3 +1,4 @@ +import { h } from '@stencil/core'; import { createProviderConsumer } from '@stencil/state-tunnel'; import { LocationSegments, RouterHistory, RouteViewOptions, HistoryType } from './interfaces'; @@ -21,4 +22,7 @@ export default createProviderConsumer({ titleSuffix: '', root: '/', routeViewsUpdated: () => {} -}); +}, +(subscribe, child) => ( + +)); diff --git a/packages/router/src/utils/__tests__/createHref-test.ts b/packages/router/src/utils/__tests__/createHref-test.ts index f652e4a..ac0427a 100644 --- a/packages/router/src/utils/__tests__/createHref-test.ts +++ b/packages/router/src/utils/__tests__/createHref-test.ts @@ -6,7 +6,7 @@ describe('a browser history', () => { describe('with no basename', () => { let history: RouterHistory; beforeEach(() => { - history = createBrowserHistory(); + history = createBrowserHistory(window); }); it('knows how to create hrefs', () => { @@ -25,7 +25,7 @@ describe('a browser history', () => { describe('with a basename', () => { let history: RouterHistory; beforeEach(() => { - history = createBrowserHistory({ basename: '/the/base' }); + history = createBrowserHistory(window, { basename: '/the/base' }); }); it('knows how to create hrefs', () => { @@ -44,7 +44,7 @@ describe('a browser history', () => { describe('with a bad basename', () => { let history: RouterHistory; beforeEach(() => { - history = createBrowserHistory({ basename: '/the/bad/base/' }); + history = createBrowserHistory(window, { basename: '/the/bad/base/' }); }); it('knows how to create hrefs', () => { @@ -63,7 +63,7 @@ describe('a browser history', () => { describe('with a slash basename', () => { let history: RouterHistory; beforeEach(() => { - history = createBrowserHistory({ basename: '/' }); + history = createBrowserHistory(window, { basename: '/' }); }); it('knows how to create hrefs', () => { @@ -82,7 +82,7 @@ describe('a browser history', () => { describe('encoding', () => { let history: RouterHistory; beforeEach(() => { - history = createBrowserHistory(); + history = createBrowserHistory(window); }); it('does not encode the generated path', () => { @@ -109,7 +109,7 @@ describe('a hash history', () => { describe('with default encoding', () => { let history: RouterHistory; beforeEach(() => { - history = createHashHistory(); + history = createHashHistory(window); }); it('knows how to create hrefs', () => { @@ -128,7 +128,7 @@ describe('a hash history', () => { describe('with hashType="noslash"', () => { let history: RouterHistory; beforeEach(() => { - history = createHashHistory({ hashType: 'noslash' }); + history = createHashHistory(window, { hashType: 'noslash' }); }); it('knows how to create hrefs', () => { @@ -147,7 +147,7 @@ describe('a hash history', () => { describe('with hashType="hashbang"', () => { let history: RouterHistory; beforeEach(() => { - history = createHashHistory({ hashType: 'hashbang' }); + history = createHashHistory(window, { hashType: 'hashbang' }); }); it('knows how to create hrefs', () => { @@ -166,7 +166,7 @@ describe('a hash history', () => { describe('with a basename', () => { let history: RouterHistory; beforeEach(() => { - history = createHashHistory({ basename: '/the/base' }); + history = createHashHistory(window, { basename: '/the/base' }); }); it('knows how to create hrefs', () => { @@ -184,7 +184,7 @@ describe('a hash history', () => { describe('with a bad basename', () => { let history: RouterHistory; beforeEach(() => { - history = createHashHistory({ basename: '/the/bad/base/' }); + history = createHashHistory(window, { basename: '/the/bad/base/' }); }); it('knows how to create hrefs', () => { @@ -202,7 +202,7 @@ describe('a hash history', () => { describe('with a slash basename', () => { let history: RouterHistory; beforeEach(() => { - history = createHashHistory({ basename: '/' }); + history = createHashHistory(window, { basename: '/' }); }); it('knows how to create hrefs', () => { @@ -220,7 +220,7 @@ describe('a hash history', () => { describe('encoding', () => { let history: RouterHistory; beforeEach(() => { - history = createHashHistory(); + history = createHashHistory(window); }); it('does not encode the generated path', () => { diff --git a/packages/router/src/utils/createBrowserHistory.ts b/packages/router/src/utils/createBrowserHistory.ts index e579ffd..4771f1e 100644 --- a/packages/router/src/utils/createBrowserHistory.ts +++ b/packages/router/src/utils/createBrowserHistory.ts @@ -2,7 +2,7 @@ import { createLocation, createKey } from './location-utils'; import { RouterHistory, LocationSegments, Prompt } from '../global/interfaces'; -import { invariant, warning } from './log'; +import { warning } from './log'; import { addLeadingSlash, stripTrailingSlash, @@ -13,7 +13,6 @@ import { import createTransitionManager from './createTransitionManager'; import createScrollHistory from './createScrollHistory'; import { - canUseDOM, addEventListener, removeEventListener, getConfirmation, @@ -37,9 +36,9 @@ interface NextState { const PopStateEvent = 'popstate'; const HashChangeEvent = 'hashchange'; -const getHistoryState = () => { +const getHistoryState = (win: Window) => { try { - return window.history.state || {}; + return win.history.state || {}; } catch (e) { // IE 11 sometimes throws when accessing window.history.state // See https://github.com/ReactTraining/history/pull/289 @@ -51,26 +50,23 @@ const getHistoryState = () => { * Creates a history object that uses the HTML5 history API including * pushState, replaceState, and the popstate event. */ -const createBrowserHistory = (props: CreateBrowserHistoryOptions = {}): RouterHistory => { - invariant( - canUseDOM, - 'Browser history needs a DOM' - ); +const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = {}): RouterHistory => { + let forceNextPop = false; - const globalHistory = window.history; - const canUseHistory = supportsHistory(); - const needsHashChangeListener = !supportsPopStateOnHashChange(); - const scrollHistory = createScrollHistory(); + const globalHistory = win.history; + const canUseHistory = supportsHistory(win); + const needsHashChangeListener = !supportsPopStateOnHashChange(win.navigator); + const scrollHistory = createScrollHistory(win); const forceRefresh = (props.forceRefresh != null) ? props.forceRefresh : false; const getUserConfirmation = (props.getUserConfirmation != null) ? props.getUserConfirmation : getConfirmation; const keyLength = (props.keyLength != null) ? props.keyLength : 6; const basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : ''; - const getDOMLocation = (historyState: LocationSegments) => { + const getDOMLocation = (win: Window, historyState: LocationSegments) => { historyState = historyState || {}; const { key, state } = historyState; - const { pathname, search, hash } = window.location; + const { pathname, search, hash } = win.location; let path = pathname + search + hash; @@ -113,14 +109,13 @@ const createBrowserHistory = (props: CreateBrowserHistoryOptions = {}): RouterHi return; } - handlePop(getDOMLocation(event.state)); + handlePop(getDOMLocation(win, event.state)); }; - const handleHashChange = () => { - handlePop(getDOMLocation(getHistoryState())); + const handleHashChange = (win: Window) => { + handlePop(getDOMLocation(win, getHistoryState(win))); }; - let forceNextPop = false; const handlePop = (location: LocationSegments) => { if (forceNextPop) { @@ -166,7 +161,7 @@ const createBrowserHistory = (props: CreateBrowserHistoryOptions = {}): RouterHi } }; - const initialLocation = getDOMLocation(getHistoryState()); + const initialLocation = getDOMLocation(win, getHistoryState(win)); let allKeys = [ initialLocation.key ]; // Public interface @@ -194,10 +189,10 @@ const createBrowserHistory = (props: CreateBrowserHistoryOptions = {}): RouterHi const { key, state } = location; if (canUseHistory) { - globalHistory.pushState({ key, state }, undefined, href); + globalHistory.pushState({ key, state }, '', href); if (forceRefresh) { - window.location.href = href; + win.location.href = href; } else { const prevIndex = allKeys.indexOf(history.location.key); const nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1); @@ -213,7 +208,7 @@ const createBrowserHistory = (props: CreateBrowserHistoryOptions = {}): RouterHi 'Browser history cannot push state in browsers that do not support HTML5 history' ); - window.location.href = href; + win.location.href = href; } }); }; @@ -237,10 +232,10 @@ const createBrowserHistory = (props: CreateBrowserHistoryOptions = {}): RouterHi const { key, state } = location; if (canUseHistory) { - globalHistory.replaceState({ key, state }, undefined, href); + globalHistory.replaceState({ key, state }, '', href); if (forceRefresh) { - window.location.replace(href); + win.location.replace(href); } else { const prevIndex = allKeys.indexOf(history.location.key); @@ -256,7 +251,7 @@ const createBrowserHistory = (props: CreateBrowserHistoryOptions = {}): RouterHi 'Browser history cannot replace state in browsers that do not support HTML5 history' ); - window.location.replace(href); + win.location.replace(href); } }); }; diff --git a/packages/router/src/utils/createHashHistory.ts b/packages/router/src/utils/createHashHistory.ts index bac30f1..9f999bd 100644 --- a/packages/router/src/utils/createHashHistory.ts +++ b/packages/router/src/utils/createHashHistory.ts @@ -2,7 +2,7 @@ import { createLocation, locationsAreEqual, createKey } from './location-utils'; import { RouterHistory, LocationSegments, Prompt } from '../global/interfaces'; -import { invariant, warning } from './log'; +import { warning } from './log'; import { addLeadingSlash, stripLeadingSlash, @@ -13,7 +13,6 @@ import { } from './path-utils'; import createTransitionManager from './createTransitionManager'; import { - canUseDOM, addEventListener, removeEventListener, getConfirmation, @@ -43,34 +42,29 @@ const HashPathCoders = { } }; -const getHashPath = () => { +const getHashPath = (win: Window) => { // We can't use window.location.hash here because it's not // consistent across browsers - Firefox will pre-decode it! - const href = window.location.href; + const href = win.location.href; const hashIndex = href.indexOf('#'); return hashIndex === -1 ? '' : href.substring(hashIndex + 1); }; -const pushHashPath = (path: string) => ( - window.location.hash = path +const pushHashPath = (win: Window, path: string) => ( + win.location.hash = path ); -const replaceHashPath = (path: string) => { - const hashIndex = window.location.href.indexOf('#'); +const replaceHashPath = (win: Window, path: string) => { + const hashIndex = win.location.href.indexOf('#'); - window.location.replace( - window.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path + win.location.replace( + win.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path ); }; -const createHashHistory = (props: CreateHashHistoryOptions = {}): RouterHistory => { - invariant( - canUseDOM, - 'Hash history needs a DOM' - ); - - const globalHistory = window.history; - const canGoWithoutReload = supportsGoWithoutReloadUsingHash(); +const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): RouterHistory => { + const globalHistory = win.history; + const canGoWithoutReload = supportsGoWithoutReloadUsingHash(win.navigator); const keyLength = (props.keyLength != null) ? props.keyLength : 6; const { @@ -81,8 +75,8 @@ const createHashHistory = (props: CreateHashHistoryOptions = {}): RouterHistory const { encodePath, decodePath } = HashPathCoders[hashType]; - const getDOMLocation = () => { - let path = decodePath(getHashPath()); + const getDOMLocation = (win: Window) => { + let path = decodePath(getHashPath(win)); warning( (!basename || hasBasename(path, basename)), @@ -114,14 +108,14 @@ const createHashHistory = (props: CreateHashHistoryOptions = {}): RouterHistory let ignorePath: any = null; const handleHashChange = () => { - const path = getHashPath(); + const path = getHashPath(win); const encodedPath = encodePath(path); if (path !== encodedPath) { // Ensure we always have a properly-encoded hash. - replaceHashPath(encodedPath); + replaceHashPath(win, encodedPath); } else { - const location = getDOMLocation(); + const location = getDOMLocation(win); const prevLocation = history.location; if (!forceNextPop && locationsAreEqual(prevLocation, location)) { @@ -183,14 +177,14 @@ const createHashHistory = (props: CreateHashHistoryOptions = {}): RouterHistory }; // Ensure the hash is encoded properly before doing anything else. - const path = getHashPath(); + const path = getHashPath(win); const encodedPath = encodePath(path); if (path !== encodedPath) { - replaceHashPath(encodedPath); + replaceHashPath(win, encodedPath); } - const initialLocation = getDOMLocation(); + const initialLocation = getDOMLocation(win); let allPaths = [ createPath(initialLocation) ]; // Public interface @@ -215,14 +209,14 @@ const createHashHistory = (props: CreateHashHistoryOptions = {}): RouterHistory const path = createPath(location); const encodedPath = encodePath(basename + path); - const hashChanged = getHashPath() !== encodedPath; + const hashChanged = getHashPath(win) !== encodedPath; if (hashChanged) { // We cannot tell if a hashchange was caused by a PUSH, so we'd // rather setState here and ignore the hashchange. The caveat here // is that other hash histories in the page will consider it a POP. ignorePath = path; - pushHashPath(encodedPath); + pushHashPath(win, encodedPath); const prevIndex = allPaths.lastIndexOf(createPath(history.location)); const nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1); @@ -258,14 +252,14 @@ const createHashHistory = (props: CreateHashHistoryOptions = {}): RouterHistory const path = createPath(location); const encodedPath = encodePath(basename + path); - const hashChanged = getHashPath() !== encodedPath; + const hashChanged = getHashPath(win) !== encodedPath; if (hashChanged) { // We cannot tell if a hashchange was caused by a REPLACE, so we'd // rather setState here and ignore the hashchange. The caveat here // is that other hash histories in the page will consider it a POP. ignorePath = path; - replaceHashPath(encodedPath); + replaceHashPath(win, encodedPath); } const prevIndex = allPaths.indexOf(createPath(history.location)); diff --git a/packages/router/src/utils/createScrollHistory.ts b/packages/router/src/utils/createScrollHistory.ts index b27ac95..0accbb7 100644 --- a/packages/router/src/utils/createScrollHistory.ts +++ b/packages/router/src/utils/createScrollHistory.ts @@ -1,23 +1,10 @@ import { storageAvailable } from './dom-utils'; -const createScrollHistory = (applicationScrollKey: string = 'scrollPositions') => { +const createScrollHistory = (win: Window, applicationScrollKey: string = 'scrollPositions') => { let scrollPositions = new Map(); - if (storageAvailable('sessionStorage')) { - const scrollData = window.sessionStorage.getItem(applicationScrollKey); - scrollPositions = scrollData ? - new Map(JSON.parse(scrollData)) : - scrollPositions; - } - - - if ('scrollRestoration' in history) { - history.scrollRestoration = 'manual'; - } - - - function set(key: string, value: [number, number]) { + const set = (key: string, value: [number, number]) => { scrollPositions.set(key, value); if (storageAvailable('sessionStorage')) { const arrayData: [string, [number, number]][] = []; @@ -25,20 +12,31 @@ const createScrollHistory = (applicationScrollKey: string = 'scrollPositions') = scrollPositions.forEach((value, key) => { arrayData.push([key, value]); }); - window.sessionStorage.setItem('scrollPositions', JSON.stringify(arrayData)); + win.sessionStorage.setItem('scrollPositions', JSON.stringify(arrayData)); } } - function get(key: string) { + const get = (key: string) => { return scrollPositions.get(key); } - function has(key: string) { + const has = (key: string) => { return scrollPositions.has(key); } - function capture(key: string) { - set(key, [window.scrollX, window.scrollY]) + const capture = (key: string) => { + set(key, [win.scrollX, win.scrollY]) + } + + if (storageAvailable('sessionStorage')) { + const scrollData = win.sessionStorage.getItem(applicationScrollKey); + scrollPositions = scrollData ? + new Map(JSON.parse(scrollData)) : + scrollPositions; + } + + if ('scrollRestoration' in history) { + history.scrollRestoration = 'manual'; } return { diff --git a/packages/router/src/utils/dom-utils.ts b/packages/router/src/utils/dom-utils.ts index 5efc548..6ea0413 100644 --- a/packages/router/src/utils/dom-utils.ts +++ b/packages/router/src/utils/dom-utils.ts @@ -1,6 +1,3 @@ -export const canUseDOM = !!( - typeof window !== 'undefined' && window.document && window.document.createElement -); export const addEventListener = (node: HTMLElement | Window, event: any, listener: any) => ( node.addEventListener @@ -14,8 +11,8 @@ export const removeEventListener = (node: HTMLElement | Window, event: any, list : (node as any).detachEvent('on' + event, listener) ); -export const getConfirmation = (message: string, callback: (confirmed: boolean) => {}) => ( - callback(window.confirm(message)) +export const getConfirmation = (win: Window, message: string, callback: (confirmed: boolean) => {}) => ( + callback(win.confirm(message)) ); export const isModifiedEvent = (event: MouseEvent) => ( @@ -29,8 +26,8 @@ export const isModifiedEvent = (event: MouseEvent) => ( * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586 */ -export const supportsHistory = () => { - const ua = window.navigator.userAgent; +export const supportsHistory = (win: Window) => { + const ua = win.navigator.userAgent; if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && @@ -40,22 +37,22 @@ export const supportsHistory = () => { return false; } - return window.history && 'pushState' in window.history; + return win.history && 'pushState' in win.history; }; /** * Returns true if browser fires popstate on hash change. * IE10 and IE11 do not. */ -export const supportsPopStateOnHashChange = () => ( - window.navigator.userAgent.indexOf('Trident') === -1 +export const supportsPopStateOnHashChange = (nav: Navigator) => ( + nav.userAgent.indexOf('Trident') === -1 ); /** * Returns false if using go(n) with hash history causes a full page reload. */ -export const supportsGoWithoutReloadUsingHash = () => ( - window.navigator.userAgent.indexOf('Firefox') === -1 +export const supportsGoWithoutReloadUsingHash = (nav: Navigator) => ( + nav.userAgent.indexOf('Firefox') === -1 ); export const isExtraneousPopstateEvent = (event: any) => ( diff --git a/packages/router/src/utils/location-utils.ts b/packages/router/src/utils/location-utils.ts index ea3d968..eefe7d2 100644 --- a/packages/router/src/utils/location-utils.ts +++ b/packages/router/src/utils/location-utils.ts @@ -92,7 +92,7 @@ export function valueEqual(a: any, b: any): boolean { } if (Array.isArray(a)) { - return Array.isArray(b) && a.length === b.length && a.every(function (item, index) { + return Array.isArray(b) && a.length === b.length && a.every((item, index) => { return valueEqual(item, b[index]) }) } @@ -119,7 +119,7 @@ export function valueEqual(a: any, b: any): boolean { return false; } - return aKeys.every(function (key) { + return aKeys.every((key) => { return valueEqual(a[key], b[key]); }); } diff --git a/packages/router/src/utils/log.ts b/packages/router/src/utils/log.ts index 58cadb4..2b360c8 100644 --- a/packages/router/src/utils/log.ts +++ b/packages/router/src/utils/log.ts @@ -1,10 +1,5 @@ -export function invariant(value: boolean, ...args: any[]) { - if (!value) { - console.error(...args); - } -} -export function warning(value:boolean, ...args: any[]) { +export const warning = (value:boolean, ...args: any[]) => { if (!value) { console.warn(...args); } diff --git a/packages/router/src/utils/match-path.ts b/packages/router/src/utils/match-path.ts index 4a4a27f..5371f46 100644 --- a/packages/router/src/utils/match-path.ts +++ b/packages/router/src/utils/match-path.ts @@ -1,4 +1,4 @@ -import pathToRegexp, { Key, Path } from './path-to-regex'; +import { Key, Path, pathToRegexp } from './path-to-regex'; import { MatchOptions, MatchResults } from '../global/interfaces'; import { valueEqual } from './location-utils'; @@ -7,12 +7,12 @@ interface CompileOptions { strict: boolean; } +let cacheCount = 0; const patternCache: {[key: string]: any } = {}; const cacheLimit = 10000; -let cacheCount = 0; // Memoized function for creating the path match regex -function compilePath(pattern: Path, options: CompileOptions): { re: RegExp, keys: Key[]} { +const compilePath = (pattern: Path, options: CompileOptions): { re: RegExp, keys: Key[]} => { const cacheKey = `${options.end}${options.strict}`; const cache = patternCache[cacheKey] || (patternCache[cacheKey] = {}); const cachePattern = JSON.stringify(pattern); @@ -36,7 +36,7 @@ function compilePath(pattern: Path, options: CompileOptions): { re: RegExp, keys /** * Public API for matching a URL pathname to a path pattern. */ -export function matchPath(pathname: string, options: MatchOptions = {}): null | MatchResults { +export const matchPath = (pathname: string, options: MatchOptions = {}): null | MatchResults => { if (typeof options === 'string') { options = { path: options }; } @@ -67,7 +67,7 @@ export function matchPath(pathname: string, options: MatchOptions = {}): null | }; } -export function matchesAreEqual(a: MatchResults | null, b: MatchResults | null) { +export const matchesAreEqual = (a: MatchResults | null, b: MatchResults | null) => { if (a == null && b == null) { return true; } diff --git a/packages/router/src/utils/path-to-regex.ts b/packages/router/src/utils/path-to-regex.ts index 52ae8ff..6cbfe26 100644 --- a/packages/router/src/utils/path-to-regex.ts +++ b/packages/router/src/utils/path-to-regex.ts @@ -58,7 +58,7 @@ var PATH_REGEXP = new RegExp([ /** * Parse a string for the raw tokens. */ -export function parse(str: string, options?: ParseOptions): Token[] { +export const parse = (str: string, options?: ParseOptions): Token[] => { var tokens = []; var key = 0; var index = 0; @@ -133,14 +133,14 @@ export function parse(str: string, options?: ParseOptions): Token[] { /** * Compile a string to a template function for the path. */ -export function compile(str: string, options?: ParseOptions) { +export const compile = (str: string, options?: ParseOptions) => { return tokensToFunction(parse(str, options)); } /** * Expose a method for transforming tokens into the path function. */ -export function tokensToFunction(tokens: Token[]): PathFunction { +export const tokensToFunction = (tokens: Token[]): PathFunction => { // Compile all the tokens into regexps. var matches = new Array(tokens.length); @@ -152,7 +152,7 @@ export function tokensToFunction(tokens: Token[]): PathFunction { } } - return function (data?: { [key: string]: any }, options?: PathFunctionOptions): string { + return (data?: { [key: string]: any }, options?: PathFunctionOptions): string => { var path = ''; var encode = (options && options.encode) || encodeURIComponent; @@ -219,28 +219,28 @@ export function tokensToFunction(tokens: Token[]): PathFunction { /** * Escape a regular expression string. */ -function escapeString(str: string) { +const escapeString = (str: string) => { return str.replace(/([.+*?=^!:${}()[\]|/\\])/g, '\\$1'); } /** * Escape the capturing group by escaping special characters and meaning. */ -function escapeGroup(group: string) { +const escapeGroup = (group: string) => { return group.replace(/([=!:$/()])/g, '\\$1'); } /** * Get the flags for a regexp from the options. */ -function flags(options: RegExpOptions): string { +const flags = (options: RegExpOptions): string => { return options && options.sensitive ? '' : 'i'; } /** * Pull out keys from a regexp. */ -function regexpToRegexp(path: RegExp, keys: Key[]): RegExp { +const regexpToRegexp = (path: RegExp, keys: Key[]): RegExp => { if (!keys) return path // Use a negative lookahead to match only capturing groups. @@ -266,7 +266,7 @@ function regexpToRegexp(path: RegExp, keys: Key[]): RegExp { /** * Transform an array into a regexp. */ -function arrayToRegexp(path: Array, keys: Key[], options: RegExpOptions): RegExp { +const arrayToRegexp = (path: Array, keys: Key[], options: RegExpOptions): RegExp => { var parts = []; for (var i = 0; i < path.length; i++) { @@ -279,14 +279,14 @@ function arrayToRegexp(path: Array, keys: Key[], options: RegEx /** * Create a path regexp from string input. */ -function stringToRegexp(path: string, keys: Key[], options: RegExpOptions): RegExp { +const stringToRegexp = (path: string, keys: Key[], options: RegExpOptions): RegExp => { return tokensToRegExp(parse(path, options), keys, options); } /** * Expose a function for taking tokens and returning a RegExp. */ -export function tokensToRegExp(tokens: Token[], keys?: Key[], options?: RegExpOptions): RegExp { +export const tokensToRegExp = (tokens: Token[], keys?: Key[], options?: RegExpOptions): RegExp => { options = options || {} var strict = options.strict; @@ -343,7 +343,7 @@ export function tokensToRegExp(tokens: Token[], keys?: Key[], options?: RegExpOp * placeholder key descriptions. For example, using `/user/:id`, `keys` will * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`. */ -export default function pathToRegexp (path: Path, keys: Key[], options: RegExpOptions): RegExp { +export const pathToRegexp = (path: Path, keys: Key[], options: RegExpOptions): RegExp => { if (path instanceof RegExp) { return regexpToRegexp(path, keys); } diff --git a/packages/router/src/utils/uuid.ts b/packages/router/src/utils/uuid.ts deleted file mode 100644 index d192e65..0000000 --- a/packages/router/src/utils/uuid.ts +++ /dev/null @@ -1,6 +0,0 @@ -export default function() { - return ([1e7].toString() + -1e3.toString() + -4e3.toString() + -8e3.toString() + -1e11.toString()).replace(/[018]/g, function(c: any) { - const random = window.crypto.getRandomValues(new Uint8Array(1)) as Uint8Array; - return (c ^ random[0] & 15 >> c / 4).toString(16); - }); -} diff --git a/packages/router/tsconfig.json b/packages/router/tsconfig.json index f3d9cc4..87c3ec4 100644 --- a/packages/router/tsconfig.json +++ b/packages/router/tsconfig.json @@ -10,8 +10,8 @@ "es2015" ], "moduleResolution": "node", - "module": "es2015", - "target": "es2015", + "module": "esnext", + "target": "es2017", "noImplicitAny": true, "noUnusedLocals": true, "noUnusedParameters": true, From 5bb6413b13646eb79a4648621e55783bb02bb66b Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Sat, 6 Apr 2019 21:25:00 -0500 Subject: [PATCH 04/16] wip --- packages/router/package.json | 1 + packages/router/src/utils/createBrowserHistory.ts | 6 ++---- packages/router/src/utils/createScrollHistory.ts | 5 ++--- packages/router/src/utils/dom-utils.ts | 14 +++++++------- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/packages/router/package.json b/packages/router/package.json index 5724a79..c64de1e 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -7,6 +7,7 @@ "unpkg": "dist/stencilrouter.js", "types": "dist/types/index.d.ts", "collection": "dist/collection/collection-manifest.json", + "collection:main": "dist/collection/index.js", "files": [ "dist/" ], diff --git a/packages/router/src/utils/createBrowserHistory.ts b/packages/router/src/utils/createBrowserHistory.ts index 4771f1e..a0570b1 100644 --- a/packages/router/src/utils/createBrowserHistory.ts +++ b/packages/router/src/utils/createBrowserHistory.ts @@ -105,11 +105,9 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = const handlePopState = (event: any) => { // Ignore extraneous popstate events in WebKit. - if (isExtraneousPopstateEvent(event)) { - return; + if (!isExtraneousPopstateEvent(win.navigator, event)) { + handlePop(getDOMLocation(win, event.state)); } - - handlePop(getDOMLocation(win, event.state)); }; const handleHashChange = (win: Window) => { diff --git a/packages/router/src/utils/createScrollHistory.ts b/packages/router/src/utils/createScrollHistory.ts index 0accbb7..c8c093c 100644 --- a/packages/router/src/utils/createScrollHistory.ts +++ b/packages/router/src/utils/createScrollHistory.ts @@ -6,7 +6,7 @@ const createScrollHistory = (win: Window, applicationScrollKey: string = 'scroll const set = (key: string, value: [number, number]) => { scrollPositions.set(key, value); - if (storageAvailable('sessionStorage')) { + if (storageAvailable(win, 'sessionStorage')) { const arrayData: [string, [number, number]][] = []; scrollPositions.forEach((value, key) => { @@ -28,7 +28,7 @@ const createScrollHistory = (win: Window, applicationScrollKey: string = 'scroll set(key, [win.scrollX, win.scrollY]) } - if (storageAvailable('sessionStorage')) { + if (storageAvailable(win, 'sessionStorage')) { const scrollData = win.sessionStorage.getItem(applicationScrollKey); scrollPositions = scrollData ? new Map(JSON.parse(scrollData)) : @@ -48,5 +48,4 @@ const createScrollHistory = (win: Window, applicationScrollKey: string = 'scroll } - export default createScrollHistory; diff --git a/packages/router/src/utils/dom-utils.ts b/packages/router/src/utils/dom-utils.ts index 6ea0413..60d841e 100644 --- a/packages/router/src/utils/dom-utils.ts +++ b/packages/router/src/utils/dom-utils.ts @@ -55,21 +55,21 @@ export const supportsGoWithoutReloadUsingHash = (nav: Navigator) => ( nav.userAgent.indexOf('Firefox') === -1 ); -export const isExtraneousPopstateEvent = (event: any) => ( +export const isExtraneousPopstateEvent = (nav: Navigator, event: any) => ( event.state === undefined && - navigator.userAgent.indexOf('CriOS') === -1 + nav.userAgent.indexOf('CriOS') === -1 ); -export const storageAvailable = (type: 'localStorage' | 'sessionStorage') => { - var storage = window[type], - x = '__storage_test__'; +export const storageAvailable = (win: any, type: 'localStorage' | 'sessionStorage') => { + const storage = win[type]; + const x = '__storage_test__'; try { storage.setItem(x, x); storage.removeItem(x); return true; - } - catch(e) { + + } catch(e) { return e instanceof DOMException && ( // everything except Firefox e.code === 22 || From 606ee95666157f8598fbc97b49bd2b30dd6a9c42 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Mon, 8 Apr 2019 11:36:27 -0500 Subject: [PATCH 05/16] win updates --- .../router/src/utils/createBrowserHistory.ts | 17 +++++++---------- packages/router/src/utils/createHashHistory.ts | 16 +++++++--------- .../router/src/utils/createScrollHistory.ts | 2 +- packages/router/src/utils/dom-utils.ts | 12 ------------ 4 files changed, 15 insertions(+), 32 deletions(-) diff --git a/packages/router/src/utils/createBrowserHistory.ts b/packages/router/src/utils/createBrowserHistory.ts index a0570b1..89f1409 100644 --- a/packages/router/src/utils/createBrowserHistory.ts +++ b/packages/router/src/utils/createBrowserHistory.ts @@ -13,8 +13,6 @@ import { import createTransitionManager from './createTransitionManager'; import createScrollHistory from './createScrollHistory'; import { - addEventListener, - removeEventListener, getConfirmation, supportsHistory, supportsPopStateOnHashChange, @@ -110,7 +108,7 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = } }; - const handleHashChange = (win: Window) => { + const handleHashChange = () => { handlePop(getDOMLocation(win, getHistoryState(win))); }; @@ -161,6 +159,8 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = const initialLocation = getDOMLocation(win, getHistoryState(win)); let allKeys = [ initialLocation.key ]; + let listenerCount = 0; + let isBlocked = false; // Public interface @@ -261,28 +261,25 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = const goBack = () => go(-1); const goForward = () => go(1); - let listenerCount = 0; const checkDOMListeners = (delta: number) => { listenerCount += delta; if (listenerCount === 1) { - addEventListener(window, PopStateEvent, handlePopState); + win.addEventListener(PopStateEvent, handlePopState); if (needsHashChangeListener) { - addEventListener(window, HashChangeEvent, handleHashChange); + win.addEventListener(HashChangeEvent, handleHashChange); } } else if (listenerCount === 0) { - removeEventListener(window, PopStateEvent, handlePopState); + win.removeEventListener(PopStateEvent, handlePopState); if (needsHashChangeListener) { - removeEventListener(window, HashChangeEvent, handleHashChange); + win.removeEventListener(HashChangeEvent, handleHashChange); } } }; - let isBlocked = false; - const block = (prompt: string | Prompt = '') => { const unblock = transitionManager.setPrompt(prompt); diff --git a/packages/router/src/utils/createHashHistory.ts b/packages/router/src/utils/createHashHistory.ts index 9f999bd..4fa30cc 100644 --- a/packages/router/src/utils/createHashHistory.ts +++ b/packages/router/src/utils/createHashHistory.ts @@ -13,8 +13,6 @@ import { } from './path-utils'; import createTransitionManager from './createTransitionManager'; import { - addEventListener, - removeEventListener, getConfirmation, supportsGoWithoutReloadUsingHash } from './dom-utils'; @@ -287,13 +285,13 @@ const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): R let listenerCount = 0; - const checkDOMListeners = (delta: number) => { + const checkDOMListeners = (win: Window, delta: number) => { listenerCount += delta; if (listenerCount === 1) { - addEventListener(window, HashChangeEvent, handleHashChange); + win.addEventListener(HashChangeEvent, handleHashChange); } else if (listenerCount === 0) { - removeEventListener(window, HashChangeEvent, handleHashChange); + win.removeEventListener(HashChangeEvent, handleHashChange); } }; @@ -303,14 +301,14 @@ const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): R const unblock = transitionManager.setPrompt(prompt); if (!isBlocked) { - checkDOMListeners(1); + checkDOMListeners(win, 1); isBlocked = true; } return () => { if (isBlocked) { isBlocked = false; - checkDOMListeners(-1); + checkDOMListeners(win, -1); } return unblock(); @@ -319,10 +317,10 @@ const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): R const listen = (listener: Function) => { const unlisten = transitionManager.appendListener(listener); - checkDOMListeners(1); + checkDOMListeners(win, 1); return () => { - checkDOMListeners(-1); + checkDOMListeners(win, -1); unlisten(); }; }; diff --git a/packages/router/src/utils/createScrollHistory.ts b/packages/router/src/utils/createScrollHistory.ts index c8c093c..73c92be 100644 --- a/packages/router/src/utils/createScrollHistory.ts +++ b/packages/router/src/utils/createScrollHistory.ts @@ -35,7 +35,7 @@ const createScrollHistory = (win: Window, applicationScrollKey: string = 'scroll scrollPositions; } - if ('scrollRestoration' in history) { + if ('scrollRestoration' in win.history) { history.scrollRestoration = 'manual'; } diff --git a/packages/router/src/utils/dom-utils.ts b/packages/router/src/utils/dom-utils.ts index 60d841e..b161e8e 100644 --- a/packages/router/src/utils/dom-utils.ts +++ b/packages/router/src/utils/dom-utils.ts @@ -1,16 +1,4 @@ -export const addEventListener = (node: HTMLElement | Window, event: any, listener: any) => ( - node.addEventListener - ? node.addEventListener(event, listener, false) - : (node as any).attachEvent('on' + event, listener) -); - -export const removeEventListener = (node: HTMLElement | Window, event: any, listener: any) => ( - node.removeEventListener - ? node.removeEventListener(event, listener, false) - : (node as any).detachEvent('on' + event, listener) -); - export const getConfirmation = (win: Window, message: string, callback: (confirmed: boolean) => {}) => ( callback(win.confirm(message)) ); From a83ad8dad85fbb69cc3100309b024396e50fed7f Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Tue, 9 Apr 2019 12:53:57 -0500 Subject: [PATCH 06/16] wip --- packages/router/src/components/switch/switch.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/router/src/components/switch/switch.tsx b/packages/router/src/components/switch/switch.tsx index 7fff283..5ce0893 100644 --- a/packages/router/src/components/switch/switch.tsx +++ b/packages/router/src/components/switch/switch.tsx @@ -21,8 +21,8 @@ const getMatch = (pathname: string, url: any, exact: boolean) => { }); } -const isHTMLStencilRouteElement = (element: Element): element is HTMLStencilRouteElement => { - return element.tagName.toLowerCase() === 'stencil-route'; +const isHTMLStencilRouteElement = (elm: Element): elm is HTMLStencilRouteElement => { + return elm.tagName === 'STENCIL-ROUTE'; } @Component({ @@ -53,11 +53,11 @@ export class RouteSwitch implements ComponentInterface { return; } - let newActiveIndex: number = -1; + let newActiveIndex = -1; this.subscribers = Array.prototype.slice.call(this.el.children) .filter(isHTMLStencilRouteElement) - .map((childElement: HTMLStencilRouteElement, index: number): Child => { + .map((childElement, index): Child => { const match = getMatch(newLocation.pathname, childElement.url, childElement.exact); if (match && newActiveIndex === -1) { From 191a07c565fac686a324927791619f1d098da95c Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Wed, 10 Apr 2019 08:35:01 -0500 Subject: [PATCH 07/16] wip --- packages/router/src/components.d.ts | 1 + .../router/src/components/route-title/route-title.tsx | 5 +++-- packages/router/src/components/router/router.tsx | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/router/src/components.d.ts b/packages/router/src/components.d.ts index 01773dd..4f06c7c 100644 --- a/packages/router/src/components.d.ts +++ b/packages/router/src/components.d.ts @@ -191,6 +191,7 @@ declare module "@stencil/core" { declare global { + interface HTMLStencilAsyncContentElement extends Components.StencilAsyncContent, HTMLStencilElement {} var HTMLStencilAsyncContentElement: { prototype: HTMLStencilAsyncContentElement; diff --git a/packages/router/src/components/route-title/route-title.tsx b/packages/router/src/components/route-title/route-title.tsx index a92f655..256adba 100644 --- a/packages/router/src/components/route-title/route-title.tsx +++ b/packages/router/src/components/route-title/route-title.tsx @@ -1,4 +1,4 @@ -import { Component, Prop, Element, Watch, ComponentInterface } from '@stencil/core'; +import { Component, Prop, Element, Watch, ComponentInterface, getDocument } from '@stencil/core'; import ActiveRouter from '../../global/active-router'; /** @@ -11,13 +11,14 @@ import ActiveRouter from '../../global/active-router'; tag: 'stencil-route-title' }) export class RouteTitle implements ComponentInterface { + doc = getDocument(this); @Element() el!: HTMLElement; @Prop() titleSuffix: string = ''; @Prop() pageTitle: string = ''; @Watch('pageTitle') updateDocumentTitle() { - document.title = `${this.pageTitle}${this.titleSuffix || ''}`; + this.doc.title = `${this.pageTitle}${this.titleSuffix || ''}`; } componentWillLoad() { diff --git a/packages/router/src/components/router/router.tsx b/packages/router/src/components/router/router.tsx index 499cadf..67ce04a 100644 --- a/packages/router/src/components/router/router.tsx +++ b/packages/router/src/components/router/router.tsx @@ -1,4 +1,4 @@ -import { Component, Prop, State, ComponentInterface, getWindow, h } from '@stencil/core'; +import { Component, Prop, State, ComponentInterface, getDocument, getWindow, h } from '@stencil/core'; import createHistory from '../../utils/createBrowserHistory'; import createHashHistory from '../../utils/createHashHistory'; import { LocationSegments, HistoryType, RouterHistory, RouteViewOptions } from '../../global/interfaces'; @@ -58,9 +58,9 @@ export class Router implements ComponentInterface { routeViewsUpdated = (options: RouteViewOptions = {}) => { if (options.scrollToId && this.historyType === 'browser') { - const element = document.getElementById(options.scrollToId); - if (element) { - return element.scrollIntoView(); + const elm = getDocument(this).getElementById(options.scrollToId); + if (elm) { + return elm.scrollIntoView(); } } this.scrollTo(options.scrollTopOffset || this.scrollTopOffset); From d5df3902b2b1354c41ff9c4ebed955d8a1320711 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 11 Apr 2019 16:07:06 -0500 Subject: [PATCH 08/16] 1.0.0-alpha.8 --- package-lock.json | 994 +----------------------------- package.json | 2 +- packages/router/package-lock.json | 7 +- packages/router/package.json | 2 +- 4 files changed, 12 insertions(+), 993 deletions(-) diff --git a/package-lock.json b/package-lock.json index 491c12e..2e17a6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1188,39 +1188,20 @@ "dev": true }, "@stencil/core": { - "version": "0.13.0-12", - "resolved": "https://registry.npmjs.org/@stencil/core/-/core-0.13.0-12.tgz", - "integrity": "sha512-Sjfwr/jWYUjRYkeA/qxxQaNlGWCfRQHIHW12BivYE5c80qN7p3oUAJA6KPjjgZ1HucUlPUbSrLt2jRSKcE4dfA==", + "version": "1.0.0-alpha.8", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-1.0.0-alpha.8.tgz", + "integrity": "sha512-ov1Ak/NvF5clXxtUxCYf3RBoI2HhyelcjxMbGsbj2YhYN/QXeoGzwg/rc0flThmsI9mLz29ApmF/OKoUEoSSag==", "dev": true, "requires": { - "chokidar": "2.0.3", - "jsdom": "11.11.0", - "rollup": "0.65.0", - "rollup-plugin-commonjs": "9.1.5", - "rollup-plugin-node-builtins": "2.1.2", - "rollup-plugin-node-resolve": "3.3.0", - "rollup-pluginutils": "2.3.1", - "typescript": "~2.9.1" + "typescript": "3.4.2" } }, - "@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, "@types/jest": { "version": "23.3.1", "resolved": "https://registry.npmjs.org/@types/jest/-/jest-23.3.1.tgz", "integrity": "sha512-/UMY+2GkOZ27Vrc51pqC5J8SPd39FKt7kkoGAtWJ8s4msj0b15KehDWIiJpWY3/7tLxBQLLzJhIBhnEsXdzpgw==", "dev": true }, - "@types/node": { - "version": "10.10.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.10.1.tgz", - "integrity": "sha512-nzsx28VwfaIykfzMAG9TB3jxF5Nn+1/WMKnmVZc8TsB+LMIVvwUscVn7PAq+LFaY5ng5u4jp5mRROSswo76PPA==", - "dev": true - }, "JSONStream": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.4.tgz", @@ -1243,23 +1224,6 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true }, - "abstract-leveldown": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-0.12.4.tgz", - "integrity": "sha1-KeGOYy5g5OIh1YECR4UqY9ey5BA=", - "dev": true, - "requires": { - "xtend": "~3.0.0" - }, - "dependencies": { - "xtend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", - "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=", - "dev": true - } - } - }, "acorn": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", @@ -1500,17 +1464,6 @@ "safer-buffer": "~2.1.0" } }, - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, "assert-plus": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", @@ -1899,41 +1852,6 @@ "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", "dev": true }, - "bl": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-0.8.2.tgz", - "integrity": "sha1-yba8oI0bwuoA/Ir7Txpf0eHGbk4=", - "dev": true, - "requires": { - "readable-stream": "~1.0.26" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, "block-stream": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", @@ -1949,12 +1867,6 @@ "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==", "dev": true }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==", - "dev": true - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1994,12 +1906,6 @@ } } }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, "browser-process-hrtime": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz", @@ -2023,79 +1929,6 @@ } } }, - "browserify-aes": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "requires": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "requires": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "browserify-fs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-fs/-/browserify-fs-1.0.0.tgz", - "integrity": "sha1-8HWqinKdTRcW0GZiDjhvzBMRqW8=", - "dev": true, - "requires": { - "level-filesystem": "^1.0.1", - "level-js": "^2.1.3", - "levelup": "^0.18.2" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "randombytes": "^2.0.1" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true, - "requires": { - "bn.js": "^4.1.1", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.2", - "elliptic": "^6.0.0", - "inherits": "^2.0.1", - "parse-asn1": "^5.0.0" - } - }, "bser": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz", @@ -2105,30 +1938,12 @@ "node-int64": "^0.4.0" } }, - "buffer-es6": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/buffer-es6/-/buffer-es6-4.9.3.tgz", - "integrity": "sha1-8mNHuC33b9N+GLy1KIxJcM/VxAQ=", - "dev": true - }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", - "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==", - "dev": true - }, "builtins": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", @@ -2275,26 +2090,6 @@ "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", "dev": true }, - "chokidar": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.3.tgz", - "integrity": "sha512-zW8iXYZtXMx4kux/nuZVXjkLP+CyIK5Al5FHnj1OgTKGZfp4Oy6/ymtMSKFv3GD8DviEmUPmJg9eFdJ/JzudMg==", - "dev": true, - "requires": { - "anymatch": "^2.0.0", - "async-each": "^1.0.0", - "braces": "^2.3.0", - "fsevents": "^1.1.2", - "glob-parent": "^3.1.0", - "inherits": "^2.0.1", - "is-binary-path": "^1.0.0", - "is-glob": "^4.0.0", - "normalize-path": "^2.1.1", - "path-is-absolute": "^1.0.0", - "readdirp": "^2.0.0", - "upath": "^1.0.0" - } - }, "chownr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", @@ -2307,16 +2102,6 @@ "integrity": "sha512-Oqmw2pVfCl8sCL+1QgMywPfdxPJPkC51y4usw0iiE2S9qnEOAqXy8bwl1CpMpnoU39g4iKJTz6QZj+28FvOnjQ==", "dev": true }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", @@ -2376,12 +2161,6 @@ } } }, - "clone": { - "version": "0.1.19", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.1.19.tgz", - "integrity": "sha1-YT+2hjmyaklKxTJT4Vsaa9iK2oU=", - "dev": true - }, "cmd-shim": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/cmd-shim/-/cmd-shim-2.0.2.tgz", @@ -2837,43 +2616,6 @@ } } }, - "create-ecdh": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", - "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "elliptic": "^6.0.0" - } - }, - "create-hash": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "create-hmac": { - "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "requires": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -2885,25 +2627,6 @@ "which": "^1.2.9" } }, - "crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "requires": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - } - }, "cssom": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.4.tgz", @@ -3071,15 +2794,6 @@ } } }, - "deferred-leveldown": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-0.2.0.tgz", - "integrity": "sha1-LO8fER4cV4cNi7uK8mUOWHzS9bQ=", - "dev": true, - "requires": { - "abstract-leveldown": "~0.12.1" - } - }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -3150,16 +2864,6 @@ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, "detect-indent": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", @@ -3191,17 +2895,6 @@ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, - "diffie-hellman": { - "version": "5.0.3", - "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, "dir-glob": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", @@ -3276,21 +2969,6 @@ "safer-buffer": "^2.1.0" } }, - "elliptic": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", - "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", - "dev": true, - "requires": { - "bn.js": "^4.4.0", - "brorand": "^1.0.1", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.0" - } - }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", @@ -3315,15 +2993,6 @@ "integrity": "sha1-BuARbTAo9q70gGhJ6w6mp0iuaWA=", "dev": true }, - "errno": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", - "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", - "dev": true, - "requires": { - "prr": "~1.0.1" - } - }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -3412,28 +3081,12 @@ "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", "dev": true }, - "estree-walker": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.5.2.tgz", - "integrity": "sha512-XpCnW/AE10ws/kDAs37cngSkvgIR8aN3G0MS85m7dUpuK2EREo9VJ00uvw6Dg/hXEpfsE1I1TvJOJr+Z+TL+ig==", - "dev": true - }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "requires": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, "exec-sh": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.2.tgz", @@ -3808,12 +3461,6 @@ "for-in": "^1.0.1" } }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -4424,41 +4071,6 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "fwd-stream": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/fwd-stream/-/fwd-stream-1.0.4.tgz", - "integrity": "sha1-7Sgcq+1G/uz5Ie4y3ExQs3KsfPo=", - "dev": true, - "requires": { - "readable-stream": "~1.0.26-4" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, "gauge": { "version": "2.7.4", "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", @@ -4930,37 +4542,6 @@ } } }, - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "hash.js": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", - "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "requires": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", @@ -5063,12 +4644,6 @@ "safer-buffer": ">= 2.1.2 < 3" } }, - "idb-wrapper": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/idb-wrapper/-/idb-wrapper-1.7.2.tgz", - "integrity": "sha512-zfNREywMuf0NzDo9mVsL0yegjsirJxHpKHvWcyRozIqQy89g0a3U+oBPOCN4cc0oCiOuYgZHimzaW/R46G1Mpg==", - "dev": true - }, "iferr": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz", @@ -5112,12 +4687,6 @@ "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", "dev": true }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -5198,12 +4767,6 @@ "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", "dev": true }, - "is": { - "version": "0.2.7", - "resolved": "http://registry.npmjs.org/is/-/is-0.2.7.tgz", - "integrity": "sha1-OzSixI81mXLzUEKEkZOucmS2NWI=", - "dev": true - }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -5385,12 +4948,6 @@ "is-extglob": "^2.1.1" } }, - "is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE=", - "dev": true - }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", @@ -5417,12 +4974,6 @@ "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, - "is-object": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/is-object/-/is-object-0.1.2.tgz", - "integrity": "sha1-AO+8CIFsM8/ErIJR0TLhDcZQmNc=", - "dev": true - }, "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -5516,12 +5067,6 @@ "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true }, - "isbuffer": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/isbuffer/-/isbuffer-0.0.0.tgz", - "integrity": "sha1-OMFG2d9Si4v5sHAcPUPPEt8/w5s=", - "dev": true - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -6695,201 +6240,6 @@ "npmlog": "^4.1.2" } }, - "level-blobs": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/level-blobs/-/level-blobs-0.1.7.tgz", - "integrity": "sha1-mrm5e7mfHtv594o0M+Ie1WOGva8=", - "dev": true, - "requires": { - "level-peek": "1.0.6", - "once": "^1.3.0", - "readable-stream": "^1.0.26-4" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, - "level-filesystem": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/level-filesystem/-/level-filesystem-1.2.0.tgz", - "integrity": "sha1-oArKmRnEpN+v3KaoEI0iWq3/Y7M=", - "dev": true, - "requires": { - "concat-stream": "^1.4.4", - "errno": "^0.1.1", - "fwd-stream": "^1.0.4", - "level-blobs": "^0.1.7", - "level-peek": "^1.0.6", - "level-sublevel": "^5.2.0", - "octal": "^1.0.0", - "once": "^1.3.0", - "xtend": "^2.2.0" - } - }, - "level-fix-range": { - "version": "1.0.2", - "resolved": "http://registry.npmjs.org/level-fix-range/-/level-fix-range-1.0.2.tgz", - "integrity": "sha1-vxW5Fa422EcMgh6IPd95zRZCCCg=", - "dev": true - }, - "level-hooks": { - "version": "4.5.0", - "resolved": "http://registry.npmjs.org/level-hooks/-/level-hooks-4.5.0.tgz", - "integrity": "sha1-G5rmGSKTDzMF0aYfxNg8gQLA3ZM=", - "dev": true, - "requires": { - "string-range": "~1.2" - } - }, - "level-js": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/level-js/-/level-js-2.2.4.tgz", - "integrity": "sha1-vAVfQYBjXUSJtWHJSG+jcOjBFpc=", - "dev": true, - "requires": { - "abstract-leveldown": "~0.12.0", - "idb-wrapper": "^1.5.0", - "isbuffer": "~0.0.0", - "ltgt": "^2.1.2", - "typedarray-to-buffer": "~1.0.0", - "xtend": "~2.1.2" - }, - "dependencies": { - "object-keys": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.4.0.tgz", - "integrity": "sha1-KKaq50KN0sOpLz2V8hM13SBOAzY=", - "dev": true - }, - "xtend": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.1.2.tgz", - "integrity": "sha1-bv7MKk2tjmlixJAbM3znuoe10os=", - "dev": true, - "requires": { - "object-keys": "~0.4.0" - } - } - } - }, - "level-peek": { - "version": "1.0.6", - "resolved": "http://registry.npmjs.org/level-peek/-/level-peek-1.0.6.tgz", - "integrity": "sha1-vsUccqgu5GTTNkNMfIdsP8vM538=", - "dev": true, - "requires": { - "level-fix-range": "~1.0.2" - } - }, - "level-sublevel": { - "version": "5.2.3", - "resolved": "http://registry.npmjs.org/level-sublevel/-/level-sublevel-5.2.3.tgz", - "integrity": "sha1-dEwSxy0ucr543eO5tc2E1iGRQTo=", - "dev": true, - "requires": { - "level-fix-range": "2.0", - "level-hooks": ">=4.4.0 <5", - "string-range": "~1.2.1", - "xtend": "~2.0.4" - }, - "dependencies": { - "level-fix-range": { - "version": "2.0.0", - "resolved": "http://registry.npmjs.org/level-fix-range/-/level-fix-range-2.0.0.tgz", - "integrity": "sha1-xBfWIVlEIVGhnZojZ4aPFyTC1Ug=", - "dev": true, - "requires": { - "clone": "~0.1.9" - } - }, - "xtend": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.0.6.tgz", - "integrity": "sha1-XqZXptukRwacLlnFihE4ywxebO4=", - "dev": true, - "requires": { - "is-object": "~0.1.2", - "object-keys": "~0.2.0" - } - } - } - }, - "levelup": { - "version": "0.18.6", - "resolved": "https://registry.npmjs.org/levelup/-/levelup-0.18.6.tgz", - "integrity": "sha1-5qAcsIlhbI7MApHCqb0/DETj5es=", - "dev": true, - "requires": { - "bl": "~0.8.1", - "deferred-leveldown": "~0.2.0", - "errno": "~0.1.1", - "prr": "~0.0.0", - "readable-stream": "~1.0.26", - "semver": "~2.3.1", - "xtend": "~3.0.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "prr": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/prr/-/prr-0.0.0.tgz", - "integrity": "sha1-GoS4WQgyVQFBGFPQCB7j+obikmo=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "xtend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", - "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=", - "dev": true - } - } - }, "leven": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", @@ -7012,21 +6362,6 @@ "yallist": "^2.1.2" } }, - "ltgt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", - "integrity": "sha1-81ypHEk/e3PaDgdJUwTxezH4fuU=", - "dev": true - }, - "magic-string": { - "version": "0.22.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.22.5.tgz", - "integrity": "sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w==", - "dev": true, - "requires": { - "vlq": "^0.2.2" - } - }, "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", @@ -7099,16 +6434,6 @@ "integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w=", "dev": true }, - "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, "mem": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", @@ -7243,16 +6568,6 @@ "to-regex": "^3.0.2" } }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "requires": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - } - }, "mime-db": { "version": "1.35.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", @@ -7274,18 +6589,6 @@ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "dev": true }, - "minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -7736,17 +7039,6 @@ } } }, - "object-keys": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-0.2.0.tgz", - "integrity": "sha1-zd7AKZiwkb5CvxA1rjLknxy26mc=", - "dev": true, - "requires": { - "foreach": "~2.0.1", - "indexof": "~0.0.1", - "is": "~0.2.6" - } - }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", @@ -7785,12 +7077,6 @@ "isobject": "^3.0.1" } }, - "octal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/octal/-/octal-1.0.0.tgz", - "integrity": "sha1-Y+cWKmjvvrniE1iNWOmJ0eXEUws=", - "dev": true - }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -8009,19 +7295,6 @@ "readable-stream": "^2.1.5" } }, - "parse-asn1": { - "version": "5.1.1", - "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", - "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", - "dev": true, - "requires": { - "asn1.js": "^4.0.0", - "browserify-aes": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3" - } - }, "parse-github-repo-url": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz", @@ -8119,19 +7392,6 @@ "pinkie-promise": "^2.0.0" } }, - "pbkdf2": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", - "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", - "dev": true, - "requires": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", @@ -8216,12 +7476,6 @@ "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", "dev": true }, - "process-es6": { - "version": "0.11.6", - "resolved": "https://registry.npmjs.org/process-es6/-/process-es6-0.11.6.tgz", - "integrity": "sha1-xrs4n5qVH4K9TrFpYAEFvS/5x3g=", - "dev": true - }, "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", @@ -8278,12 +7532,6 @@ "genfun": "^4.0.1" } }, - "prr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", - "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", - "dev": true - }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", @@ -8296,19 +7544,6 @@ "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==", "dev": true }, - "public-encrypt": { - "version": "4.0.2", - "resolved": "http://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", - "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", - "dev": true, - "requires": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" - } - }, "pump": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", @@ -8385,25 +7620,6 @@ } } }, - "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", - "dev": true, - "requires": { - "safe-buffer": "^5.1.0" - } - }, - "randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "requires": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, "read": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", @@ -8731,162 +7947,6 @@ "glob": "^7.0.5" } }, - "ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "requires": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "rollup": { - "version": "0.65.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.65.0.tgz", - "integrity": "sha512-en95i7zwW5IiWay6DR/6QV8TxO2LvWuCjHYDcgP96oVG/gPnWWzsxNViObhoJUs17bAj2RgB67WuBuGmysZZcw==", - "dev": true, - "requires": { - "@types/estree": "0.0.39", - "@types/node": "*" - } - }, - "rollup-plugin-commonjs": { - "version": "9.1.5", - "resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-9.1.5.tgz", - "integrity": "sha512-Hy7KbvsSMNu6aCO2xabp8gBcWrTiS+EzfHkzWwZwMjrcAYuYfCLU7fP1nM4xM0FMye/13r8mzTkfb9AmDaZ1hQ==", - "dev": true, - "requires": { - "estree-walker": "^0.5.1", - "magic-string": "^0.22.4", - "resolve": "^1.5.0", - "rollup-pluginutils": "^2.0.1" - } - }, - "rollup-plugin-node-builtins": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-builtins/-/rollup-plugin-node-builtins-2.1.2.tgz", - "integrity": "sha1-JKH+1KQyV7a2Q3HYq8bOGrFFl+k=", - "dev": true, - "requires": { - "browserify-fs": "^1.0.0", - "buffer-es6": "^4.9.2", - "crypto-browserify": "^3.11.0", - "process-es6": "^0.11.2" - } - }, - "rollup-plugin-node-resolve": { - "version": "3.3.0", - "resolved": "http://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.3.0.tgz", - "integrity": "sha512-9zHGr3oUJq6G+X0oRMYlzid9fXicBdiydhwGChdyeNRGPcN/majtegApRKHLR5drboUvEWU+QeUmGTyEZQs3WA==", - "dev": true, - "requires": { - "builtin-modules": "^2.0.0", - "is-module": "^1.0.0", - "resolve": "^1.1.6" - } - }, - "rollup-pluginutils": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.3.1.tgz", - "integrity": "sha512-JZS8aJMHEHhqmY2QVPMXwKP6lsD1ShkrcGYjhAIvqKKdXQyPHw/9NF0tl3On/xOJ4ACkxfeG7AF+chfCN1NpBg==", - "dev": true, - "requires": { - "estree-walker": "^0.5.2", - "micromatch": "^2.3.11" - }, - "dependencies": { - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true, - "requires": { - "arr-flatten": "^1.0.1" - } - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true, - "requires": { - "expand-range": "^1.8.1", - "preserve": "^0.2.0", - "repeat-element": "^1.1.2" - } - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true, - "requires": { - "is-posix-bracket": "^0.1.0" - } - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true, - "requires": { - "is-extglob": "^1.0.0" - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "requires": { - "arr-diff": "^2.0.0", - "array-unique": "^0.2.1", - "braces": "^1.8.2", - "expand-brackets": "^0.1.4", - "extglob": "^0.3.1", - "filename-regex": "^2.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.1", - "kind-of": "^3.0.2", - "normalize-path": "^2.0.1", - "object.omit": "^2.0.0", - "parse-glob": "^3.0.4", - "regex-cache": "^0.4.2" - } - } - } - }, "rsvp": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz", @@ -9013,16 +8073,6 @@ } } }, - "sha.js": { - "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "requires": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", @@ -9403,12 +8453,6 @@ "strip-ansi": "^4.0.0" } }, - "string-range": { - "version": "1.2.2", - "resolved": "http://registry.npmjs.org/string-range/-/string-range-1.2.2.tgz", - "integrity": "sha1-qJPtNH5yKZvIO++78qaSqNI51d0=", - "dev": true - }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -10091,16 +9135,10 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, - "typedarray-to-buffer": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-1.0.4.tgz", - "integrity": "sha1-m7i6DoQfs/TPH+fCRenz+opf6Zw=", - "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": "3.4.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.2.tgz", + "integrity": "sha512-Og2Vn6Mk7JAuWA1hQdDQN/Ekm/SchX80VzLhjKN9ETYrIepBFAd8PkOdOTK2nKt0FCkmMZKBJvQ1dV1gIxPu/A==", "dev": true }, "uglify-js": { @@ -10248,12 +9286,6 @@ } } }, - "upath": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", - "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==", - "dev": true - }, "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", @@ -10318,12 +9350,6 @@ "extsprintf": "^1.2.0" } }, - "vlq": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/vlq/-/vlq-0.2.3.tgz", - "integrity": "sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow==", - "dev": true - }, "w3c-hr-time": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", @@ -10556,12 +9582,6 @@ "integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg==", "dev": true }, - "xtend": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-2.2.0.tgz", - "integrity": "sha1-7vax8ZjByN6vrYsXZaBNrUoBxak=", - "dev": true - }, "y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", diff --git a/package.json b/package.json index 10713b4..f4cbb52 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "root", "private": true, "devDependencies": { - "@stencil/core": "^0.13.0-12", + "@stencil/core": "^1.0.0-alpha.8", "@types/jest": "^23.3.1", "jest": "^23.4.2", "lerna": "^3.0.3", diff --git a/packages/router/package-lock.json b/packages/router/package-lock.json index a6b308d..a13048b 100644 --- a/packages/router/package-lock.json +++ b/packages/router/package-lock.json @@ -14,10 +14,9 @@ } }, "@stencil/state-tunnel": { - "version": "0.0.9-1", - "resolved": "https://registry.npmjs.org/@stencil/state-tunnel/-/state-tunnel-0.0.9-1.tgz", - "integrity": "sha512-Dn04TXjwM+H+1HB6R5B9WwLOKTq/kT/YIwGtAAxiAwYFCugiSWZuE2vf3I8dkCLlEetib5/QAz9MYJ4H4BRKZg==", - "dev": true + "version": "0.0.9-5", + "resolved": "https://registry.npmjs.org/@stencil/state-tunnel/-/state-tunnel-0.0.9-5.tgz", + "integrity": "sha512-LOPD9s3ZmLtFSrWJjjtv45+IZKCjdp1/EJp+fJl5btjQ2WrxQfQsQUdEkuoU4AygQ5Ly+PtX7Y3Lep8AU2zVnQ==" }, "ansi-align": { "version": "2.0.0", diff --git a/packages/router/package.json b/packages/router/package.json index c64de1e..785d951 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -23,7 +23,7 @@ "url": "git+https://github.com/ionic-team/stencil-router.git" }, "dependencies": { - "@stencil/state-tunnel": "0.0.9-1" + "@stencil/state-tunnel": "^0.0.9-5" }, "devDependencies": { "np": "^3.0.4" From 9b29ee8ded8bb346a902c874bd4c002952b3cad6 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 11 Apr 2019 16:08:08 -0500 Subject: [PATCH 09/16] script update --- packages/router/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/router/package.json b/packages/router/package.json index 785d951..c051232 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "../../node_modules/.bin/stencil build", "dev": "../../node_modules/.bin/stencil build --dev --watch", - "deploy": "npm run build && np", + "release": "npm run build && np --any-branch", "start": "npm run dev", "test": "../../node_modules/.bin/jest" }, From 9086b5076d497845c2c3217970607d0e294e3309 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 11 Apr 2019 16:13:02 -0500 Subject: [PATCH 10/16] wip --- .npmrc | 1 + packages/router/.npmrc | 1 + packages/router/package-lock.json | 1914 ----------------------------- packages/router/package.json | 2 +- 4 files changed, 3 insertions(+), 1915 deletions(-) create mode 100644 .npmrc create mode 100644 packages/router/.npmrc delete mode 100644 packages/router/package-lock.json diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..9cf9495 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false \ No newline at end of file diff --git a/packages/router/.npmrc b/packages/router/.npmrc new file mode 100644 index 0000000..9cf9495 --- /dev/null +++ b/packages/router/.npmrc @@ -0,0 +1 @@ +package-lock=false \ No newline at end of file diff --git a/packages/router/package-lock.json b/packages/router/package-lock.json deleted file mode 100644 index a13048b..0000000 --- a/packages/router/package-lock.json +++ /dev/null @@ -1,1914 +0,0 @@ -{ - "name": "@stencil/router", - "version": "0.3.2", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@samverschueren/stream-to-observable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz", - "integrity": "sha512-MI4Xx6LHs4Webyvi6EbspgyAb4D2Q2VtnCQ1blOJcoLS6mVa8lNN2rkIy1CVxfTUpoyIbCTkXES1rLXztFD1lg==", - "dev": true, - "requires": { - "any-observable": "^0.3.0" - } - }, - "@stencil/state-tunnel": { - "version": "0.0.9-5", - "resolved": "https://registry.npmjs.org/@stencil/state-tunnel/-/state-tunnel-0.0.9-5.tgz", - "integrity": "sha512-LOPD9s3ZmLtFSrWJjjtv45+IZKCjdp1/EJp+fJl5btjQ2WrxQfQsQUdEkuoU4AygQ5Ly+PtX7Y3Lep8AU2zVnQ==" - }, - "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", - "dev": true, - "requires": { - "string-width": "^2.0.0" - } - }, - "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "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" - } - }, - "any-observable": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz", - "integrity": "sha512-/FQM1EDkTsf63Ub2C6O7GuYFDsSXUwsaZDurV0np41ocwq0jthUAYCmhBX9f+KwlaCgIuWyr/4WlUQUBfKfZog==", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", - "dev": true - }, - "array-union": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", - "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", - "dev": true, - "requires": { - "array-uniq": "^1.0.1" - } - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "arrify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", - "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", - "dev": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "boxen": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz", - "integrity": "sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==", - "dev": true, - "requires": { - "ansi-align": "^2.0.0", - "camelcase": "^4.0.0", - "chalk": "^2.0.1", - "cli-boxes": "^1.0.0", - "string-width": "^2.0.0", - "term-size": "^1.2.0", - "widest-line": "^2.0.0" - } - }, - "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" - } - }, - "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 - }, - "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", - "dev": true - }, - "camelcase-keys": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz", - "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=", - "dev": true, - "requires": { - "camelcase": "^4.1.0", - "map-obj": "^2.0.0", - "quick-lru": "^1.0.0" - } - }, - "capture-stack-trace": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz", - "integrity": "sha1-Sm+gc5nCa7pH8LJJa00PtAjFVQ0=", - "dev": true - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, - "ci-info": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.4.0.tgz", - "integrity": "sha512-Oqmw2pVfCl8sCL+1QgMywPfdxPJPkC51y4usw0iiE2S9qnEOAqXy8bwl1CpMpnoU39g4iKJTz6QZj+28FvOnjQ==", - "dev": true - }, - "cli-boxes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz", - "integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-truncate": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-0.2.1.tgz", - "integrity": "sha1-nxXPuwcFAFNpIWxiasfQWrkN1XQ=", - "dev": true, - "requires": { - "slice-ansi": "0.0.4", - "string-width": "^1.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, - "code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true - }, - "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 - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "configstore": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/configstore/-/configstore-3.1.2.tgz", - "integrity": "sha512-vtv5HtGjcYUgFrXc6Kx747B83MRRVS5R1VTEQoXvuP+kMI+if6uywV0nDGoiydJRy4yk7h9od5Og0kxx4zUXmw==", - "dev": true, - "requires": { - "dot-prop": "^4.1.0", - "graceful-fs": "^4.1.2", - "make-dir": "^1.0.0", - "unique-string": "^1.0.0", - "write-file-atomic": "^2.0.0", - "xdg-basedir": "^3.0.0" - } - }, - "create-error-class": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz", - "integrity": "sha1-Br56vvlHo/FKMP1hBnHUAbyot7Y=", - "dev": true, - "requires": { - "capture-stack-trace": "^1.0.0" - } - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "crypto-random-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz", - "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "date-fns": { - "version": "1.29.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz", - "integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==", - "dev": true - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "decamelize-keys": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", - "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", - "dev": true, - "requires": { - "decamelize": "^1.1.0", - "map-obj": "^1.0.0" - }, - "dependencies": { - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true - } - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", - "dev": true, - "requires": { - "globby": "^6.1.0", - "is-path-cwd": "^1.0.0", - "is-path-in-cwd": "^1.0.0", - "p-map": "^1.1.1", - "pify": "^3.0.0", - "rimraf": "^2.2.8" - } - }, - "dot-prop": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-4.2.0.tgz", - "integrity": "sha512-tUMXrxlExSW6U2EXiiKGSBVdYgtV8qlHL+C10TsW4PURY/ic+eaysnSkwB4kA/mBlCyy/IKDJ+Lc3wbWeaXtuQ==", - "dev": true, - "requires": { - "is-obj": "^1.0.0" - } - }, - "duplexer3": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", - "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", - "dev": true - }, - "elegant-spinner": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", - "integrity": "sha1-2wQ1IcldfjA/2PNFvtwzSc+wcp4=", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "execa": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", - "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - }, - "exit-hook": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-1.1.1.tgz", - "integrity": "sha1-8FyiM7SMBdVP/wd2XfhQfpXAL/g=", - "dev": true - }, - "external-editor": { - "version": "2.2.0", - "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true - }, - "github-url-from-git": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/github-url-from-git/-/github-url-from-git-1.5.0.tgz", - "integrity": "sha1-+YX+3MCpqledyI16/waNVcxiUaA=", - "dev": true - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "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" - } - }, - "global-dirs": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", - "integrity": "sha1-sxnA3UYH81PzvpzKTHL8FIxJ9EU=", - "dev": true, - "requires": { - "ini": "^1.3.4" - } - }, - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "requires": { - "array-union": "^1.0.1", - "glob": "^7.0.3", - "object-assign": "^4.0.1", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "got": { - "version": "6.7.1", - "resolved": "http://registry.npmjs.org/got/-/got-6.7.1.tgz", - "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", - "dev": true, - "requires": { - "create-error-class": "^3.0.0", - "duplexer3": "^0.1.4", - "get-stream": "^3.0.0", - "is-redirect": "^1.0.0", - "is-retry-allowed": "^1.0.0", - "is-stream": "^1.0.0", - "lowercase-keys": "^1.0.0", - "safe-buffer": "^5.0.1", - "timed-out": "^4.0.0", - "unzip-response": "^2.0.1", - "url-parse-lax": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", - "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - } - } - }, - "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-yarn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-1.0.0.tgz", - "integrity": "sha1-ieJdtgS3Jcj1l2//Ct3JIbgopac=", - "dev": true - }, - "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "import-lazy": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", - "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", - "dev": true - }, - "indent-string": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", - "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true - }, - "inquirer": { - "version": "5.2.0", - "resolved": "http://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", - "dev": true, - "requires": { - "symbol-observable": "1.0.1" - } - } - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-builtin-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", - "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", - "dev": true, - "requires": { - "builtin-modules": "^1.0.0" - } - }, - "is-ci": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-1.2.0.tgz", - "integrity": "sha512-plgvKjQtalH2P3Gytb7L61Lmz95g2DlpzFiQyRSFew8WoJKxtKRzrZMeyRN2supblm3Psc8OQGy7Xjb6XG11jw==", - "dev": true, - "requires": { - "ci-info": "^1.3.0" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "is-installed-globally": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz", - "integrity": "sha1-Df2Y9akRFxbdU13aZJL2e/PSWoA=", - "dev": true, - "requires": { - "global-dirs": "^0.1.0", - "is-path-inside": "^1.0.0" - } - }, - "is-npm": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz", - "integrity": "sha1-8vtjpl5JBbQGyGBydloaTceTufQ=", - "dev": true - }, - "is-obj": { - "version": "1.0.1", - "resolved": "http://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz", - "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", - "dev": true - }, - "is-observable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz", - "integrity": "sha512-NqCa4Sa2d+u7BWc6CukaObG3Fh+CU9bvixbpcXYhy2VvYS7vVGIdAgnIS5Ks3A/cqk4rebLJ9s8zBstT2aKnIA==", - "dev": true, - "requires": { - "symbol-observable": "^1.1.0" - }, - "dependencies": { - "symbol-observable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", - "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", - "dev": true - } - } - }, - "is-path-cwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", - "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=", - "dev": true - }, - "is-path-in-cwd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", - "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", - "dev": true, - "requires": { - "is-path-inside": "^1.0.0" - } - }, - "is-path-inside": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", - "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", - "dev": true, - "requires": { - "path-is-inside": "^1.0.1" - } - }, - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, - "is-redirect": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz", - "integrity": "sha1-HQPd7VO9jbDzDCbk+V02/HyH3CQ=", - "dev": true - }, - "is-retry-allowed": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", - "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "issue-regex": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/issue-regex/-/issue-regex-2.0.0.tgz", - "integrity": "sha512-flaQ/45dMqCYSMzBQI/h3bcto6T70uN7kjNnI8n3gQU6no5p+QcnMWBNXkraED0YvbUymxKaqdvgPa09RZQM5A==", - "dev": true - }, - "json-parse-better-errors": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "latest-version": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz", - "integrity": "sha1-ogU4P+oyKzO1rjsYq+4NwvNW7hU=", - "dev": true, - "requires": { - "package-json": "^4.0.0" - } - }, - "listr": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/listr/-/listr-0.14.2.tgz", - "integrity": "sha512-vmaNJ1KlGuGWShHI35X/F8r9xxS0VTHh9GejVXwSN20fG5xpq3Jh4bJbnumoT6q5EDM/8/YP1z3YMtQbFmhuXw==", - "dev": true, - "requires": { - "@samverschueren/stream-to-observable": "^0.3.0", - "is-observable": "^1.1.0", - "is-promise": "^2.1.0", - "is-stream": "^1.1.0", - "listr-silent-renderer": "^1.1.1", - "listr-update-renderer": "^0.4.0", - "listr-verbose-renderer": "^0.4.0", - "p-map": "^1.1.1", - "rxjs": "^6.1.0" - } - }, - "listr-input": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/listr-input/-/listr-input-0.1.3.tgz", - "integrity": "sha512-dvjSD1MrWGXxxPixpMQlSBmkyqhJrPxGo30un25k/vlvFOWZj70AauU+YkEh7CA8vmpkE6Wde37DJDmqYqF39g==", - "dev": true, - "requires": { - "inquirer": "^3.3.0", - "rxjs": "^5.5.2", - "through": "^2.3.8" - }, - "dependencies": { - "inquirer": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", - "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.0.4", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rx-lite": "^4.0.8", - "rx-lite-aggregates": "^4.0.8", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - } - }, - "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", - "dev": true, - "requires": { - "symbol-observable": "1.0.1" - } - } - } - }, - "listr-silent-renderer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz", - "integrity": "sha1-kktaN1cVN3C/Go4/v3S4u/P5JC4=", - "dev": true - }, - "listr-update-renderer": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz", - "integrity": "sha1-NE2YDaLKLosUW6MFkI8yrj9MyKc=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-truncate": "^0.2.1", - "elegant-spinner": "^1.0.1", - "figures": "^1.7.0", - "indent-string": "^3.0.0", - "log-symbols": "^1.0.2", - "log-update": "^1.0.2", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "log-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-1.0.2.tgz", - "integrity": "sha1-N2/3tY6jCGoPCfrMdGF+ylAeGhg=", - "dev": true, - "requires": { - "chalk": "^1.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "listr-verbose-renderer": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz", - "integrity": "sha1-ggb0z21S3cWCfl/RSYng6WWTOjU=", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "cli-cursor": "^1.0.2", - "date-fns": "^1.27.2", - "figures": "^1.7.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true, - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha1-y+Hjr/zxzUS4DK3+0o3Hk6lwHS4=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true, - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==", - "dev": true - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } - }, - "log-update": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", - "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", - "dev": true, - "requires": { - "ansi-escapes": "^1.0.0", - "cli-cursor": "^1.0.2" - }, - "dependencies": { - "ansi-escapes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-1.4.0.tgz", - "integrity": "sha1-06ioOzGapneTZisT52HHkRQiMG4=", - "dev": true - }, - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true, - "requires": { - "restore-cursor": "^1.0.1" - } - }, - "onetime": { - "version": "1.1.0", - "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true, - "requires": { - "exit-hook": "^1.0.0", - "onetime": "^1.0.0" - } - } - } - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "lowercase-keys": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", - "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", - "dev": true - }, - "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", - "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "map-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz", - "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=", - "dev": true - }, - "meow": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz", - "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==", - "dev": true, - "requires": { - "camelcase-keys": "^4.0.0", - "decamelize-keys": "^1.0.0", - "loud-rejection": "^1.0.0", - "minimist-options": "^3.0.1", - "normalize-package-data": "^2.3.4", - "read-pkg-up": "^3.0.0", - "redent": "^2.0.0", - "trim-newlines": "^2.0.0", - "yargs-parser": "^10.0.0" - } - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "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" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "minimist-options": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz", - "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==", - "dev": true, - "requires": { - "arrify": "^1.0.1", - "is-plain-obj": "^1.1.0" - } - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "is-builtin-module": "^1.0.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "np": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/np/-/np-3.0.4.tgz", - "integrity": "sha512-w8g6tgyI4zGzHML5f+UFGFzV1CbZVHlvNN6qXp7zoO4Wen8hho1GmQzPqngxYtPxFTZGuITQnyt4ACV4F0FSHQ==", - "dev": true, - "requires": { - "@samverschueren/stream-to-observable": "^0.3.0", - "any-observable": "^0.3.0", - "chalk": "^2.3.0", - "del": "^3.0.0", - "execa": "^0.10.0", - "github-url-from-git": "^1.5.0", - "has-yarn": "^1.0.0", - "inquirer": "^5.2.0", - "issue-regex": "^2.0.0", - "listr": "^0.14.1", - "listr-input": "^0.1.1", - "log-symbols": "^2.1.0", - "meow": "^5.0.0", - "p-timeout": "^2.0.1", - "read-pkg-up": "^3.0.0", - "rxjs": "^6.2.0", - "semver": "^5.2.0", - "split": "^1.0.0", - "terminal-link": "^1.1.0", - "update-notifier": "^2.1.0" - } - }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^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 - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-map": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", - "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==", - "dev": true - }, - "p-timeout": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz", - "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==", - "dev": true, - "requires": { - "p-finally": "^1.0.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "package-json": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz", - "integrity": "sha1-iGmgQBJTZhxMTKPabCEh7VVfXu0=", - "dev": true, - "requires": { - "got": "^6.7.1", - "registry-auth-token": "^3.0.1", - "registry-url": "^3.0.3", - "semver": "^5.1.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", - "dev": true - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "prepend-http": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", - "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", - "dev": true - }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, - "quick-lru": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz", - "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=", - "dev": true - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", - "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^3.0.0" - } - }, - "redent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz", - "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=", - "dev": true, - "requires": { - "indent-string": "^3.0.0", - "strip-indent": "^2.0.0" - } - }, - "registry-auth-token": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.3.2.tgz", - "integrity": "sha512-JL39c60XlzCVgNrO+qq68FoNb56w/m7JYvGR2jT5iR1xBrUA3Mfx5Twk5rqTThPmQKMWydGmq8oFtDlxfrmxnQ==", - "dev": true, - "requires": { - "rc": "^1.1.6", - "safe-buffer": "^5.0.1" - } - }, - "registry-url": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz", - "integrity": "sha1-PU74cPc93h138M+aOBQyRE4XSUI=", - "dev": true, - "requires": { - "rc": "^1.0.1" - } - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "rimraf": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", - "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", - "dev": true, - "requires": { - "glob": "^7.0.5" - } - }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, - "rx-lite": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", - "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=", - "dev": true - }, - "rx-lite-aggregates": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", - "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", - "dev": true, - "requires": { - "rx-lite": "*" - } - }, - "rxjs": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.0.tgz", - "integrity": "sha512-ZnwuEquf72mnVORgX75eZCAKNNwulmKQuFxDPwDA5EvbkBXeRNJtmvhyVLcPcKkdiUtqqv+LbBM8jYo0eBW++w==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "semver": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", - "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", - "dev": true - }, - "semver-diff": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz", - "integrity": "sha1-S7uEN8jTfksM8aaP1ybsbWRdbTY=", - "dev": true, - "requires": { - "semver": "^5.0.3" - } - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", - "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true - }, - "slice-ansi": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-0.0.4.tgz", - "integrity": "sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU=", - "dev": true - }, - "spdx-correct": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", - "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", - "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==", - "dev": true - }, - "split": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", - "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", - "dev": true, - "requires": { - "through": "2" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-indent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz", - "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=", - "dev": true - }, - "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 - }, - "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" - } - }, - "supports-hyperlinks": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz", - "integrity": "sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw==", - "dev": true, - "requires": { - "has-flag": "^2.0.0", - "supports-color": "^5.0.0" - }, - "dependencies": { - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", - "dev": true - } - } - }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - }, - "term-size": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz", - "integrity": "sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk=", - "dev": true, - "requires": { - "execa": "^0.7.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", - "dev": true, - "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } - } - } - }, - "terminal-link": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-1.1.0.tgz", - "integrity": "sha512-sOZb3eUbMEcBeuA+TePxEiyueKHNoFOdU8gJtw6vXBKQEgj2ZeyQfWT0aXqjSDI1a/xEZfjzTZMApcSgV70KGg==", - "dev": true, - "requires": { - "ansi-escapes": "^3.1.0", - "supports-hyperlinks": "^1.0.1" - } - }, - "through": { - "version": "2.3.8", - "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "timed-out": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", - "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, - "trim-newlines": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz", - "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=", - "dev": true - }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", - "dev": true - }, - "unique-string": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz", - "integrity": "sha1-nhBXzKhRq7kzmPizOuGHuZyuwRo=", - "dev": true, - "requires": { - "crypto-random-string": "^1.0.0" - } - }, - "unzip-response": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", - "integrity": "sha1-0vD3N9FrBhXnKmk17QQhRXLVb5c=", - "dev": true - }, - "update-notifier": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz", - "integrity": "sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw==", - "dev": true, - "requires": { - "boxen": "^1.2.1", - "chalk": "^2.0.1", - "configstore": "^3.0.0", - "import-lazy": "^2.1.0", - "is-ci": "^1.0.10", - "is-installed-globally": "^0.1.0", - "is-npm": "^1.0.0", - "latest-version": "^3.0.0", - "semver-diff": "^2.0.0", - "xdg-basedir": "^3.0.0" - } - }, - "url-parse-lax": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", - "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", - "dev": true, - "requires": { - "prepend-http": "^1.0.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" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "widest-line": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.0.tgz", - "integrity": "sha1-AUKk6KJD+IgsAjOqDgKBqnYVInM=", - "dev": true, - "requires": { - "string-width": "^2.1.1" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "write-file-atomic": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.3.0.tgz", - "integrity": "sha512-xuPeK4OdjWqtfi59ylvVL0Yn35SF3zgcAcv7rBPFHVaEapaDr4GdGgm3j7ckTwH9wHL7fGmgfAnb0+THrHb8tA==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" - } - }, - "xdg-basedir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", - "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=", - "dev": true - }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true - }, - "yargs-parser": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz", - "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==", - "dev": true, - "requires": { - "camelcase": "^4.1.0" - } - } - } -} diff --git a/packages/router/package.json b/packages/router/package.json index c051232..eb8a94d 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@stencil/router", - "version": "0.3.2", + "version": "0.3.4-0", "description": "Stencil Router", "module": "dist/index.mjs", "main": "dist/index.js", From a8f98fb5cc96ad1988bc4f369951365118740ff8 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Thu, 11 Apr 2019 16:13:54 -0500 Subject: [PATCH 11/16] 0.3.4-1 --- packages/router/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/router/package.json b/packages/router/package.json index eb8a94d..40c841d 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@stencil/router", - "version": "0.3.4-0", + "version": "0.3.4-1", "description": "Stencil Router", "module": "dist/index.mjs", "main": "dist/index.js", From 026378fbef004d6536f28e0899042f723945cd5d Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Fri, 19 Apr 2019 06:39:15 -0500 Subject: [PATCH 12/16] remove use of getDocument/getWindow --- .../src/components/redirect/redirect.tsx | 4 +- .../components/route-title/route-title.tsx | 8 +- .../router/src/components/router/router.tsx | 24 +++--- packages/router/src/global/interfaces.ts | 1 + .../router/src/utils/createBrowserHistory.ts | 55 ++++++------ .../router/src/utils/createHashHistory.ts | 86 +++++++++---------- .../src/utils/createTransitionManager.ts | 3 +- packages/router/src/utils/dom-utils.ts | 4 +- packages/router/src/utils/location-utils.ts | 23 ++--- packages/router/src/utils/path-to-regex.ts | 6 +- packages/router/src/utils/path-utils.ts | 18 ++-- packages/router/src/utils/shallow-equal.ts | 6 +- 12 files changed, 123 insertions(+), 115 deletions(-) diff --git a/packages/router/src/components/redirect/redirect.tsx b/packages/router/src/components/redirect/redirect.tsx index e12d8b5..eed935b 100644 --- a/packages/router/src/components/redirect/redirect.tsx +++ b/packages/router/src/components/redirect/redirect.tsx @@ -3,9 +3,9 @@ import { RouterHistory } from '../../global/interfaces'; import ActiveRouter from '../../global/active-router'; // Get the URL for this route link without the root from the router -function getUrl(url: string, root: string) { +const getUrl = (url: string, root: string) => { // Don't allow double slashes - if(url.charAt(0) == '/' && root.charAt(root.length - 1) == '/') { + if (url.charAt(0) == '/' && root.charAt(root.length - 1) == '/') { return root.slice(0, root.length-1) + url; } return root + url; diff --git a/packages/router/src/components/route-title/route-title.tsx b/packages/router/src/components/route-title/route-title.tsx index 256adba..e60a5d4 100644 --- a/packages/router/src/components/route-title/route-title.tsx +++ b/packages/router/src/components/route-title/route-title.tsx @@ -1,4 +1,4 @@ -import { Component, Prop, Element, Watch, ComponentInterface, getDocument } from '@stencil/core'; +import { Component, Prop, Element, Watch, ComponentInterface } from '@stencil/core'; import ActiveRouter from '../../global/active-router'; /** @@ -11,14 +11,16 @@ import ActiveRouter from '../../global/active-router'; tag: 'stencil-route-title' }) export class RouteTitle implements ComponentInterface { - doc = getDocument(this); @Element() el!: HTMLElement; @Prop() titleSuffix: string = ''; @Prop() pageTitle: string = ''; @Watch('pageTitle') updateDocumentTitle() { - this.doc.title = `${this.pageTitle}${this.titleSuffix || ''}`; + const el = this.el; + if (el.ownerDocument) { + el.ownerDocument.title = `${this.pageTitle}${this.titleSuffix || ''}`; + } } componentWillLoad() { diff --git a/packages/router/src/components/router/router.tsx b/packages/router/src/components/router/router.tsx index 67ce04a..98d2ca3 100644 --- a/packages/router/src/components/router/router.tsx +++ b/packages/router/src/components/router/router.tsx @@ -1,4 +1,4 @@ -import { Component, Prop, State, ComponentInterface, getDocument, getWindow, h } from '@stencil/core'; +import { Component, Element, Prop, State, ComponentInterface, h } from '@stencil/core'; import createHistory from '../../utils/createBrowserHistory'; import createHashHistory from '../../utils/createHashHistory'; import { LocationSegments, HistoryType, RouterHistory, RouteViewOptions } from '../../global/interfaces'; @@ -31,7 +31,7 @@ const HISTORIES: { [key in HistoryType]: (win: Window) => RouterHistory } = { tag: 'stencil-router' }) export class Router implements ComponentInterface { - win = getWindow(this); + @Element() el!: HTMLElement; @Prop() root: string = '/'; @Prop({ context: 'isServer' }) private isServer!: boolean; @Prop({ context: 'queue'}) queue!: QueueApi; @@ -47,9 +47,9 @@ export class Router implements ComponentInterface { @State() history?: RouterHistory; componentWillLoad() { - this.history = HISTORIES[this.historyType](this.win); + this.history = HISTORIES[this.historyType]((this.el.ownerDocument as any).defaultView); - this.history.listen(async (location: LocationSegments) => { + this.history.listen((location: LocationSegments) => { location = getLocation(location, this.root); this.location = location; }); @@ -57,8 +57,8 @@ export class Router implements ComponentInterface { } routeViewsUpdated = (options: RouteViewOptions = {}) => { - if (options.scrollToId && this.historyType === 'browser') { - const elm = getDocument(this).getElementById(options.scrollToId); + if (this.history && options.scrollToId && this.historyType === 'browser') { + const elm = this.history.win.document.getElementById(options.scrollToId); if (elm) { return elm.scrollIntoView(); } @@ -67,20 +67,22 @@ export class Router implements ComponentInterface { } scrollTo(scrollToLocation?: number) { - if (scrollToLocation == null || this.isServer || !this.history) { + const history = this.history; + + if (scrollToLocation == null || this.isServer || !history) { return; } - if (this.history.action === 'POP' && Array.isArray(this.history.location.scrollPosition)) { + if (history.action === 'POP' && Array.isArray(history.location.scrollPosition)) { return this.queue.write(() => { - if (this.history && this.history.location && Array.isArray(this.history.location.scrollPosition)) { - this.win.scrollTo(this.history.location.scrollPosition[0], this.history.location.scrollPosition[1]); + if (history && history.location && Array.isArray(history.location.scrollPosition)) { + history.win.scrollTo(history.location.scrollPosition[0], history.location.scrollPosition[1]); } }); } // okay, the frame has passed. Go ahead and render now return this.queue.write(() => { - this.win.scrollTo(0, scrollToLocation); + history.win.scrollTo(0, scrollToLocation); }); } diff --git a/packages/router/src/global/interfaces.ts b/packages/router/src/global/interfaces.ts index d8d36d1..72c7515 100644 --- a/packages/router/src/global/interfaces.ts +++ b/packages/router/src/global/interfaces.ts @@ -53,6 +53,7 @@ export interface RouterHistory { goForward: () => void; block: (prompt?: string | Prompt) => () => void; listen: (listener: Function) => () => void; + win: Window; } export interface RouterGroup { diff --git a/packages/router/src/utils/createBrowserHistory.ts b/packages/router/src/utils/createBrowserHistory.ts index 89f1409..558c95d 100644 --- a/packages/router/src/utils/createBrowserHistory.ts +++ b/packages/router/src/utils/createBrowserHistory.ts @@ -34,26 +34,18 @@ interface NextState { const PopStateEvent = 'popstate'; const HashChangeEvent = 'hashchange'; -const getHistoryState = (win: Window) => { - try { - return win.history.state || {}; - } catch (e) { - // IE 11 sometimes throws when accessing window.history.state - // See https://github.com/ReactTraining/history/pull/289 - return {}; - } -}; - /** * Creates a history object that uses the HTML5 history API including * pushState, replaceState, and the popstate event. */ -const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = {}): RouterHistory => { +const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = {}) => { let forceNextPop = false; const globalHistory = win.history; + const globalLocation = win.location; + const globalNavigator = win.navigator; const canUseHistory = supportsHistory(win); - const needsHashChangeListener = !supportsPopStateOnHashChange(win.navigator); + const needsHashChangeListener = !supportsPopStateOnHashChange(globalNavigator); const scrollHistory = createScrollHistory(win); const forceRefresh = (props.forceRefresh != null) ? props.forceRefresh : false; @@ -61,10 +53,20 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = const keyLength = (props.keyLength != null) ? props.keyLength : 6; const basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : ''; - const getDOMLocation = (win: Window, historyState: LocationSegments) => { + const getHistoryState = () => { + try { + return win.history.state || {}; + } catch (e) { + // IE 11 sometimes throws when accessing window.history.state + // See https://github.com/ReactTraining/history/pull/289 + return {}; + } + }; + + const getDOMLocation = (historyState: LocationSegments) => { historyState = historyState || {}; const { key, state } = historyState; - const { pathname, search, hash } = win.location; + const { pathname, search, hash } = globalLocation; let path = pathname + search + hash; @@ -103,13 +105,13 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = const handlePopState = (event: any) => { // Ignore extraneous popstate events in WebKit. - if (!isExtraneousPopstateEvent(win.navigator, event)) { - handlePop(getDOMLocation(win, event.state)); + if (!isExtraneousPopstateEvent(globalNavigator, event)) { + handlePop(getDOMLocation(event.state)); } }; const handleHashChange = () => { - handlePop(getDOMLocation(win, getHistoryState(win))); + handlePop(getDOMLocation(getHistoryState())); }; @@ -138,13 +140,12 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = // Instead, we just default to 0 for keys we don't know. let toIndex = allKeys.indexOf(toLocation.key); + let fromIndex = allKeys.indexOf(fromLocation.key); if (toIndex === -1) { toIndex = 0; } - let fromIndex = allKeys.indexOf(fromLocation.key); - if (fromIndex === -1) { fromIndex = 0; } @@ -157,7 +158,7 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = } }; - const initialLocation = getDOMLocation(win, getHistoryState(win)); + const initialLocation = getDOMLocation(getHistoryState()); let allKeys = [ initialLocation.key ]; let listenerCount = 0; let isBlocked = false; @@ -190,7 +191,7 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = globalHistory.pushState({ key, state }, '', href); if (forceRefresh) { - win.location.href = href; + globalLocation.href = href; } else { const prevIndex = allKeys.indexOf(history.location.key); const nextKeys = allKeys.slice(0, prevIndex === -1 ? 0 : prevIndex + 1); @@ -206,7 +207,7 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = 'Browser history cannot push state in browsers that do not support HTML5 history' ); - win.location.href = href; + globalLocation.href = href; } }); }; @@ -233,7 +234,8 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = globalHistory.replaceState({ key, state }, '', href); if (forceRefresh) { - win.location.replace(href); + globalLocation.replace(href); + } else { const prevIndex = allKeys.indexOf(history.location.key); @@ -249,7 +251,7 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = 'Browser history cannot replace state in browsers that do not support HTML5 history' ); - win.location.replace(href); + globalLocation.replace(href); } }); }; @@ -308,7 +310,7 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = }; }; - const history = { + const history: RouterHistory = { length: globalHistory.length, action: 'POP', location: initialLocation, @@ -319,7 +321,8 @@ const createBrowserHistory = (win: Window, props: CreateBrowserHistoryOptions = goBack, goForward, block, - listen + listen, + win: win }; return history; diff --git a/packages/router/src/utils/createHashHistory.ts b/packages/router/src/utils/createHashHistory.ts index 4fa30cc..be2a8a0 100644 --- a/packages/router/src/utils/createHashHistory.ts +++ b/packages/router/src/utils/createHashHistory.ts @@ -40,27 +40,13 @@ const HashPathCoders = { } }; -const getHashPath = (win: Window) => { - // We can't use window.location.hash here because it's not - // consistent across browsers - Firefox will pre-decode it! - const href = win.location.href; - const hashIndex = href.indexOf('#'); - return hashIndex === -1 ? '' : href.substring(hashIndex + 1); -}; - -const pushHashPath = (win: Window, path: string) => ( - win.location.hash = path -); - -const replaceHashPath = (win: Window, path: string) => { - const hashIndex = win.location.href.indexOf('#'); - - win.location.replace( - win.location.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path - ); -}; +const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}) => { + let forceNextPop = false; + let ignorePath: any = null; + let listenerCount = 0; + let isBlocked = false; -const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): RouterHistory => { + const globalLocation = win.location; const globalHistory = win.history; const canGoWithoutReload = supportsGoWithoutReloadUsingHash(win.navigator); const keyLength = (props.keyLength != null) ? props.keyLength : 6; @@ -73,8 +59,28 @@ const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): R const { encodePath, decodePath } = HashPathCoders[hashType]; - const getDOMLocation = (win: Window) => { - let path = decodePath(getHashPath(win)); + const getHashPath = () => { + // We can't use window.location.hash here because it's not + // consistent across browsers - Firefox will pre-decode it! + const href = globalLocation.href; + const hashIndex = href.indexOf('#'); + return hashIndex === -1 ? '' : href.substring(hashIndex + 1); + }; + + const pushHashPath = (path: string) => ( + globalLocation.hash = path + ); + + const replaceHashPath = (path: string) => { + const hashIndex = globalLocation.href.indexOf('#'); + + globalLocation.replace( + globalLocation.href.slice(0, hashIndex >= 0 ? hashIndex : 0) + '#' + path + ); + }; + + const getDOMLocation = () => { + let path = decodePath(getHashPath()); warning( (!basename || hasBasename(path, basename)), @@ -102,18 +108,16 @@ const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): R ); }; - let forceNextPop = false; - let ignorePath: any = null; - const handleHashChange = () => { - const path = getHashPath(win); + const path = getHashPath(); const encodedPath = encodePath(path); if (path !== encodedPath) { // Ensure we always have a properly-encoded hash. - replaceHashPath(win, encodedPath); + replaceHashPath(encodedPath); + } else { - const location = getDOMLocation(win); + const location = getDOMLocation(); const prevLocation = history.location; if (!forceNextPop && locationsAreEqual(prevLocation, location)) { @@ -155,13 +159,12 @@ const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): R // Instead, we just default to 0 for paths we don't know. let toIndex = allPaths.lastIndexOf(createPath(toLocation)); + let fromIndex = allPaths.lastIndexOf(createPath(fromLocation)); if (toIndex === -1) { toIndex = 0; } - let fromIndex = allPaths.lastIndexOf(createPath(fromLocation)); - if (fromIndex === -1) { fromIndex = 0; } @@ -175,14 +178,14 @@ const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): R }; // Ensure the hash is encoded properly before doing anything else. - const path = getHashPath(win); + const path = getHashPath(); const encodedPath = encodePath(path); if (path !== encodedPath) { - replaceHashPath(win, encodedPath); + replaceHashPath(encodedPath); } - const initialLocation = getDOMLocation(win); + const initialLocation = getDOMLocation(); let allPaths = [ createPath(initialLocation) ]; // Public interface @@ -207,14 +210,14 @@ const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): R const path = createPath(location); const encodedPath = encodePath(basename + path); - const hashChanged = getHashPath(win) !== encodedPath; + const hashChanged = getHashPath() !== encodedPath; if (hashChanged) { // We cannot tell if a hashchange was caused by a PUSH, so we'd // rather setState here and ignore the hashchange. The caveat here // is that other hash histories in the page will consider it a POP. ignorePath = path; - pushHashPath(win, encodedPath); + pushHashPath(encodedPath); const prevIndex = allPaths.lastIndexOf(createPath(history.location)); const nextPaths = allPaths.slice(0, prevIndex === -1 ? 0 : prevIndex + 1); @@ -250,14 +253,14 @@ const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): R const path = createPath(location); const encodedPath = encodePath(basename + path); - const hashChanged = getHashPath(win) !== encodedPath; + const hashChanged = getHashPath() !== encodedPath; if (hashChanged) { // We cannot tell if a hashchange was caused by a REPLACE, so we'd // rather setState here and ignore the hashchange. The caveat here // is that other hash histories in the page will consider it a POP. ignorePath = path; - replaceHashPath(win, encodedPath); + replaceHashPath(encodedPath); } const prevIndex = allPaths.indexOf(createPath(history.location)); @@ -283,8 +286,6 @@ const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): R const goForward = () => go(1); - let listenerCount = 0; - const checkDOMListeners = (win: Window, delta: number) => { listenerCount += delta; @@ -295,8 +296,6 @@ const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): R } }; - let isBlocked = false; - const block = (prompt: string | Prompt = '') => { const unblock = transitionManager.setPrompt(prompt); @@ -325,7 +324,7 @@ const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): R }; }; - const history = { + const history: RouterHistory = { length: globalHistory.length, action: 'POP', location: initialLocation, @@ -336,7 +335,8 @@ const createHashHistory = (win: Window, props: CreateHashHistoryOptions = {}): R goBack, goForward, block, - listen + listen, + win: win }; return history; diff --git a/packages/router/src/utils/createTransitionManager.ts b/packages/router/src/utils/createTransitionManager.ts index e386e58..4816e64 100644 --- a/packages/router/src/utils/createTransitionManager.ts +++ b/packages/router/src/utils/createTransitionManager.ts @@ -6,6 +6,7 @@ import { LocationSegments, Prompt } from '../global/interfaces'; const createTransitionManager = () => { let prompt: Prompt | string | null; + let listeners: Function[] = []; const setPrompt = (nextPrompt: Prompt | string | null) => { warning( @@ -49,8 +50,6 @@ const createTransitionManager = () => { } } - let listeners: Function[] = []; - const appendListener = (fn: Function) => { let isActive = true; diff --git a/packages/router/src/utils/dom-utils.ts b/packages/router/src/utils/dom-utils.ts index b161e8e..0c973c6 100644 --- a/packages/router/src/utils/dom-utils.ts +++ b/packages/router/src/utils/dom-utils.ts @@ -3,8 +3,8 @@ export const getConfirmation = (win: Window, message: string, callback: (confirm callback(win.confirm(message)) ); -export const isModifiedEvent = (event: MouseEvent) => ( - event.metaKey || event.altKey || event.ctrlKey || event.shiftKey +export const isModifiedEvent = (ev: MouseEvent) => ( + ev.metaKey || ev.altKey || ev.ctrlKey || ev.shiftKey ); /** diff --git a/packages/router/src/utils/location-utils.ts b/packages/router/src/utils/location-utils.ts index eefe7d2..512e002 100644 --- a/packages/router/src/utils/location-utils.ts +++ b/packages/router/src/utils/location-utils.ts @@ -1,16 +1,16 @@ import { parsePath, parseQueryString } from './path-utils'; import { LocationSegments } from '../global/interfaces'; -function isAbsolute(pathname: string) { +const isAbsolute = (pathname: string) => { return pathname.charAt(0) === '/'; } -export function createKey(keyLength: number) { +export const createKey = (keyLength: number) => { return Math.random().toString(36).substr(2, keyLength) }; // About 1.5x faster than the two-arg version of Array#splice() -function spliceOne(list: string[], index: number) { +const spliceOne = (list: string[], index: number) => { for (let i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) { list[i] = list[k]; } @@ -19,10 +19,12 @@ function spliceOne(list: string[], index: number) { } // This implementation is based heavily on node's url.parse -export function resolvePathname(to: string, from = '') { - const toParts = to && to.split('/') || []; +export const resolvePathname = (to: string, from = '') => { let fromParts = from && from.split('/') || []; + let hasTrailingSlash; + let up = 0; + const toParts = to && to.split('/') || []; const isToAbs = to && isAbsolute(to); const isFromAbs = from && isAbsolute(from); const mustEndAbs = isToAbs || isFromAbs; @@ -40,7 +42,6 @@ export function resolvePathname(to: string, from = '') { return '/'; } - let hasTrailingSlash; if (fromParts.length) { const last = fromParts[fromParts.length - 1]; hasTrailingSlash = (last === '.' || last === '..' || last === ''); @@ -48,7 +49,6 @@ export function resolvePathname(to: string, from = '') { hasTrailingSlash = false; } - let up = 0; for (let i = fromParts.length; i >= 0; i--) { const part = fromParts[i]; @@ -82,7 +82,7 @@ export function resolvePathname(to: string, from = '') { return result; } -export function valueEqual(a: any, b: any): boolean { +export const valueEqual = (a: any, b: any): boolean => { if (a === b) { return true; } @@ -128,7 +128,7 @@ export function valueEqual(a: any, b: any): boolean { } -export function locationsAreEqual(a: LocationSegments, b: LocationSegments) { +export const locationsAreEqual = (a: LocationSegments, b: LocationSegments) => { return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && @@ -136,8 +136,9 @@ export function locationsAreEqual(a: LocationSegments, b: LocationSegments) { valueEqual(a.state, b.state); } -export function createLocation(path: string | LocationSegments, state: any, key: string, currentLocation?: LocationSegments): LocationSegments { - let location; +export const createLocation = (path: string | LocationSegments, state: any, key: string, currentLocation?: LocationSegments) => { + let location: LocationSegments; + if (typeof path === 'string') { // Two-arg form: push(path, state) location = parsePath(path); diff --git a/packages/router/src/utils/path-to-regex.ts b/packages/router/src/utils/path-to-regex.ts index 6cbfe26..8f8d6e1 100644 --- a/packages/router/src/utils/path-to-regex.ts +++ b/packages/router/src/utils/path-to-regex.ts @@ -37,13 +37,13 @@ export type PathFunction = (data?: { [key: string]: any }, options?: PathFunctio /** * Default configs. */ -var DEFAULT_DELIMITER = '/' -var DEFAULT_DELIMITERS = './' +const DEFAULT_DELIMITER = '/' +const DEFAULT_DELIMITERS = './' /** * The main path matching regexp utility. */ -var PATH_REGEXP = new RegExp([ +const PATH_REGEXP = new RegExp([ // Match escaped characters that would otherwise appear in future matches. // This allows the user to escape special characters that won't transform. '(\\\\.)', diff --git a/packages/router/src/utils/path-utils.ts b/packages/router/src/utils/path-utils.ts index 8924cea..9bc5e7a 100644 --- a/packages/router/src/utils/path-utils.ts +++ b/packages/router/src/utils/path-utils.ts @@ -1,30 +1,30 @@ import { LocationSegments } from '../global/interfaces'; -export function hasBasename(path: string, prefix: string) { +export const hasBasename = (path: string, prefix: string) => { return (new RegExp('^' + prefix + '(\\/|\\?|#|$)', 'i')).test(path); } -export function stripBasename(path: string, prefix: string) { +export const stripBasename = (path: string, prefix: string) => { return hasBasename(path, prefix) ? path.substr(prefix.length) : path; } -export function stripTrailingSlash(path: string) { +export const stripTrailingSlash = (path: string) => { return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path; } -export function addLeadingSlash(path: string) { +export const addLeadingSlash = (path: string) => { return path.charAt(0) === '/' ? path : '/' + path; } -export function stripLeadingSlash(path: string) { +export const stripLeadingSlash = (path: string) => { return path.charAt(0) === '/' ? path.substr(1) : path; } -export function stripPrefix(path: string, prefix: string) { +export const stripPrefix = (path: string, prefix: string) => { return path.indexOf(prefix) === 0 ? path.substr(prefix.length) : path; } -export function parsePath(path: string): LocationSegments { +export const parsePath = (path: string): LocationSegments => { let pathname = path || '/'; let search = ''; let hash = ''; @@ -50,7 +50,7 @@ export function parsePath(path: string): LocationSegments { }; } -export function createPath(location: LocationSegments): string { +export const createPath = (location: LocationSegments) => { const { pathname, search, hash } = location; let path = pathname || '/'; @@ -65,7 +65,7 @@ export function createPath(location: LocationSegments): string { return path; } -export function parseQueryString(query: string) { +export const parseQueryString = (query: string) => { if (!query) { return { }; } diff --git a/packages/router/src/utils/shallow-equal.ts b/packages/router/src/utils/shallow-equal.ts index 11a7b6f..ebb1d59 100644 --- a/packages/router/src/utils/shallow-equal.ts +++ b/packages/router/src/utils/shallow-equal.ts @@ -12,13 +12,13 @@ 'use strict'; -var hasOwnProperty = Object.prototype.hasOwnProperty; +const hasOwnProperty = Object.prototype.hasOwnProperty; /** * inlined Object.is polyfill to avoid requiring consumers ship their own * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is */ -function is(x: any, y: any) { +const is = (x: any, y: any) => { // SameValue algorithm if (x === y) { // Steps 1-5, 7-10 @@ -36,7 +36,7 @@ function is(x: any, y: any) { * when any key has values which are not strictly equal between the arguments. * Returns true when the values of all keys are strictly equal. */ -export function shallowEqual(objA: any, objB: any) { +export const shallowEqual = (objA: any, objB: any) => { if (is(objA, objB)) { return true; } From 93ce92b7c12cb549f4d18d51ccda87b7c9c6ebb2 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Fri, 19 Apr 2019 06:40:45 -0500 Subject: [PATCH 13/16] 0.3.4-2 --- packages/router/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/router/package.json b/packages/router/package.json index 40c841d..27a377d 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@stencil/router", - "version": "0.3.4-1", + "version": "0.3.4-2", "description": "Stencil Router", "module": "dist/index.mjs", "main": "dist/index.js", From a5563b59a48f0748eee427941c55e0fa5eee337f Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Wed, 15 May 2019 19:35:45 +0200 Subject: [PATCH 14/16] chore(): update deps --- package.json | 2 +- packages/router/package.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index f4cbb52..39d2ec6 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "root", "private": true, "devDependencies": { - "@stencil/core": "^1.0.0-alpha.8", + "@stencil/core": "one", "@types/jest": "^23.3.1", "jest": "^23.4.2", "lerna": "^3.0.3", diff --git a/packages/router/package.json b/packages/router/package.json index 27a377d..7ba52e5 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -2,9 +2,9 @@ "name": "@stencil/router", "version": "0.3.4-2", "description": "Stencil Router", - "module": "dist/index.mjs", "main": "dist/index.js", - "unpkg": "dist/stencilrouter.js", + "module": "dist/index.mjs", + "unpkg": "dist/stencilrouter/stencilrouter.js", "types": "dist/types/index.d.ts", "collection": "dist/collection/collection-manifest.json", "collection:main": "dist/collection/index.js", @@ -14,7 +14,7 @@ "scripts": { "build": "../../node_modules/.bin/stencil build", "dev": "../../node_modules/.bin/stencil build --dev --watch", - "release": "npm run build && np --any-branch", + "release": "npm run build && np --any-branch --tag=one", "start": "npm run dev", "test": "../../node_modules/.bin/jest" }, @@ -23,10 +23,10 @@ "url": "git+https://github.com/ionic-team/stencil-router.git" }, "dependencies": { - "@stencil/state-tunnel": "^0.0.9-5" + "@stencil/state-tunnel": "one" }, "devDependencies": { - "np": "^3.0.4" + "np": "^5.0.1" }, "author": "Ionic Team", "license": "MIT", From f662e4db5f34b4b7730e9e0fd524baeef23c0b28 Mon Sep 17 00:00:00 2001 From: "Manu Mtz.-Almeida" Date: Wed, 15 May 2019 19:38:16 +0200 Subject: [PATCH 15/16] Release 1.0.0-0 --- packages/router/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/router/package.json b/packages/router/package.json index 7ba52e5..b825e7c 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@stencil/router", - "version": "0.3.4-2", + "version": "1.0.0-0", "description": "Stencil Router", "main": "dist/index.js", "module": "dist/index.mjs", From 23d1a364ac5782051df9dc0cdfa9b90daa653ff6 Mon Sep 17 00:00:00 2001 From: Josh Thomas Date: Thu, 16 May 2019 13:05:34 -0500 Subject: [PATCH 16/16] chore(): update stencil-state-tunnel version. --- package.json | 2 +- packages/router/package.json | 2 +- packages/router/src/components.d.ts | 46 ++++++++++------------------- 3 files changed, 17 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index 39d2ec6..320c85a 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "root", "private": true, "devDependencies": { - "@stencil/core": "one", + "@stencil/core": "^1.0.0-beta.0", "@types/jest": "^23.3.1", "jest": "^23.4.2", "lerna": "^3.0.3", diff --git a/packages/router/package.json b/packages/router/package.json index b825e7c..a480c61 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -23,7 +23,7 @@ "url": "git+https://github.com/ionic-team/stencil-router.git" }, "dependencies": { - "@stencil/state-tunnel": "one" + "@stencil/state-tunnel": "^1.0.0-1" }, "devDependencies": { "np": "^5.0.1" diff --git a/packages/router/src/components.d.ts b/packages/router/src/components.d.ts index 4f06c7c..a4da723 100644 --- a/packages/router/src/components.d.ts +++ b/packages/router/src/components.d.ts @@ -158,40 +158,32 @@ declare namespace LocalJSX { 'url'?: string; } - interface ElementInterfaces { - 'StencilAsyncContent': Components.StencilAsyncContent; - 'StencilRoute': Components.StencilRoute; - 'StencilRouteLink': Components.StencilRouteLink; - 'StencilRouteSwitch': Components.StencilRouteSwitch; - 'StencilRouteTitle': Components.StencilRouteTitle; - 'StencilRouter': Components.StencilRouter; - 'StencilRouterPrompt': Components.StencilRouterPrompt; - 'StencilRouterRedirect': Components.StencilRouterRedirect; - } - interface IntrinsicElements { - 'StencilAsyncContent': LocalJSX.StencilAsyncContent; - 'StencilRoute': LocalJSX.StencilRoute; - 'StencilRouteLink': LocalJSX.StencilRouteLink; - 'StencilRouteSwitch': LocalJSX.StencilRouteSwitch; - 'StencilRouteTitle': LocalJSX.StencilRouteTitle; - 'StencilRouter': LocalJSX.StencilRouter; - 'StencilRouterPrompt': LocalJSX.StencilRouterPrompt; - 'StencilRouterRedirect': LocalJSX.StencilRouterRedirect; + 'stencil-async-content': StencilAsyncContent; + 'stencil-route': StencilRoute; + 'stencil-route-link': StencilRouteLink; + 'stencil-route-switch': StencilRouteSwitch; + 'stencil-route-title': StencilRouteTitle; + 'stencil-router': StencilRouter; + 'stencil-router-prompt': StencilRouterPrompt; + 'stencil-router-redirect': StencilRouterRedirect; } } + export { LocalJSX as JSX }; + declare module "@stencil/core" { export namespace JSX { - interface ElementInterfaces extends LocalJSX.ElementInterfaces {} interface IntrinsicElements extends LocalJSX.IntrinsicElements {} } } + declare global { + interface HTMLStencilAsyncContentElement extends Components.StencilAsyncContent, HTMLStencilElement {} var HTMLStencilAsyncContentElement: { prototype: HTMLStencilAsyncContentElement; @@ -239,18 +231,8 @@ declare global { prototype: HTMLStencilRouterRedirectElement; new (): HTMLStencilRouterRedirectElement; }; - interface HTMLElementTagNameMap { - 'stencil-async-content': HTMLStencilAsyncContentElement - 'stencil-route': HTMLStencilRouteElement - 'stencil-route-link': HTMLStencilRouteLinkElement - 'stencil-route-switch': HTMLStencilRouteSwitchElement - 'stencil-route-title': HTMLStencilRouteTitleElement - 'stencil-router': HTMLStencilRouterElement - 'stencil-router-prompt': HTMLStencilRouterPromptElement - 'stencil-router-redirect': HTMLStencilRouterRedirectElement - } - interface ElementTagNameMap { + interface HTMLElementTagNameMap { 'stencil-async-content': HTMLStencilAsyncContentElement; 'stencil-route': HTMLStencilRouteElement; 'stencil-route-link': HTMLStencilRouteLinkElement; @@ -260,5 +242,7 @@ declare global { 'stencil-router-prompt': HTMLStencilRouterPromptElement; 'stencil-router-redirect': HTMLStencilRouterRedirectElement; } + + interface ElementTagNameMap extends HTMLElementTagNameMap {} }