From ad89dca426d55d384a05a4ba80dfcf9b59181ce3 Mon Sep 17 00:00:00 2001 From: hypnos Date: Thu, 30 Nov 2017 01:47:52 +0300 Subject: [PATCH 001/162] Addon-actions: display enumerable properties from prototype chain --- addons/actions/src/util.js | 7 +++++-- .../__snapshots__/addon-actions.stories.storyshot | 9 +++++++++ .../src/stories/addon-actions.stories.js | 7 ++++++- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/addons/actions/src/util.js b/addons/actions/src/util.js index b93c00ceea41..b3cac28e2506 100644 --- a/addons/actions/src/util.js +++ b/addons/actions/src/util.js @@ -70,9 +70,12 @@ export function decycle(object, depth = 15) { } else { obj = { [CLASS_NAME_KEY]: value.constructor ? value.constructor.name : 'Object' }; - Object.keys(value).forEach(name => { + // We want to iterate over all the enumerable properties, including the ones in prototype chain + // eslint-disable-next-line no-restricted-syntax, guard-for-in + for (const name in value) { + // noinspection JSUnfilteredForInLoop obj[name] = derez(value[name], `${path}[${JSON.stringify(name)}]`, _depth + 1); - }); + } } if (_depth === 0 && isObject(value) && isCyclic) { diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot index e25a31710bcd..10772f38a115 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot @@ -18,6 +18,15 @@ exports[`Storyshots Addon Actions Decorated Action 1`] = ` `; +exports[`Storyshots Addon Actions File object as payload 1`] = ` + +`; + exports[`Storyshots Addon Actions Function Name 1`] = ` ; }) - .add('Reserved keyword as name', () => ); + .add('Reserved keyword as name', () => ) + .add('File object as payload', () => { + const file = new File([''], 'filename.txt', { type: 'text/plain', lastModified: new Date() }); + return ; + }); From 24c0868d085c7b5a4c1f7d46f058d464e11bbcfb Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Tue, 5 Dec 2017 15:14:58 +0000 Subject: [PATCH 002/162] refactor code to better support all types --- .../src/containers/ActionLogger/index.js | 3 +- addons/actions/src/lib/__mocks__/example.js | 45 ++++++ .../actions/src/lib/__tests__/decycle.test.js | 8 ++ .../src/lib/__tests__/retrocycle.test.js | 42 ++++++ addons/actions/src/lib/decycle.js | 67 +++++++++ addons/actions/src/lib/index.js | 4 + addons/actions/src/lib/retrocycle.js | 50 +++++++ addons/actions/src/lib/reviver.js | 15 ++ .../__tests__/createFakeConstructor.test.js | 14 ++ .../class/__tests__/getClassName.test.js | 26 ++++ .../src/lib/types/class/__tests__/index.js | 19 +++ .../lib/types/class/createFakeConstructor.js | 13 ++ .../src/lib/types/class/getClassName.js | 23 +++ addons/actions/src/lib/types/class/index.js | 13 ++ .../src/lib/types/date/__tests__/index.js | 19 +++ addons/actions/src/lib/types/date/index.js | 10 ++ .../src/lib/types/function/__tests__/index.js | 37 +++++ .../lib/types/function/createBoundFunction.js | 5 + .../src/lib/types/function/createFunction.js | 4 + .../actions/src/lib/types/function/index.js | 21 +++ .../src/lib/types/function/isReserved.js | 3 + addons/actions/src/lib/types/index.js | 27 ++++ .../src/lib/types/infinity/__tests__/index.js | 29 ++++ .../actions/src/lib/types/infinity/index.js | 10 ++ .../src/lib/types/nan/__tests__/index.js | 16 +++ addons/actions/src/lib/types/nan/index.js | 9 ++ .../src/lib/types/regexp/__tests__/index.js | 18 +++ .../src/lib/types/regexp/createRegExp.js | 5 + addons/actions/src/lib/types/regexp/index.js | 12 ++ .../src/lib/types/symbol/__tests__/index.js | 18 +++ .../src/lib/types/symbol/createSymbol.js | 3 + addons/actions/src/lib/types/symbol/index.js | 12 ++ .../lib/types/undefined/__tests__/index.js | 16 +++ .../actions/src/lib/types/undefined/index.js | 10 ++ .../util/__tests__/getPropertiesList.test.js | 62 ++++++++ .../lib/util/__tests__/muteProperty.test.js | 7 + .../lib/util/__tests__/typeReplacer.test.js | 53 +++++++ .../lib/util/__tests__/typeReviver.test.js | 52 +++++++ .../actions/src/lib/util/getPropertiesList.js | 17 +++ addons/actions/src/lib/util/index.js | 5 + addons/actions/src/lib/util/isObject.js | 5 + addons/actions/src/lib/util/muteProperty.js | 3 + addons/actions/src/lib/util/typeReplacer.js | 15 ++ addons/actions/src/lib/util/typeReviver.js | 19 +++ addons/actions/src/preview.js | 2 +- addons/actions/src/preview.test.js | 68 +++++++++ addons/actions/src/util.js | 132 ------------------ 47 files changed, 932 insertions(+), 134 deletions(-) create mode 100644 addons/actions/src/lib/__mocks__/example.js create mode 100644 addons/actions/src/lib/__tests__/decycle.test.js create mode 100644 addons/actions/src/lib/__tests__/retrocycle.test.js create mode 100644 addons/actions/src/lib/decycle.js create mode 100644 addons/actions/src/lib/index.js create mode 100644 addons/actions/src/lib/retrocycle.js create mode 100644 addons/actions/src/lib/reviver.js create mode 100644 addons/actions/src/lib/types/class/__tests__/createFakeConstructor.test.js create mode 100644 addons/actions/src/lib/types/class/__tests__/getClassName.test.js create mode 100644 addons/actions/src/lib/types/class/__tests__/index.js create mode 100644 addons/actions/src/lib/types/class/createFakeConstructor.js create mode 100644 addons/actions/src/lib/types/class/getClassName.js create mode 100644 addons/actions/src/lib/types/class/index.js create mode 100644 addons/actions/src/lib/types/date/__tests__/index.js create mode 100644 addons/actions/src/lib/types/date/index.js create mode 100644 addons/actions/src/lib/types/function/__tests__/index.js create mode 100644 addons/actions/src/lib/types/function/createBoundFunction.js create mode 100644 addons/actions/src/lib/types/function/createFunction.js create mode 100644 addons/actions/src/lib/types/function/index.js create mode 100644 addons/actions/src/lib/types/function/isReserved.js create mode 100644 addons/actions/src/lib/types/index.js create mode 100644 addons/actions/src/lib/types/infinity/__tests__/index.js create mode 100644 addons/actions/src/lib/types/infinity/index.js create mode 100644 addons/actions/src/lib/types/nan/__tests__/index.js create mode 100644 addons/actions/src/lib/types/nan/index.js create mode 100644 addons/actions/src/lib/types/regexp/__tests__/index.js create mode 100644 addons/actions/src/lib/types/regexp/createRegExp.js create mode 100644 addons/actions/src/lib/types/regexp/index.js create mode 100644 addons/actions/src/lib/types/symbol/__tests__/index.js create mode 100644 addons/actions/src/lib/types/symbol/createSymbol.js create mode 100644 addons/actions/src/lib/types/symbol/index.js create mode 100644 addons/actions/src/lib/types/undefined/__tests__/index.js create mode 100644 addons/actions/src/lib/types/undefined/index.js create mode 100644 addons/actions/src/lib/util/__tests__/getPropertiesList.test.js create mode 100644 addons/actions/src/lib/util/__tests__/muteProperty.test.js create mode 100644 addons/actions/src/lib/util/__tests__/typeReplacer.test.js create mode 100644 addons/actions/src/lib/util/__tests__/typeReviver.test.js create mode 100644 addons/actions/src/lib/util/getPropertiesList.js create mode 100644 addons/actions/src/lib/util/index.js create mode 100644 addons/actions/src/lib/util/isObject.js create mode 100644 addons/actions/src/lib/util/muteProperty.js create mode 100644 addons/actions/src/lib/util/typeReplacer.js create mode 100644 addons/actions/src/lib/util/typeReviver.js delete mode 100644 addons/actions/src/util.js diff --git a/addons/actions/src/containers/ActionLogger/index.js b/addons/actions/src/containers/ActionLogger/index.js index 383c1c13a584..2048442dd7b8 100644 --- a/addons/actions/src/containers/ActionLogger/index.js +++ b/addons/actions/src/containers/ActionLogger/index.js @@ -3,7 +3,8 @@ import React from 'react'; import PropTypes from 'prop-types'; import deepEqual from 'deep-equal'; -import { CYCLIC_KEY, isObject, retrocycle } from '../../util'; +import { CYCLIC_KEY, retrocycle } from '../../lib'; +import { isObject } from '../../lib/util'; import ActionLoggerComponent from '../../components/ActionLogger/'; import { EVENT_ID } from '../../'; diff --git a/addons/actions/src/lib/__mocks__/example.js b/addons/actions/src/lib/__mocks__/example.js new file mode 100644 index 000000000000..1dcd386214b6 --- /dev/null +++ b/addons/actions/src/lib/__mocks__/example.js @@ -0,0 +1,45 @@ +import { File } from 'global'; + +const date = '2017-12-02T11:13:22.492Z'; +const file = new File([''], 'filename.txt', { + type: 'text/plain', + lastModified: new Date(date), +}); + +const input = { + a: 'A', + b: 1, + c: true, + d: /AA/g, + e: date, + f: file, +}; +input.circular = input; + +const output = { + '$___storybook.className': 'Object', + '$___storybook.isCyclic': true, + a: 'A', + b: 1, + c: true, + circular: { + $ref: '$', + }, + d: { + '$___storybook.regExpKey': '/AA/g', + }, + e: '2017-12-02T11:13:22.492Z', + f: { + '$___storybook.className': 'File', + isClosed: false, + lastModified: 1512213202492, + name: 'filename.txt', + size: 0, + type: 'text/plain', + }, +}; + +export default { + input, + output, +}; diff --git a/addons/actions/src/lib/__tests__/decycle.test.js b/addons/actions/src/lib/__tests__/decycle.test.js new file mode 100644 index 000000000000..e0e5b4c3fea6 --- /dev/null +++ b/addons/actions/src/lib/__tests__/decycle.test.js @@ -0,0 +1,8 @@ +import decycle from '../decycle'; +import example from '../__mocks__/example'; + +describe('Decycle', () => { + it('can handle cyclic object', () => { + expect(decycle(example.input)).toEqual(example.output); + }); +}); diff --git a/addons/actions/src/lib/__tests__/retrocycle.test.js b/addons/actions/src/lib/__tests__/retrocycle.test.js new file mode 100644 index 000000000000..0428192eb319 --- /dev/null +++ b/addons/actions/src/lib/__tests__/retrocycle.test.js @@ -0,0 +1,42 @@ +import retrocycle from '../retrocycle'; +import example from '../__mocks__/example'; + +describe('Retrocycle', () => { + it('can restore cyclic object', () => { + const FileMock = function File() { + this.close = function close() {}; + this.isClosed = example.input.f.isClosed; + this.lastModified = example.input.f.lastModified; + this.name = example.input.f.name; + this.size = 0; + this.type = 'text/plain'; + }; + + const file = new FileMock(); + + const result = { + a: example.input.a, + b: example.input.b, + c: example.input.c, + d: example.input.d, + e: example.input.e, + f: file, + }; + + result.circular = result; + + const revived = retrocycle(JSON.stringify(example.output)); + + expect(revived.a).toEqual(example.input.a); + expect(revived.b).toEqual(example.input.b); + expect(revived.c).toEqual(example.input.c); + expect(revived.d).toEqual(example.input.d); + expect(revived.e).toEqual(example.input.e); + expect(revived.f.constructor.name).toEqual('File'); + expect(revived.f.isClosed).toEqual(example.input.f.isClosed); + expect(revived.f.lastModified).toEqual(example.input.f.lastModified); + expect(revived.f.name).toEqual(example.input.f.name); + expect(revived.f.size).toEqual(example.input.f.size); + expect(revived.f.type).toEqual(example.input.f.type); + }); +}); diff --git a/addons/actions/src/lib/decycle.js b/addons/actions/src/lib/decycle.js new file mode 100644 index 000000000000..481a43c6a22f --- /dev/null +++ b/addons/actions/src/lib/decycle.js @@ -0,0 +1,67 @@ +import { getPropertiesList, typeReplacer } from './util'; + +import { CYCLIC_KEY } from './'; + +import { classType } from './types'; + +export default function decycle(object, depth = 10) { + const objects = new WeakMap(); + let isCyclic = false; + + const res = (function derez(value, path, _depth) { + let oldPath; + let obj; + + if (Object(value) === value && _depth > depth) { + const name = value.constructor ? value.constructor.name : typeof value; + + return `[${name}...]`; + } + + const result = typeReplacer(value); + + if (result) { + return result.value; + } + + const type = typeof value; + + if (value instanceof Boolean || value instanceof Number || value instanceof String) { + return value; + } + + if (type === 'object' && value !== null) { + oldPath = objects.get(value); + if (oldPath !== undefined) { + isCyclic = true; + + return { $ref: oldPath }; + } + + objects.set(value, path); + + if (Array.isArray(value)) { + obj = []; + for (let i = 0; i < value.length; i += 1) { + obj[i] = derez(value[i], `${path}[${i}]`, _depth + 1); + } + } else { + obj = classType.serialize(value); + + getPropertiesList(value).forEach(name => { + obj[name] = derez(value[name], `${path}[${JSON.stringify(name)}]`, _depth + 1); + }); + } + + if (_depth === 0 && value instanceof Object && isCyclic) { + obj[CYCLIC_KEY] = true; + } + + return obj; + } + + return value; + })(object, '$', 0); + + return res; +} diff --git a/addons/actions/src/lib/index.js b/addons/actions/src/lib/index.js new file mode 100644 index 000000000000..9cc430caa788 --- /dev/null +++ b/addons/actions/src/lib/index.js @@ -0,0 +1,4 @@ +export const CYCLIC_KEY = '$___storybook.isCyclic'; +export decycle from './decycle'; +export retrocycle from './retrocycle'; +export reviver from './reviver'; diff --git a/addons/actions/src/lib/retrocycle.js b/addons/actions/src/lib/retrocycle.js new file mode 100644 index 000000000000..ca57b41c53cd --- /dev/null +++ b/addons/actions/src/lib/retrocycle.js @@ -0,0 +1,50 @@ +import reviver from './reviver'; +import { muteProperty } from './util'; +import { CYCLIC_KEY } from './'; + +const pathReg = /^\$(?:\[(?:\d+|"(?:[^\\"\u0000-\u001f]|\\([\\"/bfnrt]|u[0-9a-zA-Z]{4}))*")])*$/; + +export default function retrocycle(json) { + const $ = JSON.parse(json, reviver); + + if (typeof $ !== 'object' || $ === null) { + return $; + } + + (function rez(value) { + if (value && typeof value === 'object') { + if (Array.isArray(value)) { + for (let i = 0; i < value.length; i += 1) { + const item = value[i]; + if (item && typeof item === 'object') { + const path = item.$ref; + if (typeof path === 'string' && pathReg.test(path)) { + value[i] = eval(path); // eslint-disable-line no-eval, no-param-reassign + } else { + rez(item); + } + } + } + } else { + // eslint-disable-next-line no-restricted-syntax, guard-for-in + for (const name in value) { + const item = value[name]; + + if (typeof item === 'object' && item !== null) { + const path = item.$ref; + + if (typeof path === 'string' && pathReg.test(path)) { + value[name] = eval(path); // eslint-disable-line no-eval, no-param-reassign + } else { + rez(item); + } + } + } + } + } + })($); + + muteProperty(CYCLIC_KEY, $); + + return $; +} diff --git a/addons/actions/src/lib/reviver.js b/addons/actions/src/lib/reviver.js new file mode 100644 index 000000000000..8c173b8cf55a --- /dev/null +++ b/addons/actions/src/lib/reviver.js @@ -0,0 +1,15 @@ +import { isObject, typeReviver } from './util'; + +function reviver(key, value) { + if (isObject(value)) { + const result = typeReviver(value); + + if (result) { + return result.value; + } + } + + return value; +} + +export default reviver; diff --git a/addons/actions/src/lib/types/class/__tests__/createFakeConstructor.test.js b/addons/actions/src/lib/types/class/__tests__/createFakeConstructor.test.js new file mode 100644 index 000000000000..f5725f5587d6 --- /dev/null +++ b/addons/actions/src/lib/types/class/__tests__/createFakeConstructor.test.js @@ -0,0 +1,14 @@ +import createFakeConstructor from '../createFakeConstructor'; + +describe('createFakeConstructor', () => { + it('creates fake constructor', () => { + expect( + createFakeConstructor( + { + name_key: 'A', + }, + 'name_key' + ).constructor.name + ).toEqual('A'); + }); +}); diff --git a/addons/actions/src/lib/types/class/__tests__/getClassName.test.js b/addons/actions/src/lib/types/class/__tests__/getClassName.test.js new file mode 100644 index 000000000000..eb5ebae7dadc --- /dev/null +++ b/addons/actions/src/lib/types/class/__tests__/getClassName.test.js @@ -0,0 +1,26 @@ +import getClassName from '../getClassName'; + +class A {} +const a = new A(); +function B() {} +const b = new B(); + +describe('getClassName', () => { + /* Transpiled cannot be tested. + it('get name of class',() => { + expect(getClassName(A)).toBe('A') + }); + */ + + it('get name of class instance', () => { + expect(getClassName(a)).toBe('A'); + }); + + it('get name of function', () => { + expect(getClassName(B)).toBe('B'); + }); + + it('get constructor name', () => { + expect(getClassName(b)).toBe('B'); + }); +}); diff --git a/addons/actions/src/lib/types/class/__tests__/index.js b/addons/actions/src/lib/types/class/__tests__/index.js new file mode 100644 index 000000000000..134fcaeb420d --- /dev/null +++ b/addons/actions/src/lib/types/class/__tests__/index.js @@ -0,0 +1,19 @@ +import classType from '../'; + +describe('Class', () => { + it('Serializes Class', () => { + class C {} + const c = new C(); + + expect(classType.serialize(c)).toEqual({ [classType.KEY]: 'C' }); + }); + + it('Deserializes Class', () => { + const value = { [classType.KEY]: 'C' }; + const c = classType.deserialize(value); + + expect(c.constructor.name).toEqual('C'); + + expect(value).toEqual({}); + }); +}); diff --git a/addons/actions/src/lib/types/class/createFakeConstructor.js b/addons/actions/src/lib/types/class/createFakeConstructor.js new file mode 100644 index 000000000000..da39767d295a --- /dev/null +++ b/addons/actions/src/lib/types/class/createFakeConstructor.js @@ -0,0 +1,13 @@ +export default function createFakeConstructor(obj, key) { + function FakeConstructor(data) { + Object.assign(this, data); + } + + Object.defineProperty(FakeConstructor, 'name', { + value: obj[key], + }); + + delete obj[key]; // eslint-disable-line no-param-reassign + + return new FakeConstructor(obj); +} diff --git a/addons/actions/src/lib/types/class/getClassName.js b/addons/actions/src/lib/types/class/getClassName.js new file mode 100644 index 000000000000..6ca575fb4d6b --- /dev/null +++ b/addons/actions/src/lib/types/class/getClassName.js @@ -0,0 +1,23 @@ +export default function getClassName(value) { + if (value.toString) { + const stringValue = value.toString(); + + if (stringValue.slice(0, 5) === 'class') { + return stringValue.slice(6, -3); + } + + const type = stringValue.slice(8, -1); + + if (stringValue.slice(1, 7) === 'object' && type !== 'Object') { + return type; + } + + const parts = stringValue.match(/function (\w+).*/); + + if (parts && parts.length === 2) { + return parts[1]; + } + } + + return value.constructor ? value.constructor.name : 'Object'; +} diff --git a/addons/actions/src/lib/types/class/index.js b/addons/actions/src/lib/types/class/index.js new file mode 100644 index 000000000000..bf6b94efa723 --- /dev/null +++ b/addons/actions/src/lib/types/class/index.js @@ -0,0 +1,13 @@ +import createFakeConstructor from './createFakeConstructor'; +import getClassName from './getClassName'; + +const KEY = '$___storybook.className'; + +const classType = { + KEY, + // is: (value) => , // not used + serialize: value => ({ [KEY]: getClassName(value) }), + deserialize: value => createFakeConstructor(value, KEY), +}; + +export default classType; diff --git a/addons/actions/src/lib/types/date/__tests__/index.js b/addons/actions/src/lib/types/date/__tests__/index.js new file mode 100644 index 000000000000..92df8dc0e9e9 --- /dev/null +++ b/addons/actions/src/lib/types/date/__tests__/index.js @@ -0,0 +1,19 @@ +import dateType from '../'; + +const date = new Date(1512137134873); +const isoString = date.toISOString(); + +describe('Date', () => { + it('Recognizes Date', () => { + expect(dateType.is(date)).toBe(true); + expect(dateType.is(1)).toBe(false); + }); + + it('Serializes Date', () => { + expect(dateType.serialize(date)).toEqual({ [dateType.KEY]: isoString }); + }); + + it('Deserializes Date', () => { + expect(dateType.deserialize({ [dateType.KEY]: isoString })).toEqual(date); + }); +}); diff --git a/addons/actions/src/lib/types/date/index.js b/addons/actions/src/lib/types/date/index.js new file mode 100644 index 000000000000..1ead4c75021d --- /dev/null +++ b/addons/actions/src/lib/types/date/index.js @@ -0,0 +1,10 @@ +const KEY = '$___storybook.Date'; + +const dateType = { + KEY, + is: value => value instanceof Date, + serialize: value => ({ [KEY]: value.toISOString() }), + deserialize: value => new Date(value[KEY]), +}; + +export default dateType; diff --git a/addons/actions/src/lib/types/function/__tests__/index.js b/addons/actions/src/lib/types/function/__tests__/index.js new file mode 100644 index 000000000000..0d0a49346512 --- /dev/null +++ b/addons/actions/src/lib/types/function/__tests__/index.js @@ -0,0 +1,37 @@ +import functionType from '../'; +import createFunction from '../createFunction'; +import createBoundFunction from '../createBoundFunction'; + +const A = createFunction('A'); +const B = createBoundFunction('B'); +const C = createFunction(); + +describe('function', () => { + it('Recognizes function', () => { + expect(functionType.is(A)).toBe(true); + }); + + it('Serializes function', () => { + expect(functionType.serialize(A)).toEqual({ [functionType.KEY]: 'A' }); + }); + + it('Serializes anonymous function', () => { + expect(functionType.serialize(C)).toEqual({ [functionType.KEY]: '' }); + }); + + it('Serializes bound function', () => { + expect(functionType.serialize(B)).toEqual({ [functionType.KEY]: 'bound B' }); + }); + + it('Deserializes function', () => { + const func = functionType.deserialize({ [functionType.KEY]: 'A' }); + + expect(func.name).toEqual('A'); + }); + + it('Deserializes bound function', () => { + const func = functionType.deserialize({ [functionType.KEY]: 'bound B' }); + + expect(func.name).toEqual('bound B'); + }); +}); diff --git a/addons/actions/src/lib/types/function/createBoundFunction.js b/addons/actions/src/lib/types/function/createBoundFunction.js new file mode 100644 index 000000000000..36dbaf7035f4 --- /dev/null +++ b/addons/actions/src/lib/types/function/createBoundFunction.js @@ -0,0 +1,5 @@ +import createFunction from './createFunction'; + +export default function createBoundFunction(name) { + return createFunction(name).bind({}); +} diff --git a/addons/actions/src/lib/types/function/createFunction.js b/addons/actions/src/lib/types/function/createFunction.js new file mode 100644 index 000000000000..9b84b690a9ba --- /dev/null +++ b/addons/actions/src/lib/types/function/createFunction.js @@ -0,0 +1,4 @@ +/* eslint-disable no-new-func */ +export default function createFunction(name = '') { + return new Function(`return function ${name}() {}`)(); +} diff --git a/addons/actions/src/lib/types/function/index.js b/addons/actions/src/lib/types/function/index.js new file mode 100644 index 000000000000..9e9c40ca34d9 --- /dev/null +++ b/addons/actions/src/lib/types/function/index.js @@ -0,0 +1,21 @@ +import createBoundFunction from './createBoundFunction'; +import createFunction from './createFunction'; +import isReserved from './isReserved'; + +const KEY = '$___storybook.functionName'; + +const functionType = { + KEY, + is: value => typeof value === 'function', + serialize: value => + isReserved(value.name) ? { [KEY]: `$${value.name}` } : { [KEY]: value.name || '' }, + deserialize: value => { + const parts = value[KEY].split(' '); + + return parts.length === 2 && parts[0] === 'bound' + ? createBoundFunction(parts[1]) + : createFunction(parts[0]); + }, +}; + +export default functionType; diff --git a/addons/actions/src/lib/types/function/isReserved.js b/addons/actions/src/lib/types/function/isReserved.js new file mode 100644 index 000000000000..53bfc64e1360 --- /dev/null +++ b/addons/actions/src/lib/types/function/isReserved.js @@ -0,0 +1,3 @@ +export default function isReserved(name) { + return ['delete'].indexOf(name) >= 0; +} diff --git a/addons/actions/src/lib/types/index.js b/addons/actions/src/lib/types/index.js new file mode 100644 index 000000000000..88dbd5677089 --- /dev/null +++ b/addons/actions/src/lib/types/index.js @@ -0,0 +1,27 @@ +import classType from './class'; +import dateType from './date'; +import functionType from './function'; +import infinityType from './infinity'; +import nanType from './nan'; +import regexpType from './regexp'; +import symbolType from './symbol'; +import undefinedType from './undefined'; + +export { classType }; +export { dateType }; +export { functionType }; +export { infinityType }; +export { nanType }; +export { regexpType }; +export { symbolType }; +export { undefinedType }; + +export const types = [ + dateType, + functionType, + nanType, + infinityType, + regexpType, + symbolType, + undefinedType, +]; diff --git a/addons/actions/src/lib/types/infinity/__tests__/index.js b/addons/actions/src/lib/types/infinity/__tests__/index.js new file mode 100644 index 000000000000..926d8b78466f --- /dev/null +++ b/addons/actions/src/lib/types/infinity/__tests__/index.js @@ -0,0 +1,29 @@ +import infinityType from '../'; + +describe('Infinity', () => { + it('Recognizes Infinity', () => { + expect(infinityType.is(Infinity)).toBe(true); + expect(infinityType.is(1)).toBe(false); + }); + + it('Recognizes -Infinity', () => { + expect(infinityType.is(-Infinity)).toBe(true); + expect(infinityType.is(-1)).toBe(false); + }); + + it('Serializes Infinity', () => { + expect(infinityType.serialize(Infinity)).toEqual({ [infinityType.KEY]: true }); + }); + + it('Serializes -Infinity', () => { + expect(infinityType.serialize(-Infinity)).toEqual({ [infinityType.KEY]: false }); + }); + + it('Deserializes Infinity', () => { + expect(infinityType.deserialize({ [infinityType.KEY]: true })).toEqual(Infinity); + }); + + it('Deserializes -Infinity', () => { + expect(infinityType.deserialize({ [infinityType.KEY]: false })).toEqual(-Infinity); + }); +}); diff --git a/addons/actions/src/lib/types/infinity/index.js b/addons/actions/src/lib/types/infinity/index.js new file mode 100644 index 000000000000..30a02d26142e --- /dev/null +++ b/addons/actions/src/lib/types/infinity/index.js @@ -0,0 +1,10 @@ +const KEY = '$___storybook.Infinity'; + +const InfinityType = { + KEY, + is: value => typeof value === 'number' && !Number.isFinite(value), + serialize: value => ({ [KEY]: value === Infinity }), + deserialize: value => (value[KEY] ? Infinity : -Infinity), +}; + +export default InfinityType; diff --git a/addons/actions/src/lib/types/nan/__tests__/index.js b/addons/actions/src/lib/types/nan/__tests__/index.js new file mode 100644 index 000000000000..7a2e4a5b77f8 --- /dev/null +++ b/addons/actions/src/lib/types/nan/__tests__/index.js @@ -0,0 +1,16 @@ +import nanType from '../'; + +describe('NaN', () => { + it('Recognizes NaN', () => { + expect(nanType.is(NaN)).toBe(true); + expect(nanType.is(1)).toBe(false); + }); + + it('Serializes NaN', () => { + expect(nanType.serialize(NaN)).toEqual({ [nanType.KEY]: true }); + }); + + it('Deserializes NaN', () => { + expect(nanType.deserialize({ [nanType.KEY]: true })).toEqual(NaN); + }); +}); diff --git a/addons/actions/src/lib/types/nan/index.js b/addons/actions/src/lib/types/nan/index.js new file mode 100644 index 000000000000..a7e54b36ae74 --- /dev/null +++ b/addons/actions/src/lib/types/nan/index.js @@ -0,0 +1,9 @@ +const KEY = '$___storybook.NaN'; +const NaNType = { + KEY, + is: value => typeof value === 'number' && Number.isNaN(value), + serialize: () => ({ [KEY]: true }), + deserialize: () => NaN, +}; + +export default NaNType; diff --git a/addons/actions/src/lib/types/regexp/__tests__/index.js b/addons/actions/src/lib/types/regexp/__tests__/index.js new file mode 100644 index 000000000000..f00cb58e82a6 --- /dev/null +++ b/addons/actions/src/lib/types/regexp/__tests__/index.js @@ -0,0 +1,18 @@ +import regExpType from '../'; + +const regExp = /aRegExp/g; + +describe('RegExp', () => { + it('Recognizes RegExp', () => { + expect(regExpType.is(regExp)).toBe(true); + expect(regExpType.is(1)).toBe(false); + }); + + it('Serializes RegExp', () => { + expect(regExpType.serialize(regExp)).toEqual({ [regExpType.KEY]: '/aRegExp/g' }); + }); + + it('Deserializes RegExp', () => { + expect(regExpType.deserialize({ [regExpType.KEY]: '/aRegExp/g' })).toEqual(regExp); + }); +}); diff --git a/addons/actions/src/lib/types/regexp/createRegExp.js b/addons/actions/src/lib/types/regexp/createRegExp.js new file mode 100644 index 000000000000..d4e5b94fd3bc --- /dev/null +++ b/addons/actions/src/lib/types/regexp/createRegExp.js @@ -0,0 +1,5 @@ +export default function createRegExp(regExp) { + const parts = regExp.split('/'); + + return new RegExp(parts[1], parts[2]); +} diff --git a/addons/actions/src/lib/types/regexp/index.js b/addons/actions/src/lib/types/regexp/index.js new file mode 100644 index 000000000000..3c0107fd7ec4 --- /dev/null +++ b/addons/actions/src/lib/types/regexp/index.js @@ -0,0 +1,12 @@ +import createRegExp from './createRegExp'; + +const KEY = '$___storybook.regExpKey'; + +const regExpType = { + KEY, + is: value => value instanceof RegExp, + serialize: value => ({ [KEY]: value.toString() }), + deserialize: value => createRegExp(value[KEY]), +}; + +export default regExpType; diff --git a/addons/actions/src/lib/types/symbol/__tests__/index.js b/addons/actions/src/lib/types/symbol/__tests__/index.js new file mode 100644 index 000000000000..6b23044ba591 --- /dev/null +++ b/addons/actions/src/lib/types/symbol/__tests__/index.js @@ -0,0 +1,18 @@ +import symbolType from '../'; + +const symbol = Symbol('S'); + +describe('Symbol', () => { + it('Recognizes Symbol', () => { + expect(symbolType.is(symbol)).toBe(true); + expect(symbolType.is(1)).toBe(false); + }); + + it('Serializes Symbol', () => { + expect(symbolType.serialize(symbol)).toEqual({ [symbolType.KEY]: 'S' }); + }); + + it('Deserializes Symbol', () => { + expect(symbolType.deserialize({ [symbolType.KEY]: 'S' }).toString()).toEqual(symbol.toString()); + }); +}); diff --git a/addons/actions/src/lib/types/symbol/createSymbol.js b/addons/actions/src/lib/types/symbol/createSymbol.js new file mode 100644 index 000000000000..6ffcb754c1e1 --- /dev/null +++ b/addons/actions/src/lib/types/symbol/createSymbol.js @@ -0,0 +1,3 @@ +export default function createSymbol(name) { + return Symbol(name); +} diff --git a/addons/actions/src/lib/types/symbol/index.js b/addons/actions/src/lib/types/symbol/index.js new file mode 100644 index 000000000000..9d62469b1639 --- /dev/null +++ b/addons/actions/src/lib/types/symbol/index.js @@ -0,0 +1,12 @@ +import createSymbol from './createSymbol'; + +const KEY = '$___storybook.symbolName'; + +const symbolType = { + KEY, + is: value => typeof value === 'symbol', + serialize: value => ({ [KEY]: String(value).slice(7, -1) || null }), + deserialize: value => createSymbol(value[KEY]), +}; + +export default symbolType; diff --git a/addons/actions/src/lib/types/undefined/__tests__/index.js b/addons/actions/src/lib/types/undefined/__tests__/index.js new file mode 100644 index 000000000000..b144f47f1035 --- /dev/null +++ b/addons/actions/src/lib/types/undefined/__tests__/index.js @@ -0,0 +1,16 @@ +import undefinedType from '../'; + +describe('undefined', () => { + it('Recognizes undefined', () => { + expect(undefinedType.is(undefined)).toBe(true); + expect(undefinedType.is(1)).toBe(false); + }); + + it('Serializes undefined', () => { + expect(undefinedType.serialize(undefined)).toEqual({ [undefinedType.KEY]: true }); + }); + + it('Deserializes undefined', () => { + expect(undefinedType.deserialize({ [undefinedType.KEY]: true })).toEqual(undefined); + }); +}); diff --git a/addons/actions/src/lib/types/undefined/index.js b/addons/actions/src/lib/types/undefined/index.js new file mode 100644 index 000000000000..d1a580345f17 --- /dev/null +++ b/addons/actions/src/lib/types/undefined/index.js @@ -0,0 +1,10 @@ +const KEY = '$___storybook.undefined'; + +const undefinedType = { + KEY, + is: value => value === undefined, + serialize: () => ({ [KEY]: true }), + deserialize: () => undefined, +}; + +export default undefinedType; diff --git a/addons/actions/src/lib/util/__tests__/getPropertiesList.test.js b/addons/actions/src/lib/util/__tests__/getPropertiesList.test.js new file mode 100644 index 000000000000..6f32c0075343 --- /dev/null +++ b/addons/actions/src/lib/util/__tests__/getPropertiesList.test.js @@ -0,0 +1,62 @@ +/* global File */ +import getPropertiesList from '../getPropertiesList'; + +describe('getPropertiesList', () => { + it('for plain object', () => { + expect(getPropertiesList({ a: 'A', b: 'B' })).toEqual(['a', 'b']); + }); + + it('for Math object', () => { + expect(getPropertiesList(Math)).toEqual([ + 'abs', + 'acos', + 'acosh', + 'asin', + 'asinh', + 'atan', + 'atanh', + 'atan2', + 'ceil', + 'cbrt', + 'expm1', + 'clz32', + 'cos', + 'cosh', + 'exp', + 'floor', + 'fround', + 'hypot', + 'imul', + 'log', + 'log1p', + 'log2', + 'log10', + 'max', + 'min', + 'pow', + 'random', + 'round', + 'sign', + 'sin', + 'sinh', + 'sqrt', + 'tan', + 'tanh', + 'trunc', + 'E', + 'LN10', + 'LN2', + 'LOG10E', + 'LOG2E', + 'PI', + 'SQRT1_2', + 'SQRT2', + ]); + }); + + it('for File object', () => { + const file = new File([''], 'filename.txt', { type: 'text/plain', lastModified: new Date() }); + + expect(getPropertiesList(file)).toEqual(['name', 'lastModified', 'size', 'type', 'isClosed']); + }); +}); diff --git a/addons/actions/src/lib/util/__tests__/muteProperty.test.js b/addons/actions/src/lib/util/__tests__/muteProperty.test.js new file mode 100644 index 000000000000..4506a79ae206 --- /dev/null +++ b/addons/actions/src/lib/util/__tests__/muteProperty.test.js @@ -0,0 +1,7 @@ +import muteProperty from '../muteProperty'; + +describe('muteProperty', () => { + it('mutes property', () => { + expect(Object.keys(muteProperty('key', { key: 1 }))).toEqual([]); + }); +}); diff --git a/addons/actions/src/lib/util/__tests__/typeReplacer.test.js b/addons/actions/src/lib/util/__tests__/typeReplacer.test.js new file mode 100644 index 000000000000..a5a85cd81a2a --- /dev/null +++ b/addons/actions/src/lib/util/__tests__/typeReplacer.test.js @@ -0,0 +1,53 @@ +import typeReplacer from '../typeReplacer'; +import { + dateType, + functionType, + infinityType, + nanType, + regexpType, + symbolType, + undefinedType, +} from '../../types'; + +function A() {} + +const date = '2017-12-02T11:13:22.492Z'; + +describe('typeReplacer', () => { + it('Replaces Date', () => { + expect(typeReplacer(new Date(date))).toEqual({ + value: { [dateType.KEY]: date }, + }); + }); + + it('Replaces Function', () => { + expect(typeReplacer(A)).toEqual({ + value: { [functionType.KEY]: 'A' }, + }); + }); + it('Replaces Infinity', () => { + expect(typeReplacer(Infinity)).toEqual({ + value: { [infinityType.KEY]: true }, + }); + }); + it('Replaces NaN', () => { + expect(typeReplacer(NaN)).toEqual({ + value: { [nanType.KEY]: true }, + }); + }); + it('Replaces Symbol', () => { + expect(typeReplacer(Symbol('A'))).toEqual({ + value: { [symbolType.KEY]: 'A' }, + }); + }); + it('Replaces undefined', () => { + expect(typeReplacer(undefined)).toEqual({ + value: { [undefinedType.KEY]: true }, + }); + }); + it('Replaces RegExp', () => { + expect(typeReplacer(/works/g)).toEqual({ + value: { [regexpType.KEY]: '/works/g' }, + }); + }); +}); diff --git a/addons/actions/src/lib/util/__tests__/typeReviver.test.js b/addons/actions/src/lib/util/__tests__/typeReviver.test.js new file mode 100644 index 000000000000..02f2a3dcd255 --- /dev/null +++ b/addons/actions/src/lib/util/__tests__/typeReviver.test.js @@ -0,0 +1,52 @@ +import typeReviver from '../typeReviver'; +import { + classType, + dateType, + functionType, + infinityType, + nanType, + regexpType, + symbolType, + undefinedType, +} from '../../types'; + +const date = '2017-12-02T11:13:22.492Z'; + +describe('typeReviver', () => { + it('Revives className', () => { + expect(typeReviver({ [classType.KEY]: 'C' }).value.constructor.name).toEqual('C'); + }); + it('Revives Date', () => { + expect(typeReviver({ [dateType.KEY]: date })).toEqual({ + value: new Date(date), + }); + }); + + it('Revives Function', () => { + expect(typeReviver({ [functionType.KEY]: 'A' }).value.name).toEqual('A'); + }); + + it('Revives Infinity', () => { + expect(typeReviver({ [infinityType.KEY]: true })).toEqual({ value: Infinity }); + }); + + it('Revives -Infinity', () => { + expect(typeReviver({ [infinityType.KEY]: false })).toEqual({ value: -Infinity }); + }); + + it('Revives NaN', () => { + expect(typeReviver({ [nanType.KEY]: true })).toEqual({ value: NaN }); + }); + + it('Revives Symbol', () => { + expect(typeReviver({ [symbolType.KEY]: 'A' }).value.toString()).toEqual(Symbol('A').toString()); + }); + + it('Revives undefined', () => { + expect(typeReviver({ [undefinedType.KEY]: true })).toEqual({ value: undefined }); + }); + + it('Revives RegExp', () => { + expect(typeReviver({ [regexpType.KEY]: '/works/g' })).toEqual({ value: /works/g }); + }); +}); diff --git a/addons/actions/src/lib/util/getPropertiesList.js b/addons/actions/src/lib/util/getPropertiesList.js new file mode 100644 index 000000000000..9c2c41ef2cb4 --- /dev/null +++ b/addons/actions/src/lib/util/getPropertiesList.js @@ -0,0 +1,17 @@ +const { hasOwnProperty } = Object.prototype; + +export default function getPropertiesList(value) { + const keys = Object.getOwnPropertyNames(value); + + // eslint-disable-next-line no-restricted-syntax + for (const name in value) { + if ( + keys.indexOf(name) === -1 && + !(typeof value[name] === 'function' && !hasOwnProperty.call(value, name)) + ) { + keys.push(name); + } + } + + return keys; +} diff --git a/addons/actions/src/lib/util/index.js b/addons/actions/src/lib/util/index.js new file mode 100644 index 000000000000..ef3c572e7c8a --- /dev/null +++ b/addons/actions/src/lib/util/index.js @@ -0,0 +1,5 @@ +export getPropertiesList from './getPropertiesList.js'; +export isObject from './isObject.js'; +export muteProperty from './muteProperty.js'; +export typeReviver from './typeReviver.js'; +export typeReplacer from './typeReplacer.js'; diff --git a/addons/actions/src/lib/util/isObject.js b/addons/actions/src/lib/util/isObject.js new file mode 100644 index 000000000000..1b34a74785da --- /dev/null +++ b/addons/actions/src/lib/util/isObject.js @@ -0,0 +1,5 @@ +const { toString } = Object.prototype; + +export default function isObject(value) { + return toString.call(value) === '[object Object]'; +} diff --git a/addons/actions/src/lib/util/muteProperty.js b/addons/actions/src/lib/util/muteProperty.js new file mode 100644 index 000000000000..7d504520ddce --- /dev/null +++ b/addons/actions/src/lib/util/muteProperty.js @@ -0,0 +1,3 @@ +export default function muteProperty(key, value) { + return Object.defineProperty(value, key, { enumerable: false }); +} diff --git a/addons/actions/src/lib/util/typeReplacer.js b/addons/actions/src/lib/util/typeReplacer.js new file mode 100644 index 000000000000..89f797bef876 --- /dev/null +++ b/addons/actions/src/lib/util/typeReplacer.js @@ -0,0 +1,15 @@ +import { types } from '../types'; + +function typeReplacer(value) { + const found = types.find(type => type.is(value)); + + if (found) { + return { + value: found.serialize(value), + }; + } + + return false; +} + +export default typeReplacer; diff --git a/addons/actions/src/lib/util/typeReviver.js b/addons/actions/src/lib/util/typeReviver.js new file mode 100644 index 000000000000..4f67c683cb10 --- /dev/null +++ b/addons/actions/src/lib/util/typeReviver.js @@ -0,0 +1,19 @@ +import { types, classType } from '../types'; + +const { hasOwnProperty } = Object.prototype; + +const allTypes = types.concat(classType); + +function typeFilter(value) { + const found = allTypes.find(type => hasOwnProperty.call(value, type.KEY)); + + if (found) { + return { + value: found.deserialize(value), + }; + } + + return false; +} + +export default typeFilter; diff --git a/addons/actions/src/preview.js b/addons/actions/src/preview.js index 41f033fb3353..8d5407b28b61 100644 --- a/addons/actions/src/preview.js +++ b/addons/actions/src/preview.js @@ -3,7 +3,7 @@ import addons from '@storybook/addons'; import uuid from 'uuid/v1'; import { EVENT_ID } from './'; -import { decycle } from './util'; +import { decycle } from './lib'; export function action(name) { // eslint-disable-next-line no-shadow diff --git a/addons/actions/src/preview.test.js b/addons/actions/src/preview.test.js index 665c655a5368..a99d88992be0 100644 --- a/addons/actions/src/preview.test.js +++ b/addons/actions/src/preview.test.js @@ -1,6 +1,7 @@ import addons from '@storybook/addons'; import uuid from 'uuid/v1'; import { action } from './preview'; +import { undefinedType, symbolType } from './lib/types'; jest.mock('uuid/v1'); jest.mock('@storybook/addons'); @@ -35,5 +36,72 @@ describe('preview', () => { expect(() => JSON.stringify(cyclicObject)).toThrow(); expect(() => action('foo')(cyclicObject)).not.toThrow(); }); + + it('should be able to handle non plain object', () => { + function A(val) { + this.a = val; + } + + const a = new A('b'); + + const channel = { emit: jest.fn() }; + addons.getChannel.mockReturnValue(channel); + + action('foo')(a); + + expect(JSON.parse(channel.emit.mock.calls[0][1].data.args[0])).toEqual({ + '$___storybook.className': 'A', + a: 'b', + }); + }); + + it('should be able to handle non plain cyclic object', () => { + function A() {} + const a = new A(); + a.a = a; + + const channel = { emit: jest.fn() }; + addons.getChannel.mockReturnValue(channel); + + action('foo')(a); + + expect(JSON.parse(channel.emit.mock.calls[0][1].data.args[0])).toEqual({ + '$___storybook.className': 'A', + '$___storybook.isCyclic': true, + a: { + $ref: '$', + }, + }); + }); + + describe('should be able to emit primitive value type:', () => { + [true, false, null, 10, 'a'].forEach(value => { + it(`${typeof value} value ${JSON.stringify(value)}`, () => { + const channel = { emit: jest.fn() }; + addons.getChannel.mockReturnValue(channel); + + action('foo')(value); + + expect(JSON.parse(channel.emit.mock.calls[0][1].data.args[0])).toBe(value); + }); + }); + + it('undefined', () => { + const channel = { emit: jest.fn() }; + addons.getChannel.mockReturnValue(channel); + + action('foo')(undefined); + + expect(JSON.parse(channel.emit.mock.calls[0][1].data.args[0])).toEqual({ + [undefinedType.KEY]: true, + }); + + action('foo')(Symbol('A Symbol')); + + expect(JSON.parse(channel.emit.mock.calls[1][1].data.args[0])).toEqual({ + [symbolType.KEY]: 'A Symbol', + }); + }); + }); }); }); diff --git a/addons/actions/src/util.js b/addons/actions/src/util.js deleted file mode 100644 index b3cac28e2506..000000000000 --- a/addons/actions/src/util.js +++ /dev/null @@ -1,132 +0,0 @@ -export const CLASS_NAME_KEY = '$___storybook.className'; -export const CYCLIC_KEY = '$___storybook.isCyclic'; - -export function muteProperty(key, value) { - return Object.defineProperty(value, key, { enumerable: false }); -} - -export function isObject(value) { - return Object.prototype.toString.call(value) === '[object Object]'; -} - -export function createFakeConstructor(obj) { - function FakeConstructor(data) { - Object.assign(this, data); - } - - Object.defineProperty(FakeConstructor, 'name', { - value: obj[CLASS_NAME_KEY], - }); - - delete obj[CLASS_NAME_KEY]; // eslint-disable-line no-param-reassign - - return new FakeConstructor(obj); -} - -export function reviver(key, value) { - if (isObject(value) && value[CLASS_NAME_KEY]) { - return createFakeConstructor(value); - } - - return value; -} - -// Based on: https://github.com/douglascrockford/JSON-js/blob/master/cycle.js -export function decycle(object, depth = 15) { - const objects = new WeakMap(); - let isCyclic = false; - - return (function derez(value, path, _depth) { - let oldPath; - let obj; - - if (Object(value) === value && _depth > depth) { - return `[${value.constructor.name}...]`; - } - - if ( - typeof value === 'object' && - value !== null && - !(value instanceof Boolean) && - !(value instanceof Date) && - !(value instanceof Number) && - !(value instanceof RegExp) && - !(value instanceof String) - ) { - oldPath = objects.get(value); - if (oldPath !== undefined) { - isCyclic = true; - - return { $ref: oldPath }; - } - - objects.set(value, path); - - if (Array.isArray(value)) { - obj = []; - for (let i = 0; i < value.length; i += 1) { - obj[i] = derez(value[i], `${path}[${i}]`, _depth + 1); - } - } else { - obj = { [CLASS_NAME_KEY]: value.constructor ? value.constructor.name : 'Object' }; - - // We want to iterate over all the enumerable properties, including the ones in prototype chain - // eslint-disable-next-line no-restricted-syntax, guard-for-in - for (const name in value) { - // noinspection JSUnfilteredForInLoop - obj[name] = derez(value[name], `${path}[${JSON.stringify(name)}]`, _depth + 1); - } - } - - if (_depth === 0 && isObject(value) && isCyclic) { - obj[CYCLIC_KEY] = true; - } - - return obj; - } - - return value; - })(object, '$', 0); -} - -export function retrocycle(json) { - const pathReg = /^\$(?:\[(?:\d+|"(?:[^\\"\u0000-\u001f]|\\([\\"/bfnrt]|u[0-9a-zA-Z]{4}))*")])*$/; - - const $ = JSON.parse(json, reviver); - - (function rez(value) { - if (value && typeof value === 'object') { - if (Array.isArray(value)) { - for (let i = 0; i < value.length; i += 1) { - const item = value[i]; - if (item && typeof item === 'object') { - const path = item.$ref; - if (typeof path === 'string' && pathReg.test(path)) { - value[i] = eval(path); // eslint-disable-line no-eval, no-param-reassign - } else { - rez(item); - } - } - } - } else { - Object.keys(value).forEach(name => { - const item = value[name]; - - if (typeof item === 'object' && item !== null) { - const path = item.$ref; - - if (typeof path === 'string' && pathReg.test(path)) { - value[name] = eval(path); // eslint-disable-line no-eval, no-param-reassign - } else { - rez(item); - } - } - }); - } - } - })($); - - muteProperty(CYCLIC_KEY, $); - - return $; -} From 611a02187d49e283846868e6cbef1876557a70c2 Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Tue, 5 Dec 2017 15:15:17 +0000 Subject: [PATCH 003/162] add global dependency --- addons/actions/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/actions/package.json b/addons/actions/package.json index a01ea3f71eb0..2771a3fee0e2 100644 --- a/addons/actions/package.json +++ b/addons/actions/package.json @@ -20,6 +20,7 @@ }, "dependencies": { "deep-equal": "^1.0.1", + "global": "^4.3.2", "prop-types": "^15.6.0", "react-inspector": "^2.2.1", "uuid": "^3.1.0" From af94539813d99bd42012d37b457789fbfc6d1d75 Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Tue, 5 Dec 2017 15:16:58 +0000 Subject: [PATCH 004/162] add buttons to test each type individually --- .../addon-actions.stories.storyshot | 119 ++++++++++++++++++ .../src/stories/addon-actions.stories.js | 51 ++++++++ 2 files changed, 170 insertions(+) diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot index 10772f38a115..cd4d252393cd 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot @@ -1,5 +1,124 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Storyshots Addon Actions All types 1`] = ` +
+ + + + + + + + + + + + + + + + + + + +
+`; + exports[`Storyshots Addon Actions Circular Payload 1`] = ` ; + }) + .add('All types', () => { + function A() {} + function B() {} + + const bound = B.bind({}); + const file = new File([''], 'filename.txt', { type: 'text/plain', lastModified: new Date() }); + const reg = /Whatever/g; + + return ( +
+ {setOptions({ selectedAddonPanel: 'storybook/actions/actions-panel' })} + + + + + + + + + + + + + + + + + + + +
+ ); }); From 440b333f01a6860d9e7f28ba659d1c6c43b318e5 Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Tue, 5 Dec 2017 15:33:24 +0000 Subject: [PATCH 005/162] moved to All types --- .../cra-kitchen-sink/src/stories/addon-actions.stories.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js b/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js index e37328acd378..1bb66f4ea367 100644 --- a/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js +++ b/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js @@ -21,10 +21,6 @@ storiesOf('Addon Actions', module) return ; }) .add('Reserved keyword as name', () => ) - .add('File object as payload', () => { - const file = new File([''], 'filename.txt', { type: 'text/plain', lastModified: new Date() }); - return ; - }) .add('All types', () => { function A() {} function B() {} From 1c3ed2d3583212c1d9b0dd9f9d6a1ce20ced1ab4 Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Tue, 5 Dec 2017 22:51:48 +0000 Subject: [PATCH 006/162] separate tests --- addons/actions/src/preview.test.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/addons/actions/src/preview.test.js b/addons/actions/src/preview.test.js index a99d88992be0..1b49a697e808 100644 --- a/addons/actions/src/preview.test.js +++ b/addons/actions/src/preview.test.js @@ -86,7 +86,7 @@ describe('preview', () => { }); }); - it('undefined', () => { + it('undefined value', () => { const channel = { emit: jest.fn() }; addons.getChannel.mockReturnValue(channel); @@ -95,10 +95,15 @@ describe('preview', () => { expect(JSON.parse(channel.emit.mock.calls[0][1].data.args[0])).toEqual({ [undefinedType.KEY]: true, }); + }); + + it('symbol value', () => { + const channel = { emit: jest.fn() }; + addons.getChannel.mockReturnValue(channel); action('foo')(Symbol('A Symbol')); - expect(JSON.parse(channel.emit.mock.calls[1][1].data.args[0])).toEqual({ + expect(JSON.parse(channel.emit.mock.calls[0][1].data.args[0])).toEqual({ [symbolType.KEY]: 'A Symbol', }); }); From a39858318c2ac81cbf76ea48c01d7526e1040e24 Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Wed, 6 Dec 2017 13:15:49 +0000 Subject: [PATCH 007/162] import from global instead of using eslint --- addons/actions/src/lib/util/__tests__/getPropertiesList.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/actions/src/lib/util/__tests__/getPropertiesList.test.js b/addons/actions/src/lib/util/__tests__/getPropertiesList.test.js index 6f32c0075343..3bdd4acf31d5 100644 --- a/addons/actions/src/lib/util/__tests__/getPropertiesList.test.js +++ b/addons/actions/src/lib/util/__tests__/getPropertiesList.test.js @@ -1,4 +1,4 @@ -/* global File */ +import { File, Math } from 'global'; import getPropertiesList from '../getPropertiesList'; describe('getPropertiesList', () => { From 9bda5ab4935a3395b5de93430b1506a8aee6fd8e Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Thu, 7 Dec 2017 11:09:34 +0000 Subject: [PATCH 008/162] do not list non-enumerable properties --- addons/actions/src/lib/decycle.js | 7 ++- .../util/__tests__/getPropertiesList.test.js | 62 ------------------- .../actions/src/lib/util/getPropertiesList.js | 17 ----- addons/actions/src/lib/util/index.js | 1 - .../src/stories/addon-actions.stories.js | 1 - 5 files changed, 4 insertions(+), 84 deletions(-) delete mode 100644 addons/actions/src/lib/util/__tests__/getPropertiesList.test.js delete mode 100644 addons/actions/src/lib/util/getPropertiesList.js diff --git a/addons/actions/src/lib/decycle.js b/addons/actions/src/lib/decycle.js index 481a43c6a22f..605af56f50ca 100644 --- a/addons/actions/src/lib/decycle.js +++ b/addons/actions/src/lib/decycle.js @@ -1,4 +1,4 @@ -import { getPropertiesList, typeReplacer } from './util'; +import { typeReplacer } from './util'; import { CYCLIC_KEY } from './'; @@ -48,9 +48,10 @@ export default function decycle(object, depth = 10) { } else { obj = classType.serialize(value); - getPropertiesList(value).forEach(name => { + // eslint-disable-next-line guard-for-in, no-restricted-syntax + for (const name in value) { obj[name] = derez(value[name], `${path}[${JSON.stringify(name)}]`, _depth + 1); - }); + } } if (_depth === 0 && value instanceof Object && isCyclic) { diff --git a/addons/actions/src/lib/util/__tests__/getPropertiesList.test.js b/addons/actions/src/lib/util/__tests__/getPropertiesList.test.js deleted file mode 100644 index 3bdd4acf31d5..000000000000 --- a/addons/actions/src/lib/util/__tests__/getPropertiesList.test.js +++ /dev/null @@ -1,62 +0,0 @@ -import { File, Math } from 'global'; -import getPropertiesList from '../getPropertiesList'; - -describe('getPropertiesList', () => { - it('for plain object', () => { - expect(getPropertiesList({ a: 'A', b: 'B' })).toEqual(['a', 'b']); - }); - - it('for Math object', () => { - expect(getPropertiesList(Math)).toEqual([ - 'abs', - 'acos', - 'acosh', - 'asin', - 'asinh', - 'atan', - 'atanh', - 'atan2', - 'ceil', - 'cbrt', - 'expm1', - 'clz32', - 'cos', - 'cosh', - 'exp', - 'floor', - 'fround', - 'hypot', - 'imul', - 'log', - 'log1p', - 'log2', - 'log10', - 'max', - 'min', - 'pow', - 'random', - 'round', - 'sign', - 'sin', - 'sinh', - 'sqrt', - 'tan', - 'tanh', - 'trunc', - 'E', - 'LN10', - 'LN2', - 'LOG10E', - 'LOG2E', - 'PI', - 'SQRT1_2', - 'SQRT2', - ]); - }); - - it('for File object', () => { - const file = new File([''], 'filename.txt', { type: 'text/plain', lastModified: new Date() }); - - expect(getPropertiesList(file)).toEqual(['name', 'lastModified', 'size', 'type', 'isClosed']); - }); -}); diff --git a/addons/actions/src/lib/util/getPropertiesList.js b/addons/actions/src/lib/util/getPropertiesList.js deleted file mode 100644 index 9c2c41ef2cb4..000000000000 --- a/addons/actions/src/lib/util/getPropertiesList.js +++ /dev/null @@ -1,17 +0,0 @@ -const { hasOwnProperty } = Object.prototype; - -export default function getPropertiesList(value) { - const keys = Object.getOwnPropertyNames(value); - - // eslint-disable-next-line no-restricted-syntax - for (const name in value) { - if ( - keys.indexOf(name) === -1 && - !(typeof value[name] === 'function' && !hasOwnProperty.call(value, name)) - ) { - keys.push(name); - } - } - - return keys; -} diff --git a/addons/actions/src/lib/util/index.js b/addons/actions/src/lib/util/index.js index ef3c572e7c8a..8974fde2f1ac 100644 --- a/addons/actions/src/lib/util/index.js +++ b/addons/actions/src/lib/util/index.js @@ -1,4 +1,3 @@ -export getPropertiesList from './getPropertiesList.js'; export isObject from './isObject.js'; export muteProperty from './muteProperty.js'; export typeReviver from './typeReviver.js'; diff --git a/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js b/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js index 1bb66f4ea367..75161a6a0096 100644 --- a/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js +++ b/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js @@ -43,7 +43,6 @@ storiesOf('Addon Actions', module) - + - - + + @@ -45,24 +45,24 @@ storiesOf('Addon Actions', module) - + - + From 4279540a262059e11ba37a57eea578a17e4055b2 Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Thu, 7 Dec 2017 13:45:45 +0000 Subject: [PATCH 012/162] include direct action call in examples --- examples/cra-kitchen-sink/src/stories/addon-actions.stories.js | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js b/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js index a62fe3e1c85b..c7709ac8e6fd 100644 --- a/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js +++ b/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js @@ -64,6 +64,7 @@ storiesOf('Addon Actions', module) + From 84f3343bc06c7611a5e760b1b44233da5431b984 Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Thu, 7 Dec 2017 17:05:43 +0000 Subject: [PATCH 013/162] prefer configure to eval --- .../function/__tests__/createFunction.test.js | 10 ++++++ .../__tests__/createFunctionEval.test.js | 10 ++++++ .../src/lib/types/function/__tests__/index.js | 9 +++++ .../src/lib/types/function/createFunction.js | 14 ++++++-- .../lib/types/function/createFunctionEval.js | 8 +++++ .../actions/src/lib/types/function/index.js | 4 +-- .../src/lib/types/function/isReserved.js | 4 ++- .../lib/types/function/reservedKeywords.js | 36 +++++++++++++++++++ .../actions/src/lib/util/canConfigureName.js | 7 ++++ addons/actions/src/lib/util/index.js | 1 + addons/actions/src/preview.js | 4 +-- 11 files changed, 98 insertions(+), 9 deletions(-) create mode 100644 addons/actions/src/lib/types/function/__tests__/createFunction.test.js create mode 100644 addons/actions/src/lib/types/function/__tests__/createFunctionEval.test.js create mode 100644 addons/actions/src/lib/types/function/createFunctionEval.js create mode 100644 addons/actions/src/lib/types/function/reservedKeywords.js create mode 100644 addons/actions/src/lib/util/canConfigureName.js diff --git a/addons/actions/src/lib/types/function/__tests__/createFunction.test.js b/addons/actions/src/lib/types/function/__tests__/createFunction.test.js new file mode 100644 index 000000000000..ceb6250de775 --- /dev/null +++ b/addons/actions/src/lib/types/function/__tests__/createFunction.test.js @@ -0,0 +1,10 @@ +import createFunction from '../createFunction'; +import reservedKeywords from '../reservedKeywords'; + +describe('createFunction', () => { + it('Can create functions with reserved names', () => { + reservedKeywords.forEach(reservedKeyword => { + expect(createFunction(reservedKeyword).name).toBe(`${reservedKeyword}`); + }); + }); +}); diff --git a/addons/actions/src/lib/types/function/__tests__/createFunctionEval.test.js b/addons/actions/src/lib/types/function/__tests__/createFunctionEval.test.js new file mode 100644 index 000000000000..273f9bf97d39 --- /dev/null +++ b/addons/actions/src/lib/types/function/__tests__/createFunctionEval.test.js @@ -0,0 +1,10 @@ +import createFunctionEval from '../createFunctionEval'; +import reservedKeywords from '../reservedKeywords'; + +describe('createFunctionEval', () => { + it('Adds $ suffix for reserved names', () => { + reservedKeywords.forEach(reservedKeyword => { + expect(createFunctionEval(reservedKeyword).name).toBe(`${reservedKeyword}$`); + }); + }); +}); diff --git a/addons/actions/src/lib/types/function/__tests__/index.js b/addons/actions/src/lib/types/function/__tests__/index.js index 0d0a49346512..9e4f0e8b7836 100644 --- a/addons/actions/src/lib/types/function/__tests__/index.js +++ b/addons/actions/src/lib/types/function/__tests__/index.js @@ -1,4 +1,5 @@ import functionType from '../'; +import reservedKeywords from '../reservedKeywords'; import createFunction from '../createFunction'; import createBoundFunction from '../createBoundFunction'; @@ -34,4 +35,12 @@ describe('function', () => { expect(func.name).toEqual('bound B'); }); + + it('Deserializes functions with reserved names', () => { + reservedKeywords.forEach(reservedKeyword => { + const func = functionType.deserialize({ [functionType.KEY]: reservedKeyword }); + + expect(func.name).toEqual(reservedKeyword); + }); + }); }); diff --git a/addons/actions/src/lib/types/function/createFunction.js b/addons/actions/src/lib/types/function/createFunction.js index 9b84b690a9ba..d45671f4d2c1 100644 --- a/addons/actions/src/lib/types/function/createFunction.js +++ b/addons/actions/src/lib/types/function/createFunction.js @@ -1,4 +1,14 @@ -/* eslint-disable no-new-func */ +import canConfigureName from '../../util/canConfigureName'; +import createFunctionEval from './createFunctionEval'; + export default function createFunction(name = '') { - return new Function(`return function ${name}() {}`)(); + if (canConfigureName) { + const func = function unnamed() {}; + + Object.defineProperty(func, 'name', { value: name }); + + return func; + } + + return createFunctionEval(name); } diff --git a/addons/actions/src/lib/types/function/createFunctionEval.js b/addons/actions/src/lib/types/function/createFunctionEval.js new file mode 100644 index 000000000000..1827426d0a29 --- /dev/null +++ b/addons/actions/src/lib/types/function/createFunctionEval.js @@ -0,0 +1,8 @@ +import isReserved from './isReserved'; + +export default function createFunctionEval(name) { + const fnName = isReserved(name) ? `${name}$` : name; + + // eslint-disable-next-line no-new-func + return new Function(`return function ${fnName}() {}`)(); +} diff --git a/addons/actions/src/lib/types/function/index.js b/addons/actions/src/lib/types/function/index.js index 9e9c40ca34d9..b89af3fbca5d 100644 --- a/addons/actions/src/lib/types/function/index.js +++ b/addons/actions/src/lib/types/function/index.js @@ -1,14 +1,12 @@ import createBoundFunction from './createBoundFunction'; import createFunction from './createFunction'; -import isReserved from './isReserved'; const KEY = '$___storybook.functionName'; const functionType = { KEY, is: value => typeof value === 'function', - serialize: value => - isReserved(value.name) ? { [KEY]: `$${value.name}` } : { [KEY]: value.name || '' }, + serialize: value => ({ [KEY]: value.name || '' }), deserialize: value => { const parts = value[KEY].split(' '); diff --git a/addons/actions/src/lib/types/function/isReserved.js b/addons/actions/src/lib/types/function/isReserved.js index 53bfc64e1360..3cb256279f43 100644 --- a/addons/actions/src/lib/types/function/isReserved.js +++ b/addons/actions/src/lib/types/function/isReserved.js @@ -1,3 +1,5 @@ +import reservedKeywords from './reservedKeywords'; + export default function isReserved(name) { - return ['delete'].indexOf(name) >= 0; + return reservedKeywords.indexOf(name) >= 0; } diff --git a/addons/actions/src/lib/types/function/reservedKeywords.js b/addons/actions/src/lib/types/function/reservedKeywords.js new file mode 100644 index 000000000000..9fe1ad79c887 --- /dev/null +++ b/addons/actions/src/lib/types/function/reservedKeywords.js @@ -0,0 +1,36 @@ +const reservedWords = [ + 'break', + 'case', + 'catch', + 'class', + 'continue', + 'debugger', + 'default', + 'delete', + 'do', + 'else', + 'export', + 'extends', + 'finally', + 'for', + 'function', + 'if', + 'import', + 'in', + 'instanceof', + 'new', + 'return', + 'super', + 'switch', + 'this', + 'throw', + 'try', + 'typeof', + 'var', + 'void', + 'while', + 'with', + 'yield', +]; + +export default reservedWords; diff --git a/addons/actions/src/lib/util/canConfigureName.js b/addons/actions/src/lib/util/canConfigureName.js new file mode 100644 index 000000000000..10709a3043cd --- /dev/null +++ b/addons/actions/src/lib/util/canConfigureName.js @@ -0,0 +1,7 @@ +// IE11 may return an undefined descriptor, but it supports Function#name +const func = function unnamed() {}; +const nameDescriptor = Object.getOwnPropertyDescriptor(func, 'name'); +// This condition is true in modern browsers that implement Function#name properly +const canConfigureName = !nameDescriptor || nameDescriptor.configurable; + +export default canConfigureName; diff --git a/addons/actions/src/lib/util/index.js b/addons/actions/src/lib/util/index.js index ef3c572e7c8a..2c1c33077bc0 100644 --- a/addons/actions/src/lib/util/index.js +++ b/addons/actions/src/lib/util/index.js @@ -1,3 +1,4 @@ +export canConfigureName from './canConfigureName.js'; export getPropertiesList from './getPropertiesList.js'; export isObject from './isObject.js'; export muteProperty from './muteProperty.js'; diff --git a/addons/actions/src/preview.js b/addons/actions/src/preview.js index 8d5407b28b61..78fa83e53755 100644 --- a/addons/actions/src/preview.js +++ b/addons/actions/src/preview.js @@ -4,6 +4,7 @@ import addons from '@storybook/addons'; import uuid from 'uuid/v1'; import { EVENT_ID } from './'; import { decycle } from './lib'; +import { canConfigureName } from './lib/util'; export function action(name) { // eslint-disable-next-line no-shadow @@ -17,9 +18,6 @@ export function action(name) { }); }; - // This condition is true in modern browsers that implement Function#name properly - const canConfigureName = Object.getOwnPropertyDescriptor(handler, 'name').configurable; - if (canConfigureName && name && typeof name === 'string') { Object.defineProperty(handler, 'name', { value: name }); } From 442df6ee26d1a7966760462950df0542ee03fc67 Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Thu, 7 Dec 2017 17:06:00 +0000 Subject: [PATCH 014/162] update storyshot --- .../addon-actions.stories.storyshot | 21 ++++++------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot index cd4d252393cd..303816dd67fe 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot @@ -68,12 +68,6 @@ exports[`Storyshots Addon Actions All types 1`] = ` > Number - + -`; - exports[`Storyshots Addon Actions Function Name 1`] = ` + )) .add('with some emoji', () => ( - - )); + + )); ``` Story is a single state of your component. In the above case, there are two stories for the native button component: From 00106d385afce49cd06aa5c9c0b8d20fbe64f882 Mon Sep 17 00:00:00 2001 From: igor Date: Tue, 12 Dec 2017 12:03:27 +0200 Subject: [PATCH 041/162] 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 042/162] 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 043/162] 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 044/162] 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 83b0798e3296731e50607cf4da65c985c2c3aef7 Mon Sep 17 00:00:00 2001 From: folmert Date: Tue, 12 Dec 2017 16:32:05 +0100 Subject: [PATCH 045/162] fix missing supported extension check in case when asset is a string I've came across this inconsistent logic while investigating my own issue: https://github.com/storybooks/storybook/issues/2363 --- app/vue/src/server/iframe.html.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/vue/src/server/iframe.html.js b/app/vue/src/server/iframe.html.js index bfcc2db58ee3..2f0cb7279c95 100644 --- a/app/vue/src/server/iframe.html.js +++ b/app/vue/src/server/iframe.html.js @@ -29,7 +29,9 @@ const urlsFromAssets = assets => { .forEach(key => { let asset = assets[key]; if (typeof asset === 'string') { - urls[getExtensionForFilename(asset)].push(asset); + if (Boolean(urls[getExtensionForFilename(asset)])) { + urls[getExtensionForFilename(asset)].push(asset); + } } else { if (!Array.isArray(asset)) { asset = [asset]; From 5645a0a5d0880387b9ff88d7b02fc3b25b735f02 Mon Sep 17 00:00:00 2001 From: folmert Date: Tue, 12 Dec 2017 17:00:40 +0100 Subject: [PATCH 046/162] fix no-extra-boolean-cast eslint error --- app/vue/src/server/iframe.html.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vue/src/server/iframe.html.js b/app/vue/src/server/iframe.html.js index 2f0cb7279c95..c49dc810b25c 100644 --- a/app/vue/src/server/iframe.html.js +++ b/app/vue/src/server/iframe.html.js @@ -29,7 +29,7 @@ const urlsFromAssets = assets => { .forEach(key => { let asset = assets[key]; if (typeof asset === 'string') { - if (Boolean(urls[getExtensionForFilename(asset)])) { + if (urls[getExtensionForFilename(asset)]) { urls[getExtensionForFilename(asset)].push(asset); } } else { From 1232b6fd846b1e0d615dbbf1d268cb609826fa9f Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Tue, 12 Dec 2017 16:27:02 +0000 Subject: [PATCH 047/162] Update danger from 2.1.3 to 2.1.4 in / --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ddbec125ae16..86345ebcf381 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "codecov": "^3.0.0", "commander": "^2.12.2", "cross-env": "^5.1.1", - "danger": "^2.1.3", + "danger": "^2.1.4", "enzyme": "^3.2.0", "enzyme-adapter-react-16": "^1.1.0", "eslint": "^4.13.0", diff --git a/yarn.lock b/yarn.lock index 5cc56839649f..97d5dedf75c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3155,9 +3155,9 @@ damerau-levenshtein@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" -danger@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/danger/-/danger-2.1.3.tgz#eaf6893f6aa568c30153ba780113288a8b933d81" +danger@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/danger/-/danger-2.1.4.tgz#908c59cf8ddcbe64fc6968f2ae70a5c641a27a9b" dependencies: babel-polyfill "7.0.0-alpha.19" chalk "^2.0.0" @@ -11724,7 +11724,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" From cc3c1f4ac567b47a9a0278b64fdd3cffd1674df3 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Tue, 12 Dec 2017 16:28:37 +0000 Subject: [PATCH 048/162] Update eslint from 4.13.0 to 4.13.1 in / --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 86345ebcf381..0611c941ce9c 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "danger": "^2.1.4", "enzyme": "^3.2.0", "enzyme-adapter-react-16": "^1.1.0", - "eslint": "^4.13.0", + "eslint": "^4.13.1", "eslint-config-airbnb": "^16.1.0", "eslint-config-prettier": "^2.9.0", "eslint-plugin-import": "^2.8.0", diff --git a/yarn.lock b/yarn.lock index 97d5dedf75c5..234e357dff12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4056,9 +4056,9 @@ eslint@^3.16.1: text-table "~0.2.0" user-home "^2.0.0" -eslint@^4.13.0: - version "4.13.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.13.0.tgz#1991aa359586af83877bde59de9d41f53e20826d" +eslint@^4.13.1: + version "4.13.1" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.13.1.tgz#0055e0014464c7eb7878caf549ef2941992b444f" dependencies: ajv "^5.3.0" babel-code-frame "^6.22.0" @@ -11724,7 +11724,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 c61b7d0307ebb986482d943c8c73ddd12824ffd9 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Tue, 12 Dec 2017 16:30:12 +0000 Subject: [PATCH 049/162] Update prettier from 1.9.1 to 1.9.2 in / --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 0611c941ce9c..b778f5d4d1ad 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "lodash": "^4.17.4", "nodemon": "^1.12.5", "npmlog": "^4.1.2", - "prettier": "^1.9.1", + "prettier": "^1.9.2", "process-nextick-args": "^1.0.7", "puppeteer": "^0.13.0", "raf": "^3.4.0", diff --git a/yarn.lock b/yarn.lock index 234e357dff12..64429dee04d8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8913,9 +8913,9 @@ prettier@^1.7.0: version "1.8.2" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8" -prettier@^1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.1.tgz#41638a0d47c1efbd1b7d5a742aaa5548eab86d70" +prettier@^1.9.2: + version "1.9.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.2.tgz#96bc2132f7a32338e6078aeb29727178c6335827" pretty-bytes@^4.0.2: version "4.0.2" From 7d38adf6927424bf09c3c01ef9e352f6533f164d Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Tue, 12 Dec 2017 16:31:54 +0000 Subject: [PATCH 050/162] Update @types/node from 8.0.57 to 8.0.58 in addons/knobs --- addons/knobs/package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/knobs/package.json b/addons/knobs/package.json index 4614b48694cb..022b74b9e586 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -28,7 +28,7 @@ "util-deprecate": "^1.0.2" }, "devDependencies": { - "@types/node": "^8.0.57", + "@types/node": "^8.0.58", "@types/react": "^16.0.28", "raw-loader": "^0.5.1", "style-loader": "^0.19.0", diff --git a/yarn.lock b/yarn.lock index 64429dee04d8..8dcc4c6c6f30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -128,9 +128,9 @@ version "8.0.52" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.52.tgz#8e7f47747868e7687f2cd4922966e2d6af78d22d" -"@types/node@^8.0.57": - version "8.0.57" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.57.tgz#e5d8b4dc112763e35cfc51988f4f38da3c486d99" +"@types/node@^8.0.58": + version "8.0.58" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.58.tgz#5b3881c0be3a646874803fee3197ea7f1ed6df90" "@types/react@^16.0.18", "@types/react@^16.0.20": version "16.0.23" From 374f3f58b3404488dce40b604c2f4b4a0d6c03fb Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Tue, 12 Dec 2017 16:33:36 +0000 Subject: [PATCH 051/162] Update @types/react from 16.0.28 to 16.0.29 in addons/knobs --- addons/knobs/package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/knobs/package.json b/addons/knobs/package.json index 022b74b9e586..0b6fa2128b8c 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -29,7 +29,7 @@ }, "devDependencies": { "@types/node": "^8.0.58", - "@types/react": "^16.0.28", + "@types/react": "^16.0.29", "raw-loader": "^0.5.1", "style-loader": "^0.19.0", "typescript": "^2.6.2", diff --git a/yarn.lock b/yarn.lock index 8dcc4c6c6f30..699e29b2838b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -136,9 +136,9 @@ version "16.0.23" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.23.tgz#f0f713b07912c6fd8e10c9ccc539443ceb06dbca" -"@types/react@^16.0.28": - version "16.0.28" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.28.tgz#eb0b31272528da8f20477ec27569c4f767315b33" +"@types/react@^16.0.29": + version "16.0.29" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.29.tgz#4eea6a8de9f40ca71d580ae7a9f3b4b77b368de8" JSONStream@^1.0.4: version "1.3.1" From 8ab527d024be0ac9574edac1576bf7a6bbf82518 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Tue, 12 Dec 2017 16:35:16 +0000 Subject: [PATCH 052/162] Update core-js from 2.5.2 to 2.5.3 in app/react --- app/react/package.json | 2 +- yarn.lock | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/react/package.json b/app/react/package.json index d4c5192dbb48..96020321b25a 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -45,7 +45,7 @@ "commander": "^2.12.2", "common-tags": "^1.5.1", "configstore": "^3.1.1", - "core-js": "^2.5.2", + "core-js": "^2.5.3", "css-loader": "^0.28.7", "dotenv-webpack": "^1.5.4", "express": "^4.16.2", diff --git a/yarn.lock b/yarn.lock index 699e29b2838b..3a1ac90b5f45 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2890,6 +2890,10 @@ 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.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" From cb460add544b3b9ea40a0c3c474d1ee2fb8759b0 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Tue, 12 Dec 2017 16:36:48 +0000 Subject: [PATCH 053/162] Update core-js from 2.5.2 to 2.5.3 in app/vue --- app/vue/package.json | 2 +- yarn.lock | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/app/vue/package.json b/app/vue/package.json index 7f79be09397d..b4cbdee2c165 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -45,7 +45,7 @@ "commander": "^2.12.2", "common-tags": "^1.5.1", "configstore": "^3.1.1", - "core-js": "^2.5.2", + "core-js": "^2.5.3", "css-loader": "^0.28.7", "dotenv-webpack": "^1.5.4", "express": "^4.16.2", diff --git a/yarn.lock b/yarn.lock index 3a1ac90b5f45..d25b42b59104 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2886,10 +2886,6 @@ 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.5.3: version "2.5.3" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" From f8ff2512f2301b6ffbbb92174e294796255a6ea4 Mon Sep 17 00:00:00 2001 From: hypnos Date: Tue, 12 Dec 2017 23:47:25 +0300 Subject: [PATCH 054/162] Run prettier --- lib/cli/generators/METEOR/index.js | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/lib/cli/generators/METEOR/index.js b/lib/cli/generators/METEOR/index.js index 7171c2a2358e..e448efa85eb4 100644 --- a/lib/cli/generators/METEOR/index.js +++ b/lib/cli/generators/METEOR/index.js @@ -16,19 +16,17 @@ module.exports = Promise.all([ latestVersion('babel-preset-stage-1'), latestVersion('babel-root-slash-import'), ]).then( - ( - [ - storybookVersion, - actionsVersion, - linksVersion, - reactVersion, - reactDomVersion, - presetEnvVersion, - presetReactVersion, - presetStage1Version, - rootSlashImportVersion, - ] - ) => { + ([ + storybookVersion, + actionsVersion, + linksVersion, + reactVersion, + reactDomVersion, + presetEnvVersion, + presetReactVersion, + presetStage1Version, + rootSlashImportVersion, + ]) => { mergeDirs(path.resolve(__dirname, 'template/'), '.', 'overwrite'); const packageJson = helpers.getPackageJson(); From a55741d4e1e7de20553a826172fa946d518e396e Mon Sep 17 00:00:00 2001 From: igor Date: Wed, 13 Dec 2017 12:14:39 +0200 Subject: [PATCH 055/162] 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 056/162] 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 b30b5872fd770cb99508897f52000895ac779ccb Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Wed, 13 Dec 2017 16:23:06 +0000 Subject: [PATCH 057/162] Update gatsby-remark-images from 1.5.34 to 1.5.35 --- docs/package.json | 2 +- docs/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/package.json b/docs/package.json index a8e5ed3abd87..ff2630c412b4 100644 --- a/docs/package.json +++ b/docs/package.json @@ -35,7 +35,7 @@ "gatsby-plugin-sharp": "^1.6.23", "gatsby-remark-autolink-headers": "^1.4.10", "gatsby-remark-copy-linked-files": "^1.5.23", - "gatsby-remark-images": "^1.5.34", + "gatsby-remark-images": "^1.5.35", "gatsby-remark-smartypants": "^1.4.10", "gatsby-source-filesystem": "^1.5.10", "gatsby-transformer-remark": "^1.7.24", diff --git a/docs/yarn.lock b/docs/yarn.lock index a00206447404..b7d64f820093 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4276,9 +4276,9 @@ gatsby-remark-copy-linked-files@^1.5.23: path-is-inside "^1.0.2" unist-util-visit "^1.1.1" -gatsby-remark-images@^1.5.34: - version "1.5.34" - resolved "https://registry.yarnpkg.com/gatsby-remark-images/-/gatsby-remark-images-1.5.34.tgz#0e55b88d8f26e363d76b5705b7e92cc492ad15a0" +gatsby-remark-images@^1.5.35: + version "1.5.35" + resolved "https://registry.yarnpkg.com/gatsby-remark-images/-/gatsby-remark-images-1.5.35.tgz#141786c33129538f4a560389f94d1f902c66872e" dependencies: babel-runtime "^6.26.0" cheerio "^1.0.0-rc.2" From f38e91d2293e795920ef29d34529a8c17a928067 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Wed, 13 Dec 2017 16:24:26 +0000 Subject: [PATCH 058/162] Update gatsby-source-filesystem from 1.5.10 to 1.5.11 --- docs/package.json | 2 +- docs/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/package.json b/docs/package.json index ff2630c412b4..a61dc6786e2a 100644 --- a/docs/package.json +++ b/docs/package.json @@ -37,7 +37,7 @@ "gatsby-remark-copy-linked-files": "^1.5.23", "gatsby-remark-images": "^1.5.35", "gatsby-remark-smartypants": "^1.4.10", - "gatsby-source-filesystem": "^1.5.10", + "gatsby-source-filesystem": "^1.5.11", "gatsby-transformer-remark": "^1.7.24", "gh-pages": "^1.1.0", "global": "^4.3.2", diff --git a/docs/yarn.lock b/docs/yarn.lock index b7d64f820093..689be9adeac1 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4297,9 +4297,9 @@ gatsby-remark-smartypants@^1.4.10: retext-smartypants "^2.0.0" unist-util-visit "^1.1.1" -gatsby-source-filesystem@^1.5.10: - version "1.5.10" - resolved "https://registry.yarnpkg.com/gatsby-source-filesystem/-/gatsby-source-filesystem-1.5.10.tgz#b2a2ed5a7656a30335961624af1da39373a9d5c5" +gatsby-source-filesystem@^1.5.11: + version "1.5.11" + resolved "https://registry.yarnpkg.com/gatsby-source-filesystem/-/gatsby-source-filesystem-1.5.11.tgz#bc2f9bdcc71212df42d45ae0b8adc7e37540b599" dependencies: babel-cli "^6.26.0" babel-runtime "^6.26.0" From 0dfef9fdbef435e81fd2ab7025c1e60b725faf79 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Wed, 13 Dec 2017 16:24:45 +0000 Subject: [PATCH 059/162] Update eslint-plugin-jsx-a11y from 6.0.2 to 6.0.3 in / --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b778f5d4d1ad..82d8671accf8 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "eslint-plugin-import": "^2.8.0", "eslint-plugin-jest": "^21.4.2", "eslint-plugin-json": "^1.2.0", - "eslint-plugin-jsx-a11y": "^6.0.2", + "eslint-plugin-jsx-a11y": "^6.0.3", "eslint-plugin-prettier": "^2.2.0", "eslint-plugin-react": "^7.5.1", "fs-extra": "^4.0.3", diff --git a/yarn.lock b/yarn.lock index d25b42b59104..d2d8c44a679a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3926,9 +3926,9 @@ eslint-plugin-jsx-a11y@5.1.1: emoji-regex "^6.1.0" jsx-ast-utils "^1.4.0" -eslint-plugin-jsx-a11y@^6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.0.2.tgz#659277a758b036c305a7e4a13057c301cd3be73f" +eslint-plugin-jsx-a11y@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.0.3.tgz#54583d1ae442483162e040e13cc31865465100e5" dependencies: aria-query "^0.7.0" array-includes "^3.0.3" @@ -3936,7 +3936,7 @@ eslint-plugin-jsx-a11y@^6.0.2: axobject-query "^0.1.0" damerau-levenshtein "^1.0.0" emoji-regex "^6.1.0" - jsx-ast-utils "^1.4.0" + jsx-ast-utils "^2.0.0" eslint-plugin-prettier@^2.2.0: version "2.3.1" From 2a257fe750e82d426579aff609e42b4abe79900e Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Wed, 13 Dec 2017 16:26:14 +0000 Subject: [PATCH 060/162] Update gatsby from 1.9.130 to 1.9.131 --- docs/package.json | 2 +- docs/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/package.json b/docs/package.json index a61dc6786e2a..0a3b81978bc7 100644 --- a/docs/package.json +++ b/docs/package.json @@ -30,7 +30,7 @@ "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", "bootstrap": "^3.3.7", - "gatsby": "^1.9.130", + "gatsby": "^1.9.131", "gatsby-link": "^1.6.31", "gatsby-plugin-sharp": "^1.6.23", "gatsby-remark-autolink-headers": "^1.4.10", diff --git a/docs/yarn.lock b/docs/yarn.lock index 689be9adeac1..1460062166d1 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4335,9 +4335,9 @@ gatsby-transformer-remark@^1.7.24: unist-util-select "^1.5.0" unist-util-visit "^1.1.1" -gatsby@^1.9.130: - version "1.9.130" - resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.130.tgz#74c22b85a3fcf75a9c2f0ba190b2f9a1b435a651" +gatsby@^1.9.131: + version "1.9.131" + resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.131.tgz#15ad010885bdb1dd6bfe8c8d069108b6f06f4311" dependencies: async "^2.1.2" babel-code-frame "^6.22.0" From b642162f06497660ed69278943748207b964203d Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Wed, 13 Dec 2017 16:26:34 +0000 Subject: [PATCH 061/162] Update nodemon from 1.12.5 to 1.12.6 in / --- package.json | 2 +- yarn.lock | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 82d8671accf8..0bd9c7e63de8 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "lerna": "^2.5.1", "lint-staged": "^6.0.0", "lodash": "^4.17.4", - "nodemon": "^1.12.5", + "nodemon": "^1.12.6", "npmlog": "^4.1.2", "prettier": "^1.9.2", "process-nextick-args": "^1.0.7", diff --git a/yarn.lock b/yarn.lock index d2d8c44a679a..3dbb86725d83 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7943,6 +7943,21 @@ nodemon@^1.12.5: undefsafe "0.0.3" update-notifier "^2.3.0" +nodemon@^1.12.6: + version "1.12.6" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.12.6.tgz#aa0ca0f3b9ea0f09e970e8135b2c9c9aa84eb711" + 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.3.0" + nomnom@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.8.1.tgz#2151f722472ba79e50a76fc125bb8c8f2e4dc2a7" From 30e0348b47a44882c9990619da46b4170e719717 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Wed, 13 Dec 2017 16:28:16 +0000 Subject: [PATCH 062/162] Update vue from 2.5.9 to 2.5.10 in addons/knobs --- addons/knobs/package.json | 2 +- yarn.lock | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/knobs/package.json b/addons/knobs/package.json index 0b6fa2128b8c..54a3eeafde23 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -34,7 +34,7 @@ "style-loader": "^0.19.0", "typescript": "^2.6.2", "typescript-definition-tester": "^0.0.5", - "vue": "^2.5.9" + "vue": "^2.5.10" }, "peerDependencies": { "react": "*", diff --git a/yarn.lock b/yarn.lock index 3dbb86725d83..f79df7015eab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11791,6 +11791,10 @@ vue-template-es2015-compiler@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.6.0.tgz#dc42697133302ce3017524356a6c61b7b69b4a18" +vue@^2.5.10: + version "2.5.10" + resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.10.tgz#dcd772e2594ba994145f2f09522149d9a1e7841a" + vue@^2.5.9: version "2.5.9" resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.9.tgz#b2380cd040915dca69881dafd121d760952e65f7" From a721d2004f1a74513e0cc4d126081cd4a8146407 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Wed, 13 Dec 2017 16:29:59 +0000 Subject: [PATCH 063/162] Update react-modal from 3.1.7 to 3.1.8 in lib/ui --- lib/ui/package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ui/package.json b/lib/ui/package.json index e9583116d77b..80ea09315782 100644 --- a/lib/ui/package.json +++ b/lib/ui/package.json @@ -33,7 +33,7 @@ "qs": "^6.5.1", "react-icons": "^2.2.7", "react-inspector": "^2.2.2", - "react-modal": "^3.1.7", + "react-modal": "^3.1.8", "react-split-pane": "^0.1.71", "react-treebeard": "^2.0.3", "redux": "^3.7.2" diff --git a/yarn.lock b/yarn.lock index f79df7015eab..5303ec501e05 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9321,9 +9321,9 @@ react-inspector@^2.2.2: babel-runtime "^6.26.0" is-dom "^1.0.9" -react-modal@^3.1.7: - version "3.1.7" - resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.1.7.tgz#21feb937c95cd722bf2d375cada751fdc8189c0e" +react-modal@^3.1.8: + version "3.1.8" + resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.1.8.tgz#7d6b1958f44828babd2a1ce826c28fa40d026b0f" dependencies: exenv "^1.2.0" prop-types "^15.5.10" From 0375dc2939b5794cea2dda5c321d1dce7517e09f Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Wed, 13 Dec 2017 16:31:36 +0000 Subject: [PATCH 064/162] Update nodemon from 1.12.5 to 1.12.6 in app/react --- app/react/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/react/package.json b/app/react/package.json index 96020321b25a..b16c3e92c8f6 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -75,7 +75,7 @@ "webpack-hot-middleware": "^2.21.0" }, "devDependencies": { - "nodemon": "^1.12.5" + "nodemon": "^1.12.6" }, "peerDependencies": { "react": ">=15.0.0 || ^16.0.0", From ca48b2ec12c5faa550df5353d79ac485797c3475 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Wed, 13 Dec 2017 16:33:23 +0000 Subject: [PATCH 065/162] Update nodemon from 1.12.5 to 1.12.6 in app/vue --- app/vue/package.json | 2 +- yarn.lock | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/app/vue/package.json b/app/vue/package.json index b4cbdee2c165..265bc88a5351 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -76,7 +76,7 @@ "webpack-hot-middleware": "^2.21.0" }, "devDependencies": { - "nodemon": "^1.12.5", + "nodemon": "^1.12.6", "vue": "^2.5.9", "vue-loader": "^13.5.0", "vue-template-compiler": "^2.5.9" diff --git a/yarn.lock b/yarn.lock index 5303ec501e05..5d49294e37af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7928,21 +7928,6 @@ 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.5: - version "1.12.5" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.12.5.tgz#bd34afa1aa855f1996b561147848519f136de620" - 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.3.0" - nodemon@^1.12.6: version "1.12.6" resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.12.6.tgz#aa0ca0f3b9ea0f09e970e8135b2c9c9aa84eb711" From 3bfbc7a7011416c6f374e66103cd48f5f38294b0 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Wed, 13 Dec 2017 16:34:54 +0000 Subject: [PATCH 066/162] Update vue from 2.5.9 to 2.5.10 in app/vue --- app/vue/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/vue/package.json b/app/vue/package.json index 265bc88a5351..035eae68f540 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -77,12 +77,12 @@ }, "devDependencies": { "nodemon": "^1.12.6", - "vue": "^2.5.9", + "vue": "^2.5.10", "vue-loader": "^13.5.0", "vue-template-compiler": "^2.5.9" }, "peerDependencies": { - "vue": "*", + "vue": "2.5.10", "vue-loader": "*", "vue-template-compiler": "*" } From 6cb99593716829efdfc4f932e36528b5c476143c Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Wed, 13 Dec 2017 16:36:24 +0000 Subject: [PATCH 067/162] Update vue-template-compiler from 2.5.9 to 2.5.10 in app/vue --- app/vue/package.json | 4 ++-- yarn.lock | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/vue/package.json b/app/vue/package.json index 035eae68f540..9febae50fa6b 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -79,11 +79,11 @@ "nodemon": "^1.12.6", "vue": "^2.5.10", "vue-loader": "^13.5.0", - "vue-template-compiler": "^2.5.9" + "vue-template-compiler": "^2.5.10" }, "peerDependencies": { "vue": "2.5.10", "vue-loader": "*", - "vue-template-compiler": "*" + "vue-template-compiler": "2.5.10" } } diff --git a/yarn.lock b/yarn.lock index 5d49294e37af..4d791add7925 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11765,6 +11765,13 @@ vue-style-loader@^3.0.0, vue-style-loader@^3.0.1: hash-sum "^1.0.2" loader-utils "^1.0.2" +vue-template-compiler@^2.5.10: + version "2.5.10" + resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.10.tgz#8d2754677430bf520650a7e2aee9070635158fc5" + dependencies: + de-indent "^1.0.2" + he "^1.1.0" + vue-template-compiler@^2.5.9: version "2.5.9" resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.9.tgz#7fabc73c8d3d12d32340cd86c5fc33e00e86d686" From 7af74fe8015c25d3a83315184c9327c8de2aa5cd Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Wed, 13 Dec 2017 16:37:54 +0000 Subject: [PATCH 068/162] Update vue from 2.5.9 to 2.5.10 in examples/vue-kitchen-sink --- examples/vue-kitchen-sink/package.json | 2 +- yarn.lock | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/vue-kitchen-sink/package.json b/examples/vue-kitchen-sink/package.json index 8ae34cd1e5c1..4d636cd7d046 100644 --- a/examples/vue-kitchen-sink/package.json +++ b/examples/vue-kitchen-sink/package.json @@ -25,7 +25,7 @@ "webpack-dev-server": "^2.9.7" }, "dependencies": { - "vue": "^2.5.9", + "vue": "^2.5.10", "vuex": "^3.0.0" }, "scripts": { diff --git a/yarn.lock b/yarn.lock index 4d791add7925..5d0587087b12 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11787,10 +11787,6 @@ vue@^2.5.10: version "2.5.10" resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.10.tgz#dcd772e2594ba994145f2f09522149d9a1e7841a" -vue@^2.5.9: - version "2.5.9" - resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.9.tgz#b2380cd040915dca69881dafd121d760952e65f7" - vuex@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/vuex/-/vuex-3.0.1.tgz#e761352ebe0af537d4bb755a9b9dc4be3df7efd2" From 93dfe7196e624ec7251fd83ecaca13d735470c57 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Wed, 13 Dec 2017 16:39:23 +0000 Subject: [PATCH 069/162] Update vue-template-compiler from 2.5.9 to 2.5.10 in examples/vue-kitchen-sink --- examples/vue-kitchen-sink/package.json | 2 +- yarn.lock | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/examples/vue-kitchen-sink/package.json b/examples/vue-kitchen-sink/package.json index 4d636cd7d046..a5034713ebcd 100644 --- a/examples/vue-kitchen-sink/package.json +++ b/examples/vue-kitchen-sink/package.json @@ -20,7 +20,7 @@ "vue-hot-reload-api": "^2.2.4", "vue-loader": "^13.5.0", "vue-style-loader": "^3.0.1", - "vue-template-compiler": "^2.5.9", + "vue-template-compiler": "^2.5.10", "webpack": "^3.10.0", "webpack-dev-server": "^2.9.7" }, diff --git a/yarn.lock b/yarn.lock index 5d0587087b12..e500eb3fb0d1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11772,13 +11772,6 @@ vue-template-compiler@^2.5.10: de-indent "^1.0.2" he "^1.1.0" -vue-template-compiler@^2.5.9: - version "2.5.9" - resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.9.tgz#7fabc73c8d3d12d32340cd86c5fc33e00e86d686" - dependencies: - de-indent "^1.0.2" - he "^1.1.0" - vue-template-es2015-compiler@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.6.0.tgz#dc42697133302ce3017524356a6c61b7b69b4a18" From a35d8e4a2e2f8a4f913a0f3c77f4cb544ebc2da6 Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Wed, 13 Dec 2017 18:21:43 +0000 Subject: [PATCH 070/162] add error handling --- addons/actions/package.json | 1 + addons/actions/src/lib/decycle.js | 17 +++++++++++++++-- addons/actions/src/lib/errors/DecycleError.js | 3 +++ addons/actions/src/lib/errors/index.js | 1 + .../src/lib/types/object/canAccessProperty.js | 11 +++++++++++ .../src/lib/types/object/getObjectName.js | 4 +++- .../actions/src/lib/util/getPropertiesList.js | 11 ++++++++--- addons/actions/src/preview.js | 14 +++++++++++++- .../src/stories/addon-actions.stories.js | 8 +++++++- 9 files changed, 62 insertions(+), 8 deletions(-) create mode 100644 addons/actions/src/lib/errors/DecycleError.js create mode 100644 addons/actions/src/lib/errors/index.js create mode 100644 addons/actions/src/lib/types/object/canAccessProperty.js diff --git a/addons/actions/package.json b/addons/actions/package.json index 2771a3fee0e2..5da36b6370e9 100644 --- a/addons/actions/package.json +++ b/addons/actions/package.json @@ -21,6 +21,7 @@ "dependencies": { "deep-equal": "^1.0.1", "global": "^4.3.2", + "make-error": "^1.3.0", "prop-types": "^15.6.0", "react-inspector": "^2.2.1", "uuid": "^3.1.0" diff --git a/addons/actions/src/lib/decycle.js b/addons/actions/src/lib/decycle.js index 80a67f1f0907..c6a3e9ec44f8 100644 --- a/addons/actions/src/lib/decycle.js +++ b/addons/actions/src/lib/decycle.js @@ -1,3 +1,5 @@ +import { DecycleError } from './errors'; + import { getPropertiesList, typeReplacer } from './util'; import { CYCLIC_KEY } from './'; @@ -6,6 +8,7 @@ import { objectType } from './types'; export default function decycle(object, depth = 10) { const objects = new WeakMap(); + let isCyclic = false; const res = (function derez(value, path, _depth) { @@ -38,7 +41,12 @@ export default function decycle(object, depth = 10) { return { $ref: oldPath }; } - objects.set(value, path); + try { + objects.set(value, path); + } catch (error) { + console.error(error); // eslint-disable-line no-console + return new DecycleError(error.message); + } if (Array.isArray(value)) { obj = []; @@ -49,7 +57,12 @@ export default function decycle(object, depth = 10) { obj = objectType.serialize(value); getPropertiesList(value).forEach(name => { - obj[name] = derez(value[name], `${path}[${JSON.stringify(name)}]`, _depth + 1); + try { + obj[name] = derez(value[name], `${path}[${JSON.stringify(name)}]`, _depth + 1); + } catch (error) { + console.error(error); // eslint-disable-line no-console + obj[name] = new DecycleError(error.message); + } }); } diff --git a/addons/actions/src/lib/errors/DecycleError.js b/addons/actions/src/lib/errors/DecycleError.js new file mode 100644 index 000000000000..b488431d8be9 --- /dev/null +++ b/addons/actions/src/lib/errors/DecycleError.js @@ -0,0 +1,3 @@ +import { BaseError } from 'make-error'; + +export default class DecycleError extends BaseError {} diff --git a/addons/actions/src/lib/errors/index.js b/addons/actions/src/lib/errors/index.js new file mode 100644 index 000000000000..d39a34074158 --- /dev/null +++ b/addons/actions/src/lib/errors/index.js @@ -0,0 +1 @@ +export DecycleError from './DecycleError'; diff --git a/addons/actions/src/lib/types/object/canAccessProperty.js b/addons/actions/src/lib/types/object/canAccessProperty.js new file mode 100644 index 000000000000..e71989ac5088 --- /dev/null +++ b/addons/actions/src/lib/types/object/canAccessProperty.js @@ -0,0 +1,11 @@ +export default function canAccessProperty(key, value) { + let prop; + + try { + prop = value[key]; + } catch (error) { + console.error(error); // eslint-disable-line no-console + } + + return !!prop; +} diff --git a/addons/actions/src/lib/types/object/getObjectName.js b/addons/actions/src/lib/types/object/getObjectName.js index 331e6cc7f11f..2ca626860d03 100644 --- a/addons/actions/src/lib/types/object/getObjectName.js +++ b/addons/actions/src/lib/types/object/getObjectName.js @@ -1,5 +1,7 @@ +import canAccessProperty from './canAccessProperty'; + export default function getObjectName(value) { - if (value.toString) { + if (canAccessProperty('toString', value)) { const stringValue = value.toString(); if (stringValue.slice(0, 5) === 'class') { diff --git a/addons/actions/src/lib/util/getPropertiesList.js b/addons/actions/src/lib/util/getPropertiesList.js index b9f95954ec28..35ccdd49818e 100644 --- a/addons/actions/src/lib/util/getPropertiesList.js +++ b/addons/actions/src/lib/util/getPropertiesList.js @@ -3,10 +3,15 @@ const { hasOwnProperty } = Object.prototype; export default function getPropertiesList(value) { const keys = []; - // eslint-disable-next-line no-restricted-syntax + // eslint-disable-next-line no-restricted-syntax, guard-for-in for (const name in value) { - if (hasOwnProperty.call(value, name) || typeof value[name] !== 'function') { - keys.push(name); + try { + if (hasOwnProperty.call(value, name) || typeof value[name] !== 'function') { + keys.push(name); + } + } catch (error) { + // eslint-disable-next-line no-console + console.error(`Error accessing property ${name}`, error); } } diff --git a/addons/actions/src/preview.js b/addons/actions/src/preview.js index 78fa83e53755..c7dc47ac51b5 100644 --- a/addons/actions/src/preview.js +++ b/addons/actions/src/preview.js @@ -9,7 +9,19 @@ import { canConfigureName } from './lib/util'; export function action(name) { // eslint-disable-next-line no-shadow const handler = function action(..._args) { - const args = _args.map(arg => JSON.stringify(decycle(arg))); + const args = _args.map(arg => { + let result; + + try { + result = JSON.stringify(decycle(arg)); + } catch (error) { + // IE still cyclic. + + return JSON.stringify(error.toString()); + } + + return result; + }); const channel = addons.getChannel(); const id = uuid(); channel.emit(EVENT_ID, { diff --git a/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js b/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js index c7709ac8e6fd..ba9355f9f928 100644 --- a/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js +++ b/examples/cra-kitchen-sink/src/stories/addon-actions.stories.js @@ -26,7 +26,13 @@ storiesOf('Addon Actions', module) function B() {} const bound = B.bind({}); - const file = new File([''], 'filename.txt', { type: 'text/plain', lastModified: new Date() }); + + let file; + try { + file = new File([''], 'filename.txt', { type: 'text/plain', lastModified: new Date() }); + } catch (error) { + file = error; + } const reg = /fooBar/g; return ( From 1a10635b86dcb1aacd318fb589a81e23b99f9e8c Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Wed, 13 Dec 2017 18:59:55 +0000 Subject: [PATCH 071/162] Update lockfile --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 2effa3cd4554..016b54c674d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8416,7 +8416,7 @@ make-dir@^1.0.0: dependencies: pify "^3.0.0" -make-error@^1.1.1: +make-error@^1.1.1, make-error@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.0.tgz#52ad3a339ccf10ce62b4040b708fe707244b8b96" From 2852af82e3ead399f2419d55fa962ffee953a413 Mon Sep 17 00:00:00 2001 From: "Voss, Jennifer (ELS-PHI)" Date: Wed, 13 Dec 2017 14:18:27 -0500 Subject: [PATCH 072/162] Allow fn or object prop for styles for backward compatibility --- addons/info/src/components/Story.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/info/src/components/Story.js b/addons/info/src/components/Story.js index c31fda980ef6..317c62daf23c 100644 --- a/addons/info/src/components/Story.js +++ b/addons/info/src/components/Story.js @@ -383,7 +383,7 @@ Story.propTypes = { showInline: PropTypes.bool, showHeader: PropTypes.bool, showSource: PropTypes.bool, - styles: PropTypes.object, // eslint-disable-line react/forbid-prop-types + styles: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), marksyConf: PropTypes.object, // eslint-disable-line react/forbid-prop-types maxPropsIntoLine: PropTypes.number.isRequired, From 8ad8938c4ef65146d757bacd1adb1ef272e4185c Mon Sep 17 00:00:00 2001 From: hypnos Date: Wed, 13 Dec 2017 23:11:30 +0300 Subject: [PATCH 073/162] Move back to original fuse.js package --- lib/ui/package.json | 2 +- lib/ui/src/modules/ui/libs/filters.js | 2 +- yarn.lock | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/ui/package.json b/lib/ui/package.json index 8b590adbd653..be4633c0f43c 100644 --- a/lib/ui/package.json +++ b/lib/ui/package.json @@ -14,13 +14,13 @@ "storybook": "start-storybook -p 9010" }, "dependencies": { - "@hypnosphi/fuse.js": "^3.0.9", "@storybook/components": "^3.3.0-alpha.4", "@storybook/mantra-core": "^1.7.0", "@storybook/react-komposer": "^2.0.0", "babel-runtime": "^6.26.0", "deep-equal": "^1.0.1", "events": "^1.1.1", + "fuse.js": "^3.2.0", "global": "^4.3.2", "json-stringify-safe": "^5.0.1", "keycode": "^2.1.8", diff --git a/lib/ui/src/modules/ui/libs/filters.js b/lib/ui/src/modules/ui/libs/filters.js index 6fb1860282fe..358b2a3f6455 100755 --- a/lib/ui/src/modules/ui/libs/filters.js +++ b/lib/ui/src/modules/ui/libs/filters.js @@ -1,4 +1,4 @@ -import Fuse from '@hypnosphi/fuse.js'; +import Fuse from 'fuse.js'; import sortBy from 'lodash.sortby'; const searchOptions = { diff --git a/yarn.lock b/yarn.lock index d518ceb97f65..2639e0a1ff3b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -199,10 +199,6 @@ lodash "^4.2.0" to-fast-properties "^2.0.0" -"@hypnosphi/fuse.js@^3.0.9": - version "3.0.9" - resolved "https://registry.yarnpkg.com/@hypnosphi/fuse.js/-/fuse.js-3.0.9.tgz#ea99f6121b4a8f065b4c71f85595db2714498807" - "@ngtools/json-schema@1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@ngtools/json-schema/-/json-schema-1.1.0.tgz#c3a0c544d62392acc2813a42c8a0dc6f58f86922" @@ -5461,7 +5457,7 @@ functional-red-black-tree@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" -fuse.js@^3.0.1: +fuse.js@^3.0.1, fuse.js@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-3.2.0.tgz#f0448e8069855bf2a3e683cdc1d320e7e2a07ef4" From a137ffcabf197d769dd8a56df066e00a6fe98e8a Mon Sep 17 00:00:00 2001 From: hypnos Date: Wed, 13 Dec 2017 23:56:05 +0300 Subject: [PATCH 074/162] Fix accessibility warning in search box --- lib/ui/src/modules/ui/routes.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ui/src/modules/ui/routes.js b/lib/ui/src/modules/ui/routes.js index 98c536c633fc..79929c704083 100755 --- a/lib/ui/src/modules/ui/routes.js +++ b/lib/ui/src/modules/ui/routes.js @@ -1,5 +1,6 @@ import React from 'react'; import ReactDOM from 'react-dom'; +import ReactModal from 'react-modal'; import Layout from './containers/layout'; import StoriesPanel from './containers/stories_panel'; import AddonPanel from './containers/addon_panel'; @@ -14,6 +15,9 @@ export default function(injectDeps, { clientStore, provider, domNode }) { return preview; }; + // Tell react-modal which element to mark as aria-hidden + ReactModal.setAppElement(domNode); + const root = (
Date: Wed, 13 Dec 2017 23:56:24 +0300 Subject: [PATCH 075/162] Fix keys warning in search box --- lib/ui/src/modules/ui/components/search_box.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/src/modules/ui/components/search_box.js b/lib/ui/src/modules/ui/components/search_box.js index 7fa0a29e9f2d..148338580fb0 100644 --- a/lib/ui/src/modules/ui/components/search_box.js +++ b/lib/ui/src/modules/ui/components/search_box.js @@ -58,7 +58,7 @@ const suggestionTemplate = (props, state, styles, clickHandler) => tabIndex={0} role="option" aria-selected={state.selectedIndex === i} - key={val.value} + key={val.id} style={{ ...style, display: 'flex', justifyContent: 'space-between' }} onClick={() => clickHandler(i)} > From 2b7916751a1cd20b3599f2337126389e09f318cf Mon Sep 17 00:00:00 2001 From: hypnos Date: Thu, 14 Dec 2017 00:27:30 +0300 Subject: [PATCH 076/162] Fix test --- lib/ui/src/modules/ui/components/search_box.js | 2 +- lib/ui/src/modules/ui/components/search_box.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ui/src/modules/ui/components/search_box.js b/lib/ui/src/modules/ui/components/search_box.js index 148338580fb0..4f5b6c159db9 100644 --- a/lib/ui/src/modules/ui/components/search_box.js +++ b/lib/ui/src/modules/ui/components/search_box.js @@ -58,7 +58,7 @@ const suggestionTemplate = (props, state, styles, clickHandler) => tabIndex={0} role="option" aria-selected={state.selectedIndex === i} - key={val.id} + key={`${val.value}_${val.id}`} style={{ ...style, display: 'flex', justifyContent: 'space-between' }} onClick={() => clickHandler(i)} > diff --git a/lib/ui/src/modules/ui/components/search_box.test.js b/lib/ui/src/modules/ui/components/search_box.test.js index a146f868b319..d0097d9fda0e 100644 --- a/lib/ui/src/modules/ui/components/search_box.test.js +++ b/lib/ui/src/modules/ui/components/search_box.test.js @@ -127,7 +127,7 @@ describe('manager.ui.components.search_box', () => { target: { value: 'b' }, }); - const option = modal.findWhere(el => el.key() === 'b'); + const option = modal.findWhere(el => el.key() && el.key().startsWith('b_')); option.simulate('click'); expect(onSelectStory).toHaveBeenCalledWith('a', 'b'); From ddf0f6d955ec33c2f32ad62a6c977cc34bc37f11 Mon Sep 17 00:00:00 2001 From: hypnos Date: Thu, 14 Dec 2017 01:10:15 +0300 Subject: [PATCH 077/162] Remove unused dependencies --- package.json | 2 -- yarn.lock | 10 +--------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/package.json b/package.json index 0bd9c7e63de8..5bf10d367ff0 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,6 @@ "eslint-plugin-jsx-a11y": "^6.0.3", "eslint-plugin-prettier": "^2.2.0", "eslint-plugin-react": "^7.5.1", - "fs-extra": "^4.0.3", "gh-pages": "^1.1.0", "github-release-from-changelog": "^1.3.0", "glob": "^7.1.2", @@ -79,7 +78,6 @@ "nodemon": "^1.12.6", "npmlog": "^4.1.2", "prettier": "^1.9.2", - "process-nextick-args": "^1.0.7", "puppeteer": "^0.13.0", "raf": "^3.4.0", "react": "^16.2.0", diff --git a/yarn.lock b/yarn.lock index e500eb3fb0d1..9e699c565c86 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4698,14 +4698,6 @@ fs-extra@^4.0.1, fs-extra@^4.0.2: jsonfile "^4.0.0" universalify "^0.1.0" -fs-extra@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-readdir-recursive@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" @@ -8950,7 +8942,7 @@ private@^0.1.6, private@^0.1.7, private@~0.1.5: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" -process-nextick-args@^1.0.7, process-nextick-args@~1.0.6: +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" From 154e51054004b40fa6fdd17d2d4cceed69eebfb7 Mon Sep 17 00:00:00 2001 From: igor Date: Thu, 14 Dec 2017 08:14:47 +0200 Subject: [PATCH 078/162] 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 079/162] 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 8aba7c8629b3b9e74bb4b6e00a6d35765020baa8 Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Thu, 14 Dec 2017 10:44:24 +0000 Subject: [PATCH 080/162] update storyshots --- .../addon-actions.stories.storyshot | 57 +++++++------------ 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot index fd8da525a3c7..d245eb9a062c 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-actions.stories.storyshot @@ -3,116 +3,97 @@ exports[`Storyshots Addon Actions All types 1`] = `
From d35e69607b030f21fac150f6295b325263e1dd18 Mon Sep 17 00:00:00 2001 From: Rob Halff Date: Thu, 14 Dec 2017 11:16:17 +0000 Subject: [PATCH 081/162] ignore __mocks__/ folders --- scripts/prepare.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/prepare.js b/scripts/prepare.js index 875695e2af50..28c315965903 100644 --- a/scripts/prepare.js +++ b/scripts/prepare.js @@ -11,7 +11,7 @@ shell.rm('-rf', 'dist'); const babel = path.join(__dirname, '..', 'node_modules', '.bin', 'babel'); const args = [ - '--ignore tests/*,__tests__/,**.test.js,stories/,**.story.js,**.stories.js', + '--ignore __mocks__/,tests/*,__tests__/,**.test.js,stories/,**.story.js,**.stories.js', '--plugins "transform-runtime"', './src --out-dir ./dist', '--copy-files', From 702fd0c5170b3913e92dcd04dd3e82b746f91915 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 16:25:34 +0000 Subject: [PATCH 082/162] Update gatsby-link from 1.6.31 to 1.6.32 --- docs/package.json | 2 +- docs/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/package.json b/docs/package.json index 0a3b81978bc7..a6f271b29870 100644 --- a/docs/package.json +++ b/docs/package.json @@ -31,7 +31,7 @@ "babel-preset-stage-0": "^6.24.1", "bootstrap": "^3.3.7", "gatsby": "^1.9.131", - "gatsby-link": "^1.6.31", + "gatsby-link": "^1.6.32", "gatsby-plugin-sharp": "^1.6.23", "gatsby-remark-autolink-headers": "^1.4.10", "gatsby-remark-copy-linked-files": "^1.5.23", diff --git a/docs/yarn.lock b/docs/yarn.lock index 1460062166d1..b51b5aa0566b 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4214,9 +4214,9 @@ gatsby-cli@^1.1.27: yargs "^8.0.2" yurnalist "^0.2.1" -gatsby-link@^1.6.31: - version "1.6.31" - resolved "https://registry.yarnpkg.com/gatsby-link/-/gatsby-link-1.6.31.tgz#552220ad68b11ef49f7b0e0d21f677158c9fdb1b" +gatsby-link@^1.6.32: + version "1.6.32" + resolved "https://registry.yarnpkg.com/gatsby-link/-/gatsby-link-1.6.32.tgz#49114e5fc649f274254953e06bfaafebb296ccb8" dependencies: babel-runtime "^6.26.0" prop-types "^15.5.8" From 276a73e4f9a84a0d2c28905fe1f7fa640b8d615d Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 16:27:15 +0000 Subject: [PATCH 083/162] Update gatsby-transformer-remark from 1.7.24 to 1.7.25 --- docs/package.json | 2 +- docs/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/package.json b/docs/package.json index a6f271b29870..6b059d80ab46 100644 --- a/docs/package.json +++ b/docs/package.json @@ -38,7 +38,7 @@ "gatsby-remark-images": "^1.5.35", "gatsby-remark-smartypants": "^1.4.10", "gatsby-source-filesystem": "^1.5.11", - "gatsby-transformer-remark": "^1.7.24", + "gatsby-transformer-remark": "^1.7.25", "gh-pages": "^1.1.0", "global": "^4.3.2", "highlight.js": "^9.12.0", diff --git a/docs/yarn.lock b/docs/yarn.lock index b51b5aa0566b..4ab0bade4283 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4313,9 +4313,9 @@ gatsby-source-filesystem@^1.5.11: slash "^1.0.0" valid-url "^1.0.9" -gatsby-transformer-remark@^1.7.24: - version "1.7.24" - resolved "https://registry.yarnpkg.com/gatsby-transformer-remark/-/gatsby-transformer-remark-1.7.24.tgz#b39b122b983834a86499704d013b6d639a6efa6e" +gatsby-transformer-remark@^1.7.25: + version "1.7.25" + resolved "https://registry.yarnpkg.com/gatsby-transformer-remark/-/gatsby-transformer-remark-1.7.25.tgz#7fb1a0447270f780d933b838c16b0a82aa195d72" dependencies: babel-runtime "^6.26.0" bluebird "^3.5.0" From 237d1001d59d896d6da87b17b5ef482dd86e2aec Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 16:29:04 +0000 Subject: [PATCH 084/162] Update gatsby from 1.9.131 to 1.9.134 --- docs/package.json | 2 +- docs/yarn.lock | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/package.json b/docs/package.json index 6b059d80ab46..6790afad460a 100644 --- a/docs/package.json +++ b/docs/package.json @@ -30,7 +30,7 @@ "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", "bootstrap": "^3.3.7", - "gatsby": "^1.9.131", + "gatsby": "^1.9.134", "gatsby-link": "^1.6.32", "gatsby-plugin-sharp": "^1.6.23", "gatsby-remark-autolink-headers": "^1.4.10", diff --git a/docs/yarn.lock b/docs/yarn.lock index 4ab0bade4283..5eb98da82578 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4214,7 +4214,7 @@ gatsby-cli@^1.1.27: yargs "^8.0.2" yurnalist "^0.2.1" -gatsby-link@^1.6.32: +gatsby-link@^1.6.30, gatsby-link@^1.6.32: version "1.6.32" resolved "https://registry.yarnpkg.com/gatsby-link/-/gatsby-link-1.6.32.tgz#49114e5fc649f274254953e06bfaafebb296ccb8" dependencies: @@ -4335,9 +4335,9 @@ gatsby-transformer-remark@^1.7.25: unist-util-select "^1.5.0" unist-util-visit "^1.1.1" -gatsby@^1.9.131: - version "1.9.131" - resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.131.tgz#15ad010885bdb1dd6bfe8c8d069108b6f06f4311" +gatsby@^1.9.134: + version "1.9.134" + resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.134.tgz#fe6c088151f3442e089d3b81238a5c56827fa578" dependencies: async "^2.1.2" babel-code-frame "^6.22.0" @@ -4377,6 +4377,7 @@ gatsby@^1.9.131: fs-extra "^4.0.1" gatsby-1-config-css-modules "^1.0.8" gatsby-cli "^1.1.27" + gatsby-link "^1.6.30" gatsby-module-loader "^1.0.9" gatsby-react-router-scroll "^1.0.6" glob "^7.1.1" From 3cc66e39c59de767d26e70664b0d166c440d9c56 Mon Sep 17 00:00:00 2001 From: hypnos Date: Thu, 14 Dec 2017 21:09:25 +0300 Subject: [PATCH 085/162] Dependencies.io: run yarn with `--ignore-scripts` flag --- dependencies.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dependencies.yml b/dependencies.yml index ddf53ad9110a..7f5fe049bb6c 100644 --- a/dependencies.yml +++ b/dependencies.yml @@ -26,14 +26,14 @@ collectors: path: / settings: collect_root: true - bootstrap_command: yarn + bootstrap_command: yarn --ignore-scripts actors: # pull requests for updates to our major version - type: js-lerna versions: "L.Y.Y" settings: batch_mode: true - bootstrap_command: yarn + bootstrap_command: yarn --ignore-scripts github_labels: - dependencies:update github_assignees: From bfafaa8bd0d32d357f1a893f579edfd56e7cdc67 Mon Sep 17 00:00:00 2001 From: hypnos Date: Thu, 14 Dec 2017 22:11:16 +0300 Subject: [PATCH 086/162] Dependencies.io: run yarn with `--ignore-engines` and `--silent` flags --- dependencies.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dependencies.yml b/dependencies.yml index 7f5fe049bb6c..bb0aeff29a00 100644 --- a/dependencies.yml +++ b/dependencies.yml @@ -26,14 +26,14 @@ collectors: path: / settings: collect_root: true - bootstrap_command: yarn --ignore-scripts + bootstrap_command: yarn --ignore-scripts --ignore-engines --silent actors: # pull requests for updates to our major version - type: js-lerna versions: "L.Y.Y" settings: batch_mode: true - bootstrap_command: yarn --ignore-scripts + bootstrap_command: yarn --ignore-scripts --ignore-engines --silent github_labels: - dependencies:update github_assignees: From 57c164d3b36e9b7fdf670e653e6f98ec66ec0e94 Mon Sep 17 00:00:00 2001 From: hypnos Date: Thu, 14 Dec 2017 22:50:15 +0300 Subject: [PATCH 087/162] Dependencies.io: skip updating lockfile --- dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.yml b/dependencies.yml index bb0aeff29a00..9e73f51dfbfd 100644 --- a/dependencies.yml +++ b/dependencies.yml @@ -33,7 +33,7 @@ collectors: versions: "L.Y.Y" settings: batch_mode: true - bootstrap_command: yarn --ignore-scripts --ignore-engines --silent + bootstrap_command: echo 'Skip updating lockfile' github_labels: - dependencies:update github_assignees: From 39a4e035c1f72f62077e485bd6e8d346e77677df Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:02 +0000 Subject: [PATCH 088/162] Update eslint-plugin-jest from 21.4.2 to 21.4.3 in / --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0bd9c7e63de8..5af6761fa777 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "eslint-config-airbnb": "^16.1.0", "eslint-config-prettier": "^2.9.0", "eslint-plugin-import": "^2.8.0", - "eslint-plugin-jest": "^21.4.2", + "eslint-plugin-jest": "^21.4.3", "eslint-plugin-json": "^1.2.0", "eslint-plugin-jsx-a11y": "^6.0.3", "eslint-plugin-prettier": "^2.2.0", From 77e4d9f36944e2e6acd54dfab3ca7b4b9ea3a885 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:03 +0000 Subject: [PATCH 089/162] Update nodemon from 1.12.6 to 1.12.7 in / --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5af6761fa777..3fa61f2a69ef 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "lerna": "^2.5.1", "lint-staged": "^6.0.0", "lodash": "^4.17.4", - "nodemon": "^1.12.6", + "nodemon": "^1.12.7", "npmlog": "^4.1.2", "prettier": "^1.9.2", "process-nextick-args": "^1.0.7", From 11de6a9be0ce74ca8363051554602cd7fa08efd1 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:04 +0000 Subject: [PATCH 090/162] Update symlink-dir from 1.1.0 to 1.1.1 in / --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3fa61f2a69ef..2643042802b6 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "remark-preset-lint-recommended": "^3.0.1", "remark-toc": "^4.0.1", "shelljs": "^0.7.8", - "symlink-dir": "^1.1.0" + "symlink-dir": "^1.1.1" }, "engines": { "node": ">=8.0.0", From 408c71b7125c364c33e6e653844aea2f4c1cee14 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:04 +0000 Subject: [PATCH 091/162] Update @types/node from 8.0.58 to 8.5.1 in addons/knobs --- addons/knobs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/knobs/package.json b/addons/knobs/package.json index 54a3eeafde23..02158bf03115 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -28,7 +28,7 @@ "util-deprecate": "^1.0.2" }, "devDependencies": { - "@types/node": "^8.0.58", + "@types/node": "^8.5.1", "@types/react": "^16.0.29", "raw-loader": "^0.5.1", "style-loader": "^0.19.0", From 17fb36a2de91bc11bf49d4362101be0a7c16eee8 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:05 +0000 Subject: [PATCH 092/162] Update @types/react from 16.0.29 to 16.0.30 in addons/knobs --- addons/knobs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/knobs/package.json b/addons/knobs/package.json index 02158bf03115..afa4a291f603 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -29,7 +29,7 @@ }, "devDependencies": { "@types/node": "^8.5.1", - "@types/react": "^16.0.29", + "@types/react": "^16.0.30", "raw-loader": "^0.5.1", "style-loader": "^0.19.0", "typescript": "^2.6.2", From 8264edb4b6593230cc2117a4cad7cb97de3dcf74 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:06 +0000 Subject: [PATCH 093/162] Update style-loader from 0.19.0 to 0.19.1 in addons/knobs --- addons/knobs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/knobs/package.json b/addons/knobs/package.json index afa4a291f603..ae28f7f56ee1 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -31,7 +31,7 @@ "@types/node": "^8.5.1", "@types/react": "^16.0.30", "raw-loader": "^0.5.1", - "style-loader": "^0.19.0", + "style-loader": "^0.19.1", "typescript": "^2.6.2", "typescript-definition-tester": "^0.0.5", "vue": "^2.5.10" From e5e3653787096c2ca17fe8df777b2d26a3e66eb8 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:07 +0000 Subject: [PATCH 094/162] Update vue from 2.5.10 to 2.5.11 in addons/knobs --- addons/knobs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/knobs/package.json b/addons/knobs/package.json index ae28f7f56ee1..bbdeb207676a 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -34,7 +34,7 @@ "style-loader": "^0.19.1", "typescript": "^2.6.2", "typescript-definition-tester": "^0.0.5", - "vue": "^2.5.10" + "vue": "^2.5.11" }, "peerDependencies": { "react": "*", From 0c70ceae745fa453ddd0c3d3f1081e9d2a552a91 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:07 +0000 Subject: [PATCH 095/162] Update autoprefixer from 7.2.2 to 7.2.3 in app/react-native --- app/react-native/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/react-native/package.json b/app/react-native/package.json index 2b164edceaf6..fc14f0e9d40b 100644 --- a/app/react-native/package.json +++ b/app/react-native/package.json @@ -29,7 +29,7 @@ "@storybook/addons": "^3.2.17", "@storybook/channel-websocket": "^3.2.17", "@storybook/ui": "^3.2.17", - "autoprefixer": "^7.2.2", + "autoprefixer": "^7.2.3", "babel-core": "^6.26.0", "babel-loader": "^7.1.2", "babel-plugin-syntax-async-functions": "^6.13.0", From 68f5acd561c29fab236a6ea39e10744e5b10902f Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:08 +0000 Subject: [PATCH 096/162] Update style-loader from 0.18.2 to 0.19.1 in app/react-native --- app/react-native/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/react-native/package.json b/app/react-native/package.json index fc14f0e9d40b..20f141c9d423 100644 --- a/app/react-native/package.json +++ b/app/react-native/package.json @@ -60,7 +60,7 @@ "react-native-compat": "^1.0.0", "react-native-iphone-x-helper": "^1.0.1", "shelljs": "^0.7.8", - "style-loader": "^0.18.2", + "style-loader": "^0.19.1", "url-loader": "^0.6.2", "url-parse": "^1.1.9", "util-deprecate": "^1.0.2", From 07f54de9a6fbd0caaa57645905dfbab1e928fd4c Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:09 +0000 Subject: [PATCH 097/162] Update autoprefixer from 7.2.2 to 7.2.3 in app/react --- app/react/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/react/package.json b/app/react/package.json index b16c3e92c8f6..87381fbcb21e 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -28,7 +28,7 @@ "@storybook/channel-postmessage": "^3.2.17", "@storybook/ui": "^3.2.17", "airbnb-js-shims": "^1.4.0", - "autoprefixer": "^7.2.2", + "autoprefixer": "^7.2.3", "babel-core": "^6.26.0", "babel-loader": "^7.1.2", "babel-plugin-react-docgen": "^1.8.0", From d0c1a9657b323690cd4e77a4a49186e9d5756fc6 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:09 +0000 Subject: [PATCH 098/162] Update style-loader from 0.18.2 to 0.19.1 in app/react --- app/react/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/react/package.json b/app/react/package.json index 87381fbcb21e..1053d3862fb4 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -66,7 +66,7 @@ "request": "^2.83.0", "serve-favicon": "^2.4.5", "shelljs": "^0.7.8", - "style-loader": "^0.18.2", + "style-loader": "^0.19.1", "url-loader": "^0.6.2", "util-deprecate": "^1.0.2", "uuid": "^3.1.0", From 46e30652800faab1d84dbb6b1ca67d6f4d789cef Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:10 +0000 Subject: [PATCH 099/162] Update nodemon from 1.12.6 to 1.12.7 in app/react --- app/react/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/react/package.json b/app/react/package.json index 1053d3862fb4..e082897a30dd 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -75,7 +75,7 @@ "webpack-hot-middleware": "^2.21.0" }, "devDependencies": { - "nodemon": "^1.12.6" + "nodemon": "^1.12.7" }, "peerDependencies": { "react": ">=15.0.0 || ^16.0.0", From cbac802c28bec8a6695d7057d20dedc773afce84 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:11 +0000 Subject: [PATCH 100/162] Update autoprefixer from 7.2.2 to 7.2.3 in app/vue --- app/vue/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vue/package.json b/app/vue/package.json index 9febae50fa6b..5f1f99aed1d0 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -28,7 +28,7 @@ "@storybook/channel-postmessage": "^3.2.17", "@storybook/ui": "^3.2.17", "airbnb-js-shims": "^1.4.0", - "autoprefixer": "^7.2.2", + "autoprefixer": "^7.2.3", "babel-core": "^6.26.0", "babel-loader": "^7.1.2", "babel-plugin-react-docgen": "^1.8.0", From 1aa50563f08ebbd7b2bf3c032be4db66f1d54bcd Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:12 +0000 Subject: [PATCH 101/162] Update style-loader from 0.18.2 to 0.19.1 in app/vue --- app/vue/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vue/package.json b/app/vue/package.json index 5f1f99aed1d0..04d6d3376d3b 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -65,7 +65,7 @@ "request": "^2.83.0", "serve-favicon": "^2.4.5", "shelljs": "^0.7.8", - "style-loader": "^0.18.2", + "style-loader": "^0.19.1", "url-loader": "^0.6.2", "util-deprecate": "^1.0.2", "uuid": "^3.1.0", From f6a306767506bc8925b336cb3b25908049647c99 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:12 +0000 Subject: [PATCH 102/162] Update nodemon from 1.12.6 to 1.12.7 in app/vue --- app/vue/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vue/package.json b/app/vue/package.json index 04d6d3376d3b..67b995127491 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -76,7 +76,7 @@ "webpack-hot-middleware": "^2.21.0" }, "devDependencies": { - "nodemon": "^1.12.6", + "nodemon": "^1.12.7", "vue": "^2.5.10", "vue-loader": "^13.5.0", "vue-template-compiler": "^2.5.10" From 9f0824e95269d4cdf08a7f47030dfca6d95e4b6d Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:13 +0000 Subject: [PATCH 103/162] Update vue from 2.5.10 to 2.5.11 in app/vue --- app/vue/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/vue/package.json b/app/vue/package.json index 67b995127491..9d86b83873bf 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -77,12 +77,12 @@ }, "devDependencies": { "nodemon": "^1.12.7", - "vue": "^2.5.10", + "vue": "^2.5.11", "vue-loader": "^13.5.0", "vue-template-compiler": "^2.5.10" }, "peerDependencies": { - "vue": "2.5.10", + "vue": "2.5.11", "vue-loader": "*", "vue-template-compiler": "2.5.10" } From 4e1ea58688ad080fb246cf28a24f369ae0a26d9f Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:14 +0000 Subject: [PATCH 104/162] Update vue-template-compiler from 2.5.10 to 2.5.11 in app/vue --- app/vue/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/vue/package.json b/app/vue/package.json index 9d86b83873bf..f9320337d33b 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -79,11 +79,11 @@ "nodemon": "^1.12.7", "vue": "^2.5.11", "vue-loader": "^13.5.0", - "vue-template-compiler": "^2.5.10" + "vue-template-compiler": "^2.5.11" }, "peerDependencies": { "vue": "2.5.11", "vue-loader": "*", - "vue-template-compiler": "2.5.10" + "vue-template-compiler": "2.5.11" } } From c6c1dff3802001a5d52ea0ed9b11717e7d51a43e Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:14 +0000 Subject: [PATCH 105/162] Update vue from 2.5.10 to 2.5.11 in examples/vue-kitchen-sink --- examples/vue-kitchen-sink/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vue-kitchen-sink/package.json b/examples/vue-kitchen-sink/package.json index a5034713ebcd..2b1306c04ed8 100644 --- a/examples/vue-kitchen-sink/package.json +++ b/examples/vue-kitchen-sink/package.json @@ -25,7 +25,7 @@ "webpack-dev-server": "^2.9.7" }, "dependencies": { - "vue": "^2.5.10", + "vue": "^2.5.11", "vuex": "^3.0.0" }, "scripts": { From 703f05f8b8db5c4df989998ec869a22404220e8a Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:02:15 +0000 Subject: [PATCH 106/162] Update vue-template-compiler from 2.5.10 to 2.5.11 in examples/vue-kitchen-sink --- examples/vue-kitchen-sink/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vue-kitchen-sink/package.json b/examples/vue-kitchen-sink/package.json index 2b1306c04ed8..5e10fff86147 100644 --- a/examples/vue-kitchen-sink/package.json +++ b/examples/vue-kitchen-sink/package.json @@ -20,7 +20,7 @@ "vue-hot-reload-api": "^2.2.4", "vue-loader": "^13.5.0", "vue-style-loader": "^3.0.1", - "vue-template-compiler": "^2.5.10", + "vue-template-compiler": "^2.5.11", "webpack": "^3.10.0", "webpack-dev-server": "^2.9.7" }, From 28cd8a97367541ca1af4c3ed861f39cd2ab89d68 Mon Sep 17 00:00:00 2001 From: hypnos Date: Thu, 14 Dec 2017 23:08:28 +0300 Subject: [PATCH 107/162] Dependencies.io: enable updating lockfile --- dependencies.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dependencies.yml b/dependencies.yml index 9e73f51dfbfd..bb0aeff29a00 100644 --- a/dependencies.yml +++ b/dependencies.yml @@ -33,7 +33,7 @@ collectors: versions: "L.Y.Y" settings: batch_mode: true - bootstrap_command: echo 'Skip updating lockfile' + bootstrap_command: yarn --ignore-scripts --ignore-engines --silent github_labels: - dependencies:update github_assignees: From 210ac2973038dbeb5c9e4e717627c05df48d9148 Mon Sep 17 00:00:00 2001 From: hypnos Date: Thu, 14 Dec 2017 23:10:39 +0300 Subject: [PATCH 108/162] Update lockfile --- yarn.lock | 74 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 39 insertions(+), 35 deletions(-) diff --git a/yarn.lock b/yarn.lock index e500eb3fb0d1..6f4072a3b4d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -118,27 +118,27 @@ version "3.0.1" resolved "https://registry.yarnpkg.com/@types/inline-style-prefixer/-/inline-style-prefixer-3.0.1.tgz#8541e636b029124b747952e9a28848286d2b5bf6" -"@types/mz@0.0.31": - version "0.0.31" - resolved "https://registry.yarnpkg.com/@types/mz/-/mz-0.0.31.tgz#a4d80c082fefe71e40a7c0f07d1e6555bbbc7b52" +"@types/mz@0.0.32": + version "0.0.32" + resolved "https://registry.yarnpkg.com/@types/mz/-/mz-0.0.32.tgz#e8248b4e41424c052edc1725dd33650c313a3659" dependencies: "@types/node" "*" -"@types/node@*", "@types/node@^8.0.0": +"@types/node@*": version "8.0.52" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.52.tgz#8e7f47747868e7687f2cd4922966e2d6af78d22d" -"@types/node@^8.0.58": - version "8.0.58" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.58.tgz#5b3881c0be3a646874803fee3197ea7f1ed6df90" +"@types/node@^8.0.28", "@types/node@^8.5.1": + version "8.5.1" + resolved "https://registry.yarnpkg.com/@types/node/-/node-8.5.1.tgz#4ec3020bcdfe2abffeef9ba3fbf26fca097514b5" "@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" -"@types/react@^16.0.29": - version "16.0.29" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.29.tgz#4eea6a8de9f40ca71d580ae7a9f3b4b77b368de8" +"@types/react@^16.0.30": + version "16.0.30" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.30.tgz#cca9b180160004df574519c3d7c559fb181d545f" JSONStream@^1.0.4: version "1.3.1" @@ -572,12 +572,12 @@ autoprefixer@^6.3.1: postcss "^5.2.16" postcss-value-parser "^3.2.3" -autoprefixer@^7.2.2: - version "7.2.2" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.2.2.tgz#082293b964be00602efacc59aa4aa7df5158bb6e" +autoprefixer@^7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.2.3.tgz#c2841e38b7940c2d0a9bbffd72c75f33637854f8" dependencies: browserslist "^2.10.0" - caniuse-lite "^1.0.30000780" + caniuse-lite "^1.0.30000783" normalize-range "^0.1.2" num2fraction "^1.2.2" postcss "^6.0.14" @@ -2213,6 +2213,10 @@ 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.30000783: + version "1.0.30000783" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000783.tgz#9b5499fb1b503d2345d12aa6b8612852f4276ffd" + capture-stack-trace@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d" @@ -3904,9 +3908,9 @@ eslint-plugin-import@2.8.0, eslint-plugin-import@^2.8.0: minimatch "^3.0.3" read-pkg-up "^2.0.0" -eslint-plugin-jest@^21.4.2: - version "21.4.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-21.4.2.tgz#0e8ec03687259169cef46656827a0a0715e8a8d4" +eslint-plugin-jest@^21.4.3: + version "21.4.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-21.4.3.tgz#34a5ded103cf2482b2e1c28d0c0bb7dbe1b3fc38" eslint-plugin-json@^1.2.0: version "1.2.0" @@ -7928,9 +7932,9 @@ 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.6: - version "1.12.6" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.12.6.tgz#aa0ca0f3b9ea0f09e970e8135b2c9c9aa84eb711" +nodemon@^1.12.7: + version "1.12.7" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.12.7.tgz#4d0fa8386291c4f532f583cc102c05350722f647" dependencies: chokidar "^1.7.0" debug "^2.6.8" @@ -10898,16 +10902,16 @@ strong-log-transformer@^1.0.6: moment "^2.6.0" through "^2.3.4" -style-loader@0.19.0, style-loader@^0.19.0: +style-loader@0.19.0: version "0.19.0" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.19.0.tgz#7258e788f0fee6a42d710eaf7d6c2412a4c50759" dependencies: loader-utils "^1.0.2" schema-utils "^0.3.0" -style-loader@^0.18.2: - version "0.18.2" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.18.2.tgz#cc31459afbcd6d80b7220ee54b291a9fd66ff5eb" +style-loader@^0.19.1: + version "0.19.1" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.19.1.tgz#591ffc80bcefe268b77c5d9ebc0505d772619f85" dependencies: loader-utils "^1.0.2" schema-utils "^0.3.0" @@ -11003,12 +11007,12 @@ symbol-tree@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" -symlink-dir@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/symlink-dir/-/symlink-dir-1.1.0.tgz#13a747574f1b83a3eeb02f401358365178637482" +symlink-dir@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/symlink-dir/-/symlink-dir-1.1.1.tgz#ea6367d96b0257f730dd03f95212eed24623b93e" dependencies: - "@types/mz" "0.0.31" - "@types/node" "^8.0.0" + "@types/mz" "0.0.32" + "@types/node" "^8.0.28" graceful-fs "^4.1.11" is-windows "^1.0.0" mkdirp-promise "^5.0.0" @@ -11765,9 +11769,9 @@ vue-style-loader@^3.0.0, vue-style-loader@^3.0.1: hash-sum "^1.0.2" loader-utils "^1.0.2" -vue-template-compiler@^2.5.10: - version "2.5.10" - resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.10.tgz#8d2754677430bf520650a7e2aee9070635158fc5" +vue-template-compiler@^2.5.11: + version "2.5.11" + resolved "https://registry.yarnpkg.com/vue-template-compiler/-/vue-template-compiler-2.5.11.tgz#7dda6905e464ff173c8e70e1dfd1769a7888b7e8" dependencies: de-indent "^1.0.2" he "^1.1.0" @@ -11776,9 +11780,9 @@ vue-template-es2015-compiler@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.6.0.tgz#dc42697133302ce3017524356a6c61b7b69b4a18" -vue@^2.5.10: - version "2.5.10" - resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.10.tgz#dcd772e2594ba994145f2f09522149d9a1e7841a" +vue@^2.5.11: + version "2.5.11" + resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.11.tgz#80ca2657aa81f03545cd8dd5a2f55454641e6405" vuex@^3.0.0: version "3.0.1" From 1e903b3f41033373fb1fd1de5cd4a4902850c967 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:21:11 +0000 Subject: [PATCH 109/162] Update gatsby-plugin-sharp from 1.6.23 to 1.6.24 --- docs/package.json | 2 +- docs/yarn.lock | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/package.json b/docs/package.json index 6790afad460a..d8c808f6589c 100644 --- a/docs/package.json +++ b/docs/package.json @@ -32,7 +32,7 @@ "bootstrap": "^3.3.7", "gatsby": "^1.9.134", "gatsby-link": "^1.6.32", - "gatsby-plugin-sharp": "^1.6.23", + "gatsby-plugin-sharp": "^1.6.24", "gatsby-remark-autolink-headers": "^1.4.10", "gatsby-remark-copy-linked-files": "^1.5.23", "gatsby-remark-images": "^1.5.35", diff --git a/docs/yarn.lock b/docs/yarn.lock index 5eb98da82578..39720eb41fac 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4246,6 +4246,23 @@ gatsby-plugin-sharp@^1.6.23: sharp "^0.17.3" svgo "^0.7.2" +gatsby-plugin-sharp@^1.6.24: + version "1.6.24" + resolved "https://registry.yarnpkg.com/gatsby-plugin-sharp/-/gatsby-plugin-sharp-1.6.24.tgz#f885a384b222f655534e45788a99863a038bf107" + dependencies: + async "^2.1.2" + babel-runtime "^6.26.0" + bluebird "^3.5.0" + image-size "^0.5.1" + imagemin "^5.2.2" + imagemin-pngquant "^5.0.0" + imagemin-webp "^4.0.0" + lodash "^4.17.4" + potrace "^2.1.1" + progress "^1.1.8" + sharp "^0.17.3" + svgo "^0.7.2" + gatsby-react-router-scroll@^1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/gatsby-react-router-scroll/-/gatsby-react-router-scroll-1.0.6.tgz#7cf83afec00ed5441522c3db3b84ec4a12df509a" From 16d251913ad04f54c5bf7a31f1cdaf788f0508dc Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:22:11 +0000 Subject: [PATCH 110/162] Update danger from 2.1.4 to 2.1.5 in / --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0bd9c7e63de8..10f330ccc993 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "codecov": "^3.0.0", "commander": "^2.12.2", "cross-env": "^5.1.1", - "danger": "^2.1.4", + "danger": "^2.1.5", "enzyme": "^3.2.0", "enzyme-adapter-react-16": "^1.1.0", "eslint": "^4.13.1", diff --git a/yarn.lock b/yarn.lock index e500eb3fb0d1..340910a9470a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3155,9 +3155,9 @@ damerau-levenshtein@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" -danger@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/danger/-/danger-2.1.4.tgz#908c59cf8ddcbe64fc6968f2ae70a5c641a27a9b" +danger@^2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/danger/-/danger-2.1.5.tgz#76b0e2a0cf7de82e844391d2f9c560539fdf49c5" dependencies: babel-polyfill "7.0.0-alpha.19" chalk "^2.0.0" @@ -11724,7 +11724,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" From 480b38fa675605a8967b81f272087fbcdaace827 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 20:22:40 +0000 Subject: [PATCH 111/162] Update gatsby-remark-images from 1.5.35 to 1.5.36 --- docs/package.json | 2 +- docs/yarn.lock | 25 ++++--------------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/docs/package.json b/docs/package.json index d8c808f6589c..ed30aa64a07f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -35,7 +35,7 @@ "gatsby-plugin-sharp": "^1.6.24", "gatsby-remark-autolink-headers": "^1.4.10", "gatsby-remark-copy-linked-files": "^1.5.23", - "gatsby-remark-images": "^1.5.35", + "gatsby-remark-images": "^1.5.36", "gatsby-remark-smartypants": "^1.4.10", "gatsby-source-filesystem": "^1.5.11", "gatsby-transformer-remark": "^1.7.25", diff --git a/docs/yarn.lock b/docs/yarn.lock index 39720eb41fac..15f549c5ea82 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4229,23 +4229,6 @@ gatsby-module-loader@^1.0.9: babel-runtime "^6.26.0" loader-utils "^0.2.16" -gatsby-plugin-sharp@^1.6.23: - version "1.6.23" - resolved "https://registry.yarnpkg.com/gatsby-plugin-sharp/-/gatsby-plugin-sharp-1.6.23.tgz#6f53013ee72a6b4613587ec07485cffc18e40e9b" - dependencies: - async "^2.1.2" - babel-runtime "^6.26.0" - bluebird "^3.5.0" - image-size "^0.5.1" - imagemin "^5.2.2" - imagemin-pngquant "^5.0.0" - imagemin-webp "^4.0.0" - lodash "^4.17.4" - potrace "^2.1.1" - progress "^1.1.8" - sharp "^0.17.3" - svgo "^0.7.2" - gatsby-plugin-sharp@^1.6.24: version "1.6.24" resolved "https://registry.yarnpkg.com/gatsby-plugin-sharp/-/gatsby-plugin-sharp-1.6.24.tgz#f885a384b222f655534e45788a99863a038bf107" @@ -4293,13 +4276,13 @@ gatsby-remark-copy-linked-files@^1.5.23: path-is-inside "^1.0.2" unist-util-visit "^1.1.1" -gatsby-remark-images@^1.5.35: - version "1.5.35" - resolved "https://registry.yarnpkg.com/gatsby-remark-images/-/gatsby-remark-images-1.5.35.tgz#141786c33129538f4a560389f94d1f902c66872e" +gatsby-remark-images@^1.5.36: + version "1.5.36" + resolved "https://registry.yarnpkg.com/gatsby-remark-images/-/gatsby-remark-images-1.5.36.tgz#12920b1c1969d519befd4c661201c28e30a896a8" dependencies: babel-runtime "^6.26.0" cheerio "^1.0.0-rc.2" - gatsby-plugin-sharp "^1.6.23" + gatsby-plugin-sharp "^1.6.24" is-relative-url "^2.0.0" lodash "^4.17.4" slash "^1.0.0" From 2231bc9c52b7a1563ba8f3038b1c61f6762d7ba3 Mon Sep 17 00:00:00 2001 From: hypnos Date: Thu, 14 Dec 2017 23:42:36 +0300 Subject: [PATCH 112/162] Update lockfile --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 7f22668a6e23..a5c84dfb0e33 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11728,7 +11728,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 5e33d32e48cc77ec7b8dfa640781f69914300d32 Mon Sep 17 00:00:00 2001 From: Filipp Riabchun Date: Fri, 15 Dec 2017 00:21:53 +0300 Subject: [PATCH 113/162] Update dependencies.yml --- dependencies.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dependencies.yml b/dependencies.yml index bb0aeff29a00..b018845da85b 100644 --- a/dependencies.yml +++ b/dependencies.yml @@ -26,14 +26,14 @@ collectors: path: / settings: collect_root: true - bootstrap_command: yarn --ignore-scripts --ignore-engines --silent + bootstrap_command: yarn --ignore-scripts --ignore-engines --silent --prefer-offline actors: # pull requests for updates to our major version - type: js-lerna versions: "L.Y.Y" settings: batch_mode: true - bootstrap_command: yarn --ignore-scripts --ignore-engines --silent + bootstrap_command: yarn --ignore-scripts --ignore-engines --silent --prefer-offline github_labels: - dependencies:update github_assignees: From edb80c521849a1274e3a40fe0899a9b23f26e889 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Thu, 14 Dec 2017 21:33:19 +0000 Subject: [PATCH 114/162] Update gatsby from 1.9.134 to 1.9.135 --- docs/package.json | 2 +- docs/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/package.json b/docs/package.json index ed30aa64a07f..1c4dcfbc62f6 100644 --- a/docs/package.json +++ b/docs/package.json @@ -30,7 +30,7 @@ "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", "bootstrap": "^3.3.7", - "gatsby": "^1.9.134", + "gatsby": "^1.9.135", "gatsby-link": "^1.6.32", "gatsby-plugin-sharp": "^1.6.24", "gatsby-remark-autolink-headers": "^1.4.10", diff --git a/docs/yarn.lock b/docs/yarn.lock index 15f549c5ea82..26f3bbbef22a 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4335,9 +4335,9 @@ gatsby-transformer-remark@^1.7.25: unist-util-select "^1.5.0" unist-util-visit "^1.1.1" -gatsby@^1.9.134: - version "1.9.134" - resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.134.tgz#fe6c088151f3442e089d3b81238a5c56827fa578" +gatsby@^1.9.135: + version "1.9.135" + resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.135.tgz#7ab1c684c8556cb4324b4888d77efd1a919fc4e0" dependencies: async "^2.1.2" babel-code-frame "^6.22.0" From 7830bed85a796a3249ecf9b4a37aa761490da2b8 Mon Sep 17 00:00:00 2001 From: hypnos Date: Fri, 15 Dec 2017 01:19:40 +0300 Subject: [PATCH 115/162] Remove remarc-toc plugin --- .remarkrc.js | 7 ------- package.json | 1 - yarn.lock | 35 +---------------------------------- 3 files changed, 1 insertion(+), 42 deletions(-) diff --git a/.remarkrc.js b/.remarkrc.js index 078472d14052..9a2b8e63e7e5 100644 --- a/.remarkrc.js +++ b/.remarkrc.js @@ -14,12 +14,5 @@ module.exports = { }, }, ], - [ - 'remark-toc', - { - tight: true, - maxDepth: 3, - }, - ], ], }; diff --git a/package.json b/package.json index 7755de1abd16..06bcede0325b 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,6 @@ "remark-lint-code": "^2.0.0", "remark-lint-code-eslint": "^2.0.0", "remark-preset-lint-recommended": "^3.0.1", - "remark-toc": "^4.0.1", "shelljs": "^0.7.8", "symlink-dir": "^1.1.1" }, diff --git a/yarn.lock b/yarn.lock index 364639d5c965..cecfc04a1c61 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3592,10 +3592,6 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" -"emoji-regex@>=6.0.0 <=6.1.1": - version "6.1.1" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.1.1.tgz#c6cd0ec1b0642e2a3c67a1137efc5e796da4f88e" - emoji-regex@^6.1.0: version "6.5.1" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-6.5.1.tgz#9baea929b155565c11ea41c6626eaa65cef992c2" @@ -4908,12 +4904,6 @@ github-release-from-changelog@^1.3.0: grizzly "^2.0.0" minimist "^1.2.0" -github-slugger@^1.0.0, github-slugger@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.2.0.tgz#8ada3286fd046d8951c3c952a8d7854cfd90fd9a" - dependencies: - emoji-regex ">=6.0.0 <=6.1.1" - github@^11, github@^11.0.0: version "11.0.0" resolved "https://registry.yarnpkg.com/github/-/github-11.0.0.tgz#edb32df5efb33cad004ebf0bdd2a4b30bb63a854" @@ -7464,18 +7454,10 @@ mdast-util-heading-style@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/mdast-util-heading-style/-/mdast-util-heading-style-1.0.3.tgz#efb390dbc8aa016c3cf577a034900db27ee7247c" -mdast-util-to-string@^1.0.0, mdast-util-to-string@^1.0.2: +mdast-util-to-string@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/mdast-util-to-string/-/mdast-util-to-string-1.0.4.tgz#5c455c878c9355f0c1e7f3e8b719cf583691acfb" -mdast-util-toc@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/mdast-util-toc/-/mdast-util-toc-2.0.1.tgz#b1d2cb23bfb01f812fa7b55bffe8b0a8bedf6f21" - dependencies: - github-slugger "^1.1.1" - mdast-util-to-string "^1.0.2" - unist-util-visit "^1.1.0" - media-typer@0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" @@ -9981,14 +9963,6 @@ remark-preset-lint-recommended@^3.0.1: remark-lint-no-unused-definitions "^1.0.0" remark-lint-ordered-list-marker-style "^1.0.0" -remark-slug@^4.0.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/remark-slug/-/remark-slug-4.2.3.tgz#8d987d0e5e63d4a49ea37b90fe999a3dcfc81b72" - dependencies: - github-slugger "^1.0.0" - mdast-util-to-string "^1.0.0" - unist-util-visit "^1.0.0" - remark-stringify@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/remark-stringify/-/remark-stringify-4.0.0.tgz#4431884c0418f112da44991b4e356cfe37facd87" @@ -10008,13 +9982,6 @@ remark-stringify@^4.0.0: unherit "^1.0.4" xtend "^4.0.1" -remark-toc@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/remark-toc/-/remark-toc-4.0.1.tgz#ff36ff6de54ea07dd59e3f5334a4a3aac1e93185" - dependencies: - mdast-util-toc "^2.0.0" - remark-slug "^4.0.0" - remark@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/remark/-/remark-8.0.0.tgz#287b6df2fe1190e263c1d15e486d3fa835594d6d" From e143f19a0a14ba2f4e785aa0486c0024f945e89c Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 15 Dec 2017 00:10:35 +0100 Subject: [PATCH 116/162] CHANGE eslint to not fix (remove) debugger statements during development, but enforce removing them when validating --- .eslintrc.js | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index d05fded1d6a9..bd9f16f747f8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -30,6 +30,7 @@ module.exports = { singleQuote: true, }, ], + 'no-debugger': process.env.NODE_ENV === 'production' ? error : ignore, quotes: [warn, 'single', { avoidEscape: true }], 'class-methods-use-this': ignore, 'arrow-parens': [warn, 'as-needed'], diff --git a/package.json b/package.json index 06bcede0325b..0d02c681b9b2 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "docs:dev": "npm --prefix docs run dev", "github-release": "github-release-from-changelog", "lint": "yarn lint:js . && yarn lint:md .", - "lint:js": "eslint --cache --cache-location=.cache/eslint --ext .js,.jsx,.json", + "lint:js": "NODE_ENV=production eslint --cache --cache-location=.cache/eslint --ext .js,.jsx,.json", "lint:md": "remark", "publish": "lerna publish", "test": "node ./scripts/test.js", From fac95b5256d36a2c338723c47149f4a4156962fe Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Fri, 15 Dec 2017 16:23:03 +0000 Subject: [PATCH 117/162] Update gatsby-remark-copy-linked-files from 1.5.23 to 1.5.24 --- docs/package.json | 2 +- docs/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/package.json b/docs/package.json index 1c4dcfbc62f6..6ff9ac7d6af9 100644 --- a/docs/package.json +++ b/docs/package.json @@ -34,7 +34,7 @@ "gatsby-link": "^1.6.32", "gatsby-plugin-sharp": "^1.6.24", "gatsby-remark-autolink-headers": "^1.4.10", - "gatsby-remark-copy-linked-files": "^1.5.23", + "gatsby-remark-copy-linked-files": "^1.5.24", "gatsby-remark-images": "^1.5.36", "gatsby-remark-smartypants": "^1.4.10", "gatsby-source-filesystem": "^1.5.11", diff --git a/docs/yarn.lock b/docs/yarn.lock index 26f3bbbef22a..b4a26e19657f 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4263,9 +4263,9 @@ gatsby-remark-autolink-headers@^1.4.10: mdast-util-to-string "^1.0.2" unist-util-visit "^1.1.1" -gatsby-remark-copy-linked-files@^1.5.23: - version "1.5.23" - resolved "https://registry.yarnpkg.com/gatsby-remark-copy-linked-files/-/gatsby-remark-copy-linked-files-1.5.23.tgz#fdd200c1f156e8788efde79d9389ac3694b5c066" +gatsby-remark-copy-linked-files@^1.5.24: + version "1.5.24" + resolved "https://registry.yarnpkg.com/gatsby-remark-copy-linked-files/-/gatsby-remark-copy-linked-files-1.5.24.tgz#5bc02ef35978cc273620042a8351aa13cb97bc47" dependencies: babel-runtime "^6.26.0" cheerio "^1.0.0-rc.2" From 2bd4d143352b66ebf5ed5190618acdaff80b13ad Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Fri, 15 Dec 2017 16:24:38 +0000 Subject: [PATCH 118/162] Update eslint-plugin-jest from 21.4.3 to 21.5.0 in / --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 0d02c681b9b2..6827794dc03d 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "eslint-config-airbnb": "^16.1.0", "eslint-config-prettier": "^2.9.0", "eslint-plugin-import": "^2.8.0", - "eslint-plugin-jest": "^21.4.3", + "eslint-plugin-jest": "^21.5.0", "eslint-plugin-json": "^1.2.0", "eslint-plugin-jsx-a11y": "^6.0.3", "eslint-plugin-prettier": "^2.2.0", diff --git a/yarn.lock b/yarn.lock index cecfc04a1c61..501d4c392562 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3904,9 +3904,9 @@ eslint-plugin-import@2.8.0, eslint-plugin-import@^2.8.0: minimatch "^3.0.3" read-pkg-up "^2.0.0" -eslint-plugin-jest@^21.4.3: - version "21.4.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-21.4.3.tgz#34a5ded103cf2482b2e1c28d0c0bb7dbe1b3fc38" +eslint-plugin-jest@^21.5.0: + version "21.5.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-21.5.0.tgz#c7a3bd2ee9d1c832b4e31dec89f6ad93e08d4853" eslint-plugin-json@^1.2.0: version "1.2.0" From 1d3a3ab4c3d55907d7284e3aa1c3bb34f1d32866 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Fri, 15 Dec 2017 16:26:30 +0000 Subject: [PATCH 119/162] Update nodemon from 1.12.7 to 1.13.2 in / --- package.json | 2 +- yarn.lock | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 6827794dc03d..93b7295d1555 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "lerna": "^2.5.1", "lint-staged": "^6.0.0", "lodash": "^4.17.4", - "nodemon": "^1.12.7", + "nodemon": "^1.13.2", "npmlog": "^4.1.2", "prettier": "^1.9.2", "puppeteer": "^0.13.0", diff --git a/yarn.lock b/yarn.lock index 501d4c392562..2b7d211794b0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -74,6 +74,12 @@ git-url-parse "^6.0.2" shelljs "^0.7.0" +"@remy/pstree@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@remy/pstree/-/pstree-1.0.1.tgz#420abb613c72cd29f8c595bd7d6c55691bb96910" + dependencies: + ps-tree "^1.1.0" + "@storybook/mantra-core@^1.7.0": version "1.7.2" resolved "https://registry.yarnpkg.com/@storybook/mantra-core/-/mantra-core-1.7.2.tgz#e10c7faca29769e97131e0e0308ef7cfb655b70c" @@ -7921,6 +7927,21 @@ nodemon@^1.12.7: undefsafe "0.0.3" update-notifier "^2.3.0" +nodemon@^1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.13.2.tgz#4f772d8e68ecbd9792d5af39f0dad6f708e46ef1" + dependencies: + "@remy/pstree" "^1.0.1" + 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" + touch "^3.1.0" + undefsafe "0.0.3" + update-notifier "^2.3.0" + nomnom@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.8.1.tgz#2151f722472ba79e50a76fc125bb8c8f2e4dc2a7" From 40582c85d121f10c67d23567f447956793dc57d7 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Fri, 15 Dec 2017 16:28:21 +0000 Subject: [PATCH 120/162] Update nodemon from 1.12.7 to 1.13.2 in app/react --- app/react/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/react/package.json b/app/react/package.json index e082897a30dd..0a64e3cf8534 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -75,7 +75,7 @@ "webpack-hot-middleware": "^2.21.0" }, "devDependencies": { - "nodemon": "^1.12.7" + "nodemon": "^1.13.2" }, "peerDependencies": { "react": ">=15.0.0 || ^16.0.0", From ab82990a5d06dbc02c37a74d77482e5bd7645254 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Fri, 15 Dec 2017 16:30:00 +0000 Subject: [PATCH 121/162] Update nodemon from 1.12.7 to 1.13.2 in app/vue --- app/vue/package.json | 2 +- yarn.lock | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/app/vue/package.json b/app/vue/package.json index f9320337d33b..95b042ba8ad4 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -76,7 +76,7 @@ "webpack-hot-middleware": "^2.21.0" }, "devDependencies": { - "nodemon": "^1.12.7", + "nodemon": "^1.13.2", "vue": "^2.5.11", "vue-loader": "^13.5.0", "vue-template-compiler": "^2.5.11" diff --git a/yarn.lock b/yarn.lock index 2b7d211794b0..6fb453918b65 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7912,21 +7912,6 @@ 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.7: - version "1.12.7" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.12.7.tgz#4d0fa8386291c4f532f583cc102c05350722f647" - 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.3.0" - nodemon@^1.13.2: version "1.13.2" resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.13.2.tgz#4f772d8e68ecbd9792d5af39f0dad6f708e46ef1" From f134038014e50464069439fd594dceeea4309502 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sat, 16 Dec 2017 16:22:02 +0000 Subject: [PATCH 122/162] Update gatsby from 1.9.135 to 1.9.138 --- docs/package.json | 2 +- docs/yarn.lock | 26 ++++++++++++++++++++++---- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/docs/package.json b/docs/package.json index 6ff9ac7d6af9..b12bbac5d4fe 100644 --- a/docs/package.json +++ b/docs/package.json @@ -30,7 +30,7 @@ "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", "bootstrap": "^3.3.7", - "gatsby": "^1.9.135", + "gatsby": "^1.9.138", "gatsby-link": "^1.6.32", "gatsby-plugin-sharp": "^1.6.24", "gatsby-remark-autolink-headers": "^1.4.10", diff --git a/docs/yarn.lock b/docs/yarn.lock index b4a26e19657f..90c57be5de11 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -1720,6 +1720,18 @@ better-assert@~1.0.0: dependencies: callsite "1.0.0" +better-queue-memory@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/better-queue-memory/-/better-queue-memory-1.0.2.tgz#aa6d169aa1d0cc77409185cb9cb5c7dc251bcd41" + +better-queue@^3.8.6: + version "3.8.6" + resolved "https://registry.yarnpkg.com/better-queue/-/better-queue-3.8.6.tgz#73220bdfab403924cffa7497220dd387abb73a63" + dependencies: + better-queue-memory "^1.0.1" + node-eta "^0.9.0" + uuid "^3.0.0" + big.js@^3.1.3: version "3.2.0" resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" @@ -4335,9 +4347,9 @@ gatsby-transformer-remark@^1.7.25: unist-util-select "^1.5.0" unist-util-visit "^1.1.1" -gatsby@^1.9.135: - version "1.9.135" - resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.135.tgz#7ab1c684c8556cb4324b4888d77efd1a919fc4e0" +gatsby@^1.9.138: + version "1.9.138" + resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.138.tgz#69f710efa66e9bfd33bda52f5fd5fb428ebfa925" dependencies: async "^2.1.2" babel-code-frame "^6.22.0" @@ -4353,6 +4365,7 @@ gatsby@^1.9.135: babel-runtime "^6.26.0" babel-traverse "^6.24.1" babylon "^6.17.3" + better-queue "^3.8.6" bluebird "^3.5.0" chalk "^1.1.3" chokidar "^1.7.0" @@ -4395,6 +4408,7 @@ gatsby@^1.9.135: lodash "^4.17.4" lodash-id "^0.14.0" lowdb "^0.16.2" + md5 "^2.2.1" md5-file "^3.1.1" mime "^1.3.6" mitt "^1.1.2" @@ -6449,7 +6463,7 @@ md5.js@^1.3.4: hash-base "^3.0.0" inherits "^2.0.1" -md5@^2.0.0: +md5@^2.0.0, md5@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/md5/-/md5-2.2.1.tgz#53ab38d5fe3c8891ba465329ea23fac0540126f9" dependencies: @@ -6793,6 +6807,10 @@ node-emoji@^1.0.4: dependencies: lodash.toarray "^4.4.0" +node-eta@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/node-eta/-/node-eta-0.9.0.tgz#9fb0b099bcd2a021940e603c64254dc003d9a7a8" + node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" From d8547a97795fbecf9b94129a09f73f58d9b2033f Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sat, 16 Dec 2017 16:23:13 +0000 Subject: [PATCH 123/162] Update nodemon from 1.13.2 to 1.13.3 in / --- package.json | 2 +- yarn.lock | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 93b7295d1555..71fca30639c5 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "lerna": "^2.5.1", "lint-staged": "^6.0.0", "lodash": "^4.17.4", - "nodemon": "^1.13.2", + "nodemon": "^1.13.3", "npmlog": "^4.1.2", "prettier": "^1.9.2", "puppeteer": "^0.13.0", diff --git a/yarn.lock b/yarn.lock index 6fb453918b65..ff7cd4ec4930 100644 --- a/yarn.lock +++ b/yarn.lock @@ -80,6 +80,12 @@ dependencies: ps-tree "^1.1.0" +"@remy/pstree@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@remy/pstree/-/pstree-1.1.0.tgz#414045d4fec60946604f3718023052aaf49bd8d3" + dependencies: + ps-tree "^1.1.0" + "@storybook/mantra-core@^1.7.0": version "1.7.2" resolved "https://registry.yarnpkg.com/@storybook/mantra-core/-/mantra-core-1.7.2.tgz#e10c7faca29769e97131e0e0308ef7cfb655b70c" @@ -7927,6 +7933,21 @@ nodemon@^1.13.2: undefsafe "0.0.3" update-notifier "^2.3.0" +nodemon@^1.13.3: + version "1.13.3" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.13.3.tgz#92d23e6b91dca351215a4b8a50d2bd838cd0f9e3" + dependencies: + "@remy/pstree" "^1.1.0" + 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" + touch "^3.1.0" + undefsafe "0.0.3" + update-notifier "^2.3.0" + nomnom@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/nomnom/-/nomnom-1.8.1.tgz#2151f722472ba79e50a76fc125bb8c8f2e4dc2a7" From 48034a458eba5560f47388f61b7b0a45013f596b Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sat, 16 Dec 2017 16:24:47 +0000 Subject: [PATCH 124/162] Update graphql from 0.11.7 to 0.12.0 in addons/graphql --- addons/graphql/package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/graphql/package.json b/addons/graphql/package.json index 162ee14ce6ec..264570902e89 100644 --- a/addons/graphql/package.json +++ b/addons/graphql/package.json @@ -23,7 +23,7 @@ "dependencies": { "global": "^4.3.2", "graphiql": "^0.11.10", - "graphql": "^0.11.7", + "graphql": "^0.12.0", "prop-types": "^15.6.0" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index ff7cd4ec4930..5de77ea37af9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5146,9 +5146,9 @@ graphql@^0.10.1: dependencies: iterall "^1.1.0" -graphql@^0.11.7: - version "0.11.7" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.11.7.tgz#e5abaa9cb7b7cccb84e9f0836bf4370d268750c6" +graphql@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.12.0.tgz#a62576995f67f7a94a02f3e57e91d752bae70055" dependencies: iterall "1.1.3" From 0a8a66b1a19a80817602a7b507c6e1e7f857fc9a Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sat, 16 Dec 2017 16:26:18 +0000 Subject: [PATCH 125/162] Update @types/react from 16.0.30 to 16.0.31 in addons/knobs --- addons/knobs/package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/knobs/package.json b/addons/knobs/package.json index bbdeb207676a..dc9520e1fd90 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -29,7 +29,7 @@ }, "devDependencies": { "@types/node": "^8.5.1", - "@types/react": "^16.0.30", + "@types/react": "^16.0.31", "raw-loader": "^0.5.1", "style-loader": "^0.19.1", "typescript": "^2.6.2", diff --git a/yarn.lock b/yarn.lock index 5de77ea37af9..5d884fd87683 100644 --- a/yarn.lock +++ b/yarn.lock @@ -148,9 +148,9 @@ version "16.0.23" resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.23.tgz#f0f713b07912c6fd8e10c9ccc539443ceb06dbca" -"@types/react@^16.0.30": - version "16.0.30" - resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.30.tgz#cca9b180160004df574519c3d7c559fb181d545f" +"@types/react@^16.0.31": + version "16.0.31" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.0.31.tgz#5285da62f3ac62b797f6d0729a1d6181f3180c3e" JSONStream@^1.0.4: version "1.3.1" From 34cafba6785b9c17101b883262d242fe4a43b3dc Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sat, 16 Dec 2017 16:27:54 +0000 Subject: [PATCH 126/162] Update file-loader from 1.1.5 to 1.1.6 in app/react-native --- app/react-native/package.json | 2 +- yarn.lock | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/react-native/package.json b/app/react-native/package.json index 20f141c9d423..d2897daee3f8 100644 --- a/app/react-native/package.json +++ b/app/react-native/package.json @@ -50,7 +50,7 @@ "css-loader": "^0.28.7", "events": "^1.1.1", "express": "^4.16.2", - "file-loader": "^1.1.5", + "file-loader": "^1.1.6", "find-cache-dir": "^1.0.0", "global": "^4.3.2", "json-loader": "^0.5.7", diff --git a/yarn.lock b/yarn.lock index 5d884fd87683..720ac58592db 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4503,6 +4503,13 @@ file-loader@1.1.5, file-loader@^1.1.5: loader-utils "^1.0.2" schema-utils "^0.3.0" +file-loader@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-1.1.6.tgz#7b9a8f2c58f00a77fddf49e940f7ac978a3ea0e8" + dependencies: + loader-utils "^1.0.2" + schema-utils "^0.3.0" + filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" From ed7d7f653eaca8d805e92effd77472f088411f65 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sat, 16 Dec 2017 16:29:24 +0000 Subject: [PATCH 127/162] Update file-loader from 1.1.5 to 1.1.6 in app/react --- app/react/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/react/package.json b/app/react/package.json index 0a64e3cf8534..168a0c13cd67 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -49,7 +49,7 @@ "css-loader": "^0.28.7", "dotenv-webpack": "^1.5.4", "express": "^4.16.2", - "file-loader": "^1.1.5", + "file-loader": "^1.1.6", "find-cache-dir": "^1.0.0", "glamor": "^2.20.40", "glamorous": "^4.11.0", From e75e50ba114996650a8057eb0a92693fcaa27956 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sat, 16 Dec 2017 16:30:52 +0000 Subject: [PATCH 128/162] Update nodemon from 1.13.2 to 1.13.3 in app/react --- app/react/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/react/package.json b/app/react/package.json index 168a0c13cd67..de34fbd2091a 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -75,7 +75,7 @@ "webpack-hot-middleware": "^2.21.0" }, "devDependencies": { - "nodemon": "^1.13.2" + "nodemon": "^1.13.3" }, "peerDependencies": { "react": ">=15.0.0 || ^16.0.0", From e1f39bdcff6974f52070b069f9b399718c195e4c Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sat, 16 Dec 2017 16:32:19 +0000 Subject: [PATCH 129/162] Update file-loader from 1.1.5 to 1.1.6 in app/vue --- app/vue/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/vue/package.json b/app/vue/package.json index 95b042ba8ad4..a21b1be7a45a 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -49,7 +49,7 @@ "css-loader": "^0.28.7", "dotenv-webpack": "^1.5.4", "express": "^4.16.2", - "file-loader": "^1.1.5", + "file-loader": "^1.1.6", "find-cache-dir": "^1.0.0", "global": "^4.3.2", "json-loader": "^0.5.7", From 88e460d689fb0ec66e9d359c6e8178d35f3452d7 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sat, 16 Dec 2017 16:33:55 +0000 Subject: [PATCH 130/162] Update nodemon from 1.13.2 to 1.13.3 in app/vue --- app/vue/package.json | 2 +- yarn.lock | 21 --------------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/app/vue/package.json b/app/vue/package.json index a21b1be7a45a..eb4fe97a094f 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -76,7 +76,7 @@ "webpack-hot-middleware": "^2.21.0" }, "devDependencies": { - "nodemon": "^1.13.2", + "nodemon": "^1.13.3", "vue": "^2.5.11", "vue-loader": "^13.5.0", "vue-template-compiler": "^2.5.11" diff --git a/yarn.lock b/yarn.lock index 720ac58592db..4f2158c2c0f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -74,12 +74,6 @@ git-url-parse "^6.0.2" shelljs "^0.7.0" -"@remy/pstree@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@remy/pstree/-/pstree-1.0.1.tgz#420abb613c72cd29f8c595bd7d6c55691bb96910" - dependencies: - ps-tree "^1.1.0" - "@remy/pstree@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@remy/pstree/-/pstree-1.1.0.tgz#414045d4fec60946604f3718023052aaf49bd8d3" @@ -7925,21 +7919,6 @@ 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.13.2: - version "1.13.2" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.13.2.tgz#4f772d8e68ecbd9792d5af39f0dad6f708e46ef1" - dependencies: - "@remy/pstree" "^1.0.1" - 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" - touch "^3.1.0" - undefsafe "0.0.3" - update-notifier "^2.3.0" - nodemon@^1.13.3: version "1.13.3" resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.13.3.tgz#92d23e6b91dca351215a4b8a50d2bd838cd0f9e3" From aa7d9cc7e54c64684680dfb5b7998e7a144bc883 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sat, 16 Dec 2017 16:35:24 +0000 Subject: [PATCH 131/162] Update vue-loader from 13.5.0 to 13.6.0 in app/vue --- app/vue/package.json | 4 ++-- yarn.lock | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/app/vue/package.json b/app/vue/package.json index eb4fe97a094f..ca029ee2862c 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -78,12 +78,12 @@ "devDependencies": { "nodemon": "^1.13.3", "vue": "^2.5.11", - "vue-loader": "^13.5.0", + "vue-loader": "^13.6.0", "vue-template-compiler": "^2.5.11" }, "peerDependencies": { "vue": "2.5.11", - "vue-loader": "*", + "vue-loader": "13.6.0", "vue-template-compiler": "2.5.11" } } diff --git a/yarn.lock b/yarn.lock index 4f2158c2c0f4..7d3d4887935c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11734,6 +11734,24 @@ vue-loader@^13.5.0: vue-style-loader "^3.0.0" vue-template-es2015-compiler "^1.6.0" +vue-loader@^13.6.0: + version "13.6.0" + resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-13.6.0.tgz#c1c9570e1e57475f8acb02cda35551b812f88086" + dependencies: + consolidate "^0.14.0" + hash-sum "^1.0.2" + loader-utils "^1.1.0" + lru-cache "^4.1.1" + postcss "^6.0.8" + postcss-load-config "^1.1.0" + postcss-selector-parser "^2.0.0" + prettier "^1.7.0" + resolve "^1.4.0" + source-map "^0.6.1" + vue-hot-reload-api "^2.2.0" + vue-style-loader "^3.0.0" + vue-template-es2015-compiler "^1.6.0" + vue-style-loader@^3.0.0, vue-style-loader@^3.0.1: version "3.0.3" resolved "https://registry.yarnpkg.com/vue-style-loader/-/vue-style-loader-3.0.3.tgz#623658f81506aef9d121cdc113a4f5c9cac32df7" From 99b09bca51ce542c29215b3950bfef3ee173b3ae Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sat, 16 Dec 2017 16:36:53 +0000 Subject: [PATCH 132/162] Update file-loader from 1.1.5 to 1.1.6 in examples/vue-kitchen-sink --- examples/vue-kitchen-sink/package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/vue-kitchen-sink/package.json b/examples/vue-kitchen-sink/package.json index 5e10fff86147..fd03ee75fb93 100644 --- a/examples/vue-kitchen-sink/package.json +++ b/examples/vue-kitchen-sink/package.json @@ -16,7 +16,7 @@ "babel-preset-vue": "^1.2.1", "cross-env": "^5.1.1", "css-loader": "^0.28.7", - "file-loader": "^1.1.5", + "file-loader": "^1.1.6", "vue-hot-reload-api": "^2.2.4", "vue-loader": "^13.5.0", "vue-style-loader": "^3.0.1", diff --git a/yarn.lock b/yarn.lock index 7d3d4887935c..ccbdffc58dad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4490,7 +4490,7 @@ file-entry-cache@^2.0.0: flat-cache "^1.2.1" object-assign "^4.0.1" -file-loader@1.1.5, file-loader@^1.1.5: +file-loader@1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-1.1.5.tgz#91c25b6b6fbe56dae99f10a425fd64933b5c9daa" dependencies: From 94ee97facfbfbe3cacbb2b6838b196ed867291b5 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sat, 16 Dec 2017 16:38:20 +0000 Subject: [PATCH 133/162] Update vue-loader from 13.5.0 to 13.6.0 in examples/vue-kitchen-sink --- examples/vue-kitchen-sink/package.json | 2 +- yarn.lock | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/examples/vue-kitchen-sink/package.json b/examples/vue-kitchen-sink/package.json index fd03ee75fb93..58fb3dc2dd99 100644 --- a/examples/vue-kitchen-sink/package.json +++ b/examples/vue-kitchen-sink/package.json @@ -18,7 +18,7 @@ "css-loader": "^0.28.7", "file-loader": "^1.1.6", "vue-hot-reload-api": "^2.2.4", - "vue-loader": "^13.5.0", + "vue-loader": "^13.6.0", "vue-style-loader": "^3.0.1", "vue-template-compiler": "^2.5.11", "webpack": "^3.10.0", diff --git a/yarn.lock b/yarn.lock index ccbdffc58dad..897ee4be01cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11716,24 +11716,6 @@ 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" -vue-loader@^13.5.0: - version "13.5.0" - resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-13.5.0.tgz#52f7b3790a267eff80012b77ea187a54586dd5d4" - dependencies: - consolidate "^0.14.0" - hash-sum "^1.0.2" - loader-utils "^1.1.0" - lru-cache "^4.1.1" - postcss "^6.0.8" - postcss-load-config "^1.1.0" - postcss-selector-parser "^2.0.0" - prettier "^1.7.0" - resolve "^1.4.0" - source-map "^0.6.1" - vue-hot-reload-api "^2.2.0" - vue-style-loader "^3.0.0" - vue-template-es2015-compiler "^1.6.0" - vue-loader@^13.6.0: version "13.6.0" resolved "https://registry.yarnpkg.com/vue-loader/-/vue-loader-13.6.0.tgz#c1c9570e1e57475f8acb02cda35551b812f88086" From a94eaea9a0908b32e70d38531b98e2860e2c0619 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sun, 17 Dec 2017 16:20:20 +0000 Subject: [PATCH 134/162] Update gatsby from 1.9.138 to 1.9.139 --- docs/package.json | 2 +- docs/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/package.json b/docs/package.json index b12bbac5d4fe..190599b9d997 100644 --- a/docs/package.json +++ b/docs/package.json @@ -30,7 +30,7 @@ "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", "bootstrap": "^3.3.7", - "gatsby": "^1.9.138", + "gatsby": "^1.9.139", "gatsby-link": "^1.6.32", "gatsby-plugin-sharp": "^1.6.24", "gatsby-remark-autolink-headers": "^1.4.10", diff --git a/docs/yarn.lock b/docs/yarn.lock index 90c57be5de11..9092c67bb027 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4347,9 +4347,9 @@ gatsby-transformer-remark@^1.7.25: unist-util-select "^1.5.0" unist-util-visit "^1.1.1" -gatsby@^1.9.138: - version "1.9.138" - resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.138.tgz#69f710efa66e9bfd33bda52f5fd5fb428ebfa925" +gatsby@^1.9.139: + version "1.9.139" + resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.139.tgz#35003af4acf083bb9cec073a2c707d9249b53ca7" dependencies: async "^2.1.2" babel-code-frame "^6.22.0" From 30aaeb2611456ceecb059e2e2c771fe4012d38a7 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sun, 17 Dec 2017 16:21:25 +0000 Subject: [PATCH 135/162] Update eslint-plugin-prettier from 2.3.1 to 2.4.0 in / --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 93b7295d1555..0ff4b87d1340 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "eslint-plugin-jest": "^21.5.0", "eslint-plugin-json": "^1.2.0", "eslint-plugin-jsx-a11y": "^6.0.3", - "eslint-plugin-prettier": "^2.2.0", + "eslint-plugin-prettier": "^2.4.0", "eslint-plugin-react": "^7.5.1", "gh-pages": "^1.1.0", "github-release-from-changelog": "^1.3.0", diff --git a/yarn.lock b/yarn.lock index 6fb453918b65..7b2803080830 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3944,9 +3944,9 @@ eslint-plugin-jsx-a11y@^6.0.3: emoji-regex "^6.1.0" jsx-ast-utils "^2.0.0" -eslint-plugin-prettier@^2.2.0: - version "2.3.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.3.1.tgz#e7a746c67e716f335274b88295a9ead9f544e44d" +eslint-plugin-prettier@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-2.4.0.tgz#85cab0775c6d5e3344ef01e78d960f166fb93aae" dependencies: fast-diff "^1.1.1" jest-docblock "^21.0.0" From 28ec9e343a6786a7ebb5eaa2ffdf4f41242d1023 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sun, 17 Dec 2017 16:22:38 +0000 Subject: [PATCH 136/162] Update graphql from 0.11.7 to 0.12.3 in addons/graphql --- addons/graphql/package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/graphql/package.json b/addons/graphql/package.json index 162ee14ce6ec..93c27fcdab4d 100644 --- a/addons/graphql/package.json +++ b/addons/graphql/package.json @@ -23,7 +23,7 @@ "dependencies": { "global": "^4.3.2", "graphiql": "^0.11.10", - "graphql": "^0.11.7", + "graphql": "^0.12.3", "prop-types": "^15.6.0" }, "peerDependencies": { diff --git a/yarn.lock b/yarn.lock index 7b2803080830..0e7df9156e68 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5140,9 +5140,9 @@ graphql@^0.10.1: dependencies: iterall "^1.1.0" -graphql@^0.11.7: - version "0.11.7" - resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.11.7.tgz#e5abaa9cb7b7cccb84e9f0836bf4370d268750c6" +graphql@^0.12.3: + version "0.12.3" + resolved "https://registry.yarnpkg.com/graphql/-/graphql-0.12.3.tgz#11668458bbe28261c0dcb6e265f515ba79f6ce07" dependencies: iterall "1.1.3" From 0895c1dc12c15257a4cbef71d8e2c41320ce52d2 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sun, 17 Dec 2017 16:23:54 +0000 Subject: [PATCH 137/162] Update moment from 2.19.4 to 2.20.0 in addons/knobs --- addons/knobs/package.json | 2 +- yarn.lock | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/knobs/package.json b/addons/knobs/package.json index bbdeb207676a..a4a795bdc567 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -20,7 +20,7 @@ "global": "^4.3.2", "insert-css": "^2.0.0", "lodash.debounce": "^4.0.8", - "moment": "^2.19.4", + "moment": "^2.20.0", "prop-types": "^15.6.0", "react-color": "^2.11.4", "react-datetime": "^2.11.1", diff --git a/yarn.lock b/yarn.lock index 0e7df9156e68..764ba9011bbf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7712,6 +7712,10 @@ moment@^2.19.4: version "2.19.4" resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.4.tgz#17e5e2c6ead8819c8ecfad83a0acccb312e94682" +moment@^2.20.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.20.0.tgz#53396358994dd3a551e966a66af715ecb6c30ad0" + moment@^2.6.0: version "2.19.2" resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.2.tgz#8a7f774c95a64550b4c7ebd496683908f9419dbe" From 231c731b3e89bbec7bcaae4dd426e0fcbe2daacd Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sun, 17 Dec 2017 16:25:13 +0000 Subject: [PATCH 138/162] Update ws from 3.3.2 to 3.3.3 in app/react-native --- app/react-native/package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/react-native/package.json b/app/react-native/package.json index 20f141c9d423..215dcefc77bc 100644 --- a/app/react-native/package.json +++ b/app/react-native/package.json @@ -68,7 +68,7 @@ "webpack": "^3.10.0", "webpack-dev-middleware": "^1.12.2", "webpack-hot-middleware": "^2.21.0", - "ws": "^3.3.2" + "ws": "^3.3.3" }, "devDependencies": { "react-native": "^0.51.0" diff --git a/yarn.lock b/yarn.lock index 764ba9011bbf..2f1d4722d2bd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12144,9 +12144,9 @@ ws@^3.0.0: safe-buffer "~5.1.0" ultron "~1.1.0" -ws@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.2.tgz#96c1d08b3fefda1d5c1e33700d3bfaa9be2d5608" +ws@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" dependencies: async-limiter "~1.0.0" safe-buffer "~5.1.0" From 5e330152f9324a1b2e6402498d989e9a65defe6b Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Sun, 17 Dec 2017 16:26:41 +0000 Subject: [PATCH 139/162] Update moment from 2.19.4 to 2.20.0 in addons/comments --- addons/comments/package.json | 2 +- yarn.lock | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/comments/package.json b/addons/comments/package.json index 5606b71e24be..a72587b3ffdd 100644 --- a/addons/comments/package.json +++ b/addons/comments/package.json @@ -30,7 +30,7 @@ "global": "^4.3.2", "insert-css": "^2.0.0", "marked": "^0.3.7", - "moment": "^2.19.4", + "moment": "^2.20.0", "prop-types": "^15.6.0", "react-render-html": "^0.6.0", "react-textarea-autosize": "^5.2.1" diff --git a/yarn.lock b/yarn.lock index 2f1d4722d2bd..e65cdc0043c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7708,10 +7708,6 @@ 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.4: - version "2.19.4" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.4.tgz#17e5e2c6ead8819c8ecfad83a0acccb312e94682" - moment@^2.20.0: version "2.20.0" resolved "https://registry.yarnpkg.com/moment/-/moment-2.20.0.tgz#53396358994dd3a551e966a66af715ecb6c30ad0" From 435dcab136f4494fdc562f623daea203aeaa6627 Mon Sep 17 00:00:00 2001 From: "Voss, Jennifer (ELS-PHI)" Date: Sun, 17 Dec 2017 12:49:54 -0500 Subject: [PATCH 140/162] Pass stylesheet as the default arg to props.styles, update README and cra examples --- addons/info/README.md | 26 ++++++++++- addons/info/src/components/Story.js | 5 +-- addons/info/src/index.js | 6 ++- .../src/stories/addon-info.stories.js | 44 +++++++++++++------ 4 files changed, 62 insertions(+), 19 deletions(-) diff --git a/addons/info/README.md b/addons/info/README.md index 06c0ac708d4d..eab61ebde7a3 100644 --- a/addons/info/README.md +++ b/addons/info/README.md @@ -74,6 +74,30 @@ storiesOf('Component', module) ) ``` +The `styles` prop can also accept a function. The default stylesheet is passed as argument: + +```js +import { withInfo } from '@storybook/addon-info'; + +storiesOf('Component', module) + .add('custom info styles using a function', + withInfo({ + styles: stylesheet => ({ + ...stylesheet, + header: { + ...stylesheet.header, + h1: { + ...stylesheet.header.h1, + color: 'red' + } + } + }) + })(() => + Click the "?" mark at top-right to view the info. + ) + ) +``` + ## Usage as decorator It is possible to add infos by default to all components by using a global or story decorator. The drawback is you won't be able to display a distinct info message per story. @@ -107,7 +131,7 @@ setDefaults({ source: true, // Displays the source of story Component propTables: [/* Components used in story */], // displays Prop Tables with this components propTablesExclude: [], // Exclude Components from being shown in Prop Tables section - styles: {}, // Overrides styles of addon. The object should follow this shape: https://github.com/storybooks/storybook/blob/master/addons/info/src/components/Story.js#L19 + styles: {}, // Overrides styles of addon. The object should follow this shape: https://github.com/storybooks/storybook/blob/master/addons/info/src/components/Story.js#L19. This prop can also accept a function which has the default stylesheet passed as an argument. marksyConf: {}, // Overrides components used to display markdown. Warning! This option's name will be likely deprecated in favor to "components" with the same API in 3.3 release. Follow this PR #1501 for details maxPropsIntoLine: 1, // Max props to display per line in source code maxPropObjectKeys: 10, // Displays the first 10 characters of the prop name diff --git a/addons/info/src/components/Story.js b/addons/info/src/components/Story.js index 317c62daf23c..4188fd77b4bc 100644 --- a/addons/info/src/components/Story.js +++ b/addons/info/src/components/Story.js @@ -2,7 +2,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import nestedObjectAssign from 'nested-object-assign'; import global from 'global'; import { baseFonts } from '@storybook/components'; @@ -107,14 +106,14 @@ export default class Story extends React.Component { super(...args); this.state = { open: false, - stylesheet: nestedObjectAssign({}, stylesheet, this.props.styles), + stylesheet: this.props.styles(stylesheet), }; this.marksy = marksy(this.props.marksyConf); } componentWillReceiveProps(nextProps) { this.setState({ - stylesheet: nestedObjectAssign({}, stylesheet, nextProps.styles), + stylesheet: nextProps.styles(stylesheet), }); } diff --git a/addons/info/src/index.js b/addons/info/src/index.js index 10f43dc2b9bc..1e4423dd13f6 100644 --- a/addons/info/src/index.js +++ b/addons/info/src/index.js @@ -1,5 +1,6 @@ import React from 'react'; import deprecate from 'util-deprecate'; +import nestedObjectAssign from 'nested-object-assign'; import Story from './components/Story'; import { H1, H2, H3, H4, H5, H6, Code, P, UL, A, LI } from './components/markdown'; @@ -53,7 +54,10 @@ function addInfo(storyFn, context, infoOptions) { showSource: Boolean(options.source), propTables: options.propTables, propTablesExclude: options.propTablesExclude, - styles: options.styles, + styles: + typeof options.styles === 'function' + ? options.styles + : s => nestedObjectAssign({}, s, options.styles), marksyConf, maxPropObjectKeys: options.maxPropObjectKeys, maxPropArrayLength: options.maxPropArrayLength, diff --git a/examples/cra-kitchen-sink/src/stories/addon-info.stories.js b/examples/cra-kitchen-sink/src/stories/addon-info.stories.js index e89be387146c..e50e3f86a019 100644 --- a/examples/cra-kitchen-sink/src/stories/addon-info.stories.js +++ b/examples/cra-kitchen-sink/src/stories/addon-info.stories.js @@ -88,23 +88,39 @@ storiesOf('Addon Info.Options.propTablesExclude', module).add( )) ); -storiesOf('Addon Info.Options.styles', module).add( - 'Change info styles', - withInfo({ - styles: { - button: { - base: { - background: 'purple', +storiesOf('Addon Info.Options.styles', module) + .add( + 'Extend info styles with an object', + withInfo({ + styles: { + button: { + base: { + background: 'purple', + }, }, - }, - header: { - h1: { - color: 'red', + header: { + h1: { + color: 'red', + }, }, }, - }, - })(() => ) -); + })(() => ) + ) + .add( + 'Full control over styles using a function', + withInfo({ + styles: stylesheet => ({ + ...stylesheet, + header: { + ...stylesheet.header, + h1: { + ...stylesheet.header.h1, + color: 'red', + }, + }, + }), + })(() => ) + ); storiesOf('Addon Info.Decorator', module) .addDecorator((story, context) => From 99a8033737db03427c54349d11aad3d0ec957e45 Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Mon, 18 Dec 2017 14:14:09 +1100 Subject: [PATCH 141/162] Move addon events into its own story file --- .../src/stories/addon-events.stories.js | 73 +++++++++++++++++++ .../src/stories/index.stories.js | 70 ------------------ 2 files changed, 73 insertions(+), 70 deletions(-) create mode 100644 examples/cra-kitchen-sink/src/stories/addon-events.stories.js diff --git a/examples/cra-kitchen-sink/src/stories/addon-events.stories.js b/examples/cra-kitchen-sink/src/stories/addon-events.stories.js new file mode 100644 index 000000000000..9621e03fbeef --- /dev/null +++ b/examples/cra-kitchen-sink/src/stories/addon-events.stories.js @@ -0,0 +1,73 @@ +import React from 'react'; +import EventEmitter from 'eventemitter3'; +import { storiesOf } from '@storybook/react'; + +import WithEvents from '@storybook/addon-events'; +import Logger from './Logger'; + +const EVENTS = { + TEST_EVENT_1: 'test-event-1', + TEST_EVENT_2: 'test-event-2', + TEST_EVENT_3: 'test-event-3', + TEST_EVENT_4: 'test-event-4', +}; + +const emitter = new EventEmitter(); +const emit = emitter.emit.bind(emitter); + +storiesOf('Addon Events', module) + .addDecorator(getStory => ( + + {getStory()} + + )) + .add('Logger', () => ); diff --git a/examples/cra-kitchen-sink/src/stories/index.stories.js b/examples/cra-kitchen-sink/src/stories/index.stories.js index 0206683976e5..ddaa54b55e50 100644 --- a/examples/cra-kitchen-sink/src/stories/index.stories.js +++ b/examples/cra-kitchen-sink/src/stories/index.stories.js @@ -1,29 +1,16 @@ import React from 'react'; -import EventEmitter from 'eventemitter3'; import { storiesOf } from '@storybook/react'; import { setOptions } from '@storybook/addon-options'; import { action } from '@storybook/addon-actions'; import { withNotes, WithNotes } from '@storybook/addon-notes'; -import WithEvents from '@storybook/addon-events'; import centered from '@storybook/addon-centered'; import { withInfo } from '@storybook/addon-info'; import { Button } from '@storybook/react/demo'; import App from '../App'; -import Logger from './Logger'; import Container from './Container'; -const EVENTS = { - TEST_EVENT_1: 'test-event-1', - TEST_EVENT_2: 'test-event-2', - TEST_EVENT_3: 'test-event-3', - TEST_EVENT_4: 'test-event-4', -}; - -const emitter = new EventEmitter(); -const emit = emitter.emit.bind(emitter); - const InfoButton = () => ( ); storiesOf('Some really long story kind description', module) .addDecorator(centered) .add('with text', () => ); - -storiesOf('WithEvents', module) - .addDecorator(getStory => ( - - {getStory()} - - )) - .add('Logger', () => ); From 7c8cdb72b3c9c105d9098e58b3c69974593c327a Mon Sep 17 00:00:00 2001 From: Tom Coleman Date: Mon, 18 Dec 2017 22:57:07 +1100 Subject: [PATCH 142/162] Add events logger snapshots --- .../__snapshots__/addon-events.stories.storyshot | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 examples/cra-kitchen-sink/src/stories/__snapshots__/addon-events.stories.storyshot diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-events.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-events.stories.storyshot new file mode 100644 index 000000000000..cfc8b0c3618e --- /dev/null +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-events.stories.storyshot @@ -0,0 +1,15 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Storyshots Addon Events Logger 1`] = ` +
+

+ Logger +

+
+ +
+
+`; From 46ba3d9c21f160a1000eb5610787796dbf9ddd90 Mon Sep 17 00:00:00 2001 From: "Voss, Jennifer (ELS-PHI)" Date: Mon, 18 Dec 2017 10:02:32 -0500 Subject: [PATCH 143/162] Set styles to proptypes.func --- addons/info/src/components/Story.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/info/src/components/Story.js b/addons/info/src/components/Story.js index 2817636a5254..746856a95d85 100644 --- a/addons/info/src/components/Story.js +++ b/addons/info/src/components/Story.js @@ -384,7 +384,7 @@ Story.propTypes = { showInline: PropTypes.bool, showHeader: PropTypes.bool, showSource: PropTypes.bool, - styles: PropTypes.oneOfType([PropTypes.func, PropTypes.object]), + styles: PropTypes.func.isRequired, children: PropTypes.oneOfType([PropTypes.object, PropTypes.array]), components: PropTypes.shape({}), maxPropsIntoLine: PropTypes.number.isRequired, @@ -401,6 +401,5 @@ Story.defaultProps = { showInline: false, showHeader: true, showSource: true, - styles: {}, components: {}, }; From 5efa669ab6349d1cb7100d55a65963f07e9d5890 Mon Sep 17 00:00:00 2001 From: "Voss, Jennifer (ELS-PHI)" Date: Mon, 18 Dec 2017 10:36:29 -0500 Subject: [PATCH 144/162] Update snapshots --- .../addon-info.stories.storyshot | 287 +++++++++++++++++- .../__snapshots__/index.stories.storyshot | 14 - .../src/stories/addon-info.stories.js | 2 +- 3 files changed, 285 insertions(+), 18 deletions(-) diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-info.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-info.stories.storyshot index c5e699b5b548..0e88260a5882 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-info.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/addon-info.stories.storyshot @@ -2544,7 +2544,288 @@ exports[`Storyshots Addon Info.Options.source Shows or hides Info Addon source 1
`; -exports[`Storyshots Addon Info.Options.styles Change info styles // I think this is broken or I am using it wrong? 1`] = ` +exports[`Storyshots Addon Info.Options.styles Extend info styles with an object 1`] = ` +
+
+ +
+ +
+ +
+
+
+

+ Addon Info.Options.styles +

+

+ Extend info styles with an object +

+
+
+

+ Story Source +

+
+            
+ + <BaseButton + + + + + + label + + + = + + + "Button" + + + + + + + + /> + +
+
+
+
+

+ Prop Types +

+
+

+ "BaseButton" Component +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ property + + propType + + required + + default + + description +
+ disabled + + + + + + - + + + { + + false + + } + + + +
+ label + + + + + + yes + + - + + +
+ onClick + + + + + + - + + + { + + onClick() + + } + + + +
+ style + + + + + + - + + + { + + {} + + } + + + +
+
+
+
+
+
+
+`; + +exports[`Storyshots Addon Info.Options.styles Full control over styles using a function 1`] = `

Addon Info.Options.styles

- Change info styles // I think this is broken or I am using it wrong? + Full control over styles using a function

diff --git a/examples/cra-kitchen-sink/src/stories/__snapshots__/index.stories.storyshot b/examples/cra-kitchen-sink/src/stories/__snapshots__/index.stories.storyshot index febf46a09637..eea5f06be615 100644 --- a/examples/cra-kitchen-sink/src/stories/__snapshots__/index.stories.storyshot +++ b/examples/cra-kitchen-sink/src/stories/__snapshots__/index.stories.storyshot @@ -1045,17 +1045,3 @@ exports[`Storyshots Some really long story kind description with text 1`] = `
`; - -exports[`Storyshots WithEvents Logger 1`] = ` -
-

- Logger -

-
- -
-
-`; diff --git a/examples/cra-kitchen-sink/src/stories/addon-info.stories.js b/examples/cra-kitchen-sink/src/stories/addon-info.stories.js index 6480afc5ba8e..d6fad18d2c58 100644 --- a/examples/cra-kitchen-sink/src/stories/addon-info.stories.js +++ b/examples/cra-kitchen-sink/src/stories/addon-info.stories.js @@ -101,7 +101,7 @@ storiesOf('Addon Info.Options.styles', module) }, header: { h1: { - color: 'red', + color: 'green', }, }, }, From 53355ba0d670f2cc9e2abcfec7905f101f190b52 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Mon, 18 Dec 2017 16:22:03 +0000 Subject: [PATCH 145/162] Update gatsby from 1.9.139 to 1.9.141 --- docs/package.json | 2 +- docs/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/package.json b/docs/package.json index 190599b9d997..0f79d8c55c02 100644 --- a/docs/package.json +++ b/docs/package.json @@ -30,7 +30,7 @@ "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", "bootstrap": "^3.3.7", - "gatsby": "^1.9.139", + "gatsby": "^1.9.141", "gatsby-link": "^1.6.32", "gatsby-plugin-sharp": "^1.6.24", "gatsby-remark-autolink-headers": "^1.4.10", diff --git a/docs/yarn.lock b/docs/yarn.lock index 9092c67bb027..744f07a49eb0 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4347,9 +4347,9 @@ gatsby-transformer-remark@^1.7.25: unist-util-select "^1.5.0" unist-util-visit "^1.1.1" -gatsby@^1.9.139: - version "1.9.139" - resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.139.tgz#35003af4acf083bb9cec073a2c707d9249b53ca7" +gatsby@^1.9.141: + version "1.9.141" + resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.141.tgz#8cde1d84900abcb7dfa910778cafebdb461e73cd" dependencies: async "^2.1.2" babel-code-frame "^6.22.0" From 3d7a4fddf12e836f10440b28cb5824d96c544a75 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Mon, 18 Dec 2017 16:24:08 +0000 Subject: [PATCH 146/162] Update danger from 2.1.5 to 2.1.6 in / --- package.json | 2 +- yarn.lock | 67 +++++++++++++++++++++++++++++----------------------- 2 files changed, 39 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 0ff4b87d1340..a4a0abce91b3 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "codecov": "^3.0.0", "commander": "^2.12.2", "cross-env": "^5.1.1", - "danger": "^2.1.5", + "danger": "^2.1.6", "enzyme": "^3.2.0", "enzyme-adapter-react-16": "^1.1.0", "eslint": "^4.13.1", diff --git a/yarn.lock b/yarn.lock index e65cdc0043c0..a8524bc1ea17 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3165,36 +3165,36 @@ damerau-levenshtein@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514" -danger@^2.1.5: - version "2.1.5" - resolved "https://registry.yarnpkg.com/danger/-/danger-2.1.5.tgz#76b0e2a0cf7de82e844391d2f9c560539fdf49c5" +danger@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/danger/-/danger-2.1.6.tgz#ea4b3024cbef422286dc6bdb4d23da132d8ebbe5" dependencies: babel-polyfill "7.0.0-alpha.19" - chalk "^2.0.0" - commander "^2.9.0" - debug "^3.0.0" + chalk "^2.3.0" + commander "^2.12.2" + debug "^3.1.0" get-stdin "^5.0.1" - github "^11" + github "^13.0.1" hyperlinker "^1.0.0" jsome "^2.3.25" jsonpointer "^4.0.1" lodash.find "^4.6.0" lodash.includes "^4.3.0" - lodash.isobject "^2.4.1" + lodash.isobject "^3.0.2" lodash.keys "^4.0.8" node-cleanup "^2.1.2" - node-fetch "^1.6.3" + node-fetch "^1.7.3" parse-diff "^0.4.0" parse-git-config "^1.1.1" - parse-github-url "^1.0.1" + parse-github-url "^1.0.2" parse-link-header "^1.0.1" pinpoint "^1.1.0" readline-sync "^1.4.7" require-from-string "^2.0.1" - rfc6902 "^2.0.0" + rfc6902 "^2.2.2" supports-hyperlinks "^1.0.1" vm2 patriksimek/vm2#custom_files - voca "^1.2.0" + voca "^1.3.1" dargs@^4.0.1: version "4.1.0" @@ -4910,7 +4910,7 @@ github-release-from-changelog@^1.3.0: grizzly "^2.0.0" minimist "^1.2.0" -github@^11, github@^11.0.0: +github@^11.0.0: version "11.0.0" resolved "https://registry.yarnpkg.com/github/-/github-11.0.0.tgz#edb32df5efb33cad004ebf0bdd2a4b30bb63a854" dependencies: @@ -4919,6 +4919,17 @@ github@^11, github@^11.0.0: mime "^1.2.11" netrc "^0.1.4" +github@^13.0.1: + version "13.0.1" + resolved "https://registry.yarnpkg.com/github/-/github-13.0.1.tgz#4ccf4a41df662f92367e77a474674eabb1b6c78d" + dependencies: + debug "^3.1.0" + dotenv "^4.0.0" + https-proxy-agent "^2.1.0" + lodash "^4.17.4" + proxy-from-env "^1.0.0" + url-template "^2.0.8" + glamor@^2.20.40: version "2.20.40" resolved "https://registry.yarnpkg.com/glamor/-/glamor-2.20.40.tgz#f606660357b7cf18dface731ad1a2cfa93817f05" @@ -7119,10 +7130,6 @@ lodash._isiterateecall@^3.0.0: version "3.0.9" resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" -lodash._objecttypes@~2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/lodash._objecttypes/-/lodash._objecttypes-2.4.1.tgz#7c0b7f69d98a1f76529f890b0cdb1b4dfec11c11" - lodash._reescape@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" @@ -7207,11 +7214,9 @@ lodash.isequal@^3.0: lodash._baseisequal "^3.0.0" lodash._bindcallback "^3.0.0" -lodash.isobject@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-2.4.1.tgz#5a2e47fe69953f1ee631a7eba1fe64d2d06558f5" - dependencies: - lodash._objecttypes "~2.4.1" +lodash.isobject@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d" lodash.isplainobject@^4.0.6: version "4.0.6" @@ -7832,7 +7837,7 @@ node-dir@^0.1.10: dependencies: minimatch "^3.0.2" -node-fetch@^1.0.1, node-fetch@^1.3.3, node-fetch@^1.6.3: +node-fetch@^1.0.1, node-fetch@^1.3.3, node-fetch@^1.7.3: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" dependencies: @@ -8328,9 +8333,9 @@ parse-github-repo-url@^1.3.0: version "1.4.1" 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" +parse-github-url@^1.0.2: + 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" @@ -10173,7 +10178,7 @@ ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" -rfc6902@^2.0.0: +rfc6902@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/rfc6902/-/rfc6902-2.2.2.tgz#518a4e9caac1688f3d94c9df2fdcdb6ce21f29be" @@ -11544,6 +11549,10 @@ url-parse@^1.1.8, url-parse@^1.1.9: querystringify "~1.0.0" requires-port "~1.0.0" +url-template@^2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/url-template/-/url-template-2.0.8.tgz#fc565a3cccbff7730c775f5641f9555791439f21" + url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" @@ -11693,11 +11702,11 @@ 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" -voca@^1.2.0: +voca@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/voca/-/voca-1.3.1.tgz#60c911dd41841785192b4d35971ec2b36f8ef779" From 684479dfbbf4fda08f1e19f104e593235eefeadb Mon Sep 17 00:00:00 2001 From: Emmanuel Vuigner Date: Mon, 18 Dec 2017 21:35:06 +0100 Subject: [PATCH 147/162] fix: update links to webpack docs to the new documentation website --- docs/src/pages/basics/writing-stories/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/pages/basics/writing-stories/index.md b/docs/src/pages/basics/writing-stories/index.md index cc06435695a8..68d0ae93b54a 100644 --- a/docs/src/pages/basics/writing-stories/index.md +++ b/docs/src/pages/basics/writing-stories/index.md @@ -63,7 +63,7 @@ function loadStories() { configure(loadStories, module); ``` -Here we use Webpack's [require.context](https://webpack.github.io/docs/context.html#require-context) to load modules dynamically. Have a look at the relevant Webpack [docs](https://webpack.github.io/docs/context.html#require-context) to learn more about how to use require.context. +Here we use Webpack's [require.context](https://webpack.js.org/guides/dependency-management/#require-context) to load modules dynamically. Have a look at the relevant Webpack [docs](https://webpack.js.org/guides/dependency-management/#require-context) to learn more about how to use require.context. The **React Native** packager resolves all the imports at build-time, so it's not possible to load modules dynamically. If you don't want to import all your stories manually you can use [react-native-storybook-loader](https://github.com/elderfo/react-native-storybook-loader) to automatically create the import statements for all of your stories. From 85535abc53782a5e39d6ae54b11099a87c76d3c8 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Mon, 18 Dec 2017 13:53:25 -0800 Subject: [PATCH 148/162] 3.2.18 changelog --- CHANGELOG.md | 174 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 541765fdc5d0..be7d4ca9efda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,177 @@ +# 3.2.18 + +2017-December-18 + +#### Bug Fixes + +- Number knob: apply default min/max/step values only in range mode [#2437](https://github.com/storybooks/storybook/pull/2437) +- [addon-actions] Check result of getPropertyDescriptor for IE11 [#2428](https://github.com/storybooks/storybook/pull/2428) +- Edited template of search box result item to fix overflow text in row [#2419](https://github.com/storybooks/storybook/pull/2419) +- Fix missing supported extension check in case when asset is a string [#2468](https://github.com/storybooks/storybook/pull/2468) + +#### Documentation + +- Fix react-native-vanilla to actually run storybook and document how to run it [#2274](https://github.com/storybooks/storybook/pull/2274) +- Add another state addon to the gallery [#2391](https://github.com/storybooks/storybook/pull/2391) +- Create ISSUE_TEMPLATE.md [#2426](https://github.com/storybooks/storybook/pull/2426) +- fix Button dependency & typo in composant name in documentation [#2465](https://github.com/storybooks/storybook/pull/2465) +- add vue storybook boilerplate [#2421](https://github.com/storybooks/storybook/pull/2421) +- fix: update links to webpack docs [#2512](https://github.com/storybooks/storybook/pull/2512) + +#### Maintenance + +- Do not remove debugger-statements during development [#2493](https://github.com/storybooks/storybook/pull/2493) +- FIX react-native-test in CI [#2444](https://github.com/storybooks/storybook/pull/2444) + +#### Dependency Upgrades + +
+ +139 PRs + + +- Update gatsby in /docs from 1.9.139 to 1.9.141 [#2510](https://github.com/storybooks/storybook/pull/2510) +- Update gatsby in /docs from 1.9.138 to 1.9.139 [#2499](https://github.com/storybooks/storybook/pull/2499) +- Upgraded `eslint-plugin-prettier` in `/` from "2.3.1" to "2.4.0" [#2500](https://github.com/storybooks/storybook/pull/2500) +- Upgraded `graphql` in `addons/graphql` from "0.11.7" to "0.12.3" [#2500](https://github.com/storybooks/storybook/pull/2500) +- Upgraded `moment` in `addons/knobs` from "2.19.4" to "2.20.0" [#2500](https://github.com/storybooks/storybook/pull/2500) +- Upgraded `ws` in `app/react-native` from "3.3.2" to "3.3.3" [#2500](https://github.com/storybooks/storybook/pull/2500) +- Upgraded `moment` in `addons/comments` from "2.19.4" to "2.20.0" [#2500](https://github.com/storybooks/storybook/pull/2500) +- Update gatsby in /docs from 1.9.135 to 1.9.138 [#2497](https://github.com/storybooks/storybook/pull/2497) +- Upgraded `eslint-plugin-jest` in `/` from "21.4.3" to "21.5.0" [#2496](https://github.com/storybooks/storybook/pull/2496) +- Upgraded `nodemon` in `/` from "1.12.7" to "1.13.2" [#2496](https://github.com/storybooks/storybook/pull/2496) +- Upgraded `nodemon` in `app/react` from "1.12.7" to "1.13.2" [#2496](https://github.com/storybooks/storybook/pull/2496) +- Upgraded `nodemon` in `app/vue` from "1.12.7" to "1.13.2" [#2496](https://github.com/storybooks/storybook/pull/2496) +- Update gatsby-remark-copy-linked-files in /docs from 1.5.23 to 1.5.24 [#2495](https://github.com/storybooks/storybook/pull/2495) +- Update gatsby in /docs from 1.9.134 to 1.9.135 [#2491](https://github.com/storybooks/storybook/pull/2491) +- Update danger in / from 2.1.4 to 2.1.5 [#2489](https://github.com/storybooks/storybook/pull/2489) +- Upgraded `gatsby-plugin-sharp` in `/docs` from "1.6.23" to "1.6.24" [#2490](https://github.com/storybooks/storybook/pull/2490) +- Upgraded `gatsby-remark-images` in `/docs` from "1.5.35" to "1.5.36" [#2490](https://github.com/storybooks/storybook/pull/2490) +- Upgraded `eslint-plugin-jest` in `/` from "21.4.2" to "21.4.3" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `nodemon` in `/` from "1.12.6" to "1.12.7" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `symlink-dir` in `/` from "1.1.0" to "1.1.1" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `@types/node` in `addons/knobs` from "8.0.58" to "8.5.1" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `@types/react` in `addons/knobs` from "16.0.29" to "16.0.30" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `style-loader` in `addons/knobs` from "0.19.0" to "0.19.1" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `vue` in `addons/knobs` from "2.5.10" to "2.5.11" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `autoprefixer` in `app/react-native` from "7.2.2" to "7.2.3" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `style-loader` in `app/react-native` from "0.18.2" to "0.19.1" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `autoprefixer` in `app/react` from "7.2.2" to "7.2.3" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `style-loader` in `app/react` from "0.18.2" to "0.19.1" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `nodemon` in `app/react` from "1.12.6" to "1.12.7" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `autoprefixer` in `app/vue` from "7.2.2" to "7.2.3" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `style-loader` in `app/vue` from "0.18.2" to "0.19.1" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `nodemon` in `app/vue` from "1.12.6" to "1.12.7" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `vue` in `app/vue` from "2.5.10" to "2.5.11" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `vue-template-compiler` in `app/vue` from "2.5.10" to "2.5.11" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `vue` in `examples/vue-kitchen-sink` from "2.5.10" to "2.5.11" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `vue-template-compiler` in `examples/vue-kitchen-sink` from "2.5.10" to "2.5.11" [#2488](https://github.com/storybooks/storybook/pull/2488) +- Upgraded `gatsby-link` in `/docs` from "1.6.31" to "1.6.32" [#2486](https://github.com/storybooks/storybook/pull/2486) +- Upgraded `gatsby-transformer-remark` in `/docs` from "1.7.24" to "1.7.25" [#2486](https://github.com/storybooks/storybook/pull/2486) +- Upgraded `gatsby` in `/docs` from "1.9.131" to "1.9.134" [#2486](https://github.com/storybooks/storybook/pull/2486) +- Upgraded `gatsby-remark-images` in `/docs` from "1.5.34" to "1.5.35" [#2476](https://github.com/storybooks/storybook/pull/2476) +- Upgraded `gatsby-source-filesystem` in `/docs` from "1.5.10" to "1.5.11" [#2476](https://github.com/storybooks/storybook/pull/2476) +- Upgraded `gatsby` in `/docs` from "1.9.130" to "1.9.131" [#2476](https://github.com/storybooks/storybook/pull/2476) +- Upgraded `eslint-plugin-jsx-a11y` in `/` from "6.0.2" to "6.0.3" [#2477](https://github.com/storybooks/storybook/pull/2477) +- Upgraded `nodemon` in `/` from "1.12.5" to "1.12.6" [#2477](https://github.com/storybooks/storybook/pull/2477) +- Upgraded `vue` in `addons/knobs` from "2.5.9" to "2.5.10" [#2477](https://github.com/storybooks/storybook/pull/2477) +- Upgraded `react-modal` in `lib/ui` from "3.1.7" to "3.1.8" [#2477](https://github.com/storybooks/storybook/pull/2477) +- Upgraded `nodemon` in `app/react` from "1.12.5" to "1.12.6" [#2477](https://github.com/storybooks/storybook/pull/2477) +- Upgraded `nodemon` in `app/vue` from "1.12.5" to "1.12.6" [#2477](https://github.com/storybooks/storybook/pull/2477) +- Upgraded `vue` in `app/vue` from "2.5.9" to "2.5.10" [#2477](https://github.com/storybooks/storybook/pull/2477) +- Upgraded `vue-template-compiler` in `app/vue` from "2.5.9" to "2.5.10" [#2477](https://github.com/storybooks/storybook/pull/2477) +- Upgraded `vue` in `examples/vue-kitchen-sink` from "2.5.9" to "2.5.10" [#2477](https://github.com/storybooks/storybook/pull/2477) +- Upgraded `vue-template-compiler` in `examples/vue-kitchen-sink` from "2.5.9" to "2.5.10" [#2477](https://github.com/storybooks/storybook/pull/2477) +- Upgraded `danger` in `/` from "2.1.3" to "2.1.4" [#2473](https://github.com/storybooks/storybook/pull/2473) +- Upgraded `eslint` in `/` from "4.13.0" to "4.13.1" [#2473](https://github.com/storybooks/storybook/pull/2473) +- Upgraded `prettier` in `/` from "1.9.1" to "1.9.2" [#2473](https://github.com/storybooks/storybook/pull/2473) +- Upgraded `@types/node` in `addons/knobs` from "8.0.57" to "8.0.58" [#2473](https://github.com/storybooks/storybook/pull/2473) +- Upgraded `@types/react` in `addons/knobs` from "16.0.28" to "16.0.29" [#2473](https://github.com/storybooks/storybook/pull/2473) +- Upgraded `core-js` in `app/react` from "2.5.2" to "2.5.3" [#2473](https://github.com/storybooks/storybook/pull/2473) +- Upgraded `core-js` in `app/vue` from "2.5.2" to "2.5.3" [#2473](https://github.com/storybooks/storybook/pull/2473) +- Upgraded `moment` in `addons/knobs` from "2.19.3" to "2.19.4" [#2462](https://github.com/storybooks/storybook/pull/2462) +- Upgraded `moment` in `addons/comments` from "2.19.3" to "2.19.4" [#2462](https://github.com/storybooks/storybook/pull/2462) +- Upgraded `react-inspector` in `addons/actions` from "2.2.1" to "2.2.2" [#2457](https://github.com/storybooks/storybook/pull/2457) +- Upgraded `react-inspector` in `lib/ui` from "2.2.1" to "2.2.2" [#2457](https://github.com/storybooks/storybook/pull/2457) +- Upgraded `gatsby-link` in `/docs` from "1.6.30" to "1.6.31" [#2458](https://github.com/storybooks/storybook/pull/2458) +- Upgraded `gatsby-plugin-sharp` in `/docs` from "1.6.22" to "1.6.23" [#2458](https://github.com/storybooks/storybook/pull/2458) +- Upgraded `gatsby-remark-autolink-headers` in `/docs` from "1.4.9" to "1.4.10" [#2458](https://github.com/storybooks/storybook/pull/2458) +- Upgraded `gatsby-remark-copy-linked-files` in `/docs` from "1.5.22" to "1.5.23" [#2458](https://github.com/storybooks/storybook/pull/2458) +- Upgraded `gatsby-remark-images` in `/docs` from "1.5.33" to "1.5.34" [#2458](https://github.com/storybooks/storybook/pull/2458) +- Upgraded `gatsby-remark-smartypants` in `/docs` from "1.4.9" to "1.4.10" [#2458](https://github.com/storybooks/storybook/pull/2458) +- Upgraded `gatsby-source-filesystem` in `/docs` from "1.5.9" to "1.5.10" [#2458](https://github.com/storybooks/storybook/pull/2458) +- Upgraded `gatsby-transformer-remark` in `/docs` from "1.7.23" to "1.7.24" [#2458](https://github.com/storybooks/storybook/pull/2458) +- Upgraded `gatsby` in `/docs` from "1.9.128" to "1.9.130" [#2458](https://github.com/storybooks/storybook/pull/2458) +- Update react-stack-grid in /docs from 0.6.0 to 0.7.0 [#2453](https://github.com/storybooks/storybook/pull/2453) +- Upgraded `eslint` in `/` from "4.12.1" to "4.13.0" [#2454](https://github.com/storybooks/storybook/pull/2454) +- Upgraded `core-js` in `app/react` from "2.5.1" to "2.5.2" [#2454](https://github.com/storybooks/storybook/pull/2454) +- Upgraded `core-js` in `app/vue` from "2.5.1" to "2.5.2" [#2454](https://github.com/storybooks/storybook/pull/2454) +- Upgraded `@types/node` in `addons/knobs` from "8.0.56" to "8.0.57" [#2448](https://github.com/storybooks/storybook/pull/2448) +- Upgraded `@types/react` in `addons/knobs` from "16.0.27" to "16.0.28" [#2448](https://github.com/storybooks/storybook/pull/2448) +- Upgraded `autoprefixer` in `app/react-native` from "7.2.1" to "7.2.2" [#2448](https://github.com/storybooks/storybook/pull/2448) +- Upgraded `autoprefixer` in `app/react` from "7.2.1" to "7.2.2" [#2448](https://github.com/storybooks/storybook/pull/2448) +- Upgraded `autoprefixer` in `app/vue` from "7.2.1" to "7.2.2" [#2448](https://github.com/storybooks/storybook/pull/2448) +- Upgraded `danger` in `/` from "2.1.2" to "2.1.3" [#2447](https://github.com/storybooks/storybook/pull/2447) +- Upgraded `jscodeshift` in `lib/codemod` from "0.3.32" to "0.4.0" [#2447](https://github.com/storybooks/storybook/pull/2447) +- Upgraded `jscodeshift` in `lib/cli` from "0.3.32" to "0.4.0" [#2447](https://github.com/storybooks/storybook/pull/2447) +- Upgraded `webpack-dev-server` in `examples/vue-kitchen-sink` from "2.9.6" to "2.9.7" [#2447](https://github.com/storybooks/storybook/pull/2447) +- Upgraded `danger` in `/` from "2.0.3" to "2.1.2" [#2442](https://github.com/storybooks/storybook/pull/2442) +- Upgraded `eslint-plugin-jest` in `/` from "21.4.1" to "21.4.2" [#2442](https://github.com/storybooks/storybook/pull/2442) +- Upgraded `github-release-from-changelog` in `/` from "1.2.1" to "1.3.0" [#2442](https://github.com/storybooks/storybook/pull/2442) +- Upgraded `nodemon` in `/` from "1.12.4" to "1.12.5" [#2442](https://github.com/storybooks/storybook/pull/2442) +- Upgraded `prettier` in `/` from "1.9.0" to "1.9.1" [#2442](https://github.com/storybooks/storybook/pull/2442) +- Upgraded `@types/node` in `addons/knobs` from "8.0.54" to "8.0.55" [#2442](https://github.com/storybooks/storybook/pull/2442) +- Upgraded `react-native` in `app/react-native` from "0.50.4" to "0.51.0" [#2442](https://github.com/storybooks/storybook/pull/2442) +- Upgraded `nodemon` in `app/react` from "1.12.4" to "1.12.5" [#2442](https://github.com/storybooks/storybook/pull/2442) +- Upgraded `nodemon` in `app/vue` from "1.12.4" to "1.12.5" [#2442](https://github.com/storybooks/storybook/pull/2442) +- Upgraded `@types/node` in `addons/knobs` from "8.0.54" to "8.0.56" [#2443](https://github.com/storybooks/storybook/pull/2443) +- Upgraded `webpack-dev-server` in `examples/vue-kitchen-sink` from "2.9.5" to "2.9.6" [#2443](https://github.com/storybooks/storybook/pull/2443) +- Update fs-extra in / from 4.0.2 to 4.0.3 [#2433](https://github.com/storybooks/storybook/pull/2433) +- Upgraded `eslint-plugin-jest` in `/` from "21.4.0" to "21.4.1" [#2430](https://github.com/storybooks/storybook/pull/2430) +- Upgraded `prettier` in `/` from "1.8.2" to "1.9.0" [#2430](https://github.com/storybooks/storybook/pull/2430) +- Upgraded `babel-eslint` in `/` from "8.0.2" to "8.0.3" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `commander` in `/` from "2.12.1" to "2.12.2" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `eslint` in `/` from "4.12.0" to "4.12.1" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `eslint-plugin-jest` in `/` from "21.3.2" to "21.4.0" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `inquirer` in `/` from "4.0.0" to "4.0.1" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `nodemon` in `/` from "1.12.1" to "1.12.4" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `moment` in `addons/knobs` from "2.19.2" to "2.19.3" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `react-datetime` in `addons/knobs` from "2.11.0" to "2.11.1" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `@types/node` in `addons/knobs` from "8.0.53" to "8.0.54" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `@types/react` in `addons/knobs` from "16.0.25" to "16.0.27" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `typescript` in `addons/knobs` from "2.6.1" to "2.6.2" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `vue` in `addons/knobs` from "2.5.8" to "2.5.9" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `commander` in `lib/cli` from "2.12.1" to "2.12.2" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `react-modal` in `lib/ui` from "3.1.4" to "3.1.7" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `autoprefixer` in `app/react-native` from "7.1.6" to "7.2.1" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `commander` in `app/react-native` from "2.12.1" to "2.12.2" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `webpack` in `app/react-native` from "3.8.1" to "3.10.0" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `airbnb-js-shims` in `app/react` from "1.3.0" to "1.4.0" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `autoprefixer` in `app/react` from "7.1.6" to "7.2.1" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `commander` in `app/react` from "2.12.1" to "2.12.2" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `webpack` in `app/react` from "3.8.1" to "3.10.0" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `nodemon` in `app/react` from "1.12.1" to "1.12.4" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `airbnb-js-shims` in `app/vue` from "1.3.0" to "1.4.0" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `autoprefixer` in `app/vue` from "7.1.6" to "7.2.1" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `commander` in `app/vue` from "2.12.1" to "2.12.2" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `webpack` in `app/vue` from "3.8.1" to "3.10.0" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `nodemon` in `app/vue` from "1.12.1" to "1.12.4" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `vue` in `app/vue` from "2.5.8" to "2.5.9" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `vue-template-compiler` in `app/vue` from "2.5.8" to "2.5.9" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `marked` in `addons/comments` from "0.3.6" to "0.3.7" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `moment` in `addons/comments` from "2.19.2" to "2.19.3" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `vue` in `examples/vue-kitchen-sink` from "2.5.8" to "2.5.9" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `vue-template-compiler` in `examples/vue-kitchen-sink` from "2.5.8" to "2.5.9" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `webpack` in `examples/vue-kitchen-sink` from "3.8.1" to "3.10.0" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `webpack-dev-server` in `examples/vue-kitchen-sink` from "2.9.4" to "2.9.5" [#2429](https://github.com/storybooks/storybook/pull/2429) +- Upgraded `@storybook/addon-actions` in `/docs` from "3.2.16" to "3.2.17" [#2427](https://github.com/storybooks/storybook/pull/2427) +- Upgraded `@storybook/addon-links` in `/docs` from "3.2.16" to "3.2.17" [#2427](https://github.com/storybooks/storybook/pull/2427) +- Upgraded `@storybook/addons` in `/docs` from "3.2.16" to "3.2.17" [#2427](https://github.com/storybooks/storybook/pull/2427) +- Upgraded `@storybook/react` in `/docs` from "3.2.16" to "3.2.17" [#2427](https://github.com/storybooks/storybook/pull/2427) +- React 16.2 [#2393](https://github.com/storybooks/storybook/pull/2393) + +
+ # 3.2.17 2017-December-03 From 2aea83798e2656ee8ca01c6ddd0e7f09d50a86de Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Mon, 18 Dec 2017 13:58:53 -0800 Subject: [PATCH 149/162] v3.2.18 --- addons/a11y/package.json | 6 ++--- addons/actions/package.json | 4 ++-- addons/background/package.json | 2 +- addons/centered/package.json | 2 +- addons/comments/package.json | 8 +++---- addons/events/package.json | 4 ++-- addons/graphql/package.json | 2 +- addons/info/package.json | 6 ++--- addons/jest/package.json | 4 ++-- addons/knobs/package.json | 4 ++-- addons/links/package.json | 4 ++-- addons/notes/package.json | 4 ++-- addons/options/package.json | 4 ++-- addons/storyshots/package.json | 10 ++++---- app/react-native/package.json | 12 +++++----- app/react/package.json | 12 +++++----- app/vue/package.json | 12 +++++----- examples/cra-kitchen-sink/package.json | 32 +++++++++++++------------- examples/vue-kitchen-sink/package.json | 16 ++++++------- lerna.json | 2 +- lib/addons/package.json | 2 +- lib/channel-postmessage/package.json | 4 ++-- lib/channel-websocket/package.json | 4 ++-- lib/channels/package.json | 2 +- lib/cli/package.json | 4 ++-- lib/codemod/package.json | 2 +- lib/components/package.json | 2 +- lib/ui/package.json | 4 ++-- 28 files changed, 87 insertions(+), 87 deletions(-) diff --git a/addons/a11y/package.json b/addons/a11y/package.json index a40955f42e7d..20370bd6345c 100644 --- a/addons/a11y/package.json +++ b/addons/a11y/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-a11y", - "version": "3.2.17", + "version": "3.2.18", "description": "a11y addon for storybook", "keywords": [ "a11y", @@ -24,8 +24,8 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "^3.2.17", - "@storybook/components": "^3.2.17", + "@storybook/addons": "^3.2.18", + "@storybook/components": "^3.2.18", "axe-core": "^2.0.7", "prop-types": "^15.6.0" }, diff --git a/addons/actions/package.json b/addons/actions/package.json index 567e00312fd3..037b63c05ddb 100644 --- a/addons/actions/package.json +++ b/addons/actions/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-actions", - "version": "3.2.17", + "version": "3.2.18", "description": "Action Logger addon for storybook", "keywords": [ "storybook" @@ -19,7 +19,7 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addons": "^3.2.17", + "@storybook/addons": "^3.2.18", "deep-equal": "^1.0.1", "json-stringify-safe": "^5.0.1", "prop-types": "^15.6.0", diff --git a/addons/background/package.json b/addons/background/package.json index 7bb1b756107e..4d29ba723111 100644 --- a/addons/background/package.json +++ b/addons/background/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-backgrounds", - "version": "3.2.17", + "version": "3.2.18", "description": "A storybook addon to show different backgrounds for your preview", "keywords": [ "addon", diff --git a/addons/centered/package.json b/addons/centered/package.json index 41b65e372714..9ff0e1dd380c 100644 --- a/addons/centered/package.json +++ b/addons/centered/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-centered", - "version": "3.2.17", + "version": "3.2.18", "description": "Storybook decorator to center components", "license": "MIT", "author": "Muhammed Thanish ", diff --git a/addons/comments/package.json b/addons/comments/package.json index a72587b3ffdd..f5897ffc6462 100644 --- a/addons/comments/package.json +++ b/addons/comments/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-comments", - "version": "3.2.17", + "version": "3.2.18", "description": "Comments addon for Storybook", "keywords": [ "storybook" @@ -23,7 +23,7 @@ "storybook-remote": "start-storybook -p 3006" }, "dependencies": { - "@storybook/addons": "^3.2.17", + "@storybook/addons": "^3.2.18", "babel-runtime": "^6.26.0", "deep-equal": "^1.0.1", "events": "^1.1.1", @@ -38,8 +38,8 @@ "devDependencies": { "@kadira/storybook-database-cloud": "*", "@kadira/storybook-deployer": "*", - "@storybook/addon-actions": "^3.2.17", - "@storybook/react": "^3.2.17" + "@storybook/addon-actions": "^3.2.18", + "@storybook/react": "^3.2.18" }, "peerDependencies": { "react": "*" diff --git a/addons/events/package.json b/addons/events/package.json index f1ededf29cae..970be3cc7875 100644 --- a/addons/events/package.json +++ b/addons/events/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-events", - "version": "3.2.17", + "version": "3.2.18", "description": "Add events to your Storybook stories.", "keywords": [ "addon", @@ -20,7 +20,7 @@ "storybook": "start-storybook -p 6006" }, "dependencies": { - "@storybook/addons": "^3.2.17", + "@storybook/addons": "^3.2.18", "babel-runtime": "^6.26.0", "format-json": "^1.0.3", "prop-types": "^15.6.0", diff --git a/addons/graphql/package.json b/addons/graphql/package.json index 93c27fcdab4d..51789998cd34 100644 --- a/addons/graphql/package.json +++ b/addons/graphql/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-graphql", - "version": "3.2.17", + "version": "3.2.18", "description": "Storybook addon to display the GraphiQL IDE", "keywords": [ "storybook" diff --git a/addons/info/package.json b/addons/info/package.json index 9093e793e85c..0cc1eeab25ae 100644 --- a/addons/info/package.json +++ b/addons/info/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-info", - "version": "3.2.17", + "version": "3.2.18", "description": "A Storybook addon to show additional information for your stories.", "license": "MIT", "main": "dist/index.js", @@ -14,8 +14,8 @@ "storybook": "start-storybook -p 9010" }, "dependencies": { - "@storybook/addons": "^3.2.17", - "@storybook/components": "^3.2.17", + "@storybook/addons": "^3.2.18", + "@storybook/components": "^3.2.18", "babel-runtime": "^6.26.0", "global": "^4.3.2", "marksy": "^2.0.0", diff --git a/addons/jest/package.json b/addons/jest/package.json index 66d91a732f4f..7573d48d1ff2 100644 --- a/addons/jest/package.json +++ b/addons/jest/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-jest", - "version": "3.2.17", + "version": "3.2.18", "description": "React storybook addon that show component jest report", "keywords": [ "addon", @@ -24,7 +24,7 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/components": "^3.2.17", + "@storybook/components": "^3.2.18", "glamor": "^2.20.40", "glamorous": "^4.11.0", "global": "^4.3.2", diff --git a/addons/knobs/package.json b/addons/knobs/package.json index a4a795bdc567..4abe4d8ba601 100644 --- a/addons/knobs/package.json +++ b/addons/knobs/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-knobs", - "version": "3.2.17", + "version": "3.2.18", "description": "Storybook Addon Prop Editor Component", "license": "MIT", "main": "dist/index.js", @@ -14,7 +14,7 @@ "storybook": "start-storybook -p 9010" }, "dependencies": { - "@storybook/addons": "^3.2.17", + "@storybook/addons": "^3.2.18", "babel-runtime": "^6.26.0", "deep-equal": "^1.0.1", "global": "^4.3.2", diff --git a/addons/links/package.json b/addons/links/package.json index 449c8cf59a98..3837bb62e52a 100644 --- a/addons/links/package.json +++ b/addons/links/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-links", - "version": "3.2.17", + "version": "3.2.18", "description": "Story Links addon for storybook", "keywords": [ "storybook" @@ -21,7 +21,7 @@ "storybook": "start-storybook -p 9001" }, "dependencies": { - "@storybook/addons": "^3.2.17" + "@storybook/addons": "^3.2.18" }, "peerDependencies": { "react": "*", diff --git a/addons/notes/package.json b/addons/notes/package.json index 48e11f0546ee..ce31670f632a 100644 --- a/addons/notes/package.json +++ b/addons/notes/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-notes", - "version": "3.2.17", + "version": "3.2.18", "description": "Write notes for your Storybook stories.", "keywords": [ "addon", @@ -19,7 +19,7 @@ "storybook": "start-storybook -p 9010" }, "dependencies": { - "@storybook/addons": "^3.2.17", + "@storybook/addons": "^3.2.18", "babel-runtime": "^6.26.0", "prop-types": "^15.6.0", "util-deprecate": "^1.0.2" diff --git a/addons/options/package.json b/addons/options/package.json index a73e9b04ec04..0b89c3833862 100644 --- a/addons/options/package.json +++ b/addons/options/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-options", - "version": "3.2.17", + "version": "3.2.18", "description": "Options addon for storybook", "keywords": [ "storybook" @@ -20,7 +20,7 @@ "storybook": "start-storybook -p 9001" }, "dependencies": { - "@storybook/addons": "^3.2.17" + "@storybook/addons": "^3.2.18" }, "peerDependencies": { "react": "*", diff --git a/addons/storyshots/package.json b/addons/storyshots/package.json index d28136cf5b3d..f90c6d5bc8fd 100644 --- a/addons/storyshots/package.json +++ b/addons/storyshots/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addon-storyshots", - "version": "3.2.17", + "version": "3.2.18", "description": "StoryShots is a Jest Snapshot Testing Addon for Storybook.", "license": "MIT", "main": "dist/index.js", @@ -14,7 +14,7 @@ "storybook": "start-storybook -p 6006" }, "dependencies": { - "@storybook/channels": "^3.2.17", + "@storybook/channels": "^3.2.18", "babel-core": "^6.26.0", "babel-runtime": "^6.26.0", "global": "^4.3.2", @@ -22,11 +22,11 @@ "read-pkg-up": "^3.0.0" }, "devDependencies": { - "@storybook/addons": "^3.2.17", - "@storybook/react": "^3.2.17" + "@storybook/addons": "^3.2.18", + "@storybook/react": "^3.2.18" }, "peerDependencies": { - "@storybook/addons": "^3.2.17", + "@storybook/addons": "^3.2.18", "react": "*", "react-test-renderer": "*" } diff --git a/app/react-native/package.json b/app/react-native/package.json index 215dcefc77bc..9a166ba431dd 100644 --- a/app/react-native/package.json +++ b/app/react-native/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react-native", - "version": "3.2.17", + "version": "3.2.18", "description": "A better way to develop React Native Components for your app", "keywords": [ "react", @@ -24,11 +24,11 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addon-actions": "^3.2.17", - "@storybook/addon-links": "^3.2.17", - "@storybook/addons": "^3.2.17", - "@storybook/channel-websocket": "^3.2.17", - "@storybook/ui": "^3.2.17", + "@storybook/addon-actions": "^3.2.18", + "@storybook/addon-links": "^3.2.18", + "@storybook/addons": "^3.2.18", + "@storybook/channel-websocket": "^3.2.18", + "@storybook/ui": "^3.2.18", "autoprefixer": "^7.2.3", "babel-core": "^6.26.0", "babel-loader": "^7.1.2", diff --git a/app/react/package.json b/app/react/package.json index 0a64e3cf8534..bdedf48f4496 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/react", - "version": "3.2.17", + "version": "3.2.18", "description": "Storybook for React: Develop React Component in isolation with Hot Reloading.", "homepage": "https://github.com/storybooks/storybook/tree/master/app/react", "bugs": { @@ -22,11 +22,11 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addon-actions": "^3.2.17", - "@storybook/addon-links": "^3.2.17", - "@storybook/addons": "^3.2.17", - "@storybook/channel-postmessage": "^3.2.17", - "@storybook/ui": "^3.2.17", + "@storybook/addon-actions": "^3.2.18", + "@storybook/addon-links": "^3.2.18", + "@storybook/addons": "^3.2.18", + "@storybook/channel-postmessage": "^3.2.18", + "@storybook/ui": "^3.2.18", "airbnb-js-shims": "^1.4.0", "autoprefixer": "^7.2.3", "babel-core": "^6.26.0", diff --git a/app/vue/package.json b/app/vue/package.json index 95b042ba8ad4..602da0bae1e7 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/vue", - "version": "3.2.17", + "version": "3.2.18", "description": "Storybook for Vue: Develop Vue Component in isolation with Hot Reloading.", "homepage": "https://github.com/storybooks/storybook/tree/master/apps/vue", "bugs": { @@ -22,11 +22,11 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/addon-actions": "^3.2.17", - "@storybook/addon-links": "^3.2.17", - "@storybook/addons": "^3.2.17", - "@storybook/channel-postmessage": "^3.2.17", - "@storybook/ui": "^3.2.17", + "@storybook/addon-actions": "^3.2.18", + "@storybook/addon-links": "^3.2.18", + "@storybook/addons": "^3.2.18", + "@storybook/channel-postmessage": "^3.2.18", + "@storybook/ui": "^3.2.18", "airbnb-js-shims": "^1.4.0", "autoprefixer": "^7.2.3", "babel-core": "^6.26.0", diff --git a/examples/cra-kitchen-sink/package.json b/examples/cra-kitchen-sink/package.json index 9c716c883a88..82d2a94bbdbe 100644 --- a/examples/cra-kitchen-sink/package.json +++ b/examples/cra-kitchen-sink/package.json @@ -1,6 +1,6 @@ { "name": "cra-kitchen-sink", - "version": "3.2.17", + "version": "3.2.18", "scripts": { "build": "react-scripts build", "build-storybook": "build-storybook -s public", @@ -22,21 +22,21 @@ "uuid": "^3.1.0" }, "devDependencies": { - "@storybook/addon-a11y": "^3.2.17", - "@storybook/addon-actions": "^3.2.17", - "@storybook/addon-backgrounds": "^3.2.17", - "@storybook/addon-centered": "^3.2.17", - "@storybook/addon-events": "^3.2.17", - "@storybook/addon-info": "^3.2.17", - "@storybook/addon-jest": "^3.2.17", - "@storybook/addon-knobs": "^3.2.17", - "@storybook/addon-links": "^3.2.17", - "@storybook/addon-notes": "^3.2.17", - "@storybook/addon-options": "^3.2.17", - "@storybook/addon-storyshots": "^3.2.17", - "@storybook/addons": "^3.2.17", - "@storybook/components": "^3.2.17", - "@storybook/react": "^3.2.17", + "@storybook/addon-a11y": "^3.2.18", + "@storybook/addon-actions": "^3.2.18", + "@storybook/addon-backgrounds": "^3.2.18", + "@storybook/addon-centered": "^3.2.18", + "@storybook/addon-events": "^3.2.18", + "@storybook/addon-info": "^3.2.18", + "@storybook/addon-jest": "^3.2.18", + "@storybook/addon-knobs": "^3.2.18", + "@storybook/addon-links": "^3.2.18", + "@storybook/addon-notes": "^3.2.18", + "@storybook/addon-options": "^3.2.18", + "@storybook/addon-storyshots": "^3.2.18", + "@storybook/addons": "^3.2.18", + "@storybook/components": "^3.2.18", + "@storybook/react": "^3.2.18", "babel-jest": "^21.2.0", "jest": "^21.2.1", "react-scripts": "1.0.17" diff --git a/examples/vue-kitchen-sink/package.json b/examples/vue-kitchen-sink/package.json index 5e10fff86147..ea64dbdfa46d 100644 --- a/examples/vue-kitchen-sink/package.json +++ b/examples/vue-kitchen-sink/package.json @@ -1,15 +1,15 @@ { "name": "vue-example", - "version": "3.2.17", + "version": "3.2.18", "private": true, "devDependencies": { - "@storybook/addon-actions": "^3.2.17", - "@storybook/addon-centered": "^3.2.17", - "@storybook/addon-knobs": "^3.2.17", - "@storybook/addon-links": "^3.2.17", - "@storybook/addon-notes": "^3.2.17", - "@storybook/addons": "^3.2.17", - "@storybook/vue": "^3.2.17", + "@storybook/addon-actions": "^3.2.18", + "@storybook/addon-centered": "^3.2.18", + "@storybook/addon-knobs": "^3.2.18", + "@storybook/addon-links": "^3.2.18", + "@storybook/addon-notes": "^3.2.18", + "@storybook/addons": "^3.2.18", + "@storybook/vue": "^3.2.18", "babel-core": "^6.26.0", "babel-loader": "^7.1.2", "babel-preset-env": "^1.6.0", diff --git a/lerna.json b/lerna.json index 8d09b966d69a..5dc5ae6f526c 100644 --- a/lerna.json +++ b/lerna.json @@ -8,5 +8,5 @@ } }, "concurrency": 1, - "version": "3.2.17" + "version": "3.2.18" } diff --git a/lib/addons/package.json b/lib/addons/package.json index 1c4eb9b81081..ceb3994d1fd9 100644 --- a/lib/addons/package.json +++ b/lib/addons/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/addons", - "version": "3.2.17", + "version": "3.2.18", "description": "Storybook addons store", "keywords": [ "storybook" diff --git a/lib/channel-postmessage/package.json b/lib/channel-postmessage/package.json index 6a3bda37b4fa..3b576269838d 100644 --- a/lib/channel-postmessage/package.json +++ b/lib/channel-postmessage/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channel-postmessage", - "version": "3.2.17", + "version": "3.2.18", "description": "", "license": "MIT", "main": "dist/index.js", @@ -8,7 +8,7 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/channels": "^3.2.17", + "@storybook/channels": "^3.2.18", "global": "^4.3.2", "json-stringify-safe": "^5.0.1" } diff --git a/lib/channel-websocket/package.json b/lib/channel-websocket/package.json index a8313fc18e15..c792cf8acc8b 100644 --- a/lib/channel-websocket/package.json +++ b/lib/channel-websocket/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channel-websocket", - "version": "3.2.17", + "version": "3.2.18", "description": "", "license": "MIT", "main": "dist/index.js", @@ -8,7 +8,7 @@ "prepare": "node ../../scripts/prepare.js" }, "dependencies": { - "@storybook/channels": "^3.2.17", + "@storybook/channels": "^3.2.18", "global": "^4.3.2" } } diff --git a/lib/channels/package.json b/lib/channels/package.json index 255b734424aa..991832cefee2 100644 --- a/lib/channels/package.json +++ b/lib/channels/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/channels", - "version": "3.2.17", + "version": "3.2.18", "description": "", "license": "MIT", "main": "dist/index.js", diff --git a/lib/cli/package.json b/lib/cli/package.json index ca4db7c8099f..c41dd301e0d6 100644 --- a/lib/cli/package.json +++ b/lib/cli/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/cli", - "version": "3.2.17", + "version": "3.2.18", "description": "Storybook's CLI - easiest method of adding storybook to your projects", "keywords": [ "cli", @@ -21,7 +21,7 @@ "url": "https://github.com/storybooks/storybook.git" }, "dependencies": { - "@storybook/codemod": "^3.2.17", + "@storybook/codemod": "^3.2.18", "chalk": "^2.3.0", "child-process-promise": "^2.2.1", "commander": "^2.12.2", diff --git a/lib/codemod/package.json b/lib/codemod/package.json index 2a21125e4cf5..b86bd3c12585 100644 --- a/lib/codemod/package.json +++ b/lib/codemod/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/codemod", - "version": "3.2.17", + "version": "3.2.18", "description": "A collection of codemod scripts written with JSCodeshift", "license": "MIT", "main": "dist/index.js", diff --git a/lib/components/package.json b/lib/components/package.json index 994905954ba2..c11f9bcf2f82 100644 --- a/lib/components/package.json +++ b/lib/components/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/components", - "version": "3.2.17", + "version": "3.2.18", "description": "Core Storybook Components", "license": "MIT", "main": "dist/index.js", diff --git a/lib/ui/package.json b/lib/ui/package.json index 80ea09315782..3efb6cad1d96 100644 --- a/lib/ui/package.json +++ b/lib/ui/package.json @@ -1,6 +1,6 @@ { "name": "@storybook/ui", - "version": "3.2.17", + "version": "3.2.18", "description": "Core Storybook UI", "license": "MIT", "main": "dist/index.js", @@ -15,7 +15,7 @@ }, "dependencies": { "@hypnosphi/fuse.js": "^3.0.9", - "@storybook/components": "^3.2.17", + "@storybook/components": "^3.2.18", "@storybook/mantra-core": "^1.7.0", "@storybook/react-fuzzy": "^0.4.3", "@storybook/react-komposer": "^2.0.0", From aa82b1222e7cd527ced7e087277a9135c68d7030 Mon Sep 17 00:00:00 2001 From: hypnos Date: Mon, 18 Dec 2017 23:40:20 +0100 Subject: [PATCH 150/162] Update lockfile --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index a8524bc1ea17..f1f74f7eea11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11702,7 +11702,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 5fe1283e309a82f83ee894d5cba26ff9c92451db Mon Sep 17 00:00:00 2001 From: igor Date: Tue, 19 Dec 2017 17:38:34 +0200 Subject: [PATCH 151/162] Add custom pipes support --- app/angular/src/client/preview/angular/app.token.ts | 3 ++- app/angular/src/client/preview/angular/helpers.ts | 6 ++++-- examples/angular-cli/src/stories/custom.pipe.ts | 10 ++++++++++ examples/angular-cli/src/stories/index.ts | 8 ++++++++ examples/angular-cli/src/stories/name.component.ts | 7 +++++++ 5 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 examples/angular-cli/src/stories/custom.pipe.ts create mode 100644 examples/angular-cli/src/stories/name.component.ts diff --git a/app/angular/src/client/preview/angular/app.token.ts b/app/angular/src/client/preview/angular/app.token.ts index 278844d0a449..2ebf349781d8 100644 --- a/app/angular/src/client/preview/angular/app.token.ts +++ b/app/angular/src/client/preview/angular/app.token.ts @@ -1,4 +1,4 @@ -import { InjectionToken } from "@angular/core"; +import { InjectionToken, PipeTransform } from "@angular/core"; export const STORY = new InjectionToken("story"); @@ -6,4 +6,5 @@ export type Data = { component: any; props: object; propsMeta: object; + pipes: PipeTransform[]; } \ No newline at end of file diff --git a/app/angular/src/client/preview/angular/helpers.ts b/app/angular/src/client/preview/angular/helpers.ts index b33ad7285ea0..cad1a92b6b9f 100644 --- a/app/angular/src/client/preview/angular/helpers.ts +++ b/app/angular/src/client/preview/angular/helpers.ts @@ -33,7 +33,7 @@ const debounce = (func, wait = 100, immediate = false) => { }; }; -const getComponentMetadata = ({ component, props = {}, propsMeta = {} }) => { +const getComponentMetadata = ({ component, props = {}, propsMeta = {}, pipes = [] }) => { if (!component || typeof component !== "function") throw new Error("No valid component provided"); @@ -50,6 +50,7 @@ const getComponentMetadata = ({ component, props = {}, propsMeta = {} }) => { return { component, props, + pipes, componentMeta: componentMetadata, propsMeta: propsMetadata, params: paramsMetadata @@ -88,6 +89,7 @@ const initModule = (currentStory, context, reRender) => { component, componentMeta, props, + pipes, propsMeta, params } = getComponentMetadata(currentStory(context)); @@ -107,7 +109,7 @@ const initModule = (currentStory, context, reRender) => { propsMeta }; const Module = getModule( - [AppComponent, AnnotatedComponent], + [AppComponent, AnnotatedComponent, ...pipes], [AnnotatedComponent], [AppComponent], story diff --git a/examples/angular-cli/src/stories/custom.pipe.ts b/examples/angular-cli/src/stories/custom.pipe.ts new file mode 100644 index 000000000000..7c72cbc89bd7 --- /dev/null +++ b/examples/angular-cli/src/stories/custom.pipe.ts @@ -0,0 +1,10 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'customPipe' +}) +export class CustomPipePipe implements PipeTransform { + transform(value: any, args?: any): any { + return `CustomPipe: ${value}`; + } +} diff --git a/examples/angular-cli/src/stories/index.ts b/examples/angular-cli/src/stories/index.ts index 09adb88f6242..bd900dbb4336 100644 --- a/examples/angular-cli/src/stories/index.ts +++ b/examples/angular-cli/src/stories/index.ts @@ -20,6 +20,14 @@ import { Welcome, Button } from '@storybook/angular/demo'; import { SimpleKnobsComponent } from './knobs.component'; import { AllKnobsComponent } from './all-knobs.component'; import { AppComponent } from '../app/app.component'; +import { NameComponent } from './name.component'; +import { CustomPipePipe } from './custom.pipe'; + +storiesOf('NameComponent', module) + .add('with text', () => ({ + component: NameComponent, + pipes: [ CustomPipePipe ], + })); storiesOf('Welcome', module) .add('to Storybook', () => ({ diff --git a/examples/angular-cli/src/stories/name.component.ts b/examples/angular-cli/src/stories/name.component.ts new file mode 100644 index 000000000000..eb6b2745761c --- /dev/null +++ b/examples/angular-cli/src/stories/name.component.ts @@ -0,0 +1,7 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'name', + template: `

{{ 'foobar' | customPipe }}

` +}) +export class NameComponent {} From 95771daad5397c8355af8be062a10b490c4e7243 Mon Sep 17 00:00:00 2001 From: igor Date: Tue, 19 Dec 2017 18:00:25 +0200 Subject: [PATCH 152/162] Add knobs support --- addons/knobs/src/angular/helpers.js | 6 ++++-- examples/angular-cli/src/stories/index.ts | 17 +++++++++++++++-- .../angular-cli/src/stories/name.component.ts | 8 +++++--- package.json | 2 +- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/addons/knobs/src/angular/helpers.js b/addons/knobs/src/angular/helpers.js index f570fc35dcb7..122bf7210f85 100644 --- a/addons/knobs/src/angular/helpers.js +++ b/addons/knobs/src/angular/helpers.js @@ -2,7 +2,7 @@ import { Component, SimpleChange, ChangeDetectorRef } from '@angular/core'; -const getComponentMetadata = ({ component, props = {} }) => { +const getComponentMetadata = ({ component, props = {}, pipes = [] }) => { if (!component || typeof component !== 'function') throw new Error('No valid component provided'); const componentMeta = component.__annotations__[0] || component.annotations[0]; @@ -11,6 +11,7 @@ const getComponentMetadata = ({ component, props = {} }) => { return { component, props, + pipes, componentMeta, propsMeta, params: paramsMetadata, @@ -95,7 +96,7 @@ const resetKnobs = (knobStore, channel) => { export function prepareComponent({ getStory, context, channel, knobStore }) { resetKnobs(knobStore, channel); - const { component, componentMeta, props, propsMeta, params } = getComponentMetadata( + const { component, componentMeta, props, pipes, propsMeta, params } = getComponentMetadata( getStory(context) ); @@ -112,6 +113,7 @@ export function prepareComponent({ getStory, context, channel, knobStore }) { return { component: AnnotatedComponent, props, + pipes, propsMeta, }; } diff --git a/examples/angular-cli/src/stories/index.ts b/examples/angular-cli/src/stories/index.ts index bd900dbb4336..dab525efdd1f 100644 --- a/examples/angular-cli/src/stories/index.ts +++ b/examples/angular-cli/src/stories/index.ts @@ -23,9 +23,22 @@ import { AppComponent } from '../app/app.component'; import { NameComponent } from './name.component'; import { CustomPipePipe } from './custom.pipe'; -storiesOf('NameComponent', module) - .add('with text', () => ({ +storiesOf('Custom Pipe', module) + .add('Default', () => ({ + component: NameComponent, + props: { + field: 'foobar', + }, + pipes: [ CustomPipePipe ], + })); + +storiesOf('Custom Pipe/With Knobs', module) + .addDecorator(withKnobs) + .add('NameComponent', () => ({ component: NameComponent, + props: { + field: text('field', 'foobar'), + }, pipes: [ CustomPipePipe ], })); diff --git a/examples/angular-cli/src/stories/name.component.ts b/examples/angular-cli/src/stories/name.component.ts index eb6b2745761c..79a6e95e21ee 100644 --- a/examples/angular-cli/src/stories/name.component.ts +++ b/examples/angular-cli/src/stories/name.component.ts @@ -1,7 +1,9 @@ -import { Component } from '@angular/core'; +import { Component, Input } from '@angular/core'; @Component({ selector: 'name', - template: `

{{ 'foobar' | customPipe }}

` + template: `

{{ field | customPipe }}

` }) -export class NameComponent {} +export class NameComponent { + @Input() field; +} diff --git a/package.json b/package.json index df5d204cd4ce..94168ae239b9 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "docs:dev": "npm --prefix docs run dev", "github-release": "github-release-from-changelog", "lint": "yarn lint:js . && yarn lint:md .", - "lint:js": "NODE_ENV=production eslint --cache --cache-location=.cache/eslint --ext .js,.jsx,.json", + "lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location=.cache/eslint --ext .js,.jsx,.json", "lint:md": "remark", "publish": "lerna publish", "test": "./scripts/test.js", From 88b8e09d68f6d869de96cb836c24058517acb68e Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Tue, 19 Dec 2017 16:22:00 +0000 Subject: [PATCH 153/162] Update @storybook/addon-actions from 3.2.17 to 3.2.18 --- docs/package.json | 2 +- docs/yarn.lock | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/package.json b/docs/package.json index 0f79d8c55c02..253fd002900e 100644 --- a/docs/package.json +++ b/docs/package.json @@ -18,7 +18,7 @@ "storybook": "start-storybook -p 9009 -s src/pages" }, "dependencies": { - "@storybook/addon-actions": "^3.2.17", + "@storybook/addon-actions": "^3.2.18", "@storybook/addon-links": "^3.2.17", "@storybook/addons": "^3.2.17", "@storybook/react": "^3.2.17", diff --git a/docs/yarn.lock b/docs/yarn.lock index 744f07a49eb0..961d8e6cb35a 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -17,6 +17,17 @@ react-inspector "^2.2.1" uuid "^3.1.0" +"@storybook/addon-actions@^3.2.18": + version "3.2.18" + resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-3.2.18.tgz#46d97b0add955698d66becb5d51e68a4d387b822" + dependencies: + "@storybook/addons" "^3.2.18" + deep-equal "^1.0.1" + json-stringify-safe "^5.0.1" + prop-types "^15.6.0" + react-inspector "^2.2.2" + uuid "^3.1.0" + "@storybook/addon-links@^3.2.17": version "3.2.17" resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-3.2.17.tgz#fb1d5f5f16575e56d560955d70c2a756c9f5b612" @@ -27,6 +38,10 @@ version "3.2.17" resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-3.2.17.tgz#5c2ece24c5f7fbf7cedf4cfe503c5e356543e62d" +"@storybook/addons@^3.2.18": + version "3.2.18" + resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-3.2.18.tgz#2c1d42a0b661db2e429d1c406e79765ae5c71458" + "@storybook/channel-postmessage@^3.2.17": version "3.2.17" resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-3.2.17.tgz#530c1d6852b2c77df08490988fa943ba1373b1ec" @@ -8424,6 +8439,13 @@ react-inspector@^2.2.1: babel-runtime "^6.26.0" is-dom "^1.0.9" +react-inspector@^2.2.2: + 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" + react-modal@^3.1.4: version "3.1.7" resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.1.7.tgz#21feb937c95cd722bf2d375cada751fdc8189c0e" From a7ff91d5d615aa95859ed1cd92d99f4fc6a94cd7 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Tue, 19 Dec 2017 16:24:03 +0000 Subject: [PATCH 154/162] Update @storybook/addon-links from 3.2.17 to 3.2.18 --- docs/package.json | 2 +- docs/yarn.lock | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/package.json b/docs/package.json index 253fd002900e..7da040fbafc1 100644 --- a/docs/package.json +++ b/docs/package.json @@ -19,7 +19,7 @@ }, "dependencies": { "@storybook/addon-actions": "^3.2.18", - "@storybook/addon-links": "^3.2.17", + "@storybook/addon-links": "^3.2.18", "@storybook/addons": "^3.2.17", "@storybook/react": "^3.2.17", "babel-cli": "^6.26.0", diff --git a/docs/yarn.lock b/docs/yarn.lock index 961d8e6cb35a..f5dea19adb7b 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -34,6 +34,12 @@ dependencies: "@storybook/addons" "^3.2.17" +"@storybook/addon-links@^3.2.18": + version "3.2.18" + resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-3.2.18.tgz#a1fd96dd91d56204da92632baa36a2263d2aeebb" + dependencies: + "@storybook/addons" "^3.2.18" + "@storybook/addons@^3.2.17": version "3.2.17" resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-3.2.17.tgz#5c2ece24c5f7fbf7cedf4cfe503c5e356543e62d" From 44bf08c8461719180cad778c34f0da4940d6992d Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Tue, 19 Dec 2017 16:26:05 +0000 Subject: [PATCH 155/162] Update @storybook/addons from 3.2.17 to 3.2.18 --- docs/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/package.json b/docs/package.json index 7da040fbafc1..919c2c508644 100644 --- a/docs/package.json +++ b/docs/package.json @@ -20,7 +20,7 @@ "dependencies": { "@storybook/addon-actions": "^3.2.18", "@storybook/addon-links": "^3.2.18", - "@storybook/addons": "^3.2.17", + "@storybook/addons": "^3.2.18", "@storybook/react": "^3.2.17", "babel-cli": "^6.26.0", "babel-core": "^6.26.0", From 45dc5cb588146e09588c2494d46e3fc0aa87a525 Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Tue, 19 Dec 2017 16:28:24 +0000 Subject: [PATCH 156/162] Update @storybook/react from 3.2.17 to 3.2.18 --- docs/package.json | 2 +- docs/yarn.lock | 207 ++++++++++++++++++++++++---------------------- 2 files changed, 110 insertions(+), 99 deletions(-) diff --git a/docs/package.json b/docs/package.json index 919c2c508644..19032e0d63bf 100644 --- a/docs/package.json +++ b/docs/package.json @@ -21,7 +21,7 @@ "@storybook/addon-actions": "^3.2.18", "@storybook/addon-links": "^3.2.18", "@storybook/addons": "^3.2.18", - "@storybook/react": "^3.2.17", + "@storybook/react": "^3.2.18", "babel-cli": "^6.26.0", "babel-core": "^6.26.0", "babel-plugin-transform-runtime": "^6.23.0", diff --git a/docs/yarn.lock b/docs/yarn.lock index f5dea19adb7b..df25b868ca18 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -6,17 +6,6 @@ version "3.0.9" resolved "https://registry.yarnpkg.com/@hypnosphi/fuse.js/-/fuse.js-3.0.9.tgz#ea99f6121b4a8f065b4c71f85595db2714498807" -"@storybook/addon-actions@^3.2.17": - version "3.2.17" - resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-3.2.17.tgz#e85d38f743125157fdaf6669708e089bc2008e50" - dependencies: - "@storybook/addons" "^3.2.17" - deep-equal "^1.0.1" - json-stringify-safe "^5.0.1" - prop-types "^15.6.0" - react-inspector "^2.2.1" - uuid "^3.1.0" - "@storybook/addon-actions@^3.2.18": version "3.2.18" resolved "https://registry.yarnpkg.com/@storybook/addon-actions/-/addon-actions-3.2.18.tgz#46d97b0add955698d66becb5d51e68a4d387b822" @@ -28,41 +17,31 @@ react-inspector "^2.2.2" uuid "^3.1.0" -"@storybook/addon-links@^3.2.17": - version "3.2.17" - resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-3.2.17.tgz#fb1d5f5f16575e56d560955d70c2a756c9f5b612" - dependencies: - "@storybook/addons" "^3.2.17" - "@storybook/addon-links@^3.2.18": version "3.2.18" resolved "https://registry.yarnpkg.com/@storybook/addon-links/-/addon-links-3.2.18.tgz#a1fd96dd91d56204da92632baa36a2263d2aeebb" dependencies: "@storybook/addons" "^3.2.18" -"@storybook/addons@^3.2.17": - version "3.2.17" - resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-3.2.17.tgz#5c2ece24c5f7fbf7cedf4cfe503c5e356543e62d" - "@storybook/addons@^3.2.18": version "3.2.18" resolved "https://registry.yarnpkg.com/@storybook/addons/-/addons-3.2.18.tgz#2c1d42a0b661db2e429d1c406e79765ae5c71458" -"@storybook/channel-postmessage@^3.2.17": - version "3.2.17" - resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-3.2.17.tgz#530c1d6852b2c77df08490988fa943ba1373b1ec" +"@storybook/channel-postmessage@^3.2.18": + version "3.2.18" + resolved "https://registry.yarnpkg.com/@storybook/channel-postmessage/-/channel-postmessage-3.2.18.tgz#8193e2fbae4f46a20a58fb6cdfd722c1743a3dd0" dependencies: - "@storybook/channels" "^3.2.17" + "@storybook/channels" "^3.2.18" global "^4.3.2" json-stringify-safe "^5.0.1" -"@storybook/channels@^3.2.17": - version "3.2.17" - resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-3.2.17.tgz#09219a512564d1aa2292419d8d6064dbf7f5a5b3" +"@storybook/channels@^3.2.18": + version "3.2.18" + resolved "https://registry.yarnpkg.com/@storybook/channels/-/channels-3.2.18.tgz#c5d8c4ac780c6ebb4b1c360d8faf9207fd4fbafd" -"@storybook/components@^3.2.17": - version "3.2.17" - resolved "https://registry.yarnpkg.com/@storybook/components/-/components-3.2.17.tgz#318c6e6a1d3ffb469523b5dcfee775639ccc500b" +"@storybook/components@^3.2.18": + version "3.2.18" + resolved "https://registry.yarnpkg.com/@storybook/components/-/components-3.2.18.tgz#142dd10414a717c24734f063af6b2b7b9bd06b4a" dependencies: glamor "^2.20.40" glamorous "^4.11.0" @@ -108,17 +87,17 @@ dependencies: babel-runtime "^6.5.0" -"@storybook/react@^3.2.17": - version "3.2.17" - resolved "https://registry.yarnpkg.com/@storybook/react/-/react-3.2.17.tgz#c7b0595efef049d4dae89202994c17f332ee4662" - dependencies: - "@storybook/addon-actions" "^3.2.17" - "@storybook/addon-links" "^3.2.17" - "@storybook/addons" "^3.2.17" - "@storybook/channel-postmessage" "^3.2.17" - "@storybook/ui" "^3.2.17" - airbnb-js-shims "^1.3.0" - autoprefixer "^7.1.6" +"@storybook/react@^3.2.18": + version "3.2.18" + resolved "https://registry.yarnpkg.com/@storybook/react/-/react-3.2.18.tgz#bb0a86cf808c3c90fedc11e489f10660f650c781" + dependencies: + "@storybook/addon-actions" "^3.2.18" + "@storybook/addon-links" "^3.2.18" + "@storybook/addons" "^3.2.18" + "@storybook/channel-postmessage" "^3.2.18" + "@storybook/ui" "^3.2.18" + airbnb-js-shims "^1.4.0" + autoprefixer "^7.2.3" babel-core "^6.26.0" babel-loader "^7.1.2" babel-plugin-react-docgen "^1.8.0" @@ -132,10 +111,10 @@ babel-runtime "^6.26.0" case-sensitive-paths-webpack-plugin "^2.1.1" chalk "^2.3.0" - commander "^2.12.1" + commander "^2.12.2" common-tags "^1.5.1" configstore "^3.1.1" - core-js "^2.5.1" + core-js "^2.5.3" css-loader "^0.28.7" dotenv-webpack "^1.5.4" express "^4.16.2" @@ -148,7 +127,6 @@ json-stringify-safe "^5.0.1" json5 "^0.5.1" lodash.flattendeep "^4.4.0" - lodash.pick "^4.4.0" postcss-flexbugs-fixes "^3.2.0" postcss-loader "^2.0.9" prop-types "^15.6.0" @@ -157,20 +135,20 @@ request "^2.83.0" serve-favicon "^2.4.5" shelljs "^0.7.8" - style-loader "^0.18.2" + style-loader "^0.19.1" url-loader "^0.6.2" util-deprecate "^1.0.2" uuid "^3.1.0" - webpack "^3.8.1" + webpack "^3.10.0" webpack-dev-middleware "^1.12.2" webpack-hot-middleware "^2.21.0" -"@storybook/ui@^3.2.17": - version "3.2.17" - resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-3.2.17.tgz#8838fc5bbe21cedfafc65ee90fe525499370118a" +"@storybook/ui@^3.2.18": + version "3.2.18" + resolved "https://registry.yarnpkg.com/@storybook/ui/-/ui-3.2.18.tgz#4d19f8daff7ec37cebe4d2b5d20e81e3676d8938" dependencies: "@hypnosphi/fuse.js" "^3.0.9" - "@storybook/components" "^3.2.17" + "@storybook/components" "^3.2.18" "@storybook/mantra-core" "^1.7.0" "@storybook/react-fuzzy" "^0.4.3" "@storybook/react-komposer" "^2.0.0" @@ -187,8 +165,8 @@ prop-types "^15.6.0" qs "^6.5.1" react-icons "^2.2.7" - react-inspector "^2.2.1" - react-modal "^3.1.4" + react-inspector "^2.2.2" + react-modal "^3.1.8" react-split-pane "^0.1.71" react-treebeard "^2.0.3" redux "^3.7.2" @@ -249,18 +227,20 @@ after@0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/after/-/after-0.8.2.tgz#fedb394f9f0e02aa9768e702bda23b505fae7e1f" -airbnb-js-shims@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/airbnb-js-shims/-/airbnb-js-shims-1.3.0.tgz#aac46d80057fb0b414f70e06d07e362fd99ee2fa" +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: array-includes "^3.0.3" + array.prototype.flatmap "^1.1.1" + array.prototype.flatten "^1.1.1" 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" + promise.prototype.finally "^3.1.0" string.prototype.padend "^3.0.0" string.prototype.padstart "^3.0.0" @@ -473,6 +453,22 @@ array-unique@^0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" +array.prototype.flatmap@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.1.1.tgz#dbb6c44693c2a2a2fcab24e551dfbf47f67fde03" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.10.0" + function-bind "^1.1.1" + +array.prototype.flatten@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array.prototype.flatten/-/array.prototype.flatten-1.1.1.tgz#301b351aa8a632356ee2f5311c6c8e8f50d318cc" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.10.0" + function-bind "^1.1.1" + arraybuffer.slice@0.0.6: version "0.0.6" resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca" @@ -562,15 +558,15 @@ autoprefixer@^6.0.2, autoprefixer@^6.3.1: postcss "^5.2.16" postcss-value-parser "^3.2.3" -autoprefixer@^7.1.6: - version "7.1.6" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.6.tgz#fb933039f74af74a83e71225ce78d9fd58ba84d7" +autoprefixer@^7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.2.3.tgz#c2841e38b7940c2d0a9bbffd72c75f33637854f8" dependencies: - browserslist "^2.5.1" - caniuse-lite "^1.0.30000748" + browserslist "^2.10.0" + caniuse-lite "^1.0.30000783" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^6.0.13" + postcss "^6.0.14" postcss-value-parser "^3.2.3" aws-sign2@~0.6.0: @@ -2021,12 +2017,12 @@ browserslist@^2.1.2: caniuse-lite "^1.0.30000718" electron-to-chromium "^1.3.18" -browserslist@^2.5.1: - version "2.8.0" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.8.0.tgz#27d64028130a2e8585ca96f7c3b7730eff4de493" +browserslist@^2.10.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.10.0.tgz#bac5ee1cc69ca9d96403ffb8a3abdc5b6aed6346" dependencies: - caniuse-lite "^1.0.30000758" - electron-to-chromium "^1.3.27" + caniuse-lite "^1.0.30000780" + electron-to-chromium "^1.3.28" bser@^2.0.0: version "2.0.0" @@ -2156,9 +2152,9 @@ caniuse-lite@^1.0.30000718: version "1.0.30000740" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000740.tgz#f2c4c04d6564eb812e61006841700ad557f6f973" -caniuse-lite@^1.0.30000748, caniuse-lite@^1.0.30000758: - version "1.0.30000760" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000760.tgz#ec720395742f1c7ec8947fd6dd2604e77a8f98ff" +caniuse-lite@^1.0.30000780, caniuse-lite@^1.0.30000783: + version "1.0.30000783" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000783.tgz#9b5499fb1b503d2345d12aa6b8612852f4276ffd" capture-stack-trace@^1.0.0: version "1.0.0" @@ -2507,7 +2503,7 @@ commander@2.9.0, commander@2.9.x: dependencies: graceful-readlink ">= 1.0.0" -commander@^2.12.1: +commander@^2.12.2: version "2.12.2" resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555" @@ -2668,10 +2664,14 @@ core-js@^1.0.0, core-js@^1.2.6: version "1.2.7" resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" -core-js@^2.4.0, core-js@^2.4.1, core-js@^2.5.0, core-js@^2.5.1: +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.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.3.tgz#8acc38345824f16d8365b7c9b4259168e8ed603e" + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -3323,9 +3323,9 @@ electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.18: version "1.3.24" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.24.tgz#9b7b88bb05ceb9fa016a177833cc2dde388f21b6" -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: + version "1.3.29" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.29.tgz#7a58236b95468c3e7660091348522d65d7736b36" element-resize-detector@^1.1.12: version "1.1.12" @@ -3457,7 +3457,17 @@ error-stack-parser@^2.0.0: dependencies: stackframe "^1.0.3" -es-abstract@^1.4.3, es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0, es-abstract@^1.8.2: +es-abstract@^1.10.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: + 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-abstract@^1.4.3, es-abstract@^1.5.1, es-abstract@^1.6.1, es-abstract@^1.7.0: version "1.8.2" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.8.2.tgz#25103263dc4decbda60e0c737ca32313518027ee" dependencies: @@ -8102,7 +8112,7 @@ postcss@^5.0.0, postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0. source-map "^0.5.6" supports-color "^3.2.3" -postcss@^6.0.0, postcss@^6.0.13: +postcss@^6.0.0: version "6.0.13" resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.13.tgz#b9ecab4ee00c89db3ec931145bd9590bbf3f125f" dependencies: @@ -8118,6 +8128,14 @@ postcss@^6.0.1: source-map "^0.5.7" supports-color "^4.4.0" +postcss@^6.0.14: + version "6.0.14" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.14.tgz#5534c72114739e75d0afcf017db853099f562885" + dependencies: + chalk "^2.3.0" + source-map "^0.6.1" + supports-color "^4.4.0" + potrace@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/potrace/-/potrace-2.1.1.tgz#79111a858197f366418845f667fe8f7fac0a79db" @@ -8169,12 +8187,12 @@ promise-each@^2.2.0: dependencies: any-promise "^0.1.0" -promise.prototype.finally@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/promise.prototype.finally/-/promise.prototype.finally-3.0.1.tgz#51ba2fa0a4cba5cbca54da818a8da8f24fc68f39" +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: define-properties "^1.1.2" - es-abstract "^1.8.2" + es-abstract "^1.9.0" function-bind "^1.1.1" promise@^7.1.1: @@ -8438,13 +8456,6 @@ react-icons@^2.2.7: dependencies: 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" - dependencies: - babel-runtime "^6.26.0" - is-dom "^1.0.9" - react-inspector@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/react-inspector/-/react-inspector-2.2.2.tgz#c04f5248fa92ab6c23e37960e725fb7f48c34d05" @@ -8452,9 +8463,9 @@ react-inspector@^2.2.2: babel-runtime "^6.26.0" is-dom "^1.0.9" -react-modal@^3.1.4: - version "3.1.7" - resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.1.7.tgz#21feb937c95cd722bf2d375cada751fdc8189c0e" +react-modal@^3.1.8: + version "3.1.8" + resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.1.8.tgz#7d6b1958f44828babd2a1ce826c28fa40d026b0f" dependencies: exenv "^1.2.0" prop-types "^15.5.10" @@ -10019,9 +10030,9 @@ style-loader@^0.13.0: dependencies: loader-utils "^1.0.2" -style-loader@^0.18.2: - version "0.18.2" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.18.2.tgz#cc31459afbcd6d80b7220ee54b291a9fd66ff5eb" +style-loader@^0.19.1: + version "0.19.1" + resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.19.1.tgz#591ffc80bcefe268b77c5d9ebc0505d772619f85" dependencies: loader-utils "^1.0.2" schema-utils "^0.3.0" @@ -11001,9 +11012,9 @@ webpack@^1.13.3: watchpack "^0.2.1" webpack-core "~0.6.9" -webpack@^3.8.1: - version "3.8.1" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.8.1.tgz#b16968a81100abe61608b0153c9159ef8bb2bd83" +webpack@^3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.10.0.tgz#5291b875078cf2abf42bdd23afe3f8f96c17d725" dependencies: acorn "^5.0.0" acorn-dynamic-import "^2.0.0" From 463dd67dfddb7bd7912e744b6b09d3f3e9e8e44e Mon Sep 17 00:00:00 2001 From: "Dependencies.io Bot" Date: Tue, 19 Dec 2017 16:30:33 +0000 Subject: [PATCH 157/162] Update gatsby from 1.9.141 to 1.9.142 --- docs/package.json | 2 +- docs/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/package.json b/docs/package.json index 19032e0d63bf..9bb9dc97efe4 100644 --- a/docs/package.json +++ b/docs/package.json @@ -30,7 +30,7 @@ "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", "bootstrap": "^3.3.7", - "gatsby": "^1.9.141", + "gatsby": "^1.9.142", "gatsby-link": "^1.6.32", "gatsby-plugin-sharp": "^1.6.24", "gatsby-remark-autolink-headers": "^1.4.10", diff --git a/docs/yarn.lock b/docs/yarn.lock index df25b868ca18..8f3daab7fe05 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -4378,9 +4378,9 @@ gatsby-transformer-remark@^1.7.25: unist-util-select "^1.5.0" unist-util-visit "^1.1.1" -gatsby@^1.9.141: - version "1.9.141" - resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.141.tgz#8cde1d84900abcb7dfa910778cafebdb461e73cd" +gatsby@^1.9.142: + version "1.9.142" + resolved "https://registry.yarnpkg.com/gatsby/-/gatsby-1.9.142.tgz#020393389a759675012b120253e16663abe8dc14" dependencies: async "^2.1.2" babel-code-frame "^6.22.0" From dd0d1859e9523e58fa19a61a2369c0b887dcccfb Mon Sep 17 00:00:00 2001 From: igor Date: Wed, 20 Dec 2017 08:09:24 +0200 Subject: [PATCH 158/162] 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 159/162] 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 160/162] 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 161/162] 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 162/162] 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') ), ],