From 480a2f05c47583b0b44623b25e875fc5f67a8608 Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 20 Feb 2018 10:01:32 +0100 Subject: [PATCH] Fix xxhash outputs as LE (#91) --- package.json | 2 +- packages/util-crypto/src/xxhash/asHex.js | 16 +- packages/util-crypto/src/xxhash/asHex.spec.js | 6 +- .../util-crypto/src/xxhash/asHex128.spec.js | 14 +- .../util-crypto/src/xxhash/asHex256.spec.js | 2 +- packages/util-crypto/src/xxhash/asU8a.js | 16 +- packages/util-crypto/src/xxhash/asU8a.spec.js | 6 +- .../util-crypto/src/xxhash/asU8a128.spec.js | 2 +- .../util-crypto/src/xxhash/asU8a256.spec.js | 2 +- yarn.lock | 274 ++++++++++++++---- 10 files changed, 259 insertions(+), 81 deletions(-) diff --git a/package.json b/package.json index 27d3934db..0de4d457f 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "test": "jest --coverage" }, "devDependencies": { - "@polkadot/dev": "^0.16.4", + "@polkadot/dev": "^0.16.7", "lerna": "^2.5.1" } } diff --git a/packages/util-crypto/src/xxhash/asHex.js b/packages/util-crypto/src/xxhash/asHex.js index 0193556f5..4261b6db0 100644 --- a/packages/util-crypto/src/xxhash/asHex.js +++ b/packages/util-crypto/src/xxhash/asHex.js @@ -3,9 +3,9 @@ // of the ISC license. See the LICENSE file for details. // @flow -const hexAddPrefix = require('@polkadot/util/hex/addPrefix'); +const u8aToHex = require('@polkadot/util/u8a/toHex'); -const xxhash64AsRaw = require('./xxhash64/asRaw'); +const xxhashAsU8a = require('./asU8a'); /** @name xxhashAsHex @@ -19,15 +19,7 @@ const xxhash64AsRaw = require('./xxhash64/asRaw'); xxhashAsHex('abc') // => 0x44bc2cf5ad770999 */ module.exports = function xxhashAsHex (data: Buffer | Uint8Array | string, bitLength: number = 64): string { - const strLength = Math.ceil(bitLength / 4); - const iterations = Math.ceil(strLength / 8); - let result = xxhash64AsRaw(data, 0); - - for (let seed = 1; seed < iterations; seed++) { - result += xxhash64AsRaw(data, seed); - } - - return hexAddPrefix( - result.substr(0, strLength) + return u8aToHex( + xxhashAsU8a(data, bitLength) ); }; diff --git a/packages/util-crypto/src/xxhash/asHex.spec.js b/packages/util-crypto/src/xxhash/asHex.spec.js index a7ff2b2dc..2a91ce989 100644 --- a/packages/util-crypto/src/xxhash/asHex.spec.js +++ b/packages/util-crypto/src/xxhash/asHex.spec.js @@ -8,18 +8,18 @@ describe('xxhashAsHex', () => { it('returns a 64-bit value by default', () => { expect( xxhashAsHex('abc') - ).toEqual('0x44bc2cf5ad770999'); + ).toEqual('0x990977adf52cbc44'); }); it('returns a 128-bit value (as specified)', () => { expect( xxhashAsHex('abc', 128) - ).toEqual('0x44bc2cf5ad770999bea9ca8199328908'); + ).toEqual('0x990977adf52cbc440889329981caa9be'); }); it('returns a 256-bit value (as specified)', () => { expect( xxhashAsHex('abc', 256) - ).toEqual('0x44bc2cf5ad770999bea9ca819932890853a0b8b27057daf72bd60d36955db703'); + ).toEqual('0x990977adf52cbc440889329981caa9bef7da5770b2b8a05303b75d95360dd62b'); }); }); diff --git a/packages/util-crypto/src/xxhash/asHex128.spec.js b/packages/util-crypto/src/xxhash/asHex128.spec.js index 57ac8acfe..6105c5a9c 100644 --- a/packages/util-crypto/src/xxhash/asHex128.spec.js +++ b/packages/util-crypto/src/xxhash/asHex128.spec.js @@ -2,12 +2,24 @@ // This software may be modified and distributed under the terms // of the ISC license. See the LICENSE file for details. +const hexToU8a = require('@polkadot/util/hex/toU8a'); + const { xxhashAsHex128 } = require('./index'); describe('xxhashAsHex128', () => { it('returns a 128-bit value (as specified)', () => { expect( xxhashAsHex128('abc') - ).toEqual('0x44bc2cf5ad770999bea9ca8199328908'); + ).toEqual('0x990977adf52cbc440889329981caa9be'); + }); + + it('matches with Rust implementation', () => { + expect( + xxhashAsHex128( + hexToU8a('0x7379733a6e6f6e3a2f8c6129d816cf51c374bc7f08c3e63ed156cf78aefb4a6550d97b87997977ee') + ) + ).toEqual( + '0xc7f790aa4fc95a8813b0d5734a8c195b' + ); }); }); diff --git a/packages/util-crypto/src/xxhash/asHex256.spec.js b/packages/util-crypto/src/xxhash/asHex256.spec.js index 434e1f6c6..2af877d0b 100644 --- a/packages/util-crypto/src/xxhash/asHex256.spec.js +++ b/packages/util-crypto/src/xxhash/asHex256.spec.js @@ -8,6 +8,6 @@ describe('xxhashAsHex256', () => { it('returns a 256-bit value (as specified)', () => { expect( xxhashAsHex256('abc') - ).toEqual('0x44bc2cf5ad770999bea9ca819932890853a0b8b27057daf72bd60d36955db703'); + ).toEqual('0x990977adf52cbc440889329981caa9bef7da5770b2b8a05303b75d95360dd62b'); }); }); diff --git a/packages/util-crypto/src/xxhash/asU8a.js b/packages/util-crypto/src/xxhash/asU8a.js index d3159e33d..82c18d111 100644 --- a/packages/util-crypto/src/xxhash/asU8a.js +++ b/packages/util-crypto/src/xxhash/asU8a.js @@ -3,9 +3,7 @@ // of the ISC license. See the LICENSE file for details. // @flow -const hexToU8a = require('@polkadot/util/hex/toU8a'); - -const xxhashAsHex = require('./asHex'); +const xxhash64AsBn = require('./xxhash64/asBn'); /** @name xxhashAsU8a @@ -19,7 +17,13 @@ const xxhashAsHex = require('./asHex'); xxhashAsU8a('abc') // => 0x44bc2cf5ad770999 */ module.exports = function xxhashAsU8a (data: Buffer | Uint8Array | string, bitLength: number = 64): Uint8Array { - return hexToU8a( - xxhashAsHex(data, bitLength) - ); + const byteLength = Math.ceil(bitLength / 8); + const iterations = Math.ceil(bitLength / 64); + const u8a = new Uint8Array(byteLength); + + for (let seed = 0; seed < iterations; seed++) { + u8a.set(xxhash64AsBn(data, seed).toArray('le', 8), seed * 8); + } + + return u8a; }; diff --git a/packages/util-crypto/src/xxhash/asU8a.spec.js b/packages/util-crypto/src/xxhash/asU8a.spec.js index b3646b455..778fc3d4e 100644 --- a/packages/util-crypto/src/xxhash/asU8a.spec.js +++ b/packages/util-crypto/src/xxhash/asU8a.spec.js @@ -11,7 +11,7 @@ describe('xxhashAsU8a', () => { expect( xxhashAsU8a('abc') ).toEqual( - hexToU8a('0x44bc2cf5ad770999') + hexToU8a('0x990977adf52cbc44') ); }); @@ -19,7 +19,7 @@ describe('xxhashAsU8a', () => { expect( xxhashAsU8a('abc', 128) ).toEqual( - hexToU8a('0x44bc2cf5ad770999bea9ca8199328908') + hexToU8a('0x990977adf52cbc440889329981caa9be') ); }); @@ -27,7 +27,7 @@ describe('xxhashAsU8a', () => { expect( xxhashAsU8a('abc', 256) ).toEqual( - hexToU8a('0x44bc2cf5ad770999bea9ca819932890853a0b8b27057daf72bd60d36955db703') + hexToU8a('0x990977adf52cbc440889329981caa9bef7da5770b2b8a05303b75d95360dd62b') ); }); }); diff --git a/packages/util-crypto/src/xxhash/asU8a128.spec.js b/packages/util-crypto/src/xxhash/asU8a128.spec.js index 21708bd9a..e457b4c54 100644 --- a/packages/util-crypto/src/xxhash/asU8a128.spec.js +++ b/packages/util-crypto/src/xxhash/asU8a128.spec.js @@ -11,7 +11,7 @@ describe('xxhashAsU8a128', () => { expect( xxhashAsU8a128('abc') ).toEqual( - hexToU8a('0x44bc2cf5ad770999bea9ca8199328908') + hexToU8a('0x990977adf52cbc440889329981caa9be') ); }); }); diff --git a/packages/util-crypto/src/xxhash/asU8a256.spec.js b/packages/util-crypto/src/xxhash/asU8a256.spec.js index b96ad9523..2b1e86dd5 100644 --- a/packages/util-crypto/src/xxhash/asU8a256.spec.js +++ b/packages/util-crypto/src/xxhash/asU8a256.spec.js @@ -11,7 +11,7 @@ describe('xxhashAsU8a256', () => { expect( xxhashAsU8a256('abc') ).toEqual( - hexToU8a('0x44bc2cf5ad770999bea9ca819932890853a0b8b27057daf72bd60d36955db703') + hexToU8a('0x990977adf52cbc440889329981caa9bef7da5770b2b8a05303b75d95360dd62b') ); }); }); diff --git a/yarn.lock b/yarn.lock index 41ad05a50..77808a9d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -69,9 +69,9 @@ dependencies: babel-runtime "^6.26.0" -"@polkadot/dev@^0.16.4": - version "0.16.4" - resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.16.4.tgz#21cc30e3266573e732301cf3f132ca2d8fc5937a" +"@polkadot/dev@^0.16.7": + version "0.16.7" + resolved "https://registry.yarnpkg.com/@polkadot/dev/-/dev-0.16.7.tgz#072ca840f133d237767e2a737cfcf903ca0e6c6d" dependencies: babel-cli "^6.26.0" babel-core "^6.26.0" @@ -86,7 +86,7 @@ eslint "^4.14.0" eslint-config-semistandard "^12.0.0" eslint-config-standard "^11.0.0-beta.0" - eslint-config-standard-jsx "^4.0.2" + eslint-config-standard-jsx "^5.0.0" eslint-config-standard-react "^5.0.0" eslint-plugin-flowtype "^2.39.1" eslint-plugin-import "^2.8.0" @@ -95,7 +95,7 @@ eslint-plugin-promise "^3.6.0" eslint-plugin-react "^7.4.0" eslint-plugin-standard "^3.0.1" - flow-bin "^0.65.0" + flow-bin "^0.66.0" flow-copy-source "^1.2.1" jest "^22.0.0" makeshift "^1.1.0" @@ -103,7 +103,7 @@ postcss "^6.0.14" postcss-sass "^0.3.0" rimraf "^2.6.2" - stylelint "^8.2.0" + stylelint "^9.0.0" stylelint-config-standard "^18.0.0" "@types/node@*": @@ -185,6 +185,10 @@ amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" +ansi-escapes@^1.1.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" + ansi-escapes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" @@ -326,15 +330,15 @@ asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" -autoprefixer@^7.1.2: - version "7.1.6" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-7.1.6.tgz#fb933039f74af74a83e71225ce78d9fd58ba84d7" +autoprefixer@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-8.0.0.tgz#c19e480f061013127c373df0b01cf46919943f74" dependencies: - browserslist "^2.5.1" - caniuse-lite "^1.0.30000748" + browserslist "^3.0.0" + caniuse-lite "^1.0.30000808" normalize-range "^0.1.2" num2fraction "^1.2.2" - postcss "^6.0.13" + postcss "^6.0.17" postcss-value-parser "^3.2.3" aws-sign2@~0.6.0: @@ -808,6 +812,14 @@ babel-plugin-transform-strict-mode@^6.24.1: babel-runtime "^6.22.0" babel-types "^6.24.1" +babel-polyfill@6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d" + dependencies: + babel-runtime "^6.22.0" + core-js "^2.4.0" + regenerator-runtime "^0.10.0" + babel-polyfill@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153" @@ -1005,13 +1017,20 @@ browser-resolve@^1.11.2: dependencies: resolve "1.1.7" -browserslist@^2.1.2, browserslist@^2.5.1: +browserslist@^2.1.2: version "2.9.1" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.9.1.tgz#b72d3982ab01b5cd24da62ff6d45573886aff275" dependencies: caniuse-lite "^1.0.30000770" electron-to-chromium "^1.3.27" +browserslist@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.1.1.tgz#d380fc048bc3a33e60fb87dc135110ebaaa6320a" + dependencies: + caniuse-lite "^1.0.30000809" + electron-to-chromium "^1.3.33" + bser@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" @@ -1047,6 +1066,14 @@ camelcase-keys@^2.0.0: camelcase "^2.0.0" map-obj "^1.0.0" +camelcase-keys@^4.0.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-4.2.0.tgz#a2aa5fb1af688758259c32c141426d78923b9b77" + dependencies: + camelcase "^4.1.0" + map-obj "^2.0.0" + quick-lru "^1.0.0" + camelcase@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" @@ -1059,10 +1086,14 @@ camelcase@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" -caniuse-lite@^1.0.30000748, caniuse-lite@^1.0.30000770: +caniuse-lite@^1.0.30000770: version "1.0.30000772" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000772.tgz#78129622cabfed7af1ff38b64ab680a6a0865420" +caniuse-lite@^1.0.30000808, caniuse-lite@^1.0.30000809: + version "1.0.30000809" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000809.tgz#1e12c1344b8f74d56737ee2614bcedb648943479" + 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" @@ -1082,7 +1113,7 @@ center-align@^0.1.1: align-text "^0.1.3" lazy-cache "^1.0.3" -chalk@^1.1.3: +chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -1100,6 +1131,14 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0: escape-string-regexp "^1.0.5" supports-color "^4.0.0" +chalk@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.1.tgz#523fe2678aec7b04e8041909292fe8b17059b796" + dependencies: + ansi-styles "^3.2.0" + escape-string-regexp "^1.0.5" + supports-color "^5.2.0" + character-entities-html4@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/character-entities-html4/-/character-entities-html4-1.1.1.tgz#359a2a4a0f7e29d3dc2ac99bdbe21ee39438ea50" @@ -1428,13 +1467,13 @@ 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" -cosmiconfig@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-3.1.0.tgz#640a94bf9847f321800403cd273af60665c73397" +cosmiconfig@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-4.0.0.tgz#760391549580bbd2df1e562bc177b13c290972dc" dependencies: is-directory "^0.3.1" js-yaml "^3.9.0" - parse-json "^3.0.0" + parse-json "^4.0.0" require-from-string "^2.0.1" coveralls@^3.0.0: @@ -1531,7 +1570,14 @@ debug@^3.0.0, debug@^3.0.1, debug@^3.1.0: dependencies: ms "2.0.0" -decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: +decamelize-keys@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" + dependencies: + decamelize "^1.1.0" + map-obj "^1.0.0" + +decamelize@^1.0.0, decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -1698,6 +1744,10 @@ 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.33: + version "1.3.33" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.33.tgz#bf00703d62a7c65238136578c352d6c5c042a545" + encoding@^0.1.11: version "0.1.12" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb" @@ -1751,10 +1801,14 @@ eslint-config-semistandard@^12.0.0: version "12.0.0" resolved "https://registry.yarnpkg.com/eslint-config-semistandard/-/eslint-config-semistandard-12.0.0.tgz#e6482de68e05c2dbdddaf45c3078f6a97fe23f1a" -eslint-config-standard-jsx@^4.0.0, eslint-config-standard-jsx@^4.0.2: +eslint-config-standard-jsx@^4.0.0: version "4.0.2" resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-4.0.2.tgz#009e53c4ddb1e9ee70b4650ffe63a7f39f8836e1" +eslint-config-standard-jsx@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-5.0.0.tgz#4abfac554f38668e0078c664569e7b2384e5d2aa" + eslint-config-standard-react@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/eslint-config-standard-react/-/eslint-config-standard-react-5.0.0.tgz#64c7b8140172852be810a53d48ee87649ff178e3" @@ -1988,7 +2042,7 @@ extend@^3.0.0, extend@~3.0.0, extend@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" -external-editor@^2.0.4: +external-editor@^2.0.1, external-editor@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.1.0.tgz#3d026a21b7f95b5726387d4200ac160d372c3b48" dependencies: @@ -2092,9 +2146,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.65.0: - version "0.65.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.65.0.tgz#64ffeca27211c786e2d68508c65686ba1b8a2169" +flow-bin@^0.66.0: + version "0.66.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.66.0.tgz#a96dde7015dc3343fd552a7b4963c02be705ca26" flow-copy-source@^1.2.1: version "1.2.1" @@ -2434,6 +2488,10 @@ has-flag@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -2536,6 +2594,10 @@ indent-string@^2.1.0: dependencies: repeating "^2.0.0" +indent-string@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289" + indexes-of@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" @@ -2555,6 +2617,24 @@ ini@^1.3.2, ini@~1.3.0: version "1.3.5" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" +inquirer@3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.0.6.tgz#e04aaa9d05b7a3cb9b0f407d04375f0447190347" + dependencies: + ansi-escapes "^1.1.0" + chalk "^1.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^2.0.1" + figures "^2.0.0" + lodash "^4.3.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx "^4.1.0" + string-width "^2.0.0" + strip-ansi "^3.0.0" + through "^2.3.6" + inquirer@^3.0.6, inquirer@^3.2.2: version "3.3.0" resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" @@ -3292,9 +3372,9 @@ kind-of@^4.0.0: dependencies: is-buffer "^1.1.5" -known-css-properties@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.4.1.tgz#baaaf704e5f8a5f10e0e221212aae3ea738ea372" +known-css-properties@^0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.6.1.tgz#31b5123ad03d8d1a3f36bd4155459c981173478b" lazy-cache@^1.0.3: version "1.0.4" @@ -3511,6 +3591,10 @@ map-obj@^1.0.0, map-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" +map-obj@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-2.0.0.tgz#a65cd29087a92598b8791257a523e021222ac1f9" + markdown-escapes@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.1.tgz#1994df2d3af4811de59a6714934c2b2292734518" @@ -3565,6 +3649,20 @@ meow@^3.3.0, meow@^3.7.0: redent "^1.0.0" trim-newlines "^1.0.0" +meow@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-4.0.0.tgz#fd5855dd008db5b92c552082db1c307cba20b29d" + dependencies: + camelcase-keys "^4.0.0" + decamelize-keys "^1.0.0" + loud-rejection "^1.0.0" + minimist "^1.1.3" + minimist-options "^3.0.1" + normalize-package-data "^2.3.4" + read-pkg-up "^3.0.0" + redent "^2.0.0" + trim-newlines "^2.0.0" + merge-stream@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" @@ -3613,6 +3711,13 @@ minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimist-options@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954" + dependencies: + arrify "^1.0.1" + is-plain-obj "^1.1.0" + minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -3621,14 +3726,14 @@ minimist@1.1.x: version "1.1.3" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.1.3.tgz#3bedfd91a92d39016fcfaa1c681e8faa1a1efda8" +minimist@1.2.0, minimist@^1.1.1, 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.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" -minimist@^1.1.1, 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" @@ -3669,6 +3774,13 @@ node-dir@^0.1.16: dependencies: minimatch "^3.0.2" +node-fetch@1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.6.3.tgz#dc234edd6489982d58e8f0db4f695029abcd8c04" + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + node-fetch@^1.0.1: version "1.7.3" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" @@ -3800,6 +3912,24 @@ onetime@^2.0.0: dependencies: mimic-fn "^1.0.0" +opencollective@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/opencollective/-/opencollective-1.0.3.tgz#aee6372bc28144583690c3ca8daecfc120dd0ef1" + dependencies: + babel-polyfill "6.23.0" + chalk "1.1.3" + inquirer "3.0.6" + minimist "1.2.0" + node-fetch "1.6.3" + opn "4.0.2" + +opn@4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95" + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + optimist@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" @@ -3902,12 +4032,6 @@ parse-json@^2.2.0: dependencies: error-ex "^1.2.0" -parse-json@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-3.0.0.tgz#fa6f47b18e23826ead32f263e744d0e1e847fb13" - dependencies: - error-ex "^1.3.1" - parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -4011,9 +4135,9 @@ pn@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/pn/-/pn-1.0.0.tgz#1cf5a30b0d806cd18f88fc41a6b5d4ad615b3ba9" -postcss-html@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/postcss-html/-/postcss-html-0.11.0.tgz#03a3ff3116f8a0fe0d46316ea21893d4db4b63af" +postcss-html@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/postcss-html/-/postcss-html-0.12.0.tgz#39b6adb4005dfc5464df7999c0f81c95bced7e50" dependencies: htmlparser2 "^3.9.2" remark "^8.0.0" @@ -4082,7 +4206,7 @@ postcss@^5.2.16: source-map "^0.5.6" supports-color "^3.2.3" -postcss@^6.0.13, postcss@^6.0.14, postcss@^6.0.3, postcss@^6.0.6, postcss@^6.0.8: +postcss@^6.0.14, postcss@^6.0.3, postcss@^6.0.6, postcss@^6.0.8: version "6.0.14" resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.14.tgz#5534c72114739e75d0afcf017db853099f562885" dependencies: @@ -4098,6 +4222,14 @@ postcss@^6.0.16: source-map "^0.6.1" supports-color "^5.1.0" +postcss@^6.0.17: + version "6.0.19" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.19.tgz#76a78386f670b9d9494a655bf23ac012effd1555" + dependencies: + chalk "^2.3.1" + source-map "^0.6.1" + supports-color "^5.2.0" + prelude-ls@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" @@ -4167,6 +4299,10 @@ qs@~6.5.1: version "6.5.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" +quick-lru@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" + randomatic@^1.1.3: version "1.1.7" resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c" @@ -4212,6 +4348,13 @@ read-pkg-up@^2.0.0: find-up "^2.0.0" read-pkg "^2.0.0" +read-pkg-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" + dependencies: + find-up "^2.0.0" + read-pkg "^3.0.0" + read-pkg@^1.0.0, read-pkg@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" @@ -4270,11 +4413,18 @@ redent@^1.0.0: indent-string "^2.1.0" strip-indent "^1.0.1" +redent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-2.0.0.tgz#c1b2007b42d57eb1389079b3c8333639d5e1ccaa" + dependencies: + indent-string "^3.0.0" + strip-indent "^2.0.0" + regenerate@^1.2.1: version "1.3.3" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f" -regenerator-runtime@^0.10.5: +regenerator-runtime@^0.10.0, regenerator-runtime@^0.10.5: version "0.10.5" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz#336c3efc1220adcedda2c9fab67b5a7955a33658" @@ -4536,6 +4686,10 @@ rx-lite@*, rx-lite@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" +rx@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" + safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" @@ -4783,6 +4937,10 @@ strip-indent@^1.0.1: dependencies: get-stdin "^4.0.1" +strip-indent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" + strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -4811,14 +4969,14 @@ stylelint-config-standard@^18.0.0: dependencies: stylelint-config-recommended "^2.0.0" -stylelint@^8.2.0: - version "8.3.1" - resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-8.3.1.tgz#424c822f32c88e85025b55d72c7b98355e3fa6de" +stylelint@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/stylelint/-/stylelint-9.0.0.tgz#dfad428e948830e522a96e0f331f510d07a4fc0b" dependencies: - autoprefixer "^7.1.2" + autoprefixer "^8.0.0" balanced-match "^1.0.0" chalk "^2.0.1" - cosmiconfig "^3.1.0" + cosmiconfig "^4.0.0" debug "^3.0.0" execall "^1.0.0" file-entry-cache "^2.0.0" @@ -4828,21 +4986,23 @@ stylelint@^8.2.0: html-tags "^2.0.0" ignore "^3.3.3" imurmurhash "^0.1.4" - known-css-properties "^0.4.0" + known-css-properties "^0.6.0" lodash "^4.17.4" log-symbols "^2.0.0" mathml-tag-names "^2.0.1" - meow "^3.7.0" + meow "^4.0.0" micromatch "^2.3.11" normalize-selector "^0.2.0" + opencollective "^1.0.3" pify "^3.0.0" - postcss "^6.0.6" - postcss-html "^0.11.0" + postcss "^6.0.16" + postcss-html "^0.12.0" postcss-less "^1.1.0" postcss-media-query-parser "^0.2.3" postcss-reporter "^5.0.0" postcss-resolve-nested-selector "^0.1.1" postcss-safe-parser "^3.0.1" + postcss-sass "^0.3.0" postcss-scss "^1.0.2" postcss-selector-parser "^3.1.0" postcss-value-parser "^3.3.0" @@ -4882,6 +5042,12 @@ supports-color@^5.1.0: dependencies: has-flag "^2.0.0" +supports-color@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.2.0.tgz#b0d5333b1184dd3666cbe5aa0b45c5ac7ac17a4a" + dependencies: + has-flag "^3.0.0" + svg-tags@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" @@ -5023,6 +5189,10 @@ trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" +trim-newlines@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-2.0.0.tgz#b403d0b91be50c331dfc4b82eeceb22c3de16d20" + trim-off-newlines@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3"