From 88be6d269e59878c605446a64e440eec3c393a17 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Thu, 7 May 2020 03:17:25 +0900 Subject: [PATCH 1/3] breaking: v-t directive --- README.md | 14 ++-- e2e/directive/basic.test.js | 20 +++++ e2e/directive/object.test.js | 14 ++++ e2e/directive/plural.test.js | 13 +++ e2e/directive/preserve.test.js | 23 ++++++ e2e/helper.js | 7 +- examples/composable/directive/basic.html | 54 ++++++++++++ examples/composable/directive/object.html | 46 +++++++++++ examples/composable/directive/plural.html | 35 ++++++++ examples/composable/directive/preserve.html | 53 ++++++++++++ examples/legacy/directive/basic.html | 54 ++++++++++++ examples/legacy/directive/object.html | 46 +++++++++++ examples/legacy/directive/plural.html | 32 +++++++ examples/legacy/directive/preserve.html | 53 ++++++++++++ src/directive.ts | 92 ++++++++++++++++++++- src/legacy.ts | 19 ++++- src/plugin.ts | 14 ++-- 17 files changed, 571 insertions(+), 18 deletions(-) create mode 100644 e2e/directive/basic.test.js create mode 100644 e2e/directive/object.test.js create mode 100644 e2e/directive/plural.test.js create mode 100644 e2e/directive/preserve.test.js create mode 100644 examples/composable/directive/basic.html create mode 100644 examples/composable/directive/object.html create mode 100644 examples/composable/directive/plural.html create mode 100644 examples/composable/directive/preserve.html create mode 100644 examples/legacy/directive/basic.html create mode 100644 examples/legacy/directive/object.html create mode 100644 examples/legacy/directive/plural.html create mode 100644 examples/legacy/directive/preserve.html diff --git a/README.md b/README.md index a01bf9a07..57d6a7575 100644 --- a/README.md +++ b/README.md @@ -93,6 +93,9 @@ The examples are offered that use the following two API styles: - For production mode, HTML message detect is not check due to performance. - Legacy API `sync` option: - default: change to `false` from `true` +- `v-t` directive + - `preserve` modifier deprecated, keep Element content + - Legacy API `preserveDirectiveContent` option, and property deprecated - `VueI18n.version` -> `import { VERSION } from 'vue-i18n'` - `VueI18n.availabilities` -> `import { availabilities } from 'vue-i18n'` - See the details [here](https://github.com/intlify/vue-i18n-next/blob/master/docs/vue-i18n.md) @@ -112,8 +115,6 @@ The examples are offered that use the following two API styles: ### :hammer: Missing features -- `v-t` directive -- `preserveDirectiveContent` option (depend on `v-t`) - SSR - Custom formatting - Tooling @@ -145,7 +146,6 @@ yarn add vue-i18n@next - [x] vue-i18n message format - [ ] sourcemap - [x] HTML format handling - - [x] error handling - [ ] more unit (fuzzing) tests - [ ] performance tests (benchmark) - Intlify core runtime @@ -157,6 +157,7 @@ yarn add vue-i18n@next - [ ] improve locale messages typing: `LocaleMessages` / `LocaleMessage` / `LocaleMessageDictiory` - [x] postTranslation context option - Composable API: I18n Composer + - [ ] error handlings - properties - [x] locale - [x] fallbackLocale @@ -204,7 +205,7 @@ yarn add vue-i18n@next - [x] silentTranslationWarn - [x] silentFallbackWarn - [x] formatFallbackMessages - - [ ] preserveDirectiveContent + - [x] preserveDirectiveContent - [x] warnHtmlInMessage - [x] postTranslation - [x] t @@ -243,7 +244,7 @@ yarn add vue-i18n@next - [x] NumberFormat `` - [x] DatetimeFormat `` - Directive - - [ ] `v-t` + - [x] `v-t` - Tool Chains - [ ] intlify devtools - [ ] vue-i18n-extensions @@ -255,6 +256,9 @@ yarn add vue-i18n@next - [ ] documentation - [x] fallback localization (bubble up) - [ ] SSR +- General tasks + - [ ] error handlings + - [ ] unit testings with @vue/test-utils@next diff --git a/e2e/directive/basic.test.js b/e2e/directive/basic.test.js new file mode 100644 index 000000000..d91b506e5 --- /dev/null +++ b/e2e/directive/basic.test.js @@ -0,0 +1,20 @@ +;['composable', 'legacy'].forEach(pattern => { + describe(`${pattern}`, () => { + beforeAll(async () => { + await page.goto( + `http://localhost:8080/examples/${pattern}/directive/basic.html` + ) + }) + + test('initial rendering', async () => { + await expect(page).toMatch('言語') + await expect(page).toMatch('こんにちは、世界!') + }) + + test('change locale', async () => { + await page.select('#app select', 'en') + await expect(page).toMatch('Language') + await expect(page).toMatch('hello world!') + }) + }) +}) diff --git a/e2e/directive/object.test.js b/e2e/directive/object.test.js new file mode 100644 index 000000000..363e1cb25 --- /dev/null +++ b/e2e/directive/object.test.js @@ -0,0 +1,14 @@ +;['composable', 'legacy'].forEach(pattern => { + describe(`${pattern}`, () => { + beforeAll(async () => { + await page.goto( + `http://localhost:8080/examples/${pattern}/directive/object.html` + ) + }) + + test('rendering', async () => { + await expect(page).toMatch('こんにちは、 kazupon!') + await expect(page).toMatch('good bye!') + }) + }) +}) diff --git a/e2e/directive/plural.test.js b/e2e/directive/plural.test.js new file mode 100644 index 000000000..db4a42561 --- /dev/null +++ b/e2e/directive/plural.test.js @@ -0,0 +1,13 @@ +;['composable', 'legacy'].forEach(pattern => { + describe(`${pattern}`, () => { + beforeAll(async () => { + await page.goto( + `http://localhost:8080/examples/${pattern}/directive/plural.html` + ) + }) + + test('rendering', async () => { + await expect(page).toMatch('2 bananas') + }) + }) +}) diff --git a/e2e/directive/preserve.test.js b/e2e/directive/preserve.test.js new file mode 100644 index 000000000..270204df3 --- /dev/null +++ b/e2e/directive/preserve.test.js @@ -0,0 +1,23 @@ +const { sleep } = require('../helper') // eslint-disable-line + +;['composable', 'legacy'].forEach(pattern => { + describe(`${pattern}`, () => { + beforeAll(async () => { + await page.goto( + `http://localhost:8080/examples/${pattern}/directive/preserve.html` + ) + }) + + test('initial rendering', async () => { + await expect(page).toMatch('hi there!') + }) + + test('trigger transition', async () => { + await expect(page).toClick('#app button') + await expect(page).toMatchElement('#app p', { text: 'hi there!' }) + await sleep(1000) + await expect(page).toClick('#app button') + await expect(page).toMatch('hi there!') + }) + }) +}) diff --git a/e2e/helper.js b/e2e/helper.js index dfa91944a..b40c59efb 100644 --- a/e2e/helper.js +++ b/e2e/helper.js @@ -7,6 +7,11 @@ const setupWarningConsole = (page, messages) => { }) } +async function sleep(delay) { + return new Promise(resolve => setTimeout(resolve, delay)) +} + module.exports = { - setupWarningConsole + setupWarningConsole, + sleep } diff --git a/examples/composable/directive/basic.html b/examples/composable/directive/basic.html new file mode 100644 index 000000000..1819b530d --- /dev/null +++ b/examples/composable/directive/basic.html @@ -0,0 +1,54 @@ + + + + + v-t directive basic usage + + + + +
+
+ + + +
+ +

+
+ + + diff --git a/examples/composable/directive/object.html b/examples/composable/directive/object.html new file mode 100644 index 000000000..f4ae853b5 --- /dev/null +++ b/examples/composable/directive/object.html @@ -0,0 +1,46 @@ + + + + + v-t directive object value usage + + + + +
+

+

+
+ + + diff --git a/examples/composable/directive/plural.html b/examples/composable/directive/plural.html new file mode 100644 index 000000000..f83baa115 --- /dev/null +++ b/examples/composable/directive/plural.html @@ -0,0 +1,35 @@ + + + + + v-t directive plural usage + + + + +
+

+
+ + + diff --git a/examples/composable/directive/preserve.html b/examples/composable/directive/preserve.html new file mode 100644 index 000000000..c387324e5 --- /dev/null +++ b/examples/composable/directive/preserve.html @@ -0,0 +1,53 @@ + + + + + v-t directive preserve content usage + + + + + +
+ +

+
+ +
+ + + diff --git a/examples/legacy/directive/basic.html b/examples/legacy/directive/basic.html new file mode 100644 index 000000000..850dbabeb --- /dev/null +++ b/examples/legacy/directive/basic.html @@ -0,0 +1,54 @@ + + + + + v-t directive basic usage + + + + +
+
+ + + +
+ +

+
+ + + diff --git a/examples/legacy/directive/object.html b/examples/legacy/directive/object.html new file mode 100644 index 000000000..7452951e4 --- /dev/null +++ b/examples/legacy/directive/object.html @@ -0,0 +1,46 @@ + + + + + v-t directive object value usage + + + + +
+

+

+
+ + + diff --git a/examples/legacy/directive/plural.html b/examples/legacy/directive/plural.html new file mode 100644 index 000000000..4ecd8b925 --- /dev/null +++ b/examples/legacy/directive/plural.html @@ -0,0 +1,32 @@ + + + + + v-t directive plural usage + + + + +
+

+
+ + + diff --git a/examples/legacy/directive/preserve.html b/examples/legacy/directive/preserve.html new file mode 100644 index 000000000..6d951ac86 --- /dev/null +++ b/examples/legacy/directive/preserve.html @@ -0,0 +1,53 @@ + + + + + v-t directive preserve content usage + + + + + +
+ +

+
+ +
+ + + diff --git a/src/directive.ts b/src/directive.ts index 2ea264886..915f694df 100644 --- a/src/directive.ts +++ b/src/directive.ts @@ -1,6 +1,90 @@ -import { DirectiveBinding, VNode } from 'vue' +import { + DirectiveBinding, + ObjectDirective, + ComponentInternalInstance +} from 'vue' +import { I18n, I18nInternal } from './i18n' +import { Composer } from './composer' +import { Locale, TranslateOptions } from './core' +import { NamedValue } from './message/runtime' +import { isString, isPlainObject, isNumber, warn } from './utils' -export function hook (el: any, binding: DirectiveBinding, vnode: VNode, prevVNode: VNode): void { // eslint-disable-line - // TODO: v-t directive - // ... +type VTDirectiveValue = { + path: string + locale?: Locale + args?: NamedValue + choice?: number +} + +function getComposer( + i18n: I18n & I18nInternal, + instance: ComponentInternalInstance +): Composer | null { + if (i18n.mode === 'composable') { + return i18n._getComposer(instance) || i18n._global + } else { + const vueI18n = i18n._getLegacy(instance) + return vueI18n != null ? vueI18n.__composer : i18n._global + } +} + +export function vTDirective( + i18n: I18n & I18nInternal +): ObjectDirective { + const bind = ( + el: HTMLElement, + { instance, value, modifiers }: DirectiveBinding + ): void => { + if (!instance || !instance.$) { + // TODO: should be raise Vue error + throw new Error('TODO') + } + + const composer = getComposer(i18n, instance.$) + if (!composer) { + // TODO: should be error + throw new Error('TODO') + } + + if (__DEV__ && modifiers.preserve) { + warn(`not supportted 'preserve' modifier`) + } + + const parsedValue = parseValue(value) + el.innerText = composer.t(...makeParams(parsedValue)) + } + + return { + beforeMount: bind, + beforeUpdate: bind + } as ObjectDirective +} + +function parseValue(value: unknown): VTDirectiveValue { + if (isString(value)) { + return { path: value } + } else if (isPlainObject(value)) { + if (!('path' in value)) { + throw new Error('TODO') + } + return value as VTDirectiveValue + } else { + throw new Error('TODO') + } +} + +function makeParams(value: VTDirectiveValue): unknown[] { + const { path, locale, args, choice } = value + const options = {} as TranslateOptions + const named: NamedValue = args || {} + + if (isString(locale)) { + options.locale = locale + } + + if (isNumber(choice)) { + options.plural = choice + } + + return [path, named, options] } diff --git a/src/legacy.ts b/src/legacy.ts index ff99f2540..6594a7aab 100644 --- a/src/legacy.ts +++ b/src/legacy.ts @@ -106,11 +106,9 @@ export type VueI18n = { formatFallbackMessages: boolean sync: boolean warnHtmlInMessage: WarnHtmlInMessageLevel + preserveDirectiveContent: boolean __id: number __composer: Composer - /* - preserveDirectiveContent: boolean - */ /*! * methods @@ -197,6 +195,10 @@ function convertComposerOptions( warn(`not supportted 'formatter' option`) } + if (__DEV__ && options.preserveDirectiveContent) { + warn(`not supportted 'preserveDirectiveContent' option`) + } + let messages = options.messages if (isPlainObject(options.sharedMessages)) { const sharedMessages = options.sharedMessages @@ -357,6 +359,17 @@ export function createVueI18n( composer.warnHtmlMessage = val !== 'off' }, + // preserveDirectiveContent + get preserveDirectiveContent(): boolean { + __DEV__ && + warn(`not supportted 'preserveDirectiveContent' getter property.`) + return true + }, + set preserveDirectiveContent(val: boolean) { + __DEV__ && + warn(`not supportted 'preserveDirectiveContent' setter property.`) + }, + // for internal __id: composer.__id, __composer: composer, diff --git a/src/plugin.ts b/src/plugin.ts index 2c394b379..f78463bd1 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -1,14 +1,18 @@ -import { App, FunctionDirective } from 'vue' -import { I18nSymbol, I18n } from './i18n' +import { App } from 'vue' +import { I18nSymbol, I18n, I18nInternal } from './i18n' import { Translation, NumberFormat, DatetimeFormat } from './components' -import { hook as vT } from './directive' +import { vTDirective } from './directive' import { isPlainObject, isString, warn } from './utils' export interface I18nPluginOptions { 'i18n-t'?: string } -export function apply(app: App, i18n: I18n, ...options: unknown[]): void { +export function apply( + app: App, + i18n: I18n & I18nInternal, + ...options: unknown[] +): void { const pluginOptions = parseOptions(...options) if (__DEV__ && isString(pluginOptions['i18n-t'])) { @@ -23,7 +27,7 @@ export function apply(app: App, i18n: I18n, ...options: unknown[]): void { app.component(DatetimeFormat.name, DatetimeFormat) // install directive - app.directive('t', vT as FunctionDirective) // TODO: + app.directive('t', vTDirective(i18n)) // setup global provider app.provide(I18nSymbol, i18n) From 41e9245af9d39f0a34df51b09517ec5bdc4bdf79 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Thu, 7 May 2020 03:25:06 +0900 Subject: [PATCH 2/3] fix: pupeteer 3 installed failed --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 831ab2a4c..9d2acc9e4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,6 +23,10 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node }} + - name: Install apt-get + run: | + sudo apt-get update + sudo apt-get install -y libgbm-dev - name: Install run: yarn install - name: Test From 7c58814ebf492cbe1e194b07c974517b7936d23d Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Thu, 7 May 2020 03:29:25 +0900 Subject: [PATCH 3/3] fix: puppeteer downgrade --- .github/workflows/test.yml | 4 - package.json | 2 +- yarn.lock | 150 +++++++++++++------------------------ 3 files changed, 54 insertions(+), 102 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9d2acc9e4..831ab2a4c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,10 +23,6 @@ jobs: uses: actions/setup-node@v1 with: node-version: ${{ matrix.node }} - - name: Install apt-get - run: | - sudo apt-get update - sudo apt-get install -y libgbm-dev - name: Install run: yarn install - name: Test diff --git a/package.json b/package.json index 1a9a04aa8..f9a9233b9 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "minimist": "^1.2.5", "opener": "^1.5.1", "prettier": "^2.0.0", - "puppeteer": "^3.0.0", + "puppeteer": "^2.1.1", "rollup": "^2.3.0", "rollup-plugin-terser": "^5.2.0", "rollup-plugin-typescript2": "^0.27.0", diff --git a/yarn.lock b/yarn.lock index 001c75496..368d3a68a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -906,13 +906,6 @@ dependencies: "@types/yargs-parser" "*" -"@types/yauzl@^2.9.1": - version "2.9.1" - resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.9.1.tgz#d10f69f9f522eef3cf98e30afb684a1e1ec923af" - integrity sha512-A1b8SU4D10uoPjwb0lnHmmu8wZhR9d+9o2PKBQT2jU5YPTKsxac6M2qGAdY7VcL+dHHhARVUDmeg0rOrcd9EjA== - dependencies: - "@types/node" "*" - "@typescript-eslint/eslint-plugin@^2.26.0": version "2.30.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.30.0.tgz#312a37e80542a764d96e8ad88a105316cdcd7b05" @@ -1221,6 +1214,11 @@ astral-regex@^1.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg== +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + async@0.9.x: version "0.9.2" resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" @@ -1340,7 +1338,7 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-js@^1.0.2, base64-js@^1.1.2: +base64-js@^1.1.2: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== @@ -1375,15 +1373,6 @@ before-after-hook@^2.1.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.1.0.tgz#b6c03487f44e24200dd30ca5e6a1979c5d2fb635" integrity sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A== -bl@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/bl/-/bl-4.0.2.tgz#52b71e9088515d0606d9dd9cc7aa48dc1f98e73a" - integrity sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" @@ -1451,14 +1440,6 @@ buffer-from@1.x, buffer-from@^1.0.0: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== -buffer@^5.2.1, buffer@^5.5.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.6.0.tgz#a31749dc7d81d84db08abf937b6b8c4033f62786" - integrity sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw== - dependencies: - base64-js "^1.0.2" - ieee754 "^1.1.4" - builtin-modules@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.1.0.tgz#aad97c15131eb76b65b50ef208e7584cd76a7484" @@ -1628,7 +1609,7 @@ chardet@^0.7.0: resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== -chownr@^1.1.1, chownr@^1.1.2: +chownr@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== @@ -1803,6 +1784,16 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= +concat-stream@^1.6.2: + version "1.6.2" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" + integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== + dependencies: + buffer-from "^1.0.0" + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + constant-case@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-3.0.3.tgz#ac910a99caf3926ac5112f352e3af599d8c5fc0a" @@ -2103,7 +2094,7 @@ debug@=3.1.0: dependencies: ms "2.0.0" -debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: +debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -2285,7 +2276,7 @@ encoding@^0.1.12: dependencies: iconv-lite "~0.4.13" -end-of-stream@^1.1.0, end-of-stream@^1.4.1: +end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -2650,16 +2641,15 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" -extract-zip@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.0.tgz#f53b71d44f4ff5a4527a2259ade000fb8b303492" - integrity sha512-i42GQ498yibjdvIhivUsRslx608whtGoFIhF26Z7O4MYncBxp8CwalOs1lnHy21A9sIohWO2+uiE4SRtC9JXDg== +extract-zip@^1.6.6: + version "1.7.0" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927" + integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA== dependencies: - debug "^4.1.1" - get-stream "^5.1.0" + concat-stream "^1.6.2" + debug "^2.6.9" + mkdirp "^0.5.4" yauzl "^2.10.0" - optionalDependencies: - "@types/yauzl" "^2.9.1" extsprintf@1.3.0: version "1.3.0" @@ -2896,11 +2886,6 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - fs-exists-sync@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add" @@ -3009,7 +2994,7 @@ get-stream@^4.0.0: dependencies: pump "^3.0.0" -get-stream@^5.0.0, get-stream@^5.1.0: +get-stream@^5.0.0: version "5.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== @@ -3317,11 +3302,6 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13: dependencies: safer-buffer ">= 2.1.2 < 3" -ieee754@^1.1.4: - version "1.1.13" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.13.tgz#ec168558e95aa181fd87d37f55c32bbcb6708b84" - integrity sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg== - iferr@^0.1.5: version "0.1.5" resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501" @@ -3388,7 +3368,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@2, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: +inherits@2, inherits@^2.0.3, inherits@~2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== @@ -4758,17 +4738,12 @@ mixin-object@^2.0.1: for-in "^0.1.3" is-extendable "^0.1.1" -mkdirp-classic@^0.5.2: - version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" - integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== - mkdirp@1.x, mkdirp@^1.0.0, mkdirp@^1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== -mkdirp@^0.5.1: +mkdirp@^0.5.1, mkdirp@^0.5.4: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -5388,23 +5363,21 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -puppeteer@^3.0.0: - version "3.0.2" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-3.0.2.tgz#1d08cdb7c0c2666f5e743221b1cb1946fea493f0" - integrity sha512-5jS/POFVDW9fqb76O8o0IBpXOnq+Na8ocGMggYtnjCRBRqmAFvX0csmwgLOHkYnQ/vCBcBPYlOq0Pp60z1850Q== +puppeteer@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-2.1.1.tgz#ccde47c2a688f131883b50f2d697bd25189da27e" + integrity sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg== dependencies: "@types/mime-types" "^2.1.0" debug "^4.1.0" - extract-zip "^2.0.0" + extract-zip "^1.6.6" https-proxy-agent "^4.0.0" mime "^2.0.3" mime-types "^2.1.25" progress "^2.0.1" proxy-from-env "^1.0.0" - rimraf "^3.0.2" - tar-fs "^2.0.0" - unbzip2-stream "^1.3.3" - ws "^7.2.3" + rimraf "^2.6.1" + ws "^6.1.0" q@^1.5.1: version "1.5.1" @@ -5484,7 +5457,7 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -"readable-stream@1 || 2", readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.2.2, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -5497,7 +5470,7 @@ read-pkg@^5.2.0: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@^3.1.1, readable-stream@^3.4.0: +"readable-stream@2 || 3": version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -5712,14 +5685,14 @@ rimraf@2.6.3: dependencies: glob "^7.1.3" -rimraf@^2.5.4, rimraf@^2.7.1: +rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== dependencies: glob "^7.1.3" -rimraf@^3.0.0, rimraf@^3.0.2: +rimraf@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -6372,27 +6345,6 @@ table@^5.2.3: slice-ansi "^2.1.0" string-width "^3.0.0" -tar-fs@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.0.1.tgz#e44086c1c60d31a4f0cf893b1c4e155dabfae9e2" - integrity sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA== - dependencies: - chownr "^1.1.1" - mkdirp-classic "^0.5.2" - pump "^3.0.0" - tar-stream "^2.0.0" - -tar-stream@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.2.tgz#6d5ef1a7e5783a95ff70b69b97455a5968dc1325" - integrity sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q== - dependencies: - bl "^4.0.1" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - tar@^6.0.0: version "6.0.2" resolved "https://registry.yarnpkg.com/tar/-/tar-6.0.2.tgz#5df17813468a6264ff14f766886c622b84ae2f39" @@ -6504,7 +6456,7 @@ through2@^3.0.0: dependencies: readable-stream "2 || 3" -through@2, "through@>=2.2.7 <3", through@^2.3.6, through@^2.3.8: +through@2, "through@>=2.2.7 <3", through@^2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -6682,6 +6634,11 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= + typescript-eslint-language-service@^2.0.3: version "2.1.8" resolved "https://registry.yarnpkg.com/typescript-eslint-language-service/-/typescript-eslint-language-service-2.1.8.tgz#0c797e4c780328d14c236de750ac6a5e2683637c" @@ -6706,14 +6663,6 @@ uglify-js@^3.1.4: dependencies: commander "~2.20.3" -unbzip2-stream@^1.3.3: - version "1.4.2" - resolved "https://registry.yarnpkg.com/unbzip2-stream/-/unbzip2-stream-1.4.2.tgz#84eb9e783b186d8fb397515fbb656f312f1a7dbf" - integrity sha512-pZMVAofMrrHX6Ik39hCk470kulCbmZ2SWfQLPmTWqfJV/oUm0gn1CblvHdUu4+54Je6Jq34x8kY6XjTy6dMkOg== - dependencies: - buffer "^5.2.1" - through "^2.3.8" - union-value@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" @@ -7050,6 +6999,13 @@ write@1.0.3: dependencies: mkdirp "^0.5.1" +ws@^6.1.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" + integrity sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== + dependencies: + async-limiter "~1.0.0" + ws@^7.2.3: version "7.2.5" resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.5.tgz#abb1370d4626a5a9cd79d8de404aa18b3465d10d"