From 59b75a3ea3b631cf10ea92e6f528a770ae32ec48 Mon Sep 17 00:00:00 2001 From: Kai Moseley Date: Wed, 23 Nov 2016 16:20:09 +0000 Subject: [PATCH] Further initial dev --- package.json | 1 + src/index.js | 26 ++++--- src/redux-arg/constants.js | 20 ++++++ src/redux-arg/generateReducer.js | 64 ++--------------- src/redux-arg/reducers.js | 113 +++++++++++++++++++++++++++++ yarn.lock | 117 ++++++++++++++++--------------- 6 files changed, 214 insertions(+), 127 deletions(-) create mode 100644 src/redux-arg/constants.js create mode 100644 src/redux-arg/reducers.js diff --git a/package.json b/package.json index ad23511..8f0e901 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "dependencies": { "global": "^4.3.1", "lodash": "^4.17.2", + "ramda": "^0.22.1", "redux": "^3.6.0", "webpack": "^1.13.3", "webpack-dev-server": "^1.16.2" diff --git a/src/index.js b/src/index.js index d36944f..77bab33 100644 --- a/src/index.js +++ b/src/index.js @@ -1,30 +1,34 @@ -import { buildReducers, Types } from './redux-arg/generateReducer'; +import { buildReducers } from './redux-arg/generateReducer'; import { createStore, compose } from 'redux'; +import { Types } from './redux-arg/constants'; const example = { - form2: Types.reducer({ + form2: Types.reducer(Types.shape({ lowerLevel: Types.number, lowerLevel2: Types.string, - }), + })), form3: Types.reducer({ - example2: Types.reducer({ + example2: Types.reducer(Types.shape({ lowerLevel3: Types.string, - }), + })), example3: Types.reducer({ - example4: Types.reducer({ + example4: Types.reducer(Types.shape({ test: Types.string, - }), + })), example5: Types.reducer({ - test: Types.reducer({ + test: Types.reducer(Types.shape({ blarg: Types.number, - }) + })) }) }) - }) + }), + test1: Types.reducer(Types.string), + test2: Types.reducer(Types.arrayOf({ + foo5: Types.number, + })), }; const test = buildReducers(example); -console.log(333, test); createStore( test, diff --git a/src/redux-arg/constants.js b/src/redux-arg/constants.js new file mode 100644 index 0000000..8abe6e7 --- /dev/null +++ b/src/redux-arg/constants.js @@ -0,0 +1,20 @@ +export const PROP_TYPES = { + _string: '_string', + _number: '_number', + _reducer: '_reducer', + _shape: '_shape', + _array: '_array', +}; + +export const TYPE_DEFAULTS = new Map([ + [PROP_TYPES._string, ''], + [PROP_TYPES._number, 0], +]); + +export const Types = { + string: () => ({ type: PROP_TYPES._string, structure: PROP_TYPES._string }), + number: () => ({ type: PROP_TYPES._number, structure: PROP_TYPES._number }), + arrayOf: structure => () => ({ type: PROP_TYPES._array, structure }), + reducer: structure => () => ({ type: PROP_TYPES._reducer, structure }), + shape: structure => () => ({ type: PROP_TYPES._shape, structure}), +}; diff --git a/src/redux-arg/generateReducer.js b/src/redux-arg/generateReducer.js index 151b8a9..1639d9f 100644 --- a/src/redux-arg/generateReducer.js +++ b/src/redux-arg/generateReducer.js @@ -1,58 +1,21 @@ //@flow import { combineReducers } from 'redux'; import { reduce, find } from 'lodash'; - -export function generateReducer(reducerMap: Object): (Object) => Object { - return combineReducers(reduce(reducerMap, (memo, propValue, propName) => ({ - ...memo, - [propName]: objectReducer(propValue), - }), reducerMap)); -} - -function objectReducer(initialState: Object): (Object) => (Object, Object) => Object { - return (state = initialState, { type } = {} ) => { - switch(type) { - case 'BLARG!': - return state; - default: - return state; - } - } -} - -const PROP_TYPES = new Map([ - ['_string', Symbol()], - ['_number', Symbol()], - ['_reducer', Symbol()], - ['_shape', Symbol()], - ['_array', Symbol()], -]); - -const TYPE_DEFAULTS = new Map([ - [PROP_TYPES._string, ''], - [PROP_TYPES._number, 0], -]); - -export const Types = { - string: () => ({ type: PROP_TYPES.get('_string') }), - number: () => ({ type: PROP_TYPES.get('_number') }), - reducer: structure => () => ({ type: PROP_TYPES.get('_reducer'), structure }), -}; - +import { createReducer } from './reducers'; +import { PROP_TYPES } from './constants'; export function buildReducers(structure) { + //TODO - allow for building single primitive reducers + const tmp = combineReducers(reduce(structure, (memo, propValue, propName) => { const { structure } = propValue(); - - const containsReducers = !!find(structure, v => v().type === PROP_TYPES.get('_reducer')); - - console.log(111, propValue(), propName, containsReducers, structure); + const containsReducers = !!find(structure, v => v().type === PROP_TYPES._reducer); const partial = { ...memo, - [propName]: containsReducers ? buildReducers(structure) : objectReducer(assignDefaults(structure)), + [propName]: containsReducers ? buildReducers(structure) : createReducer(propValue), }; return partial; @@ -61,21 +24,6 @@ export function buildReducers(structure) { return tmp; } -function assignDefaults(structure) { - - console.log(222, structure); - - const tmp2 = reduce(structure, (memo, propValue, propName) => ({ - ...memo, - [propName]: TYPE_DEFAULTS.get(propValue().type) - }), {}); - - console.log(333, tmp2); - - return tmp2; -} - - diff --git a/src/redux-arg/reducers.js b/src/redux-arg/reducers.js new file mode 100644 index 0000000..e269930 --- /dev/null +++ b/src/redux-arg/reducers.js @@ -0,0 +1,113 @@ +//@flow +import { + PROP_TYPES, + TYPE_DEFAULTS, +} from './constants'; +import { + reduce +} from 'lodash'; +import { + compose +} from 'ramda'; + +type ObjectReducerAction = { + type: string, + payload?: Object, +}; +type ObjectReducer = (Object) => (Object, ObjectReducerAction) => Object; + +type Primitive = string | number; +type PrimitiveReducerAction = { + type: string, + payload?: string | number, +}; +type PrimitiveReducer = (Primitive) => (Primitive, PrimitiveReducerAction) => Primitive; + +type ArrayReducerAction = { + type: string, + payload?: Array, + index?: number, +}; +type ArrayReducer = (Array) => (Array, ArrayReducerAction) => Array; + +const REDUCER_FUNCTIONS = { + objectReducer(reducerStructureDescriptor): ObjectReducer { + const { structure } = reducerStructureDescriptor(); + return (state = determineDefaults(reducerStructureDescriptor)(structure), { type, payload } = {}) => { + switch (type) { + case 'BLARG!': + return { state, ...reducerStructureDescriptor, ...payload }; + default: + return state; + } + } + }, + primitiveReducer(reducerStructureDescriptor): PrimitiveReducer { + const { structure } = reducerStructureDescriptor(); + return (state = determineDefaults(reducerStructureDescriptor)(structure), { type, payload } = {}) => { + switch(type) { + case 'BLARG2': + return { state, ...structure, ...payload }; + default: + return state; + } + } + }, + arrayReducer(reducerStructureDescriptor): ArrayReducer { + return (state = [], { type, payload } = {}) => { + switch(type) { + case 'BLARG3': + return { state, ...reducerStructureDescriptor, ...payload }; + default: + return state; + } + } + } +}; + +const DEFAULTS_FUNCTIONS = new Map([ + [PROP_TYPES._shape, objectDefaults], + [PROP_TYPES._array, arrayDefaults], + [PROP_TYPES._string, primitiveDefaults], + [PROP_TYPES._number, primitiveDefaults], +]); + +function objectDefaults(structure) { + return reduce(structure, (memo, propValue, propName) => console.log(333, { propName, propValue: propValue() }) || ({ + ...memo, + [propName]: TYPE_DEFAULTS.get(propValue().type) + }), {}); +} + +function arrayDefaults() { + return []; +} + +function primitiveDefaults(structure) { + return TYPE_DEFAULTS.get(structure); +} + +function determineReducerType(reducerDescriptor) { + const { structure } = reducerDescriptor(); + const { type } = structure(); + + let reducerFn = REDUCER_FUNCTIONS.primitiveReducer; + if (type === PROP_TYPES._shape) reducerFn = REDUCER_FUNCTIONS.objectReducer; + if (type === PROP_TYPES._array) reducerFn = REDUCER_FUNCTIONS.arrayReducer; + return { + reducerFn, + reducerStructureDescriptor: structure, + }; +} + +function callReducer({ reducerFn, reducerStructureDescriptor } = {}) { + return reducerFn(reducerStructureDescriptor); +} + +function determineDefaults(reducerStructureDescriptor) { + const { type } = reducerStructureDescriptor(); + console.log(111, { type, fn: DEFAULTS_FUNCTIONS.get(type), DEFAULTS_FUNCTIONS }); + return DEFAULTS_FUNCTIONS.get(type); +} + +export const createReducer = compose(callReducer, determineReducerType); diff --git a/yarn.lock b/yarn.lock index fc24947..598714b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1,5 +1,11 @@ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 + + +Base64@~0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/Base64/-/Base64-0.2.1.tgz#ba3a4230708e186705065e66babdd4c35cf60028" + abbrev@1: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" @@ -427,10 +433,6 @@ base64-js@^1.0.2: version "1.2.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1" -Base64@~0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/Base64/-/Base64-0.2.1.tgz#ba3a4230708e186705065e66babdd4c35cf60028" - batch@0.5.3: version "0.5.3" resolved "https://registry.yarnpkg.com/batch/-/batch-0.5.3.tgz#3f3414f380321743bfc1042f9a83ff1d5824d464" @@ -1029,7 +1031,7 @@ es6-set@~0.1.3: es6-symbol "3" event-emitter "~0.3.4" -es6-symbol@^3.0.2, es6-symbol@~3.1, es6-symbol@~3.1.0, es6-symbol@3: +es6-symbol@3, es6-symbol@^3.0.2, es6-symbol@~3.1, es6-symbol@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.0.tgz#94481c655e7a7cad82eba832d97d5433496d7ffa" dependencies: @@ -1642,7 +1644,7 @@ inflight@^1.0.4: once "^1.3.0" wrappy "1" -inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1, inherits@2: +inherits@2, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" @@ -1835,14 +1837,14 @@ is-utf8@^0.2.0: version "0.2.1" resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" -isarray@^1.0.0, isarray@~1.0.0, isarray@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" +isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + isexe@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/isexe/-/isexe-1.1.2.tgz#36f3e22e60750920f5e7241a476a8c6a42275ad0" @@ -2149,7 +2151,7 @@ mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.7: dependencies: mime-db "~1.24.0" -mime@^1.3.4, mime@1.3.4: +mime@1.3.4, mime@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" @@ -2165,19 +2167,15 @@ minimatch@^3.0.0, minimatch@^3.0.2, minimatch@~3.0.2: dependencies: brace-expansion "^1.0.0" +minimist@0.0.8, minimist@~0.0.1: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - -minimist@0.0.8: - version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" - -mkdirp@^0.5.0, mkdirp@^0.5.1, "mkdirp@>=0.5 0", mkdirp@~0.5.0, mkdirp@~0.5.1: +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -2293,7 +2291,7 @@ node-uuid@~1.4.7: version "1.4.7" resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f" -nopt@~3.0.6, "nopt@2 || 3": +"nopt@2 || 3", nopt@~3.0.6: version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" dependencies: @@ -2325,18 +2323,18 @@ normalize-url@^1.4.0: query-string "^4.1.0" sort-keys "^1.0.0" -npmlog@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.0.tgz#e094503961c70c1774eb76692080e8d578a9f88f" +"npmlog@0 || 1 || 2 || 3": + version "3.1.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-3.1.2.tgz#2d46fa874337af9498a2f12bb43d8d0be4a36873" dependencies: are-we-there-yet "~1.1.2" console-control-strings "~1.1.0" gauge "~2.6.0" set-blocking "~2.0.0" -"npmlog@0 || 1 || 2 || 3": - version "3.1.2" - resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-3.1.2.tgz#2d46fa874337af9498a2f12bb43d8d0be4a36873" +npmlog@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.0.tgz#e094503961c70c1774eb76692080e8d578a9f88f" dependencies: are-we-there-yet "~1.1.2" console-control-strings "~1.1.0" @@ -2817,26 +2815,26 @@ pseudomap@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" -punycode@^1.2.4, punycode@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" - punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" +punycode@^1.2.4, punycode@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" + q@^1.1.2: version "1.4.1" resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" -qs@~6.3.0: - version "6.3.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" - qs@6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.0.tgz#3b7848c03c2dece69a9522b0fae8c4126d745f3b" +qs@~6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" + query-string@^4.1.0: version "4.2.3" resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.2.3.tgz#9f27273d207a25a8ee4c7b8c74dcd45d556db822" @@ -2856,6 +2854,10 @@ querystringify@0.0.x: version "0.0.4" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-0.0.4.tgz#0cf7f84f9463ff0ae51c4c4b142d95be37724d9c" +ramda@^0.22.1: + version "0.22.1" + resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.22.1.tgz#031da0c3df417c5b33c96234757eb37033f36a0e" + randomatic@^1.1.3: version "1.1.5" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.5.tgz#5e9ef5f2d573c67bd2b8124ae90b5156e457840b" @@ -3035,7 +3037,7 @@ repeating@^2.0.0: dependencies: is-finite "^1.0.0" -request@^2.61.0, request@^2.75.0, request@2: +request@2, request@^2.61.0, request@^2.75.0: version "2.78.0" resolved "https://registry.yarnpkg.com/request/-/request-2.78.0.tgz#e1c8dec346e1c81923b24acdb337f11decabe9cc" dependencies: @@ -3100,7 +3102,7 @@ right-align@^0.1.1: dependencies: align-text "^0.1.1" -rimraf@^2.2.8, rimraf@~2.5.1, rimraf@~2.5.4, rimraf@2: +rimraf@2, rimraf@^2.2.8, rimraf@~2.5.1, rimraf@~2.5.4: version "2.5.4" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" dependencies: @@ -3132,7 +3134,7 @@ sax@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" -semver@~5.3.0, "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5": +"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -3313,10 +3315,6 @@ strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" -string_decoder@~0.10.25, string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" @@ -3332,6 +3330,10 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^3.0.0" +string_decoder@~0.10.25, string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + stringstream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" @@ -3520,16 +3522,16 @@ unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" -url-parse@^1.1.1: - version "1.1.7" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.1.7.tgz#025cff999653a459ab34232147d89514cc87d74a" +url-parse@1.0.x: + version "1.0.5" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b" dependencies: querystringify "0.0.x" requires-port "1.0.x" -url-parse@1.0.x: - version "1.0.5" - resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b" +url-parse@^1.1.1: + version "1.1.7" + resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.1.7.tgz#025cff999653a459ab34232147d89514cc87d74a" dependencies: querystringify "0.0.x" requires-port "1.0.x" @@ -3551,7 +3553,7 @@ util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -util@~0.10.3, util@0.10.3: +util@0.10.3, util@~0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" dependencies: @@ -3672,7 +3674,7 @@ which-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" -which@^1.2.9, which@1: +which@1, which@^1.2.9: version "1.2.12" resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" dependencies: @@ -3684,13 +3686,17 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.1" +window-size@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" + window-size@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" +wordwrap@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" wordwrap@~0.0.2: version "0.0.3" @@ -3700,10 +3706,6 @@ wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - wrap-ansi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.0.0.tgz#7d30f8f873f9a5bbc3a64dabc8d177e071ae426f" @@ -3766,4 +3768,3 @@ yargs@~3.10.0: cliui "^2.1.0" decamelize "^1.0.0" window-size "0.1.0" -