From 63be049aa7fce65bf4cedccc10f39a002f5b01bf Mon Sep 17 00:00:00 2001 From: igor Date: Tue, 12 Dec 2017 01:37:47 +0200 Subject: [PATCH 01/15] Create metadata extraction util --- addons/knobs/package.json | 2 +- addons/knobs/src/angular/helpers.js | 20 +- addons/knobs/src/angular/utils.js | 63 ++ app/angular/package.json | 12 +- .../src/client/preview/angular/helpers.ts | 11 +- app/angular/src/client/preview/utils.js | 63 ++ examples/angular-cli/package.json | 22 +- yarn.lock | 912 +++++++++--------- 8 files changed, 607 insertions(+), 498 deletions(-) create mode 100644 addons/knobs/src/angular/utils.js create mode 100644 app/angular/src/client/preview/utils.js diff --git a/addons/knobs/package.json b/addons/knobs/package.json index f18f7cd12d77..04de1fb645e1 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -14,7 +14,6 @@ "storybook": "start-storybook -p 9010" }, "dependencies": { - "@angular/core": "^5.0.0-beta.7", "babel-runtime": "^6.26.0", "deep-equal": "^1.0.1", "global": "^4.3.2", @@ -34,6 +33,7 @@ }, "peerDependencies": { "@storybook/addons": "^3.3.0-alpha.4", + "@angular/core": "*", "react": "*", "react-dom": "*" } diff --git a/addons/knobs/src/angular/helpers.js b/addons/knobs/src/angular/helpers.js index f570fc35dcb7..170abe74ce63 100644 --- a/addons/knobs/src/angular/helpers.js +++ b/addons/knobs/src/angular/helpers.js @@ -2,12 +2,21 @@ import { Component, SimpleChange, ChangeDetectorRef } from '@angular/core'; +import { + getParameters, + getAnnotations, + getPropMetadata, + setAnnotations, + setParameters, +} from './utils'; + const getComponentMetadata = ({ component, props = {} }) => { if (!component || typeof component !== 'function') throw new Error('No valid component provided'); - const componentMeta = component.__annotations__[0] || component.annotations[0]; - const propsMeta = component.__prop__metadata__ || component.propMetadata || {}; - const paramsMetadata = component.__parameters__ || component.parameters || []; + const componentMeta = getAnnotations(component)[0] || {}; + const propsMeta = getPropMetadata(component); + const paramsMetadata = getParameters(component); + return { component, props, @@ -25,8 +34,9 @@ const getAnnotatedComponent = ({ componentMeta, component, params, knobStore, ch this.setPaneKnobs = this.setPaneKnobs.bind(this); }; NewComponent.prototype = Object.create(component.prototype); - NewComponent.__annotations__ = [new Component(componentMeta)]; - NewComponent.__parameters__ = [[ChangeDetectorRef], ...params]; + + setAnnotations(NewComponent, [new Component(componentMeta)]); + setParameters(NewComponent, [[ChangeDetectorRef], ...params]); NewComponent.prototype.constructor = NewComponent; NewComponent.prototype.ngOnInit = function onInit() { diff --git a/addons/knobs/src/angular/utils.js b/addons/knobs/src/angular/utils.js new file mode 100644 index 000000000000..e2c38ac9bf7f --- /dev/null +++ b/addons/knobs/src/angular/utils.js @@ -0,0 +1,63 @@ +/* eslint-disable no-param-reassign */ +/* eslint no-underscore-dangle: 0 */ +/* globals window */ + +import { VERSION } from '@angular/core'; + +function getMeta(component, [name1, name2], defaultValue) { + if (!name2) { + name2 = name1; + name1 = `__${name1}__`; + } + + if (VERSION.major >= 5) { + if (component[name1]) { + return component[name1]; + } + + if (component[name2]) { + return component[name2]; + } + } + + if (VERSION.major >= 4) { + return window.Reflect.getMetadata(name2, component) || defaultValue; + } + + return defaultValue; +} + +function setMeta(component, [name1, name2], value) { + if (!name2) { + name2 = name1; + name1 = `__${name1}__`; + } + + if (VERSION.major >= 5) { + component[name1] = value; + } + + if (VERSION.major >= 4) { + window.Reflect.defineMetadata(name2, value, component); + } +} + +export function getAnnotations(component) { + return getMeta(component, ['annotations'], []); +} + +export function getPropMetadata(component) { + return getMeta(component, ['__prop__metadata__', 'propMetadata'], {}); +} + +export function getParameters(component) { + return getMeta(component, ['parameters'], []); +} + +export function setAnnotations(component, value) { + setMeta(component, ['annotations'], value); +} + +export function setParameters(component, value) { + setMeta(component, ['parameters'], value); +} diff --git a/app/angular/package.json b/app/angular/package.json index 41fa1d56eff3..a4bed3decad7 100644 --- a/app/angular/package.json +++ b/app/angular/package.json @@ -22,11 +22,6 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@angular/common": "^5.0.0-beta.7", - "@angular/compiler": "^5.0.0-beta.7", - "@angular/core": "^5.0.0-beta.7", - "@angular/platform-browser": "^5.0.0-beta.7", - "@angular/platform-browser-dynamic": "^5.0.0-beta.7", "@storybook/addon-actions": "^3.3.0-alpha.4", "@storybook/addon-links": "^3.3.0-alpha.4", "@storybook/addons": "^3.3.0-alpha.4", @@ -90,5 +85,12 @@ "mock-fs": "^4.3.0", "nodemon": "^1.12.0", "typescript": "^2.4.0" + }, + "peerDependencies": { + "@angular/common": "*", + "@angular/compiler": "*", + "@angular/core": "*", + "@angular/platform-browser": "*", + "@angular/platform-browser-dynamic": "*" } } diff --git a/app/angular/src/client/preview/angular/helpers.ts b/app/angular/src/client/preview/angular/helpers.ts index b33ad7285ea0..50d19f4c8ce2 100644 --- a/app/angular/src/client/preview/angular/helpers.ts +++ b/app/angular/src/client/preview/angular/helpers.ts @@ -6,12 +6,15 @@ import { ApplicationRef, CUSTOM_ELEMENTS_SCHEMA } from "@angular/core"; + import { platformBrowserDynamic } from "@angular/platform-browser-dynamic"; import { BrowserModule } from "@angular/platform-browser"; import { AppComponent } from "./components/app.component"; import { ErrorComponent } from "./components/error.component"; import { NoPreviewComponent } from "./components/no-preview.component"; import { STORY } from "./app.token"; +import { getAnnotations, getParameters, getPropMetadata } from '../utils'; + let platform = null; let promises = []; @@ -37,11 +40,9 @@ const getComponentMetadata = ({ component, props = {}, propsMeta = {} }) => { if (!component || typeof component !== "function") throw new Error("No valid component provided"); - const componentMetadata = - component.__annotations__[0] || component.annotations[0] || {}; - const propsMetadata = - component.__prop__metadata__ || component.propMetadata || {}; - const paramsMetadata = component.__parameters__ || component.parameters || []; + const componentMetadata = getAnnotations(component)[0] || {}; + const propsMetadata = getPropMetadata(component); + const paramsMetadata = getParameters(component); Object.keys(propsMeta).map(key => { propsMetadata[key] = propsMeta[key]; diff --git a/app/angular/src/client/preview/utils.js b/app/angular/src/client/preview/utils.js new file mode 100644 index 000000000000..e2c38ac9bf7f --- /dev/null +++ b/app/angular/src/client/preview/utils.js @@ -0,0 +1,63 @@ +/* eslint-disable no-param-reassign */ +/* eslint no-underscore-dangle: 0 */ +/* globals window */ + +import { VERSION } from '@angular/core'; + +function getMeta(component, [name1, name2], defaultValue) { + if (!name2) { + name2 = name1; + name1 = `__${name1}__`; + } + + if (VERSION.major >= 5) { + if (component[name1]) { + return component[name1]; + } + + if (component[name2]) { + return component[name2]; + } + } + + if (VERSION.major >= 4) { + return window.Reflect.getMetadata(name2, component) || defaultValue; + } + + return defaultValue; +} + +function setMeta(component, [name1, name2], value) { + if (!name2) { + name2 = name1; + name1 = `__${name1}__`; + } + + if (VERSION.major >= 5) { + component[name1] = value; + } + + if (VERSION.major >= 4) { + window.Reflect.defineMetadata(name2, value, component); + } +} + +export function getAnnotations(component) { + return getMeta(component, ['annotations'], []); +} + +export function getPropMetadata(component) { + return getMeta(component, ['__prop__metadata__', 'propMetadata'], {}); +} + +export function getParameters(component) { + return getMeta(component, ['parameters'], []); +} + +export function setAnnotations(component, value) { + setMeta(component, ['annotations'], value); +} + +export function setParameters(component, value) { + setMeta(component, ['parameters'], value); +} diff --git a/examples/angular-cli/package.json b/examples/angular-cli/package.json index 55f4fe8addfc..aafa17989124 100644 --- a/examples/angular-cli/package.json +++ b/examples/angular-cli/package.json @@ -14,23 +14,23 @@ }, "private": true, "dependencies": { - "@angular/animations": "^5.0.0-beta.7", - "@angular/common": "^5.0.0-beta.7", - "@angular/compiler": "^5.0.0-beta.7", - "@angular/core": "^5.0.0-beta.7", - "@angular/forms": "^5.0.0-beta.7", - "@angular/http": "^5.0.0-beta.7", - "@angular/platform-browser": "^5.0.0-beta.7", - "@angular/platform-browser-dynamic": "^5.0.0-beta.7", - "@angular/router": "^5.0.0-beta.7", + "@angular/animations": "4.3.5", + "@angular/common": "4.3.5", + "@angular/compiler": "4.3.5", + "@angular/core": "4.3.5", + "@angular/forms": "4.3.5", + "@angular/http": "4.3.5", + "@angular/platform-browser": "4.3.5", + "@angular/platform-browser-dynamic": "4.3.5", + "@angular/router": "4.3.5", "core-js": "^2.4.1", "rxjs": "^5.4.2", "zone.js": "^0.8.14" }, "devDependencies": { "@angular/cli": "1.3.0", - "@angular/compiler-cli": "^5.0.0-beta.7", - "@angular/language-service": "^5.0.0-beta.7", + "@angular/compiler-cli": "4.3.5", + "@angular/language-service": "4.3.5", "@storybook/addon-actions": "^3.3.0-alpha.4", "@storybook/addon-links": "^3.3.0-alpha.4", "@storybook/addon-notes": "^3.3.0-alpha.4", diff --git a/yarn.lock b/yarn.lock index 340411e3fa3f..63b8b2ce26dc 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,9 +10,9 @@ source-map "^0.5.6" typescript "^2.3.3" -"@angular/animations@^5.0.0-beta.7": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-5.0.1.tgz#a92b2b186a6e5a31a9f1584911dd6aa7e16c5de1" +"@angular/animations@4.3.5": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-4.3.5.tgz#85aa454c887cc7cce11637ea5f6e9afad88490e1" dependencies: tslib "^1.7.1" @@ -85,67 +85,72 @@ optionalDependencies: node-sass "^4.3.0" -"@angular/common@^5.0.0-beta.7": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-5.0.1.tgz#43005ab3c8b8ffaf176aafb3b86ba931c3e4bdf9" +"@angular/common@4.3.5": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-4.3.5.tgz#5f6b11347eae1dfc34623ccfd4c06c8f4c488e2d" dependencies: tslib "^1.7.1" -"@angular/compiler-cli@^5.0.0-beta.7": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-5.0.1.tgz#526dc1bb394fb16ad916601eea9aa00eb44b4fff" +"@angular/compiler-cli@4.3.5": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-4.3.5.tgz#24e99b36c0909363ff8247bf331a8b89eaedfe63" dependencies: - chokidar "^1.4.2" + "@angular/tsc-wrapped" "4.3.5" minimist "^1.2.0" reflect-metadata "^0.1.2" - tsickle "^0.24.0" -"@angular/compiler@^5.0.0-beta.7": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-5.0.1.tgz#7fd4c7fa4bbbef4c146962fa946b827330a6c8ed" +"@angular/compiler@4.3.5": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-4.3.5.tgz#50d3c986657beff1fef4f6dd9a3fa58e24abd548" dependencies: tslib "^1.7.1" -"@angular/core@^5.0.0-beta.7": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-5.0.1.tgz#a4a74afc7e2058d30b8263eb6d66daace9f427ba" +"@angular/core@4.3.5": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-4.3.5.tgz#bd1efdbf1ebcfb9c27a238e2aa4c48159b0895bb" dependencies: tslib "^1.7.1" -"@angular/forms@^5.0.0-beta.7": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-5.0.1.tgz#69f303c4c13da3caa0de63437588388b6ad62b21" +"@angular/forms@4.3.5": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-4.3.5.tgz#519aad0ad82a1b87019937fa93fc147734737787" dependencies: tslib "^1.7.1" -"@angular/http@^5.0.0-beta.7": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@angular/http/-/http-5.0.1.tgz#350cbdf63cfac8939613d753ff071ed58a60561b" +"@angular/http@4.3.5": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@angular/http/-/http-4.3.5.tgz#81d4b0761c8ef035cb0b736300c237f36286f1f0" dependencies: tslib "^1.7.1" -"@angular/language-service@^5.0.0-beta.7": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-5.0.1.tgz#869e09dbd6e3d95c117c062d21dd1fd920ad44d6" +"@angular/language-service@4.3.5": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-4.3.5.tgz#b6d882ea40d18d513fc3a035a79875029fe38f01" -"@angular/platform-browser-dynamic@^5.0.0-beta.7": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.0.1.tgz#16db67d52d4531563ab15429c6bdfe18bc1bedc8" +"@angular/platform-browser-dynamic@4.3.5": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-4.3.5.tgz#4a697b3b0aec805b33884fd4a9b3473065bab1e0" dependencies: tslib "^1.7.1" -"@angular/platform-browser@^5.0.0-beta.7": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-5.0.1.tgz#14895dd30ed2a30ee7b99c76b764748f46c1a862" +"@angular/platform-browser@4.3.5": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-4.3.5.tgz#c0d03409499cc29f81677aab623c9086760d84ef" dependencies: tslib "^1.7.1" -"@angular/router@^5.0.0-beta.7": - version "5.0.1" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-5.0.1.tgz#9ac08f29302ef60cdfd3c7810d96c265dec463d6" +"@angular/router@4.3.5": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-4.3.5.tgz#188082747bc9b6974f9d4b3f5557b434645d23cd" dependencies: tslib "^1.7.1" +"@angular/tsc-wrapped@4.3.5": + version "4.3.5" + resolved "https://registry.yarnpkg.com/@angular/tsc-wrapped/-/tsc-wrapped-4.3.5.tgz#95fdaa813cfc57262fc7ef5fea726d628aefabac" + dependencies: + tsickle "^0.21.0" + "@babel/code-frame@7.0.0-beta.31": version "7.0.0-beta.31" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.31.tgz#473d021ecc573a2cce1c07d5b509d5215f46ba35" @@ -238,11 +243,13 @@ shallowequal "^0.2.2" "@storybook/react-simple-di@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@storybook/react-simple-di/-/react-simple-di-1.2.1.tgz#fe4b29a32459e168da3aae8e6fcd8631861210c9" + version "1.3.0" + resolved "https://registry.yarnpkg.com/@storybook/react-simple-di/-/react-simple-di-1.3.0.tgz#13116d89a2f42898716a7f8c4095b47415526371" dependencies: babel-runtime "6.x.x" + create-react-class "^15.6.2" hoist-non-react-statics "1.x.x" + prop-types "^15.6.0" "@storybook/react-stubber@^1.0.0": version "1.0.1" @@ -265,20 +272,20 @@ "@types/node" "*" "@types/node@*", "@types/node@^8.0.0": - version "8.0.52" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.52.tgz#8e7f47747868e7687f2cd4922966e2d6af78d22d" + version "8.0.58" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.58.tgz#5b3881c0be3a646874803fee3197ea7f1ed6df90" "@types/node@^6.0.46", "@types/node@~6.0.60": - version "6.0.92" - resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.92.tgz#e7f721ae282772e12ba2579968c00d9cce422c5d" + version "6.0.93" + resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.93.tgz#498b9461f4ec84a057c0aca80a54cce992805ff8" "@types/q@^0.0.32": version "0.0.32" resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" "@types/react@^16.0.18", "@types/react@^16.0.20": - version "16.0.23" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.23.tgz#f0f713b07912c6fd8e10c9ccc539443ceb06dbca" + version "16.0.28" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.28.tgz#eb0b31272528da8f20477ec27569c4f767315b33" "@types/selenium-webdriver@^2.53.35", "@types/selenium-webdriver@~2.53.39": version "2.53.43" @@ -382,8 +389,8 @@ agent-base@2: semver "~5.0.1" agent-base@4, agent-base@^4.1.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.1.1.tgz#92d8a4fc2524a3b09b3666a33b6c97960f23d6a4" + version "4.1.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.1.2.tgz#80fa6cde440f4dcf9af2617cf246099b5d99f0c8" dependencies: es6-promisify "^5.0.0" @@ -393,22 +400,7 @@ agentkeepalive@^3.3.0: dependencies: humanize-ms "^1.2.1" -airbnb-js-shims@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/airbnb-js-shims/-/airbnb-js-shims-1.3.0.tgz#aac46d80057fb0b414f70e06d07e362fd99ee2fa" - dependencies: - array-includes "^3.0.3" - es5-shim "^4.5.9" - es6-shim "^0.35.3" - function.prototype.name "^1.0.3" - object.entries "^1.0.4" - object.getownpropertydescriptors "^2.0.3" - object.values "^1.0.4" - promise.prototype.finally "^3.0.0" - string.prototype.padend "^3.0.0" - string.prototype.padstart "^3.0.0" - -airbnb-js-shims@^1.4.0: +airbnb-js-shims@^1.1.1, airbnb-js-shims@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/airbnb-js-shims/-/airbnb-js-shims-1.4.0.tgz#b920b0bc9fafe8b8ae2a073f29fb10303b1b2b18" dependencies: @@ -441,8 +433,8 @@ ajv@^4.7.0, ajv@^4.9.1: json-stable-stringify "^1.0.1" ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5, ajv@^5.2.0, ajv@^5.2.3, ajv@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.3.0.tgz#4414ff74a50879c208ee5fdc826e32c303549eda" + version "5.5.1" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.1.tgz#b38bb8876d9e86bee994956a04e721e88b248eb2" dependencies: co "^4.6.0" fast-deep-equal "^1.0.0" @@ -772,7 +764,7 @@ asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" -autoprefixer@7.1.6, autoprefixer@^7.1.1: +autoprefixer@7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.6.tgz#fb933039f74af74a83e71225ce78d9fd58ba84d7" dependencies: @@ -794,7 +786,7 @@ autoprefixer@^6.3.1, autoprefixer@^6.5.3: postcss "^5.2.16" postcss-value-parser "^3.2.3" -autoprefixer@^7.2.2: +autoprefixer@^7.1.1, autoprefixer@^7.2.2: version "7.2.2" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.2.2.tgz#082293b964be00602efacc59aa4aa7df5158bb6e" dependencies: @@ -1059,8 +1051,8 @@ babel-helper-to-multiple-sequence-expressions@^0.2.0: resolved "https://registry.yarnpkg.com/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.2.0.tgz#d1a419634c6cb301f27858c659167cfee0a9d318" babel-helper-vue-jsx-merge-props@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.2.tgz#aceb1c373588279e2755ea1cfd35c22394fd33f8" + version "2.0.3" + resolved "https://registry.yarnpkg.com/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-2.0.3.tgz#22aebd3b33902328e513293a8e4992b384f9f1b6" babel-helpers@^6.24.1: version "6.24.1" @@ -2112,16 +2104,16 @@ better-assert@~1.0.0: callsite "1.0.0" big-integer@^1.6.7: - version "1.6.25" - resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.25.tgz#1de45a9f57542ac20121c682f8d642220a34e823" + version "1.6.26" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.26.tgz#3af1672fa62daf2d5ecafacf6e5aa0d25e02c1c8" big.js@^3.1.3: version "3.2.0" resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" binary-extensions@^1.0.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.10.0.tgz#9aeb9a6c5e88638aad171e167f5900abe24835d0" + version "1.11.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" bl@^1.0.0: version "1.2.1" @@ -2235,8 +2227,8 @@ boxen@^0.6.0: widest-line "^1.0.0" boxen@^1.0.0, boxen@^1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.2.2.tgz#3f1d4032c30ffea9d4b02c322eaf2ea741dcbce5" + version "1.3.0" + resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" dependencies: ansi-align "^2.0.0" camelcase "^4.0.0" @@ -2244,7 +2236,7 @@ boxen@^1.0.0, boxen@^1.2.1: cli-boxes "^1.0.0" string-width "^2.0.0" term-size "^1.2.0" - widest-line "^1.0.0" + widest-line "^2.0.0" bplist-creator@0.0.7: version "0.0.7" @@ -2339,11 +2331,11 @@ browserify-sign@^4.0.0: inherits "^2.0.1" parse-asn1 "^5.0.0" -browserify-zlib@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d" +browserify-zlib@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f" dependencies: - pako "~0.2.0" + pako "~1.0.5" browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: version "1.7.7" @@ -2352,14 +2344,7 @@ browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6: caniuse-db "^1.0.30000639" electron-to-chromium "^1.2.7" -browserslist@^2.1.2, browserslist@^2.5.1: - version "2.9.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.9.0.tgz#706aca15c53be15610f466e348cbfa0c00a6a379" - dependencies: - caniuse-lite "^1.0.30000760" - electron-to-chromium "^1.3.27" - -browserslist@^2.10.0: +browserslist@^2.1.2, browserslist@^2.10.0, browserslist@^2.5.1: version "2.10.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.10.0.tgz#bac5ee1cc69ca9d96403ffb8a3abdc5b6aed6346" dependencies: @@ -2423,8 +2408,8 @@ bytes@3.0.0: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" cacache@^10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.0.tgz#3bba88bf62b0773fd9a691605f60c9d3c595e853" + version "10.0.1" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.1.tgz#3e05f6e616117d9b54665b1b20c8aeb93ea5d36f" dependencies: bluebird "^3.5.0" chownr "^1.0.1" @@ -2538,16 +2523,12 @@ caniuse-api@^1.5.2: lodash.uniq "^4.5.0" caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000764" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000764.tgz#d73ab11ae62f6a9e2f69867d6d9c23ae3f2e5d8d" + version "1.0.30000782" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000782.tgz#d8815bce1578c350aced1132507301205e0fab53" -caniuse-lite@^1.0.30000748, caniuse-lite@^1.0.30000760: - version "1.0.30000764" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000764.tgz#97ea7472f9d3e691eede34f21983cfc219ac7842" - -caniuse-lite@^1.0.30000780: - version "1.0.30000780" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000780.tgz#1f9095f2efd4940e0ba6c5992ab7a9b64cc35ba4" +caniuse-lite@^1.0.30000748, caniuse-lite@^1.0.30000780: + version "1.0.30000782" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000782.tgz#5b82b8c385f25348745c471ca51320afb1b7f254" capture-stack-trace@^1.0.0: version "1.0.0" @@ -2557,6 +2538,10 @@ case-sensitive-paths-webpack-plugin@2.1.1, case-sensitive-paths-webpack-plugin@^ version "2.1.1" resolved "https://registry.yarnpkg.com/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.1.1.tgz#3d29ced8c1f124bf6f53846fb3f5894731fdc909" +caseless@~0.11.0: + version "0.11.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" + caseless@~0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" @@ -2656,7 +2641,7 @@ child-process-promise@^2.2.1: node-version "^1.0.0" promise-polyfill "^6.0.1" -chokidar@^1.4.1, chokidar@^1.4.2, chokidar@^1.5.1, chokidar@^1.6.0, chokidar@^1.6.1, chokidar@^1.7.0: +chokidar@^1.4.1, chokidar@^1.5.1, chokidar@^1.6.0, chokidar@^1.6.1, chokidar@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" dependencies: @@ -2676,8 +2661,8 @@ chownr@^1.0.1, chownr@~1.0.1: resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" ci-info@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.1.tgz#47b44df118c48d2597b56d342e7e25791060171a" + version "1.1.2" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.1.2.tgz#03561259db48d0474c8bdc90f5b47b068b6bbfb4" cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: version "1.0.4" @@ -2834,15 +2819,15 @@ codelyzer@^3.1.2: sprintf-js "^1.0.3" codemirror-graphql@^0.6.11: - version "0.6.11" - resolved "https://registry.yarnpkg.com/codemirror-graphql/-/codemirror-graphql-0.6.11.tgz#795efa3933523815a5245eefe8d6831d3c4ad026" + version "0.6.12" + resolved "https://registry.yarnpkg.com/codemirror-graphql/-/codemirror-graphql-0.6.12.tgz#91a273fe5188857524a30221d06e645b4ca41f00" dependencies: - graphql-language-service-interface "0.0.19" - graphql-language-service-parser "0.0.15" + graphql-language-service-interface "^1.0.16" + graphql-language-service-parser "^0.1.14" codemirror@^5.26.0: - version "5.31.0" - resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.31.0.tgz#ecf3d057eb74174147066bfc7c5f37b4c4e07df2" + version "5.32.0" + resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.32.0.tgz#cb6ff5d8ef36d0b10f031130e2d9ebeee92c902e" collapse-white-space@^1.0.2: version "1.0.3" @@ -2911,21 +2896,15 @@ command-join@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/command-join/-/command-join-2.0.0.tgz#52e8b984f4872d952ff1bdc8b98397d27c7144cf" -commander@2.11.0, commander@2.11.x, commander@^2.11.0, commander@^2.9.0, commander@~2.11.0: +commander@2.11.0: version "2.11.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" -commander@^2.12.2: +commander@2.12.x, commander@^2.11.0, commander@^2.12.2, commander@^2.9.0, commander@~2.12.1: version "2.12.2" resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555" -common-tags@^1.3.1, common-tags@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.4.0.tgz#1187be4f3d4cf0c0427d43f74eef1f73501614c0" - dependencies: - babel-runtime "^6.18.0" - -common-tags@^1.5.1: +common-tags@^1.3.1, common-tags@^1.4.0, common-tags@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.5.1.tgz#e2e39931a013cd02253defeed89a1ad615a27f07" dependencies: @@ -3126,8 +3105,8 @@ content-type@~1.0.1, content-type@~1.0.4: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" conventional-changelog-angular@^1.5.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.5.2.tgz#2b38f665fe9c5920af1a2f82f547f4babe6de57c" + version "1.5.3" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.5.3.tgz#ff0dd01d740e35bfdbc3f02dfea13cf0d96f0b82" dependencies: compare-func "^1.3.1" q "^1.4.1" @@ -3155,11 +3134,11 @@ conventional-changelog-codemirror@^0.2.1: q "^1.4.1" conventional-changelog-core@^1.9.3: - version "1.9.3" - resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.3.tgz#2899fe779389a329f0ec4b2746c36ddefb98da2d" + version "1.9.4" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-1.9.4.tgz#a541e5354f91072f8583b19e34abb9f6e461c367" dependencies: - conventional-changelog-writer "^2.0.2" - conventional-commits-parser "^2.0.1" + conventional-changelog-writer "^2.0.3" + conventional-commits-parser "^2.1.0" dateformat "^1.0.12" get-pkg-repo "^1.0.0" git-raw-commits "^1.3.0" @@ -3173,8 +3152,8 @@ conventional-changelog-core@^1.9.3: through2 "^2.0.0" conventional-changelog-ember@^0.2.9: - version "0.2.9" - resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.9.tgz#8ec73cc054e3ab064667fb1feb52fe8ef1b16438" + version "0.2.10" + resolved "https://registry.yarnpkg.com/conventional-changelog-ember/-/conventional-changelog-ember-0.2.10.tgz#dcd6e4cdc2e6c2b58653cf4d2cb1656a60421929" dependencies: q "^1.4.1" @@ -3209,12 +3188,12 @@ conventional-changelog-jshint@^0.2.1: compare-func "^1.3.1" q "^1.4.1" -conventional-changelog-writer@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-2.0.2.tgz#b5857ded1b001daf9a78b9cd40926f45c134949b" +conventional-changelog-writer@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-2.0.3.tgz#073b0c39f1cc8fc0fd9b1566e93833f51489c81c" dependencies: compare-func "^1.3.1" - conventional-commits-filter "^1.1.0" + conventional-commits-filter "^1.1.1" dateformat "^1.0.11" handlebars "^4.0.2" json-stringify-safe "^5.0.1" @@ -3239,16 +3218,16 @@ conventional-changelog@^1.1.7: conventional-changelog-jscs "^0.1.0" conventional-changelog-jshint "^0.2.1" -conventional-commits-filter@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.1.0.tgz#1fc29af30b5edab76f54e229c411b0c663d0f9eb" +conventional-commits-filter@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.1.1.tgz#72172319c0c88328a015b30686b55527b3a5e54a" dependencies: is-subset "^0.1.1" modify-values "^1.0.0" -conventional-commits-parser@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.0.1.tgz#1f15ce6b844f7ca41495c8190c0833c30b8b1693" +conventional-commits-parser@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.1.0.tgz#9b4b7c91124bf2a1a9a2cc1c72760d382cbbb229" dependencies: JSONStream "^1.0.4" is-text-path "^1.0.0" @@ -3259,20 +3238,20 @@ conventional-commits-parser@^2.0.1: trim-off-newlines "^1.0.0" conventional-recommended-bump@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.0.3.tgz#472b69b1b8f09c5c4ed40fe28a41e63cc04bd736" + version "1.1.0" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-1.1.0.tgz#964d4fcc70fb5259d41fa9b39d3df6afdb87d253" dependencies: concat-stream "^1.4.10" - conventional-commits-filter "^1.1.0" - conventional-commits-parser "^2.0.1" + conventional-commits-filter "^1.1.1" + conventional-commits-parser "^2.1.0" git-raw-commits "^1.3.0" git-semver-tags "^1.2.3" meow "^3.3.0" object-assign "^4.0.1" convert-source-map@^1.3.0, convert-source-map@^1.4.0, convert-source-map@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5" + version "1.5.1" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5" cookie-parser@~1.3.5: version "1.3.5" @@ -3316,13 +3295,9 @@ core-js@^1.0.0: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" -core-js@^2.2.0, core-js@^2.2.2, core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0: - version "2.5.1" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.1.tgz#ae6874dc66937789b80754ff5428df66819ca50b" - -core-js@^2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.2.tgz#bc4648656e7dc9dc80d7d3c7bbc172d96e744e63" +core-js@^2.2.0, core-js@^2.2.2, core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0, core-js@^2.5.2: + version "2.5.3" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" core-object@^3.1.0: version "3.1.5" @@ -3392,7 +3367,7 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4: safe-buffer "^5.0.1" sha.js "^2.4.8" -create-react-class@^15.5.2: +create-react-class@^15.5.2, create-react-class@^15.6.2: version "15.6.2" resolved "https://registry.yarnpkg.com/create-react-class/-/create-react-class-15.6.2.tgz#cf1ed15f12aad7f14ef5f2dfe05e6c42f91ef02a" dependencies: @@ -3407,6 +3382,13 @@ cross-env@^5.1.1: cross-spawn "^5.1.0" is-windows "^1.0.0" +cross-fetch@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-0.0.8.tgz#01ed94dc407df2c00f1807fde700a7cfa48a205c" + dependencies: + node-fetch "1.7.3" + whatwg-fetch "2.0.3" + cross-spawn@5.1.0, cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -3692,7 +3674,7 @@ debug@*, debug@^3.0.0, debug@^3.0.1, debug@^3.1.0: dependencies: ms "2.0.0" -debug@2, debug@2.6.9, debug@^2.1.1, debug@^2.2.0, debug@^2.4.1, debug@^2.6.0, debug@^2.6.6, debug@^2.6.8: +debug@2, debug@2.6.9, debug@^2.1.1, debug@^2.2.0, debug@^2.6.0, debug@^2.6.6, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: @@ -3710,7 +3692,7 @@ debug@2.3.3: dependencies: ms "0.7.2" -debuglog@^1.0.1: +debuglog@*, debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -3828,8 +3810,8 @@ detect-indent@^5.0.0, detect-indent@~5.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-5.0.0.tgz#3871cc0a6a002e8c3e5b3cf7f336264675f06b9d" detect-libc@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.2.tgz#71ad5d204bf17a6a6ca8f450c61454066ef461e1" + version "1.0.3" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" detect-node@^2.0.3: version "2.0.3" @@ -3901,14 +3883,7 @@ doctrine@1.5.0: esutils "^2.0.2" isarray "^1.0.0" -doctrine@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63" - dependencies: - esutils "^2.0.2" - isarray "^1.0.0" - -doctrine@^2.0.2: +doctrine@^2.0.0, doctrine@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.2.tgz#68f96ce8efc56cc42651f1faadb4f175273b0075" dependencies: @@ -4065,11 +4040,7 @@ ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" -electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.27: - version "1.3.27" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.27.tgz#78ecb8a399066187bb374eede35d9c70565a803d" - -electron-to-chromium@^1.3.28: +electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.28: version "1.3.28" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.28.tgz#8dd4e6458086644e9f9f0a1cf32e2a1f9dffd9ee" @@ -4192,8 +4163,8 @@ entities@^1.1.1, entities@~1.1.1: resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" envinfo@^3.0.0: - version "3.9.1" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-3.9.1.tgz#78d5ccbea17ca2daefd8541561d1273813b96c4c" + version "3.10.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-3.10.0.tgz#24b52a5c19af379dc32465d1909e37344dc41c20" dependencies: copy-paste "^1.3.0" glob "^7.1.2" @@ -4213,8 +4184,8 @@ enzyme-adapter-react-16@^1.1.0: react-test-renderer "^16.0.0-0" enzyme-adapter-utils@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.1.1.tgz#689de8853f0751710590d6dfa730ff4056ea36b2" + version "1.2.0" + resolved "https://registry.yarnpkg.com/enzyme-adapter-utils/-/enzyme-adapter-utils-1.2.0.tgz#7f4471ee0a70b91169ec8860d2bf0a6b551664b2" dependencies: lodash "^4.17.4" object.assign "^4.0.4" @@ -4253,10 +4224,10 @@ err-code@^1.0.0: resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" "errno@>=0.1.1 <0.2.0-0", errno@^0.1.1, errno@^0.1.3, errno@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + version "0.1.5" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.5.tgz#a563781a6052bc2c9ccd89e8cef0eb9506e0c321" dependencies: - prr "~0.0.0" + prr "~1.0.1" error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.1" @@ -4271,7 +4242,7 @@ errorhandler@~1.4.2: accepts "~1.3.0" escape-html "~1.0.3" -es-abstract@^1.10.0: +es-abstract@^1.10.0, es-abstract@^1.4.3, es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0, es-abstract@^1.9.0: version "1.10.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864" dependencies: @@ -4281,16 +4252,6 @@ es-abstract@^1.10.0: is-callable "^1.1.3" is-regex "^1.0.4" -es-abstract@^1.4.3, es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0, es-abstract@^1.9.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.9.0.tgz#690829a07cae36b222e7fd9b75c0d0573eb25227" - dependencies: - es-to-primitive "^1.1.1" - function-bind "^1.1.1" - has "^1.0.1" - is-callable "^1.1.3" - is-regex "^1.0.4" - es-to-primitive@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d" @@ -4300,8 +4261,8 @@ es-to-primitive@^1.1.1: is-symbol "^1.0.1" es5-ext@^0.10.14, es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.35" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.35.tgz#18ee858ce6a3c45c7d79e91c15fcca9ec568494f" + version "0.10.37" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.37.tgz#0ee741d148b80069ba27d020393756af257defc3" dependencies: es6-iterator "~2.0.1" es6-symbol "~3.1.1" @@ -4925,15 +4886,7 @@ extend@3, extend@^3.0.0, extend@~3.0.0, extend@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" -external-editor@^2.0.4: - version "2.0.5" - resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.5.tgz#52c249a3981b9ba187c7cacf5beb50bf1d91a6bc" - dependencies: - iconv-lite "^0.4.17" - jschardet "^1.4.2" - tmp "^0.0.33" - -external-editor@^2.1.0: +external-editor@^2.0.4, external-editor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48" dependencies: @@ -4974,10 +4927,14 @@ extract-zip@^1.6.5: mkdirp "0.5.0" yauzl "2.4.1" -extsprintf@1.3.0, extsprintf@^1.2.0: +extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + fancy-log@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948" @@ -5218,8 +5175,8 @@ flatten@^1.0.2: resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" flow-parser@^0.*: - version "0.59.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.59.0.tgz#f6ebcae61ffa187e420999d40ce0a801f39b2635" + version "0.61.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.61.0.tgz#57d1d33bbc8fb1b9341984464ac032e054ee1084" flush-write-stream@^1.0.0: version "1.0.2" @@ -5366,15 +5323,7 @@ fs-extra@^1.0.0: jsonfile "^2.1.0" klaw "^1.0.0" -fs-extra@^4.0.0, fs-extra@^4.0.1, fs-extra@^4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.2.tgz#f91704c53d1b461f893452b0c307d9997647ab6b" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^4.0.3: +fs-extra@^4.0.0, fs-extra@^4.0.1, fs-extra@^4.0.2, fs-extra@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" dependencies: @@ -5673,6 +5622,16 @@ glob@7.0.x: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^6.0.4: + version "6.0.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@~7.1.1, glob@~7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -5685,8 +5644,8 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, gl path-is-absolute "^1.0.0" global-dirs@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.0.tgz#10d34039e0df04272e262cf24224f7209434df4f" + version "0.1.1" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" dependencies: ini "^1.3.4" @@ -5716,12 +5675,12 @@ global@^4.3.0, global@^4.3.2: process "~0.5.1" globals@^10.0.0: - version "10.3.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-10.3.0.tgz#716aba93657b56630b5a0e77de5ea8ac6215afaa" + version "10.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-10.4.0.tgz#5c477388b128a9e4c5c5d01c7a2aca68c68b2da7" globals@^11.0.1: - version "11.0.1" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.0.1.tgz#12a87bb010e5154396acc535e1e43fc753b0e5e8" + version "11.1.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.1.0.tgz#632644457f5f0e3ae711807183700ebf2e4633e4" globals@^9.14.0, globals@^9.17.0, globals@^9.18.0: version "9.18.0" @@ -5810,46 +5769,47 @@ graphiql@^0.11.10: codemirror-graphql "^0.6.11" marked "0.3.6" -graphql-language-service-config@0.0.17: - version "0.0.17" - resolved "https://registry.yarnpkg.com/graphql-language-service-config/-/graphql-language-service-config-0.0.17.tgz#36b5a9906c0bf0d356d31b7583058f9b85d1793e" +graphql-config@1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/graphql-config/-/graphql-config-1.0.8.tgz#6dd1cd76ff6fbb01662704f8bddc403f6b0c24d9" dependencies: - graphql-language-service-types "0.0.21" + graphql "^0.11.7" + graphql-request "^1.4.0" + js-yaml "^3.10.0" + minimatch "^3.0.4" + rimraf "^2.6.2" -graphql-language-service-interface@0.0.19: - version "0.0.19" - resolved "https://registry.yarnpkg.com/graphql-language-service-interface/-/graphql-language-service-interface-0.0.19.tgz#c58fa7bd95d2f30e33e04937a1a2c00a9740926e" +graphql-language-service-interface@^1.0.16: + version "1.0.16" + resolved "https://registry.yarnpkg.com/graphql-language-service-interface/-/graphql-language-service-interface-1.0.16.tgz#0e6dd855bf0bdee84e7456b2128a2e5f56e4f47b" dependencies: - graphql "^0.10.1" - graphql-language-service-config "0.0.17" - graphql-language-service-parser "0.0.15" - graphql-language-service-types "0.0.21" - graphql-language-service-utils "0.0.17" + graphql-config "1.0.8" + graphql-language-service-parser "^0.1.14" + graphql-language-service-types "^0.1.14" + graphql-language-service-utils "^1.0.16" -graphql-language-service-parser@0.0.15: - version "0.0.15" - resolved "https://registry.yarnpkg.com/graphql-language-service-parser/-/graphql-language-service-parser-0.0.15.tgz#fd64afd8873624fa3c4a5831a08de9ccd6cc5182" +graphql-language-service-parser@^0.1.14: + version "0.1.14" + resolved "https://registry.yarnpkg.com/graphql-language-service-parser/-/graphql-language-service-parser-0.1.14.tgz#dd25abda5dcff4f2268c9a19e026004271491661" dependencies: - graphql-language-service-types "0.0.21" + graphql-language-service-types "^0.1.14" -graphql-language-service-types@0.0.21: - version "0.0.21" - resolved "https://registry.yarnpkg.com/graphql-language-service-types/-/graphql-language-service-types-0.0.21.tgz#b9453366fc8985765034bf34056fe93603a24b82" - dependencies: - graphql "^0.10.1" +graphql-language-service-types@^0.1.14: + version "0.1.14" + resolved "https://registry.yarnpkg.com/graphql-language-service-types/-/graphql-language-service-types-0.1.14.tgz#e6112785fc23ea8222f59a7f00e61b359f263c88" -graphql-language-service-utils@0.0.17: - version "0.0.17" - resolved "https://registry.yarnpkg.com/graphql-language-service-utils/-/graphql-language-service-utils-0.0.17.tgz#a8b91eca80c6aa5a0d461a0bbb63317986f9b989" +graphql-language-service-utils@^1.0.16: + version "1.0.16" + resolved "https://registry.yarnpkg.com/graphql-language-service-utils/-/graphql-language-service-utils-1.0.16.tgz#eb4e4495aeef0c4b6ffd8c681858558862c65e9e" dependencies: - graphql "^0.10.1" - graphql-language-service-types "0.0.21" + graphql-config "1.0.8" + graphql-language-service-types "^0.1.14" -graphql@^0.10.1: - version "0.10.5" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.10.5.tgz#c9be17ca2bdfdbd134077ffd9bbaa48b8becd298" +graphql-request@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphql-request/-/graphql-request-1.4.0.tgz#f5b067c83070296d93fb45760e83dfad0d9f537a" dependencies: - iterall "^1.1.0" + cross-fetch "0.0.8" graphql@^0.11.7: version "0.11.7" @@ -5938,6 +5898,15 @@ har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" +har-validator@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-2.0.6.tgz#cdcbc08188265ad119b6a5a7c8ab70eecfb5d27d" + dependencies: + chalk "^1.1.1" + commander "^2.9.0" + is-my-json-valid "^2.12.4" + pinkie-promise "^2.0.0" + har-validator@~4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a" @@ -6130,17 +6099,17 @@ html-loader@^0.5.1: object-assign "^4.1.0" html-minifier@^3.0.1, html-minifier@^3.2.3: - version "3.5.6" - resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.6.tgz#7e4e661a09999599c7d8e8a2b8d7fb7430bb5c3e" + version "3.5.7" + resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.7.tgz#511e69bb5a8e7677d1012ebe03819aa02ca06208" dependencies: camel-case "3.0.x" clean-css "4.1.x" - commander "2.11.x" + commander "2.12.x" he "1.1.x" ncname "1.0.x" param-case "2.1.x" relateurl "0.2.x" - uglify-js "3.1.x" + uglify-js "3.2.x" html-tag-names@^1.1.1: version "1.1.2" @@ -6203,8 +6172,8 @@ htmlparser2@~3.3.0: readable-stream "1.0" http-cache-semantics@^3.8.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.0.tgz#1e3ce248730e189ac692a6697b9e3fdea2ff8da3" + version "3.8.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" http-deceiver@^1.2.7: version "1.2.7" @@ -6269,9 +6238,9 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -https-browserify@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" +https-browserify@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" https-proxy-agent@^1.0.0: version "1.0.0" @@ -6282,11 +6251,11 @@ https-proxy-agent@^1.0.0: extend "3" https-proxy-agent@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.1.0.tgz#1391bee7fd66aeabc0df2a1fa90f58954f43e443" + version "2.1.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.1.1.tgz#a7ce4382a1ba8266ee848578778122d491260fd9" dependencies: agent-base "^4.1.0" - debug "^2.4.1" + debug "^3.1.0" humanize-ms@^1.2.1: version "1.2.1" @@ -6377,7 +6346,7 @@ import-local@^0.1.1: pkg-dir "^2.0.0" resolve-cwd "^2.0.0" -imurmurhash@^0.1.4: +imurmurhash@*, imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -6423,8 +6392,8 @@ inherits@2.0.1: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" ini@^1.3.2, ini@^1.3.4, ini@~1.3.0, ini@~1.3.4: - version "1.3.4" - resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + version "1.3.5" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" init-package-json@~1.10.1: version "1.10.1" @@ -6538,8 +6507,8 @@ internal-ip@1.2.0, internal-ip@^1.2.0: meow "^3.3.0" interpret@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.4.tgz#820cdd588b868ffb191a809506d6c9c8f212b1b0" + version "1.1.0" + resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" invariant@^2.2.0, invariant@^2.2.2: version "2.2.2" @@ -6707,7 +6676,7 @@ is-installed-globally@^0.1.0: global-dirs "^0.1.0" is-path-inside "^1.0.0" -is-my-json-valid@^2.10.0: +is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.4: version "2.16.1" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.1.tgz#5a846777e2c2620d1e69104e5d3a03b1f6088f11" dependencies: @@ -6761,8 +6730,8 @@ is-path-in-cwd@^1.0.0: is-path-inside "^1.0.0" is-path-inside@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f" + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" dependencies: path-is-inside "^1.0.1" @@ -6977,7 +6946,7 @@ istanbul-reports@^1.1.3: dependencies: handlebars "^4.0.3" -iterall@1.1.3, iterall@^1.1.0: +iterall@1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/iterall/-/iterall-1.1.3.tgz#1cbbff96204056dde6656e2ed2e2226d0e6d72c9" @@ -7467,14 +7436,14 @@ jest@^21.2.0, jest@^21.2.1: jest-cli "^21.2.1" js-base64@^2.1.5, js-base64@^2.1.8, js-base64@^2.1.9: - version "2.3.2" - resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.3.2.tgz#a79a923666372b580f8e27f51845c6f7e8fbfbaf" + version "2.4.0" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.0.tgz#9e566fee624751a1d720c966cd6226d29d4025aa" js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" -js-yaml@^3.4.3, js-yaml@^3.5.1, js-yaml@^3.6.1, js-yaml@^3.7.0, js-yaml@^3.9.0, js-yaml@^3.9.1: +js-yaml@^3.10.0, js-yaml@^3.4.3, js-yaml@^3.5.1, js-yaml@^3.6.1, js-yaml@^3.7.0, js-yaml@^3.9.0, js-yaml@^3.9.1: version "3.10.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" dependencies: @@ -7492,10 +7461,6 @@ jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" -jschardet@^1.4.2: - version "1.6.0" - resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.6.0.tgz#c7d1a71edcff2839db2f9ec30fc5d5ebd3c1a678" - jscodeshift@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.4.0.tgz#a76afdbfc6f4e78c3fd0d1a60470dfa43c03190e" @@ -7687,8 +7652,8 @@ karma-jasmine-html-reporter@^0.2.2: karma-jasmine "^1.0.2" karma-jasmine@^1.0.2, karma-jasmine@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-1.1.0.tgz#22e4c06bf9a182e5294d1f705e3733811b810acf" + version "1.1.1" + resolved "https://registry.yarnpkg.com/karma-jasmine/-/karma-jasmine-1.1.1.tgz#6fe840e75a11600c9d91e84b33c458e1c46a3529" karma-source-map-support@^1.2.0: version "1.2.0" @@ -7795,8 +7760,8 @@ lcid@^1.0.0: invert-kv "^1.0.0" left-pad@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a" + version "1.2.0" + resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee" lerna@^2.5.1: version "2.5.1" @@ -8063,6 +8028,10 @@ lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" +lodash._baseindexof@*: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" + lodash._baseisequal@^3.0.0: version "3.0.7" resolved "https://registry.yarnpkg.com/lodash._baseisequal/-/lodash._baseisequal-3.0.7.tgz#d8025f76339d29342767dcc887ce5cb95a5b51f1" @@ -8086,10 +8055,14 @@ lodash._basevalues@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" -lodash._bindcallback@^3.0.0: +lodash._bindcallback@*, lodash._bindcallback@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" +lodash._cacheindexof@*: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" + lodash._createassigner@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11" @@ -8098,11 +8071,17 @@ lodash._createassigner@^3.0.0: lodash._isiterateecall "^3.0.0" lodash.restparam "^3.0.0" +lodash._createcache@*: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" + dependencies: + lodash._getnative "^3.0.0" + lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" -lodash._getnative@^3.0.0: +lodash._getnative@*, lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" @@ -8252,7 +8231,7 @@ lodash.pick@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" -lodash.restparam@^3.0.0: +lodash.restparam@*, lodash.restparam@^3.0.0: version "3.6.1" resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" @@ -8473,10 +8452,14 @@ markdown-table@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.1.1.tgz#4b3dd3a133d1518b8ef0dbc709bf2a1b4824bc8c" -marked@0.3.6, marked@^0.3.6: +marked@0.3.6: version "0.3.6" resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" +marked@^0.3.6: + version "0.3.7" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.7.tgz#80ef3bbf1bd00d1c9cfebe42ba1b8c85da258d0d" + marksy@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/marksy/-/marksy-2.0.1.tgz#019eb9c13ff37120ce4dddeb7774aba152b5d7e0" @@ -8668,8 +8651,8 @@ miller-rabin@^4.0.0: brorand "^1.0.1" "mime-db@>= 1.30.0 < 2": - version "1.31.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.31.0.tgz#a49cd8f3ebf3ed1a482b60561d9105ad40ca74cb" + version "1.32.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.32.0.tgz#485b3848b01a3cda5f968b4882c0771e58e09414" mime-db@~1.23.0: version "1.23.0" @@ -8699,11 +8682,11 @@ mime@1.3.x: version "1.3.6" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.6.tgz#591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0" -mime@1.4.1, mime@^1.2.11, mime@^1.3.4, mime@^1.4.1: +mime@1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" -mime@^1.5.0: +mime@^1.2.11, mime@^1.3.4, mime@^1.4.1, mime@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" @@ -8725,18 +8708,18 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + minimatch@3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: brace-expansion "^1.0.0" -minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - dependencies: - brace-expansion "^1.1.7" - minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -8801,13 +8784,9 @@ modify-values@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.0.tgz#e2b6cdeb9ce19f99317a53722f3dbf5df5eaaab2" -moment@^2.19.3: - version "2.19.3" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.3.tgz#bdb99d270d6d7fda78cc0fbace855e27fe7da69f" - -moment@^2.6.0: - version "2.19.2" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.2.tgz#8a7f774c95a64550b4c7ebd496683908f9419dbe" +moment@^2.19.3, moment@^2.6.0: + version "2.19.4" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.4.tgz#17e5e2c6ead8819c8ecfad83a0acccb312e94682" morgan@~1.6.1: version "1.6.1" @@ -8838,17 +8817,21 @@ ms@0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" -ms@2.0.0, ms@^2.0.0: +ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" +ms@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + multicast-dns-service-types@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" multicast-dns@^6.0.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.1.1.tgz#6e7de86a570872ab17058adea7160bbeca814dde" + version "6.2.1" + resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.1.tgz#c5035defa9219d30640558a49298067352098060" dependencies: dns-packet "^1.0.1" thunky "^0.1.0" @@ -8944,7 +8927,7 @@ node-fetch-npm@^2.0.2: json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" -node-fetch@^1.0.1, node-fetch@^1.3.3, node-fetch@^1.6.3: +node-fetch@1.7.3, node-fetch@^1.0.1, node-fetch@^1.3.3, node-fetch@^1.6.3: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" dependencies: @@ -8982,28 +8965,28 @@ node-int64@^0.4.0: resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" node-libs-browser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646" + version "2.1.0" + resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" dependencies: assert "^1.1.1" - browserify-zlib "^0.1.4" + browserify-zlib "^0.2.0" buffer "^4.3.0" console-browserify "^1.1.0" constants-browserify "^1.0.0" crypto-browserify "^3.11.0" domain-browser "^1.1.1" events "^1.0.0" - https-browserify "0.0.1" - os-browserify "^0.2.0" + https-browserify "^1.0.0" + os-browserify "^0.3.0" path-browserify "0.0.0" - process "^0.11.0" + process "^0.11.10" punycode "^1.2.4" querystring-es3 "^0.2.0" - readable-stream "^2.0.5" + readable-stream "^2.3.3" stream-browserify "^2.0.1" - stream-http "^2.3.1" - string_decoder "^0.10.25" - timers-browserify "^2.0.2" + stream-http "^2.7.2" + string_decoder "^1.0.0" + timers-browserify "^2.0.4" tty-browserify "0.0.0" url "^0.11.0" util "^0.10.3" @@ -9039,8 +9022,8 @@ node-pre-gyp@^0.6.36, node-pre-gyp@^0.6.39: tar-pack "^3.4.0" node-sass@^4.3.0: - version "4.6.1" - resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.6.1.tgz#9b331cf943ee5440f199e858941a90d13bc9bfc5" + version "4.7.2" + resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.7.2.tgz#9366778ba1469eb01438a9e8592f4262bcb6794e" dependencies: async-foreach "^0.1.3" chalk "^1.1.1" @@ -9057,9 +9040,10 @@ node-sass@^4.3.0: nan "^2.3.2" node-gyp "^3.3.1" npmlog "^4.0.0" - request "^2.79.0" + request "~2.79.0" sass-graph "^2.2.4" stdout-stream "^1.4.0" + "true-case-path" "^1.0.2" node-status-codes@^1.0.0: version "1.0.0" @@ -9069,22 +9053,7 @@ node-version@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.1.0.tgz#f437d7ba407e65e2c4eaef8887b1718ba523d4f0" -nodemon@^1.12.0: - version "1.12.1" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.12.1.tgz#996a56dc49d9f16bbf1b78a4de08f13634b3878d" - dependencies: - chokidar "^1.7.0" - debug "^2.6.8" - es6-promise "^3.3.1" - ignore-by-default "^1.0.1" - lodash.defaults "^3.1.2" - minimatch "^3.0.4" - ps-tree "^1.1.0" - touch "^3.1.0" - undefsafe "0.0.3" - update-notifier "^2.2.0" - -nodemon@^1.12.5: +nodemon@^1.12.0, nodemon@^1.12.5: version "1.12.5" resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.12.5.tgz#bd34afa1aa855f1996b561147848519f136de620" dependencies: @@ -9548,9 +9517,9 @@ original@>=0.0.5: dependencies: url-parse "1.0.x" -os-browserify@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f" +os-browserify@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27" os-homedir@^1.0.0, os-homedir@^1.0.1: version "1.0.2" @@ -9662,9 +9631,9 @@ pacote@~2.7.38: unique-filename "^1.1.0" which "^1.2.12" -pako@~0.2.0: - version "0.2.9" - resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75" +pako@~1.0.5: + version "1.0.6" + resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" parallel-transform@^1.1.0: version "1.1.0" @@ -9719,8 +9688,8 @@ parse-github-repo-url@^1.3.0: resolved "https://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50" parse-github-url@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-github-url/-/parse-github-url-1.0.1.tgz#af8d10e58cca8cfcc6e8975dd56942ccb36f5119" + version "1.0.2" + resolved "https://registry.yarnpkg.com/parse-github-url/-/parse-github-url-1.0.2.tgz#242d3b65cbcdda14bb50439e3242acf6971db395" parse-glob@^3.0.4: version "3.0.4" @@ -10079,7 +10048,7 @@ postcss-load-plugins@^2.3.0: cosmiconfig "^2.1.1" object-assign "^4.1.0" -postcss-loader@2.0.8, postcss-loader@^2.0.5: +postcss-loader@2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.0.8.tgz#8c67ddb029407dfafe684a406cfc16bad2ce0814" dependencies: @@ -10097,7 +10066,7 @@ postcss-loader@^1.3.3: postcss "^5.2.15" postcss-load-config "^1.2.0" -postcss-loader@^2.0.9: +postcss-loader@^2.0.5, postcss-loader@^2.0.9: version "2.0.9" resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-2.0.9.tgz#001fdf7bfeeb159405ee61d1bb8e59b528dbd309" dependencies: @@ -10315,11 +10284,7 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" -prettier@^1.7.0: - version "1.8.2" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8" - -prettier@^1.9.1: +prettier@^1.7.0, prettier@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.1.tgz#41638a0d47c1efbd1b7d5a742aaa5548eab86d70" @@ -10360,7 +10325,7 @@ process-nextick-args@^1.0.7, process-nextick-args@~1.0.6: version "1.0.7" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" -process@^0.11.0, process@^0.11.1: +process@^0.11.1, process@^0.11.10: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" @@ -10381,8 +10346,8 @@ promise-inflight@^1.0.1, promise-inflight@~1.0.1: resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" promise-polyfill@^6.0.1: - version "6.0.2" - resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-6.0.2.tgz#d9c86d3dc4dc2df9016e88946defd69b49b41162" + version "6.1.0" + resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-6.1.0.tgz#dfa96943ea9c121fca4de9b5868cb39d3472e057" promise-retry@^1.1.1: version "1.1.1" @@ -10391,7 +10356,7 @@ promise-retry@^1.1.1: err-code "^1.0.0" retry "^0.10.0" -promise.prototype.finally@^3.0.0, promise.prototype.finally@^3.1.0: +promise.prototype.finally@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.1.0.tgz#66f161b1643636e50e7cf201dc1b84a857f3864e" dependencies: @@ -10466,9 +10431,9 @@ proxy-from-env@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" -prr@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" ps-tree@^1.1.0: version "1.1.0" @@ -10491,8 +10456,8 @@ public-encrypt@^4.0.0: randombytes "^2.0.1" pump@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.2.tgz#3b3ee6512f94f0e575538c17995f9f16990a5d51" + version "1.0.3" + resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" dependencies: end-of-stream "^1.1.0" once "^1.3.1" @@ -10546,6 +10511,10 @@ qs@6.5.1, qs@^6.4.0, qs@^6.5.1, qs@~6.5.1: version "6.5.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" +qs@~6.3.0: + version "6.3.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.2.tgz#e75bd5f6e268122a2a0e0bda630b2550c166502c" + qs@~6.4.0: version "6.4.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" @@ -10738,16 +10707,7 @@ react-docgen@^2.15.0: node-dir "^0.1.10" recast "^0.12.6" -react-dom@^16.0.0, react-dom@^16.1.0: - version "16.1.1" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.1.1.tgz#b2e331b6d752faf1a2d31399969399a41d8d45f8" - dependencies: - fbjs "^0.8.16" - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.0" - -react-dom@^16.2.0: +react-dom@^16.0.0, react-dom@^16.1.0, react-dom@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.2.0.tgz#69003178601c0ca19b709b33a83369fe6124c044" dependencies: @@ -10786,8 +10746,8 @@ react-icons@^2.2.7: react-icon-base "2.1.0" react-inspector@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/react-inspector/-/react-inspector-2.2.1.tgz#c24f9a0131960b8e63c8392254d34df0717aabdf" + version "2.2.2" + resolved "https://registry.yarnpkg.com/react-inspector/-/react-inspector-2.2.2.tgz#c04f5248fa92ab6c23e37960e725fb7f48c34d05" dependencies: babel-runtime "^6.26.0" is-dom "^1.0.9" @@ -10945,15 +10905,7 @@ react-style-proptype@^3.0.0: dependencies: prop-types "^15.5.4" -react-test-renderer@^16.0.0-0: - version "16.1.1" - resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.1.1.tgz#a05184688d564be799f212449262525d1e350537" - dependencies: - fbjs "^0.8.16" - object-assign "^4.1.1" - prop-types "^15.6.0" - -react-test-renderer@^16.1.0, react-test-renderer@^16.2.0: +react-test-renderer@^16.0.0-0, react-test-renderer@^16.1.0, react-test-renderer@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.2.0.tgz#bddf259a6b8fcd8555f012afc8eacc238872a211" dependencies: @@ -10999,16 +10951,7 @@ react-treebeard@^2.0.3: shallowequal "^0.2.2" velocity-react "^1.3.1" -react@^16.0.0, react@^16.1.0: - version "16.1.1" - resolved "https://registry.yarnpkg.com/react/-/react-16.1.1.tgz#d5c4ef795507e3012282dd51261ff9c0e824fe1f" - dependencies: - fbjs "^0.8.16" - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.0" - -react@^16.2.0: +react@^16.0.0, react@^16.1.0, react@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/react/-/react-16.2.0.tgz#a31bd2dab89bff65d42134fa187f24d054c273ba" dependencies: @@ -11121,7 +11064,7 @@ read@1, read@~1.0.1, read@~1.0.7: dependencies: mute-stream "~0.0.4" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9, readable-stream@~2.3.2: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c" dependencies: @@ -11160,7 +11103,7 @@ readable-stream@~1.1.10, readable-stream@~1.1.8, readable-stream@~1.1.9: isarray "0.0.1" string_decoder "~0.10.x" -readdir-scoped-modules@^1.0.0: +readdir-scoped-modules@*, readdir-scoped-modules@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" dependencies: @@ -11270,8 +11213,8 @@ regenerator-runtime@^0.10.0, regenerator-runtime@^0.10.5: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" regenerator-runtime@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz#7e54fe5b5ccd5d6624ea6255c3473be090b802e1" + version "0.11.1" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" regenerator-transform@^0.10.0: version "0.10.1" @@ -11493,8 +11436,8 @@ remark-lint@^6.0.0, remark-lint@^6.0.1: remark-message-control "^4.0.0" remark-message-control@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/remark-message-control/-/remark-message-control-4.0.1.tgz#2913cd60b316d9f9f390aa7f34639d20cf55996d" + version "4.0.2" + resolved "https://registry.yarnpkg.com/remark-message-control/-/remark-message-control-4.0.2.tgz#103d277418ce747fc0143542596c82c853990d51" dependencies: mdast-comment-marker "^1.0.0" trim "0.0.1" @@ -11678,6 +11621,31 @@ request@2.81.0, request@~2.81.0: tunnel-agent "^0.6.0" uuid "^3.0.0" +request@~2.79.0: + version "2.79.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~2.1.1" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + oauth-sign "~0.8.1" + qs "~6.3.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + uuid "^3.0.0" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" @@ -11852,10 +11820,10 @@ rx-lite@^3.1.2: resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" rxjs@^5.4.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.2.tgz#28d403f0071121967f18ad665563255d54236ac3" + version "5.5.5" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.5.tgz#e164f11d38eaf29f56f08c3447f74ff02dd84e97" dependencies: - symbol-observable "^1.0.1" + symbol-observable "1.0.1" safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" @@ -12556,7 +12524,7 @@ stream-each@^1.1.0: end-of-stream "^1.1.0" stream-shift "^1.0.0" -stream-http@^2.3.1: +stream-http@^2.7.2: version "2.7.2" resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.2.tgz#40a050ec8dc3b53b33d9909415c02c0bf1abfbad" dependencies: @@ -12631,16 +12599,16 @@ string.prototype.padstart@^3.0.0: es-abstract "^1.4.3" function-bind "^1.0.2" -string_decoder@^0.10.25, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - -string_decoder@~1.0.3: +string_decoder@^1.0.0, string_decoder@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab" dependencies: safe-buffer "~5.1.0" +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + stringify-entities@^1.0.1: version "1.3.1" resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-1.3.1.tgz#b150ec2d72ac4c1b5f324b51fb6b28c9cdff058c" @@ -12782,8 +12750,8 @@ supports-color@^4.0.0, supports-color@^4.1.0, supports-color@^4.2.1, supports-co has-flag "^2.0.0" supports-color@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.0.1.tgz#1c5331f22250c84202805b2f17adf16699f3a39a" + version "5.1.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.1.0.tgz#058a021d1b619f7ddf3980d712ea3590ce7de3d5" dependencies: has-flag "^2.0.0" @@ -12844,13 +12812,17 @@ sw-toolbox@^3.4.0: path-to-regexp "^1.0.1" serviceworker-cache-polyfill "^4.0.0" +symbol-observable@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" + symbol-observable@^0.2.2: version "0.2.4" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-0.2.4.tgz#95a83db26186d6af7e7a18dbd9760a2f86d08f40" -symbol-observable@^1.0.1, symbol-observable@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" +symbol-observable@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.1.0.tgz#5c68fd8d54115d9dfb72a84720549222e8db9b32" symbol-tree@^3.2.1: version "3.2.2" @@ -13040,7 +13012,7 @@ timed-out@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" -timers-browserify@^2.0.2: +timers-browserify@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.4.tgz#96ca53f4b794a5e7c0e1bd7cc88a372298fa01e6" dependencies: @@ -13143,6 +13115,12 @@ trough@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.1.tgz#a9fd8b0394b0ae8fff82e0633a0a36ccad5b5f86" +"true-case-path@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-1.0.2.tgz#7ec91130924766c7f573be3020c34f8fdfd00d62" + dependencies: + glob "^6.0.4" + try-catch@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/try-catch/-/try-catch-1.0.0.tgz#3797dab39a266775f4d0da5cbf42aca3f03608e6" @@ -13182,9 +13160,9 @@ tsconfig@^6.0.0: strip-bom "^3.0.0" strip-json-comments "^2.0.0" -tsickle@^0.24.0: - version "0.24.1" - resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.24.1.tgz#039343b205bf517a333b0703978892f80a7d848e" +tsickle@^0.21.0: + version "0.21.6" + resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.21.6.tgz#53b01b979c5c13fdb13afb3fb958177e5991588d" dependencies: minimist "^1.2.0" mkdirp "^0.5.1" @@ -13192,8 +13170,8 @@ tsickle@^0.24.0: source-map-support "^0.4.2" tslib@^1.6.0, tslib@^1.7.1: - version "1.8.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.8.0.tgz#dc604ebad64bcbf696d613da6c954aa0e7ea1eb6" + version "1.8.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.8.1.tgz#6946af2d1d651a7b1863b531d6e5afa41aa44eac" tslint@~5.3.2: version "5.3.2" @@ -13214,8 +13192,8 @@ tsscmp@1.0.5: resolved "https://registry.yarnpkg.com/tsscmp/-/tsscmp-1.0.5.tgz#7dc4a33af71581ab4337da91d85ca5427ebd9a97" tsutils@^2.0.0: - version "2.12.2" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.12.2.tgz#ad58a4865d17ec3ddb6631b6ca53be14a5656ff3" + version "2.13.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.13.0.tgz#0f52b6aabbc4216e72796b66db028c6cf173e144" dependencies: tslib "^1.7.1" @@ -13229,6 +13207,10 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" +tunnel-agent@~0.4.1: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" @@ -13255,25 +13237,25 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.2.tgz#f8395f85d459276067c988aa41837a8f82870844" typescript@^2.3.3, typescript@^2.4.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.1.tgz#ef39cdea27abac0b500242d6726ab90e0c846631" + version "2.6.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.6.2.tgz#3c5b6fd7f6de0914269027f03c0946758f7673a4" ua-parser-js@^0.7.9: version "0.7.17" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" uglify-es@^3.1.8: - version "3.1.9" - resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.1.9.tgz#6c82df628ac9eb7af9c61fd70c744a084abe6161" + version "3.2.2" + resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.2.2.tgz#15c62b7775002c81b7987a1c49ecd3f126cace73" dependencies: - commander "~2.11.0" + commander "~2.12.1" source-map "~0.6.1" -uglify-js@3.1.x, uglify-js@^3.0.13: - version "3.1.9" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.1.9.tgz#dffca799308cf327ec3ac77eeacb8e196ce3b452" +uglify-js@3.2.x, uglify-js@^3.0.13: + version "3.2.2" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.2.2.tgz#870e4b34ed733d179284f9998efd3293f7fd73f6" dependencies: - commander "~2.11.0" + commander "~2.12.1" source-map "~0.6.1" uglify-js@^2.6, uglify-js@^2.8.29: @@ -13326,8 +13308,8 @@ ultron@1.0.x: resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.0.2.tgz#ace116ab557cd197386a4e88f4685378c8b2e4fa" ultron@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.0.tgz#b07a2e6a541a815fc6a34ccd4533baec307ca864" + version "1.1.1" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" umask@~1.1.0: version "1.1.0" @@ -13394,8 +13376,8 @@ unified-lint-rule@^1.0.0: wrapped "^1.0.1" unified@^6.0.0: - version "6.1.5" - resolved "https://registry.yarnpkg.com/unified/-/unified-6.1.5.tgz#716937872621a63135e62ced2f3ac6a063c6fb87" + version "6.1.6" + resolved "https://registry.yarnpkg.com/unified/-/unified-6.1.6.tgz#5ea7f807a0898f1f8acdeefe5f25faa010cc42b1" dependencies: bail "^1.0.0" extend "^3.0.0" @@ -13441,6 +13423,10 @@ unist-util-generated@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/unist-util-generated/-/unist-util-generated-1.1.1.tgz#99f16c78959ac854dee7c615c291924c8bf4de7f" +unist-util-is@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-2.1.1.tgz#0c312629e3f960c66e931e812d3d80e77010947b" + unist-util-modify-children@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/unist-util-modify-children/-/unist-util-modify-children-1.1.1.tgz#66d7e6a449e6f67220b976ab3cb8b5ebac39e51d" @@ -13457,13 +13443,15 @@ unist-util-remove-position@^1.0.0: dependencies: unist-util-visit "^1.1.0" -unist-util-stringify-position@^1.0.0: +unist-util-stringify-position@^1.0.0, unist-util-stringify-position@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-1.1.1.tgz#3ccbdc53679eed6ecf3777dd7f5e3229c1b6aa3c" unist-util-visit@^1.0.0, unist-util-visit@^1.1.0, unist-util-visit@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.1.3.tgz#ec268e731b9d277a79a5b5aa0643990e405d600b" + version "1.3.0" + resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.3.0.tgz#41ca7c82981fd1ce6c762aac397fc24e35711444" + dependencies: + unist-util-is "^2.1.1" universalify@^0.1.0: version "0.1.1" @@ -13652,7 +13640,7 @@ v8flags@^3.0.0: dependencies: homedir-polyfill "^1.0.1" -validate-npm-package-license@^3.0.1: +validate-npm-package-license@*, validate-npm-package-license@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" dependencies: @@ -13702,6 +13690,12 @@ vfile-location@^2.0.0, vfile-location@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-2.0.2.tgz#d3675c59c877498e492b4756ff65e4af1a752255" +vfile-message@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-1.0.0.tgz#a6adb0474ea400fa25d929f1d673abea6a17e359" + dependencies: + unist-util-stringify-position "^1.1.1" + vfile-reporter@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/vfile-reporter/-/vfile-reporter-4.0.0.tgz#ea6f0ae1342f4841573985e05f941736f27de9da" @@ -13717,12 +13711,13 @@ vfile-statistics@^1.1.0: resolved "https://registry.yarnpkg.com/vfile-statistics/-/vfile-statistics-1.1.0.tgz#02104c60fdeed1d11b1f73ad65330b7634b3d895" vfile@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/vfile/-/vfile-2.2.0.tgz#ce47a4fb335922b233e535db0f7d8121d8fced4e" + version "2.3.0" + resolved "https://registry.yarnpkg.com/vfile/-/vfile-2.3.0.tgz#e62d8e72b20e83c324bc6c67278ee272488bf84a" dependencies: is-buffer "^1.1.4" replace-ext "1.0.0" unist-util-stringify-position "^1.0.0" + vfile-message "^1.0.0" vhost@~3.0.1: version "3.0.2" @@ -13746,7 +13741,7 @@ vm-browserify@0.0.4: dependencies: indexof "0.0.1" -vm2@patriksimek/vm2#custom_files: +"vm2@github:patriksimek/vm2#custom_files": version "3.5.0" resolved "https://codeload.github.com/patriksimek/vm2/tar.gz/7e82f90ac705fc44fad044147cb0df09b4c79a57" @@ -13758,11 +13753,7 @@ void-elements@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec" -vue-hot-reload-api@^2.2.0: - version "2.2.3" - resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.2.3.tgz#43c8e5506d65a271d2571936d77253019fd3eb17" - -vue-hot-reload-api@^2.2.4: +vue-hot-reload-api@^2.2.0, vue-hot-reload-api@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/vue-hot-reload-api/-/vue-hot-reload-api-2.2.4.tgz#683bd1d026c0d3b3c937d5875679e9a87ec6cd8f" @@ -13891,17 +13882,7 @@ webidl-conversions@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad" -webpack-dev-middleware@^1.10.2, webpack-dev-middleware@^1.11.0: - version "1.12.0" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.0.tgz#d34efefb2edda7e1d3b5dbe07289513219651709" - dependencies: - memory-fs "~0.4.1" - mime "^1.3.4" - path-is-absolute "^1.0.0" - range-parser "^1.0.3" - time-stamp "^2.0.0" - -webpack-dev-middleware@^1.12.2: +webpack-dev-middleware@^1.10.2, webpack-dev-middleware@^1.11.0, webpack-dev-middleware@^1.12.2: version "1.12.2" resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e" dependencies: @@ -14001,16 +13982,7 @@ webpack-dev-server@~2.5.1: webpack-dev-middleware "^1.11.0" yargs "^6.0.0" -webpack-hot-middleware@^2.18.0: - version "2.20.0" - resolved "https://registry.yarnpkg.com/webpack-hot-middleware/-/webpack-hot-middleware-2.20.0.tgz#cb896d837758b6408fe0afeeafdc0e5316b15319" - dependencies: - ansi-html "0.0.7" - html-entities "^1.2.0" - querystring "^0.2.0" - strip-ansi "^3.0.0" - -webpack-hot-middleware@^2.21.0: +webpack-hot-middleware@^2.18.0, webpack-hot-middleware@^2.21.0: version "2.21.0" resolved "https://registry.yarnpkg.com/webpack-hot-middleware/-/webpack-hot-middleware-2.21.0.tgz#7b3c113a7a4b301c91e0749573c7aab28b414b52" dependencies: @@ -14033,13 +14005,13 @@ webpack-merge@^4.1.0: lodash "^4.17.4" webpack-sources@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.0.2.tgz#d0148ec083b3b5ccef1035a6b3ec16442983b27a" + version "1.1.0" + resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54" dependencies: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@3.8.1, "webpack@^2.5.1 || ^3.0.0": +webpack@3.8.1: version "3.8.1" resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.8.1.tgz#b16968a81100abe61608b0153c9159ef8bb2bd83" dependencies: @@ -14066,7 +14038,7 @@ webpack@3.8.1, "webpack@^2.5.1 || ^3.0.0": webpack-sources "^1.0.1" yargs "^8.0.2" -webpack@^3.10.0: +"webpack@^2.5.1 || ^3.0.0", webpack@^3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.10.0.tgz#5291b875078cf2abf42bdd23afe3f8f96c17d725" dependencies: @@ -14192,6 +14164,12 @@ widest-line@^1.0.0: dependencies: string-width "^1.0.1" +widest-line@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.0.tgz#0142a4e8a243f8882c0233aa0e0281aa76152273" + dependencies: + string-width "^2.1.1" + win-release@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/win-release/-/win-release-1.1.1.tgz#5fa55e02be7ca934edfc12665632e849b72e5209" @@ -14219,8 +14197,8 @@ wordwrap@~0.0.2: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" worker-farm@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.1.tgz#8e9f4a7da4f3c595aa600903051b969390423fa1" + version "1.5.2" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.2.tgz#32b312e5dc3d5d45d79ef44acc2587491cd729ae" dependencies: errno "^0.1.4" xtend "^4.0.1" @@ -14319,15 +14297,7 @@ ws@^2.0.3: safe-buffer "~5.0.1" ultron "~1.1.0" -ws@^3.0.0: - version "3.3.1" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.1.tgz#d97e34dee06a1190c61ac1e95f43cb60b78cf939" - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - -ws@^3.3.2: +ws@^3.0.0, ws@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.2.tgz#96c1d08b3fefda1d5c1e33700d3bfaa9be2d5608" dependencies: From 00106d385afce49cd06aa5c9c0b8d20fbe64f882 Mon Sep 17 00:00:00 2001 From: igor Date: Tue, 12 Dec 2017 12:03:27 +0200 Subject: [PATCH 02/15] WIP utils --- addons/knobs/src/angular/utils.js | 9 +++---- .../src/client/preview/angular/helpers.ts | 26 +++++++++---------- .../preview/{utils.js => angular/utils.ts} | 20 ++++++-------- 3 files changed, 25 insertions(+), 30 deletions(-) rename app/angular/src/client/preview/{utils.js => angular/utils.ts} (66%) diff --git a/addons/knobs/src/angular/utils.js b/addons/knobs/src/angular/utils.js index e2c38ac9bf7f..9526b8117683 100644 --- a/addons/knobs/src/angular/utils.js +++ b/addons/knobs/src/angular/utils.js @@ -1,5 +1,4 @@ /* eslint-disable no-param-reassign */ -/* eslint no-underscore-dangle: 0 */ /* globals window */ import { VERSION } from '@angular/core'; @@ -10,7 +9,7 @@ function getMeta(component, [name1, name2], defaultValue) { name1 = `__${name1}__`; } - if (VERSION.major >= 5) { + if (VERSION.major === '5') { if (component[name1]) { return component[name1]; } @@ -20,7 +19,7 @@ function getMeta(component, [name1, name2], defaultValue) { } } - if (VERSION.major >= 4) { + if (VERSION.major === '4') { return window.Reflect.getMetadata(name2, component) || defaultValue; } @@ -33,11 +32,11 @@ function setMeta(component, [name1, name2], value) { name1 = `__${name1}__`; } - if (VERSION.major >= 5) { + if (VERSION.major === '5') { component[name1] = value; } - if (VERSION.major >= 4) { + if (VERSION.major === '4') { window.Reflect.defineMetadata(name2, value, component); } } diff --git a/app/angular/src/client/preview/angular/helpers.ts b/app/angular/src/client/preview/angular/helpers.ts index 50d19f4c8ce2..b416532cb4f2 100644 --- a/app/angular/src/client/preview/angular/helpers.ts +++ b/app/angular/src/client/preview/angular/helpers.ts @@ -13,7 +13,7 @@ import { AppComponent } from "./components/app.component"; import { ErrorComponent } from "./components/error.component"; import { NoPreviewComponent } from "./components/no-preview.component"; import { STORY } from "./app.token"; -import { getAnnotations, getParameters, getPropMetadata } from '../utils'; +import { getAnnotations, getParameters, getPropMetadata } from './utils'; let platform = null; let promises = []; @@ -22,18 +22,18 @@ let promises = []; // We don't want to pull underscore const debounce = (func, wait = 100, immediate = false) => { - var timeout; - return function() { - var context = this, args = arguments; - var later = function() { - timeout = null; - if (!immediate) func.apply(context, args); - }; - var callNow = immediate && !timeout; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - if (callNow) func.apply(context, args); - }; + var timeout; + return function () { + var context = this, args = arguments; + var later = function () { + timeout = null; + if (!immediate) func.apply(context, args); + }; + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) func.apply(context, args); + }; }; const getComponentMetadata = ({ component, props = {}, propsMeta = {} }) => { diff --git a/app/angular/src/client/preview/utils.js b/app/angular/src/client/preview/angular/utils.ts similarity index 66% rename from app/angular/src/client/preview/utils.js rename to app/angular/src/client/preview/angular/utils.ts index e2c38ac9bf7f..f88f4def78a2 100644 --- a/app/angular/src/client/preview/utils.js +++ b/app/angular/src/client/preview/angular/utils.ts @@ -1,16 +1,12 @@ -/* eslint-disable no-param-reassign */ -/* eslint no-underscore-dangle: 0 */ -/* globals window */ - import { VERSION } from '@angular/core'; -function getMeta(component, [name1, name2], defaultValue) { +function getMeta(component, [name1, name2]: any, defaultValue) { if (!name2) { name2 = name1; name1 = `__${name1}__`; } - if (VERSION.major >= 5) { + if (VERSION.major === '5') { if (component[name1]) { return component[name1]; } @@ -20,25 +16,25 @@ function getMeta(component, [name1, name2], defaultValue) { } } - if (VERSION.major >= 4) { - return window.Reflect.getMetadata(name2, component) || defaultValue; + if (VERSION.major === '4') { + return window['Reflect'].getMetadata(name2, component) || defaultValue; } return defaultValue; } -function setMeta(component, [name1, name2], value) { +function setMeta(component, [name1, name2]: any, value) { if (!name2) { name2 = name1; name1 = `__${name1}__`; } - if (VERSION.major >= 5) { + if (VERSION.major === '5') { component[name1] = value; } - if (VERSION.major >= 4) { - window.Reflect.defineMetadata(name2, value, component); + if (VERSION.major === '4') { + window['Reflect'].defineMetadata(name2, value, component); } } From 3778ed9119701ff4be8960596310b7554b4c8e71 Mon Sep 17 00:00:00 2001 From: igor Date: Tue, 12 Dec 2017 13:25:50 +0200 Subject: [PATCH 03/15] Use utils on a few more helper functions --- app/angular/package.json | 3 ++- .../src/client/preview/angular/helpers.ts | 22 ++++++++++++++----- .../src/client/preview/angular/utils.ts | 4 ++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/app/angular/package.json b/app/angular/package.json index a4bed3decad7..aa605f0a5c32 100644 --- a/app/angular/package.json +++ b/app/angular/package.json @@ -18,7 +18,7 @@ "url": "https://github.com/storybooks/storybook.git" }, "scripts": { - "dev": "DEV_BUILD=1 nodemon -e js,ts --watch ./src --exec 'npm run prepublish'", + "dev": "cross-env DEV_BUILD=1 nodemon -e js,ts --watch ./src --exec \"yarn prepare\"", "prepare": "node ../../scripts/prepare.js" }, "dependencies": { @@ -45,6 +45,7 @@ "configstore": "^3.1.0", "core-js": "^2.4.1", "css-loader": "^0.28.1", + "cross-env": "^5.1.1", "express": "^4.15.3", "file-loader": "^0.11.1", "find-cache-dir": "^1.0.0", diff --git a/app/angular/src/client/preview/angular/helpers.ts b/app/angular/src/client/preview/angular/helpers.ts index b416532cb4f2..dd75287a7b10 100644 --- a/app/angular/src/client/preview/angular/helpers.ts +++ b/app/angular/src/client/preview/angular/helpers.ts @@ -13,7 +13,15 @@ import { AppComponent } from "./components/app.component"; import { ErrorComponent } from "./components/error.component"; import { NoPreviewComponent } from "./components/no-preview.component"; import { STORY } from "./app.token"; -import { getAnnotations, getParameters, getPropMetadata } from './utils'; + +import { + getAnnotations, + getParameters, + getPropMetadata, + setAnnotations, + setParameters, + setPropMetadata, +} from './utils'; let platform = null; let promises = []; @@ -61,10 +69,13 @@ const getAnnotatedComponent = (meta, component, propsMeta, params) => { const NewComponent: any = function NewComponent(...args) { component.call(this, ...args); }; + NewComponent.prototype = Object.create(component.prototype); - NewComponent.annotations = [new Component(meta)]; - NewComponent.parameters = params; - NewComponent.propsMetadata = propsMeta; + + setAnnotations(NewComponent,[new Component(meta)]); + setParameters(NewComponent, params); + setPropMetadata(NewComponent, propsMeta); + return NewComponent; }; @@ -79,7 +90,8 @@ const getModule = (declarations, entryComponents, bootstrap, data) => { }); const NewModule: any = function NewModule() {}; - NewModule.annotations = [moduleMeta]; + + setAnnotations(NewModule,[moduleMeta]); return NewModule; }; diff --git a/app/angular/src/client/preview/angular/utils.ts b/app/angular/src/client/preview/angular/utils.ts index f88f4def78a2..114fd48a9219 100644 --- a/app/angular/src/client/preview/angular/utils.ts +++ b/app/angular/src/client/preview/angular/utils.ts @@ -57,3 +57,7 @@ export function setAnnotations(component, value) { export function setParameters(component, value) { setMeta(component, ['parameters'], value); } + +export function setPropMetadata(component, value) { + setMeta(component, ['__prop__metadata__', 'propMetadata'], value); +} \ No newline at end of file From e4ccd6d36f352b55b04338e2aa2ab83ae6c11f7e Mon Sep 17 00:00:00 2001 From: igor Date: Tue, 12 Dec 2017 13:30:10 +0200 Subject: [PATCH 04/15] Update yarn.lock --- yarn.lock | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/yarn.lock b/yarn.lock index 63b8b2ce26dc..ad2f894aea78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3692,7 +3692,7 @@ debug@2.3.3: dependencies: ms "0.7.2" -debuglog@*, debuglog@^1.0.1: +debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -6346,7 +6346,7 @@ import-local@^0.1.1: pkg-dir "^2.0.0" resolve-cwd "^2.0.0" -imurmurhash@*, imurmurhash@^0.1.4: +imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -8028,10 +8028,6 @@ lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" -lodash._baseindexof@*: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" - lodash._baseisequal@^3.0.0: version "3.0.7" resolved "https://registry.yarnpkg.com/lodash._baseisequal/-/lodash._baseisequal-3.0.7.tgz#d8025f76339d29342767dcc887ce5cb95a5b51f1" @@ -8055,14 +8051,10 @@ lodash._basevalues@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" -lodash._bindcallback@*, lodash._bindcallback@^3.0.0: +lodash._bindcallback@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" -lodash._cacheindexof@*: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" - lodash._createassigner@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11" @@ -8071,17 +8063,11 @@ lodash._createassigner@^3.0.0: lodash._isiterateecall "^3.0.0" lodash.restparam "^3.0.0" -lodash._createcache@*: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" - dependencies: - lodash._getnative "^3.0.0" - lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" -lodash._getnative@*, lodash._getnative@^3.0.0: +lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" @@ -8231,7 +8217,7 @@ lodash.pick@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" -lodash.restparam@*, lodash.restparam@^3.0.0: +lodash.restparam@^3.0.0: version "3.6.1" resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" @@ -11103,7 +11089,7 @@ readable-stream@~1.1.10, readable-stream@~1.1.8, readable-stream@~1.1.9: isarray "0.0.1" string_decoder "~0.10.x" -readdir-scoped-modules@*, readdir-scoped-modules@^1.0.0: +readdir-scoped-modules@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" dependencies: @@ -13640,7 +13626,7 @@ v8flags@^3.0.0: dependencies: homedir-polyfill "^1.0.1" -validate-npm-package-license@*, validate-npm-package-license@^3.0.1: +validate-npm-package-license@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" dependencies: @@ -13741,7 +13727,7 @@ vm-browserify@0.0.4: dependencies: indexof "0.0.1" -"vm2@github:patriksimek/vm2#custom_files": +vm2@patriksimek/vm2#custom_files: version "3.5.0" resolved "https://codeload.github.com/patriksimek/vm2/tar.gz/7e82f90ac705fc44fad044147cb0df09b4c79a57" From 6e6d36df84930c5b06144a4ced2b9001f9014815 Mon Sep 17 00:00:00 2001 From: igor Date: Tue, 12 Dec 2017 15:54:25 +0200 Subject: [PATCH 05/15] Use deprecated OpaqueToken instead of InjectionToken to support angular v2 --- addons/knobs/src/angular/utils.js | 4 ++-- app/angular/src/client/preview/angular/app.token.ts | 7 +++++-- app/angular/src/client/preview/angular/utils.ts | 4 ++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/addons/knobs/src/angular/utils.js b/addons/knobs/src/angular/utils.js index 9526b8117683..b7ccf5c4f25f 100644 --- a/addons/knobs/src/angular/utils.js +++ b/addons/knobs/src/angular/utils.js @@ -19,7 +19,7 @@ function getMeta(component, [name1, name2], defaultValue) { } } - if (VERSION.major === '4') { + if (VERSION.major === '4' || VERSION.major === '2') { return window.Reflect.getMetadata(name2, component) || defaultValue; } @@ -36,7 +36,7 @@ function setMeta(component, [name1, name2], value) { component[name1] = value; } - if (VERSION.major === '4') { + if (VERSION.major === '4' || VERSION.major === '2') { window.Reflect.defineMetadata(name2, value, component); } } diff --git a/app/angular/src/client/preview/angular/app.token.ts b/app/angular/src/client/preview/angular/app.token.ts index 278844d0a449..33d8201d43f2 100644 --- a/app/angular/src/client/preview/angular/app.token.ts +++ b/app/angular/src/client/preview/angular/app.token.ts @@ -1,6 +1,9 @@ -import { InjectionToken } from "@angular/core"; +// import { InjectionToken } from "@angular/core"; +// export const STORY = new InjectionToken("story"); + +import { OpaqueToken } from "@angular/core"; +export const STORY = new OpaqueToken("story"); -export const STORY = new InjectionToken("story"); export type Data = { component: any; diff --git a/app/angular/src/client/preview/angular/utils.ts b/app/angular/src/client/preview/angular/utils.ts index 114fd48a9219..282a83c2cb7a 100644 --- a/app/angular/src/client/preview/angular/utils.ts +++ b/app/angular/src/client/preview/angular/utils.ts @@ -16,7 +16,7 @@ function getMeta(component, [name1, name2]: any, defaultValue) { } } - if (VERSION.major === '4') { + if (VERSION.major === '4' || VERSION.major === '2') { return window['Reflect'].getMetadata(name2, component) || defaultValue; } @@ -33,7 +33,7 @@ function setMeta(component, [name1, name2]: any, value) { component[name1] = value; } - if (VERSION.major === '4') { + if (VERSION.major === '4' || VERSION.major === '2') { window['Reflect'].defineMetadata(name2, value, component); } } From a55741d4e1e7de20553a826172fa946d518e396e Mon Sep 17 00:00:00 2001 From: igor Date: Wed, 13 Dec 2017 12:14:39 +0200 Subject: [PATCH 06/15] Revert changes back to the strong angular 5 version. --- addons/knobs/package.json | 2 +- addons/knobs/src/angular/helpers.js | 33 ++++++-------- addons/knobs/src/angular/utils.js | 41 +++-------------- app/angular/package.json | 12 +++-- .../src/client/preview/angular/app.token.ts | 8 +--- .../src/client/preview/angular/helpers.ts | 43 +++++++----------- .../src/client/preview/angular/utils.ts | 45 +++---------------- .../src/server/config/webpack.config.js | 12 +++++ yarn.lock | 30 +++++++++++++ 9 files changed, 89 insertions(+), 137 deletions(-) diff --git a/addons/knobs/package.json b/addons/knobs/package.json index 04de1fb645e1..f18f7cd12d77 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -14,6 +14,7 @@ "storybook": "start-storybook -p 9010" }, "dependencies": { + "@angular/core": "^5.0.0-beta.7", "babel-runtime": "^6.26.0", "deep-equal": "^1.0.1", "global": "^4.3.2", @@ -33,7 +34,6 @@ }, "peerDependencies": { "@storybook/addons": "^3.3.0-alpha.4", - "@angular/core": "*", "react": "*", "react-dom": "*" } diff --git a/addons/knobs/src/angular/helpers.js b/addons/knobs/src/angular/helpers.js index 170abe74ce63..e1aaafe06088 100644 --- a/addons/knobs/src/angular/helpers.js +++ b/addons/knobs/src/angular/helpers.js @@ -1,14 +1,7 @@ /* eslint no-underscore-dangle: 0 */ import { Component, SimpleChange, ChangeDetectorRef } from '@angular/core'; - -import { - getParameters, - getAnnotations, - getPropMetadata, - setAnnotations, - setParameters, -} from './utils'; +import { getParameters, getAnnotations, getPropMetadata } from './utils'; const getComponentMetadata = ({ component, props = {} }) => { if (!component || typeof component !== 'function') throw new Error('No valid component provided'); @@ -27,19 +20,19 @@ const getComponentMetadata = ({ component, props = {} }) => { }; const getAnnotatedComponent = ({ componentMeta, component, params, knobStore, channel }) => { - const NewComponent = function NewComponent(cd, ...args) { + const KnobWrapperComponent = function KnobWrapperComponent(cd, ...args) { component.call(this, ...args); this.cd = cd; this.knobChanged = this.knobChanged.bind(this); this.setPaneKnobs = this.setPaneKnobs.bind(this); }; - NewComponent.prototype = Object.create(component.prototype); - setAnnotations(NewComponent, [new Component(componentMeta)]); - setParameters(NewComponent, [[ChangeDetectorRef], ...params]); + KnobWrapperComponent.prototype = Object.create(component.prototype); + KnobWrapperComponent.__annotations__ = [new Component(componentMeta)]; + KnobWrapperComponent.__parameters__ = [[ChangeDetectorRef], ...params]; - NewComponent.prototype.constructor = NewComponent; - NewComponent.prototype.ngOnInit = function onInit() { + KnobWrapperComponent.prototype.constructor = KnobWrapperComponent; + KnobWrapperComponent.prototype.ngOnInit = function onInit() { if (component.prototype.ngOnInit) { component.prototype.ngOnInit(); } @@ -50,7 +43,7 @@ const getAnnotatedComponent = ({ componentMeta, component, params, knobStore, ch this.setPaneKnobs(); }; - NewComponent.prototype.ngOnDestroy = function onDestroy() { + KnobWrapperComponent.prototype.ngOnDestroy = function onDestroy() { if (component.prototype.ngOnDestroy) { component.prototype.ngOnDestroy(); } @@ -60,20 +53,20 @@ const getAnnotatedComponent = ({ componentMeta, component, params, knobStore, ch knobStore.unsubscribe(this.setPaneKnobs); }; - NewComponent.prototype.ngOnChanges = function onChanges(changes) { + KnobWrapperComponent.prototype.ngOnChanges = function onChanges(changes) { if (component.prototype.ngOnChanges) { component.prototype.ngOnChanges(changes); } }; - NewComponent.prototype.setPaneKnobs = function setPaneKnobs(timestamp = +new Date()) { + KnobWrapperComponent.prototype.setPaneKnobs = function setPaneKnobs(timestamp = +new Date()) { channel.emit('addon:knobs:setKnobs', { knobs: knobStore.getAll(), timestamp, }); }; - NewComponent.prototype.knobChanged = function knobChanged(change) { + KnobWrapperComponent.prototype.knobChanged = function knobChanged(change) { const { name, value } = change; const knobOptions = knobStore.get(name); const oldValue = knobOptions.value; @@ -87,12 +80,12 @@ const getAnnotatedComponent = ({ componentMeta, component, params, knobStore, ch }); }; - NewComponent.prototype.knobClicked = function knobClicked(clicked) { + KnobWrapperComponent.prototype.knobClicked = function knobClicked(clicked) { const knobOptions = knobStore.get(clicked.name); knobOptions.callback(); }; - return NewComponent; + return KnobWrapperComponent; }; const resetKnobs = (knobStore, channel) => { diff --git a/addons/knobs/src/angular/utils.js b/addons/knobs/src/angular/utils.js index b7ccf5c4f25f..03a810a8d7e8 100644 --- a/addons/knobs/src/angular/utils.js +++ b/addons/knobs/src/angular/utils.js @@ -1,44 +1,21 @@ /* eslint-disable no-param-reassign */ /* globals window */ -import { VERSION } from '@angular/core'; - function getMeta(component, [name1, name2], defaultValue) { if (!name2) { name2 = name1; name1 = `__${name1}__`; } - if (VERSION.major === '5') { - if (component[name1]) { - return component[name1]; - } - - if (component[name2]) { - return component[name2]; - } - } - - if (VERSION.major === '4' || VERSION.major === '2') { - return window.Reflect.getMetadata(name2, component) || defaultValue; - } - - return defaultValue; -} - -function setMeta(component, [name1, name2], value) { - if (!name2) { - name2 = name1; - name1 = `__${name1}__`; + if (component[name1]) { + return component[name1]; } - if (VERSION.major === '5') { - component[name1] = value; + if (component[name2]) { + return component[name2]; } - if (VERSION.major === '4' || VERSION.major === '2') { - window.Reflect.defineMetadata(name2, value, component); - } + return window.Reflect.getMetadata(name2, component) || defaultValue; } export function getAnnotations(component) { @@ -52,11 +29,3 @@ export function getPropMetadata(component) { export function getParameters(component) { return getMeta(component, ['parameters'], []); } - -export function setAnnotations(component, value) { - setMeta(component, ['annotations'], value); -} - -export function setParameters(component, value) { - setMeta(component, ['parameters'], value); -} diff --git a/app/angular/package.json b/app/angular/package.json index aa605f0a5c32..3b6e84ea2776 100644 --- a/app/angular/package.json +++ b/app/angular/package.json @@ -22,6 +22,11 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { + "@angular/common": "^5.0.0-beta.7", + "@angular/compiler": "^5.0.0-beta.7", + "@angular/core": "^5.0.0-beta.7", + "@angular/platform-browser": "^5.0.0-beta.7", + "@angular/platform-browser-dynamic": "^5.0.0-beta.7", "@storybook/addon-actions": "^3.3.0-alpha.4", "@storybook/addon-links": "^3.3.0-alpha.4", "@storybook/addons": "^3.3.0-alpha.4", @@ -86,12 +91,5 @@ "mock-fs": "^4.3.0", "nodemon": "^1.12.0", "typescript": "^2.4.0" - }, - "peerDependencies": { - "@angular/common": "*", - "@angular/compiler": "*", - "@angular/core": "*", - "@angular/platform-browser": "*", - "@angular/platform-browser-dynamic": "*" } } diff --git a/app/angular/src/client/preview/angular/app.token.ts b/app/angular/src/client/preview/angular/app.token.ts index 33d8201d43f2..dbb5cfb20375 100644 --- a/app/angular/src/client/preview/angular/app.token.ts +++ b/app/angular/src/client/preview/angular/app.token.ts @@ -1,9 +1,5 @@ -// import { InjectionToken } from "@angular/core"; -// export const STORY = new InjectionToken("story"); - -import { OpaqueToken } from "@angular/core"; -export const STORY = new OpaqueToken("story"); - +import { InjectionToken } from "@angular/core"; +export const STORY = new InjectionToken("story"); export type Data = { component: any; diff --git a/app/angular/src/client/preview/angular/helpers.ts b/app/angular/src/client/preview/angular/helpers.ts index dd75287a7b10..8d3c6dfe724f 100644 --- a/app/angular/src/client/preview/angular/helpers.ts +++ b/app/angular/src/client/preview/angular/helpers.ts @@ -2,8 +2,6 @@ import { enableProdMode, NgModule, Component, - NgModuleRef, - ApplicationRef, CUSTOM_ELEMENTS_SCHEMA } from "@angular/core"; @@ -13,15 +11,7 @@ import { AppComponent } from "./components/app.component"; import { ErrorComponent } from "./components/error.component"; import { NoPreviewComponent } from "./components/no-preview.component"; import { STORY } from "./app.token"; - -import { - getAnnotations, - getParameters, - getPropMetadata, - setAnnotations, - setParameters, - setPropMetadata, -} from './utils'; +import { getAnnotations, getParameters, getPropMetadata } from './utils'; let platform = null; let promises = []; @@ -30,18 +20,18 @@ let promises = []; // We don't want to pull underscore const debounce = (func, wait = 100, immediate = false) => { - var timeout; - return function () { - var context = this, args = arguments; - var later = function () { - timeout = null; - if (!immediate) func.apply(context, args); - }; - var callNow = immediate && !timeout; - clearTimeout(timeout); - timeout = setTimeout(later, wait); - if (callNow) func.apply(context, args); + var timeout; + return function () { + var context = this, args = arguments; + var later = function () { + timeout = null; + if (!immediate) func.apply(context, args); }; + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) func.apply(context, args); + }; }; const getComponentMetadata = ({ component, props = {}, propsMeta = {} }) => { @@ -71,10 +61,9 @@ const getAnnotatedComponent = (meta, component, propsMeta, params) => { }; NewComponent.prototype = Object.create(component.prototype); - - setAnnotations(NewComponent,[new Component(meta)]); - setParameters(NewComponent, params); - setPropMetadata(NewComponent, propsMeta); + NewComponent.annotations = [new Component(meta)]; + NewComponent.parameters = params; + NewComponent.propsMetadata = propsMeta; return NewComponent; }; @@ -91,7 +80,7 @@ const getModule = (declarations, entryComponents, bootstrap, data) => { const NewModule: any = function NewModule() {}; - setAnnotations(NewModule,[moduleMeta]); + NewModule.annotations = [moduleMeta]; return NewModule; }; diff --git a/app/angular/src/client/preview/angular/utils.ts b/app/angular/src/client/preview/angular/utils.ts index 282a83c2cb7a..843aa5ac4df4 100644 --- a/app/angular/src/client/preview/angular/utils.ts +++ b/app/angular/src/client/preview/angular/utils.ts @@ -1,41 +1,18 @@ -import { VERSION } from '@angular/core'; - function getMeta(component, [name1, name2]: any, defaultValue) { if (!name2) { name2 = name1; name1 = `__${name1}__`; } - if (VERSION.major === '5') { - if (component[name1]) { - return component[name1]; - } - - if (component[name2]) { - return component[name2]; - } - } - - if (VERSION.major === '4' || VERSION.major === '2') { - return window['Reflect'].getMetadata(name2, component) || defaultValue; - } - - return defaultValue; -} - -function setMeta(component, [name1, name2]: any, value) { - if (!name2) { - name2 = name1; - name1 = `__${name1}__`; + if (component[name1]) { + return component[name1]; } - if (VERSION.major === '5') { - component[name1] = value; + if (component[name2]) { + return component[name2]; } - if (VERSION.major === '4' || VERSION.major === '2') { - window['Reflect'].defineMetadata(name2, value, component); - } + return window['Reflect'].getMetadata(name2, component) || defaultValue; } export function getAnnotations(component) { @@ -48,16 +25,4 @@ export function getPropMetadata(component) { export function getParameters(component) { return getMeta(component, ['parameters'], []); -} - -export function setAnnotations(component, value) { - setMeta(component, ['annotations'], value); -} - -export function setParameters(component, value) { - setMeta(component, ['parameters'], value); -} - -export function setPropMetadata(component, value) { - setMeta(component, ['__prop__metadata__', 'propMetadata'], value); } \ No newline at end of file diff --git a/app/angular/src/server/config/webpack.config.js b/app/angular/src/server/config/webpack.config.js index 92d05118f876..eef36713ab1f 100644 --- a/app/angular/src/server/config/webpack.config.js +++ b/app/angular/src/server/config/webpack.config.js @@ -1,3 +1,4 @@ +/* eslint-disable no-param-reassign */ import path from 'path'; import webpack from 'webpack'; import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; @@ -28,6 +29,7 @@ export default function() { ], }, output: { + pathinfo: true, path: path.join(__dirname, 'dist'), filename: 'static/[name].bundle.js', publicPath: '/', @@ -55,6 +57,16 @@ export default function() { new CaseSensitivePathsPlugin(), new WatchMissingNodeModulesPlugin(nodeModulesPaths), new webpack.ProgressPlugin(), + // temp plugin to make webpack bundle only one v5 version. + new webpack.NormalModuleReplacementPlugin( + /addons(\\|\/)knobs(\\|\/)node_modules(\\|\/)@angular/, + resource => { + resource.request = resource.request.replace( + /addons(\\|\/)knobs(\\|\/)node_modules(\\|\/)@angular/, + 'app\\angular\\node_modules\\@angular' + ); + } + ), new webpack.ContextReplacementPlugin( /angular(\\|\/)core(\\|\/)@angular/, path.resolve(__dirname, '../src') diff --git a/yarn.lock b/yarn.lock index ad2f894aea78..e90a269595ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -91,6 +91,12 @@ dependencies: tslib "^1.7.1" +"@angular/common@^5.0.0-beta.7": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-5.1.0.tgz#88b586e0aff6a93b8de08cce1e14c0e65fde5a56" + dependencies: + tslib "^1.7.1" + "@angular/compiler-cli@4.3.5": version "4.3.5" resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-4.3.5.tgz#24e99b36c0909363ff8247bf331a8b89eaedfe63" @@ -105,12 +111,24 @@ dependencies: tslib "^1.7.1" +"@angular/compiler@^5.0.0-beta.7": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-5.1.0.tgz#23fe2914061487fcc909616b4dc5c24c5a8d47a1" + dependencies: + tslib "^1.7.1" + "@angular/core@4.3.5": version "4.3.5" resolved "https://registry.yarnpkg.com/@angular/core/-/core-4.3.5.tgz#bd1efdbf1ebcfb9c27a238e2aa4c48159b0895bb" dependencies: tslib "^1.7.1" +"@angular/core@^5.0.0-beta.7": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-5.1.0.tgz#6f7596ad780418cecac527ae0508cfc1a36383a0" + dependencies: + tslib "^1.7.1" + "@angular/forms@4.3.5": version "4.3.5" resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-4.3.5.tgz#519aad0ad82a1b87019937fa93fc147734737787" @@ -133,12 +151,24 @@ dependencies: tslib "^1.7.1" +"@angular/platform-browser-dynamic@^5.0.0-beta.7": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-5.1.0.tgz#60566728dd949c442e064bf8247aa51672411f2b" + dependencies: + tslib "^1.7.1" + "@angular/platform-browser@4.3.5": version "4.3.5" resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-4.3.5.tgz#c0d03409499cc29f81677aab623c9086760d84ef" dependencies: tslib "^1.7.1" +"@angular/platform-browser@^5.0.0-beta.7": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-5.1.0.tgz#b5373232403d73c355b971cfae8b03191c4f58a2" + dependencies: + tslib "^1.7.1" + "@angular/router@4.3.5": version "4.3.5" resolved "https://registry.yarnpkg.com/@angular/router/-/router-4.3.5.tgz#188082747bc9b6974f9d4b3f5557b434645d23cd" From fef3b9883089409971a028dc59db1f9b5e8b5dae Mon Sep 17 00:00:00 2001 From: igor Date: Wed, 13 Dec 2017 13:14:33 +0200 Subject: [PATCH 07/15] Revert back to v5 --- .../src/client/preview/angular/app.token.ts | 1 + examples/angular-cli/package.json | 22 ++--- yarn.lock | 83 ++++++------------- 3 files changed, 36 insertions(+), 70 deletions(-) diff --git a/app/angular/src/client/preview/angular/app.token.ts b/app/angular/src/client/preview/angular/app.token.ts index dbb5cfb20375..278844d0a449 100644 --- a/app/angular/src/client/preview/angular/app.token.ts +++ b/app/angular/src/client/preview/angular/app.token.ts @@ -1,4 +1,5 @@ import { InjectionToken } from "@angular/core"; + export const STORY = new InjectionToken("story"); export type Data = { diff --git a/examples/angular-cli/package.json b/examples/angular-cli/package.json index aafa17989124..55f4fe8addfc 100644 --- a/examples/angular-cli/package.json +++ b/examples/angular-cli/package.json @@ -14,23 +14,23 @@ }, "private": true, "dependencies": { - "@angular/animations": "4.3.5", - "@angular/common": "4.3.5", - "@angular/compiler": "4.3.5", - "@angular/core": "4.3.5", - "@angular/forms": "4.3.5", - "@angular/http": "4.3.5", - "@angular/platform-browser": "4.3.5", - "@angular/platform-browser-dynamic": "4.3.5", - "@angular/router": "4.3.5", + "@angular/animations": "^5.0.0-beta.7", + "@angular/common": "^5.0.0-beta.7", + "@angular/compiler": "^5.0.0-beta.7", + "@angular/core": "^5.0.0-beta.7", + "@angular/forms": "^5.0.0-beta.7", + "@angular/http": "^5.0.0-beta.7", + "@angular/platform-browser": "^5.0.0-beta.7", + "@angular/platform-browser-dynamic": "^5.0.0-beta.7", + "@angular/router": "^5.0.0-beta.7", "core-js": "^2.4.1", "rxjs": "^5.4.2", "zone.js": "^0.8.14" }, "devDependencies": { "@angular/cli": "1.3.0", - "@angular/compiler-cli": "4.3.5", - "@angular/language-service": "4.3.5", + "@angular/compiler-cli": "^5.0.0-beta.7", + "@angular/language-service": "^5.0.0-beta.7", "@storybook/addon-actions": "^3.3.0-alpha.4", "@storybook/addon-links": "^3.3.0-alpha.4", "@storybook/addon-notes": "^3.3.0-alpha.4", diff --git a/yarn.lock b/yarn.lock index e90a269595ac..a96b6b36362b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10,9 +10,9 @@ source-map "^0.5.6" typescript "^2.3.3" -"@angular/animations@4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-4.3.5.tgz#85aa454c887cc7cce11637ea5f6e9afad88490e1" +"@angular/animations@^5.0.0-beta.7": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-5.1.0.tgz#439135ed56355ec779791bf3ea7de1c711cd2185" dependencies: tslib "^1.7.1" @@ -85,31 +85,20 @@ optionalDependencies: node-sass "^4.3.0" -"@angular/common@4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-4.3.5.tgz#5f6b11347eae1dfc34623ccfd4c06c8f4c488e2d" - dependencies: - tslib "^1.7.1" - "@angular/common@^5.0.0-beta.7": version "5.1.0" resolved "https://registry.yarnpkg.com/@angular/common/-/common-5.1.0.tgz#88b586e0aff6a93b8de08cce1e14c0e65fde5a56" dependencies: tslib "^1.7.1" -"@angular/compiler-cli@4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-4.3.5.tgz#24e99b36c0909363ff8247bf331a8b89eaedfe63" +"@angular/compiler-cli@^5.0.0-beta.7": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-5.1.0.tgz#9512abf2515c7d3b7e9ee45650801ee78d63223e" dependencies: - "@angular/tsc-wrapped" "4.3.5" + chokidar "^1.4.2" minimist "^1.2.0" reflect-metadata "^0.1.2" - -"@angular/compiler@4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-4.3.5.tgz#50d3c986657beff1fef4f6dd9a3fa58e24abd548" - dependencies: - tslib "^1.7.1" + tsickle "^0.25.5" "@angular/compiler@^5.0.0-beta.7": version "5.1.0" @@ -117,39 +106,27 @@ dependencies: tslib "^1.7.1" -"@angular/core@4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-4.3.5.tgz#bd1efdbf1ebcfb9c27a238e2aa4c48159b0895bb" - dependencies: - tslib "^1.7.1" - "@angular/core@^5.0.0-beta.7": version "5.1.0" resolved "https://registry.yarnpkg.com/@angular/core/-/core-5.1.0.tgz#6f7596ad780418cecac527ae0508cfc1a36383a0" dependencies: tslib "^1.7.1" -"@angular/forms@4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-4.3.5.tgz#519aad0ad82a1b87019937fa93fc147734737787" +"@angular/forms@^5.0.0-beta.7": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-5.1.0.tgz#8699c7117a348607d4c7a1deee9caa5ca460c2cb" dependencies: tslib "^1.7.1" -"@angular/http@4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@angular/http/-/http-4.3.5.tgz#81d4b0761c8ef035cb0b736300c237f36286f1f0" +"@angular/http@^5.0.0-beta.7": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@angular/http/-/http-5.1.0.tgz#59d47c1878896f25e64b9abc700017cff7836710" dependencies: tslib "^1.7.1" -"@angular/language-service@4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-4.3.5.tgz#b6d882ea40d18d513fc3a035a79875029fe38f01" - -"@angular/platform-browser-dynamic@4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-4.3.5.tgz#4a697b3b0aec805b33884fd4a9b3473065bab1e0" - dependencies: - tslib "^1.7.1" +"@angular/language-service@^5.0.0-beta.7": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-5.1.0.tgz#0cdd1a9d6056f1567bfe3c016352bc2e9d20cb84" "@angular/platform-browser-dynamic@^5.0.0-beta.7": version "5.1.0" @@ -157,30 +134,18 @@ dependencies: tslib "^1.7.1" -"@angular/platform-browser@4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-4.3.5.tgz#c0d03409499cc29f81677aab623c9086760d84ef" - dependencies: - tslib "^1.7.1" - "@angular/platform-browser@^5.0.0-beta.7": version "5.1.0" resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-5.1.0.tgz#b5373232403d73c355b971cfae8b03191c4f58a2" dependencies: tslib "^1.7.1" -"@angular/router@4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-4.3.5.tgz#188082747bc9b6974f9d4b3f5557b434645d23cd" +"@angular/router@^5.0.0-beta.7": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-5.1.0.tgz#4e7283e34cd3d244899b289d835b830640c7bad9" dependencies: tslib "^1.7.1" -"@angular/tsc-wrapped@4.3.5": - version "4.3.5" - resolved "https://registry.yarnpkg.com/@angular/tsc-wrapped/-/tsc-wrapped-4.3.5.tgz#95fdaa813cfc57262fc7ef5fea726d628aefabac" - dependencies: - tsickle "^0.21.0" - "@babel/code-frame@7.0.0-beta.31": version "7.0.0-beta.31" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.31.tgz#473d021ecc573a2cce1c07d5b509d5215f46ba35" @@ -2671,7 +2636,7 @@ child-process-promise@^2.2.1: node-version "^1.0.0" promise-polyfill "^6.0.1" -chokidar@^1.4.1, chokidar@^1.5.1, chokidar@^1.6.0, chokidar@^1.6.1, chokidar@^1.7.0: +chokidar@^1.4.1, chokidar@^1.4.2, chokidar@^1.5.1, chokidar@^1.6.0, chokidar@^1.6.1, chokidar@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468" dependencies: @@ -13176,9 +13141,9 @@ tsconfig@^6.0.0: strip-bom "^3.0.0" strip-json-comments "^2.0.0" -tsickle@^0.21.0: - version "0.21.6" - resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.21.6.tgz#53b01b979c5c13fdb13afb3fb958177e5991588d" +tsickle@^0.25.5: + version "0.25.5" + resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.25.5.tgz#2891d29f97c4aab1306e06378d8496d1765a4bfe" dependencies: minimist "^1.2.0" mkdirp "^0.5.1" From 154e51054004b40fa6fdd17d2d4cceed69eebfb7 Mon Sep 17 00:00:00 2001 From: igor Date: Thu, 14 Dec 2017 08:14:47 +0200 Subject: [PATCH 08/15] Fix `Critical dependency: the request of a dependency is an expression` warning with angular 5. --- app/angular/src/server/config/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/angular/src/server/config/webpack.config.js b/app/angular/src/server/config/webpack.config.js index eef36713ab1f..c256bc0a739b 100644 --- a/app/angular/src/server/config/webpack.config.js +++ b/app/angular/src/server/config/webpack.config.js @@ -68,7 +68,7 @@ export default function() { } ), new webpack.ContextReplacementPlugin( - /angular(\\|\/)core(\\|\/)@angular/, + /angular(\\|\/)core(\\|\/)(@angular|esm5)/, path.resolve(__dirname, '../src') ), ], From baaa14b1ac4caf231989f40fc5c40bd73d2b79db Mon Sep 17 00:00:00 2001 From: igor Date: Thu, 14 Dec 2017 11:05:35 +0200 Subject: [PATCH 09/15] Add node to test (for windows) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ec260b6c66d0..251430d111cb 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "lint:js": "eslint --cache --cache-location=.cache/eslint --ext .js,.jsx,.json", "lint:md": "remark", "publish": "lerna publish", - "test": "./scripts/test.js", + "test": "node ./scripts/test.js", "test-latest-cra": "npm --prefix lib/cli run test-latest-cra", "repo-dirty-check": "node ./scripts/repo-dirty-check" }, From dd0d1859e9523e58fa19a61a2369c0b887dcccfb Mon Sep 17 00:00:00 2001 From: igor Date: Wed, 20 Dec 2017 08:09:24 +0200 Subject: [PATCH 10/15] Move back to peer deps --- addons/knobs/package.json | 2 +- addons/knobs/src/angular/utils.js | 19 +++++++++++++++ app/angular/package.json | 12 ++++++---- .../src/client/preview/angular/utils.ts | 23 +++++++++++++++++++ .../src/server/config/webpack.config.js | 11 --------- 5 files changed, 50 insertions(+), 17 deletions(-) diff --git a/addons/knobs/package.json b/addons/knobs/package.json index 8a2cb8e5ef2a..738089b7dc6f 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -14,7 +14,6 @@ "storybook": "start-storybook -p 9010" }, "dependencies": { - "@angular/core": "^5.0.0-beta.7", "babel-runtime": "^6.26.0", "deep-equal": "^1.0.1", "global": "^4.3.2", @@ -34,6 +33,7 @@ }, "peerDependencies": { "@storybook/addons": "^3.3.0-alpha.4", + "@angular/core": "=>4.0.0", "react": "*", "react-dom": "*" } diff --git a/addons/knobs/src/angular/utils.js b/addons/knobs/src/angular/utils.js index 03a810a8d7e8..72b4e545768b 100644 --- a/addons/knobs/src/angular/utils.js +++ b/addons/knobs/src/angular/utils.js @@ -18,6 +18,17 @@ function getMeta(component, [name1, name2], defaultValue) { return window.Reflect.getMetadata(name2, component) || defaultValue; } +function setMeta(component, [name1, name2], value) { + if (!name2) { + name2 = name1; + name1 = `__${name1}__`; + } + + component[name1] = value; + component[name2] = value; + window.Reflect.defineMetadata(name2, value, component); +} + export function getAnnotations(component) { return getMeta(component, ['annotations'], []); } @@ -29,3 +40,11 @@ export function getPropMetadata(component) { export function getParameters(component) { return getMeta(component, ['parameters'], []); } + +export function setAnnotations(component, value) { + setMeta(component, ['annotations'], value); +} + +export function setParameters(component, value) { + setMeta(component, ['parameters'], value); +} diff --git a/app/angular/package.json b/app/angular/package.json index 3b6e84ea2776..f6a66e8cd1f6 100644 --- a/app/angular/package.json +++ b/app/angular/package.json @@ -22,11 +22,6 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@angular/common": "^5.0.0-beta.7", - "@angular/compiler": "^5.0.0-beta.7", - "@angular/core": "^5.0.0-beta.7", - "@angular/platform-browser": "^5.0.0-beta.7", - "@angular/platform-browser-dynamic": "^5.0.0-beta.7", "@storybook/addon-actions": "^3.3.0-alpha.4", "@storybook/addon-links": "^3.3.0-alpha.4", "@storybook/addons": "^3.3.0-alpha.4", @@ -91,5 +86,12 @@ "mock-fs": "^4.3.0", "nodemon": "^1.12.0", "typescript": "^2.4.0" + }, + "peerDependencies": { + "@angular/common": "=>4.0.0", + "@angular/compiler": "=>4.0.0", + "@angular/core": "=>4.0.0", + "@angular/platform-browser": "=>4.0.0", + "@angular/platform-browser-dynamic": "=>4.0.0" } } diff --git a/app/angular/src/client/preview/angular/utils.ts b/app/angular/src/client/preview/angular/utils.ts index 843aa5ac4df4..91fda7be6faf 100644 --- a/app/angular/src/client/preview/angular/utils.ts +++ b/app/angular/src/client/preview/angular/utils.ts @@ -15,6 +15,17 @@ function getMeta(component, [name1, name2]: any, defaultValue) { return window['Reflect'].getMetadata(name2, component) || defaultValue; } +function setMeta(component, [name1, name2]: any, value) { + if (!name2) { + name2 = name1; + name1 = `__${name1}__`; + } + + component[name1] = value; + component[name2] = value; + window['Reflect'].defineMetadata(name2, value, component); +} + export function getAnnotations(component) { return getMeta(component, ['annotations'], []); } @@ -25,4 +36,16 @@ export function getPropMetadata(component) { export function getParameters(component) { return getMeta(component, ['parameters'], []); +} + +export function setAnnotations(component, value) { + setMeta(component, ['annotations'], value); +} + +export function setParameters(component, value) { + setMeta(component, ['parameters'], value); +} + +export function setPropMetadata(component, value) { + setMeta(component, ['__prop__metadata__', 'propMetadata'], value); } \ No newline at end of file diff --git a/app/angular/src/server/config/webpack.config.js b/app/angular/src/server/config/webpack.config.js index c256bc0a739b..4bbe176499c3 100644 --- a/app/angular/src/server/config/webpack.config.js +++ b/app/angular/src/server/config/webpack.config.js @@ -1,4 +1,3 @@ -/* eslint-disable no-param-reassign */ import path from 'path'; import webpack from 'webpack'; import CaseSensitivePathsPlugin from 'case-sensitive-paths-webpack-plugin'; @@ -57,16 +56,6 @@ export default function() { new CaseSensitivePathsPlugin(), new WatchMissingNodeModulesPlugin(nodeModulesPaths), new webpack.ProgressPlugin(), - // temp plugin to make webpack bundle only one v5 version. - new webpack.NormalModuleReplacementPlugin( - /addons(\\|\/)knobs(\\|\/)node_modules(\\|\/)@angular/, - resource => { - resource.request = resource.request.replace( - /addons(\\|\/)knobs(\\|\/)node_modules(\\|\/)@angular/, - 'app\\angular\\node_modules\\@angular' - ); - } - ), new webpack.ContextReplacementPlugin( /angular(\\|\/)core(\\|\/)(@angular|esm5)/, path.resolve(__dirname, '../src') From 08b0bdafa6a004fd4d1f75c83053e7310297769b Mon Sep 17 00:00:00 2001 From: igor Date: Wed, 20 Dec 2017 08:38:30 +0200 Subject: [PATCH 11/15] Remove setMeta --- addons/knobs/src/angular/utils.js | 19 --------------- .../src/client/preview/angular/utils.ts | 23 ------------------- 2 files changed, 42 deletions(-) diff --git a/addons/knobs/src/angular/utils.js b/addons/knobs/src/angular/utils.js index 72b4e545768b..03a810a8d7e8 100644 --- a/addons/knobs/src/angular/utils.js +++ b/addons/knobs/src/angular/utils.js @@ -18,17 +18,6 @@ function getMeta(component, [name1, name2], defaultValue) { return window.Reflect.getMetadata(name2, component) || defaultValue; } -function setMeta(component, [name1, name2], value) { - if (!name2) { - name2 = name1; - name1 = `__${name1}__`; - } - - component[name1] = value; - component[name2] = value; - window.Reflect.defineMetadata(name2, value, component); -} - export function getAnnotations(component) { return getMeta(component, ['annotations'], []); } @@ -40,11 +29,3 @@ export function getPropMetadata(component) { export function getParameters(component) { return getMeta(component, ['parameters'], []); } - -export function setAnnotations(component, value) { - setMeta(component, ['annotations'], value); -} - -export function setParameters(component, value) { - setMeta(component, ['parameters'], value); -} diff --git a/app/angular/src/client/preview/angular/utils.ts b/app/angular/src/client/preview/angular/utils.ts index 91fda7be6faf..843aa5ac4df4 100644 --- a/app/angular/src/client/preview/angular/utils.ts +++ b/app/angular/src/client/preview/angular/utils.ts @@ -15,17 +15,6 @@ function getMeta(component, [name1, name2]: any, defaultValue) { return window['Reflect'].getMetadata(name2, component) || defaultValue; } -function setMeta(component, [name1, name2]: any, value) { - if (!name2) { - name2 = name1; - name1 = `__${name1}__`; - } - - component[name1] = value; - component[name2] = value; - window['Reflect'].defineMetadata(name2, value, component); -} - export function getAnnotations(component) { return getMeta(component, ['annotations'], []); } @@ -36,16 +25,4 @@ export function getPropMetadata(component) { export function getParameters(component) { return getMeta(component, ['parameters'], []); -} - -export function setAnnotations(component, value) { - setMeta(component, ['annotations'], value); -} - -export function setParameters(component, value) { - setMeta(component, ['parameters'], value); -} - -export function setPropMetadata(component, value) { - setMeta(component, ['__prop__metadata__', 'propMetadata'], value); } \ No newline at end of file From a1470f6d860fad1e08538df4c8434f3964f855b7 Mon Sep 17 00:00:00 2001 From: igor Date: Wed, 20 Dec 2017 08:39:50 +0200 Subject: [PATCH 12/15] Add required click handler to prevent errors. --- examples/angular-cli/src/stories/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/angular-cli/src/stories/index.ts b/examples/angular-cli/src/stories/index.ts index dab525efdd1f..5f800a4d60a9 100644 --- a/examples/angular-cli/src/stories/index.ts +++ b/examples/angular-cli/src/stories/index.ts @@ -105,7 +105,8 @@ storiesOf('Addon Notes', module) withNotes({ text: 'My notes on some button' })(() => ({ component: Button, props: { - text: 'Notes on some Button' + text: 'Notes on some Button', + onClick: () => {}, } })) ) @@ -122,7 +123,8 @@ storiesOf('Addon Notes', module) })(() => ({ component: Button, props: { - text: 'Notes with HTML' + text: 'Notes with HTML', + onClick: () => {}, } })) ); From 24873e7988e8cfad894d4b61018d7a40e1124fb0 Mon Sep 17 00:00:00 2001 From: igor Date: Wed, 20 Dec 2017 08:57:57 +0200 Subject: [PATCH 13/15] Remove pathinfo --- app/angular/src/server/config/webpack.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/app/angular/src/server/config/webpack.config.js b/app/angular/src/server/config/webpack.config.js index 4bbe176499c3..e479e77efd8b 100644 --- a/app/angular/src/server/config/webpack.config.js +++ b/app/angular/src/server/config/webpack.config.js @@ -28,7 +28,6 @@ export default function() { ], }, output: { - pathinfo: true, path: path.join(__dirname, 'dist'), filename: 'static/[name].bundle.js', publicPath: '/', From 6ed2fd848365dbb252ed983a8c26b296b9b99e75 Mon Sep 17 00:00:00 2001 From: igor Date: Wed, 20 Dec 2017 09:08:53 +0200 Subject: [PATCH 14/15] Fix `Critical dependency: the request of a dependency is an expression` in webpack.config.prod --- app/angular/src/server/config/webpack.config.prod.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/angular/src/server/config/webpack.config.prod.js b/app/angular/src/server/config/webpack.config.prod.js index 465127ec1a32..33e6c5ff1e50 100644 --- a/app/angular/src/server/config/webpack.config.prod.js +++ b/app/angular/src/server/config/webpack.config.prod.js @@ -56,7 +56,7 @@ export default function() { }, }), new webpack.ContextReplacementPlugin( - /angular(\\|\/)core(\\|\/)@angular/, + /angular(\\|\/)core(\\|\/)(@angular|esm5)/, path.resolve(__dirname, '../src') ), ], From 1ecd649defd9cc946fb1088b3637c60f56380f69 Mon Sep 17 00:00:00 2001 From: Carlos Vega Date: Wed, 20 Dec 2017 09:09:46 -0600 Subject: [PATCH 15/15] Updating fixtures to reflect deprecation of angular 2 Signed-off-by: Carlos Vega --- .../test/fixtures/angular-cli/package.json | 18 +++++------ .../test/snapshots/angular-cli/package.json | 18 +++++------ yarn.lock | 30 +++++-------------- 3 files changed, 26 insertions(+), 40 deletions(-) diff --git a/lib/cli/test/fixtures/angular-cli/package.json b/lib/cli/test/fixtures/angular-cli/package.json index 1b45787178d8..4085f190ec9b 100644 --- a/lib/cli/test/fixtures/angular-cli/package.json +++ b/lib/cli/test/fixtures/angular-cli/package.json @@ -12,21 +12,21 @@ }, "private": true, "dependencies": { - "@angular/common": "^2.3.1", - "@angular/compiler": "^2.3.1", - "@angular/core": "^2.3.1", - "@angular/forms": "^2.3.1", - "@angular/http": "^2.3.1", - "@angular/platform-browser": "^2.3.1", - "@angular/platform-browser-dynamic": "^2.3.1", - "@angular/router": "^3.3.1", + "@angular/common": "4.0.0", + "@angular/compiler": "4.0.0", + "@angular/core": "4.0.0", + "@angular/forms": "4.0.0", + "@angular/http": "4.0.0", + "@angular/platform-browser": "4.0.0", + "@angular/platform-browser-dynamic": "4.0.0", + "@angular/router": "4.0.0", "core-js": "^2.4.1", "rxjs": "^5.0.1", "ts-helpers": "^1.1.1", "zone.js": "^0.7.2" }, "devDependencies": { - "@angular/compiler-cli": "^2.3.1", + "@angular/compiler-cli": "4.0.0", "@types/jasmine": "2.5.38", "@types/node": "^6.0.42", "angular-cli": "1.0.0-beta.28.3", diff --git a/lib/cli/test/snapshots/angular-cli/package.json b/lib/cli/test/snapshots/angular-cli/package.json index c3280e3ade9f..080fcf713ca7 100644 --- a/lib/cli/test/snapshots/angular-cli/package.json +++ b/lib/cli/test/snapshots/angular-cli/package.json @@ -14,21 +14,21 @@ }, "private": true, "dependencies": { - "@angular/common": "^2.3.1", - "@angular/compiler": "^2.3.1", - "@angular/core": "^2.3.1", - "@angular/forms": "^2.3.1", - "@angular/http": "^2.3.1", - "@angular/platform-browser": "^2.3.1", - "@angular/platform-browser-dynamic": "^2.3.1", - "@angular/router": "^3.3.1", + "@angular/common": "4.0.0", + "@angular/compiler": "4.0.0", + "@angular/core": "4.0.0", + "@angular/forms": "4.0.0", + "@angular/http": "4.0.0", + "@angular/platform-browser": "4.0.0", + "@angular/platform-browser-dynamic": "4.0.0", + "@angular/router": "4.0.0", "core-js": "^2.4.1", "rxjs": "^5.0.1", "ts-helpers": "^1.1.1", "zone.js": "^0.7.2" }, "devDependencies": { - "@angular/compiler-cli": "^2.3.1", + "@angular/compiler-cli": "4.0.0", "@types/jasmine": "2.5.38", "@types/node": "^6.0.42", "angular-cli": "1.0.0-beta.28.3", diff --git a/yarn.lock b/yarn.lock index 63b8b2ce26dc..ad2f894aea78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3692,7 +3692,7 @@ debug@2.3.3: dependencies: ms "0.7.2" -debuglog@*, debuglog@^1.0.1: +debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -6346,7 +6346,7 @@ import-local@^0.1.1: pkg-dir "^2.0.0" resolve-cwd "^2.0.0" -imurmurhash@*, imurmurhash@^0.1.4: +imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" @@ -8028,10 +8028,6 @@ lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" -lodash._baseindexof@*: - version "3.1.0" - resolved "https://registry.yarnpkg.com/lodash._baseindexof/-/lodash._baseindexof-3.1.0.tgz#fe52b53a1c6761e42618d654e4a25789ed61822c" - lodash._baseisequal@^3.0.0: version "3.0.7" resolved "https://registry.yarnpkg.com/lodash._baseisequal/-/lodash._baseisequal-3.0.7.tgz#d8025f76339d29342767dcc887ce5cb95a5b51f1" @@ -8055,14 +8051,10 @@ lodash._basevalues@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" -lodash._bindcallback@*, lodash._bindcallback@^3.0.0: +lodash._bindcallback@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" -lodash._cacheindexof@*: - version "3.0.2" - resolved "https://registry.yarnpkg.com/lodash._cacheindexof/-/lodash._cacheindexof-3.0.2.tgz#3dc69ac82498d2ee5e3ce56091bafd2adc7bde92" - lodash._createassigner@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/lodash._createassigner/-/lodash._createassigner-3.1.1.tgz#838a5bae2fdaca63ac22dee8e19fa4e6d6970b11" @@ -8071,17 +8063,11 @@ lodash._createassigner@^3.0.0: lodash._isiterateecall "^3.0.0" lodash.restparam "^3.0.0" -lodash._createcache@*: - version "3.1.2" - resolved "https://registry.yarnpkg.com/lodash._createcache/-/lodash._createcache-3.1.2.tgz#56d6a064017625e79ebca6b8018e17440bdcf093" - dependencies: - lodash._getnative "^3.0.0" - lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/lodash._createset/-/lodash._createset-4.0.3.tgz#0f4659fbb09d75194fa9e2b88a6644d363c9fe26" -lodash._getnative@*, lodash._getnative@^3.0.0: +lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" @@ -8231,7 +8217,7 @@ lodash.pick@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.pick/-/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3" -lodash.restparam@*, lodash.restparam@^3.0.0: +lodash.restparam@^3.0.0: version "3.6.1" resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" @@ -11103,7 +11089,7 @@ readable-stream@~1.1.10, readable-stream@~1.1.8, readable-stream@~1.1.9: isarray "0.0.1" string_decoder "~0.10.x" -readdir-scoped-modules@*, readdir-scoped-modules@^1.0.0: +readdir-scoped-modules@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747" dependencies: @@ -13640,7 +13626,7 @@ v8flags@^3.0.0: dependencies: homedir-polyfill "^1.0.1" -validate-npm-package-license@*, validate-npm-package-license@^3.0.1: +validate-npm-package-license@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" dependencies: @@ -13741,7 +13727,7 @@ vm-browserify@0.0.4: dependencies: indexof "0.0.1" -"vm2@github:patriksimek/vm2#custom_files": +vm2@patriksimek/vm2#custom_files: version "3.5.0" resolved "https://codeload.github.com/patriksimek/vm2/tar.gz/7e82f90ac705fc44fad044147cb0df09b4c79a57"