diff --git a/.babelrc b/.babelrc index 84b1bcc..eb1f74d 100644 --- a/.babelrc +++ b/.babelrc @@ -1,5 +1,5 @@ { - "presets": ["env"], + "presets": ["env", "flow"], "env": { "test": { "plugins": ["istanbul"] diff --git a/.eslintrc.json b/.eslintrc.json index bfd589d..c8a0431 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,8 +1,13 @@ { + "plugins": ["flowtype"], + "parser": "babel-eslint", "parserOptions": { "ecmaVersion": 8, "sourceType": "module" }, + "extends": [ + "plugin:flowtype/recommended" + ], "rules": { "no-alert": 2, "no-array-constructor": 0, diff --git a/.flowconfig b/.flowconfig new file mode 100644 index 0000000..0d26140 --- /dev/null +++ b/.flowconfig @@ -0,0 +1,12 @@ +[ignore] + +[include] + +[libs] +flow-typed + +[lints] + +[options] + +[strict] diff --git a/.gitignore b/.gitignore index 1d56f7b..039924f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,8 @@ node_modules coverage examples/*.png browser\.js +browser\.js\.flow dist package-lock\.json \.nyc_output +flow-typed/npm diff --git a/flow-typed/pngjs-types.js b/flow-typed/pngjs-types.js new file mode 100644 index 0000000..a94e157 --- /dev/null +++ b/flow-typed/pngjs-types.js @@ -0,0 +1,13 @@ +// @flow + +declare type Metadata = {| + width: number, + height: number, + depth: 1 | 2 | 4 | 8 | 16, + interlace: boolean, + palette: boolean, + color: boolean, + alpha: boolean, + bpp: 1 | 2 | 3 | 4, + colorType: 0 | 2 | 3 | 4 | 6, +|} diff --git a/lib/png.js b/lib/png.js index 8978867..fdf01d4 100644 --- a/lib/png.js +++ b/lib/png.js @@ -1,28 +1,40 @@ -import Stream from 'stream'; +// @flow +import Stream, { type Readable, type Writable } from 'stream'; import { ParserAsync as Parser } from './parser'; import { PackerAsync as Packer } from './packer'; import * as PNGSync from './png-sync'; import * as propData from './propData'; +type Props = { + width?: number, + height?: number, + initGrayscaleData?: boolean, + initPropData?: boolean | { shrinkMax: boolean, shrinkMin: boolean }, +} + +// $FlowFixMe export class PNG extends Stream { - constructor(options) { + width: number; + height: number; + color: boolean; + depth: number; + _grayscaleData: Uint8Array | Uint16Array | void; + _propData: ?Float32Array; + data: ?Buffer; + gamma: number; + + constructor(options: Props = {}) { super(options); - Stream.call(this); - - options = options || {}; // eslint-disable-line no-param-reassign + const { + width, height, + initGrayscaleData, initPropData, + } = options; // coerce pixel dimensions to integers (also coerces undefined -> 0): - this.width = options.width | 0; - this.height = options.height | 0; + this.width = width || 0; + this.height = height || 0; - this.color = undefined; - this.depth = undefined; - this._grayscaleData = undefined; - this._propData = undefined; - this._configPostParse = { - initGrayscaleData: options.initGrayscaleData, - initPropData: options.initPropData, - }; + this._configPostParse = { initGrayscaleData, initPropData }; this.data = this.width > 0 && this.height > 0 ? new Buffer(4 * this.width * this.height) : null; @@ -56,6 +68,7 @@ export class PNG extends Stream { this._postParsed = this._postParsed.bind(this); } + _postParsed: Function; _postParsed() { this._grayscaleData = undefined; this._propData = undefined; @@ -83,7 +96,7 @@ export class PNG extends Stream { return this; } - parse(data, callback) { + parse(data: ArrayBuffer | Readable, callback: Function) { if (callback) { let onParsed, onError; @@ -107,16 +120,16 @@ export class PNG extends Stream { return this; } - write(data) { + write(data: Writable) { this._parser.write(data); return true; } - end(data) { + end(data: Readable | ArrayBuffer) { this._parser.end(data); } - _metadata(metadata) { + _metadata(metadata: Metadata) { const { width, height, color, depth } = metadata; this.width = width; this.height = height; @@ -126,7 +139,7 @@ export class PNG extends Stream { this.emit('metadata', metadata); } - _gamma(gamma) { + _gamma(gamma: number) { this.gamma = gamma; } @@ -136,7 +149,13 @@ export class PNG extends Stream { } } - bitblt(src, dst, srcX = 0, srcY = 0, width = 0, height = 0, deltaX = 0, deltaY = 0) { // eslint-disable-line max-params + // eslint-disable-next-line max-params + bitblt( + src: PNG, dst: PNG, + srcX: number = 0, srcY: number = 0, + width: number = 0, height: number = 0, + deltaX: number = 0, deltaY: number = 0, + ) { // coerce pixel dimensions to integers (also coerces undefined -> 0): if (srcX > src.width || srcY > src.height || srcX + width > src.width || srcY + height > src.height) { @@ -147,8 +166,17 @@ export class PNG extends Stream { throw new Error('bitblt writing outside image'); } + const { data } = src; + if (!data) { + throw new Error('No data available in src'); + } + const { data: outData } = dst; + if (!outData) { + throw new Error('No data available in dst'); + } + for (var y = 0; y < height; y++) { - src.data.copy(dst.data, + data.copy(outData, ((deltaY + y) * dst.width + deltaX) << 2, ((srcY + y) * src.width + srcX) << 2, ((srcY + y) * src.width + srcX + width) << 2 @@ -158,19 +186,25 @@ export class PNG extends Stream { return this; } - adjustGamma(src) { + adjustGamma(src: PNG) { if (src.gamma) { + const { data } = src; + if (!data) { + throw new Error('No data available for object'); + } + for (var y = 0; y < src.height; y++) { for (var x = 0; x < src.width; x++) { var idx = (src.width * y + x) << 2; for (var i = 0; i < 3; i++) { - var sample = src.data[idx + i] / 255; + var sample = data[idx + i] / 255; sample = Math.pow(sample, 1 / 2.2 / src.gamma); - src.data[idx + i] = Math.round(sample * 255); + data[idx + i] = Math.round(sample * 255); } } } + src.data = data; src.gamma = 0; } return this; @@ -178,12 +212,17 @@ export class PNG extends Stream { initGrayscaleData() { const { data } = this; + if (!data) { + throw new Error('The initGrayscaleData() called before receiving data'); + } + + let outData; if (this.color) { const mono = ({ red, green, blue }) => ((0.2125 * red) + (0.7154 * green) + (0.0721 * blue)); - this._grayscaleData = data.slice(data.length / 4); - for (let i = 0; i < this._grayscaleData.length; i += 1) { + outData = data.slice(data.length / 4); + for (let i = 0; i < outData.length; i += 1) { const pxPos = i * 4; - this._grayscaleData[i] = mono({ + outData[i] = mono({ red: data[pxPos + 0], green: data[pxPos + 1], blue: data[pxPos + 2], @@ -191,8 +230,10 @@ export class PNG extends Stream { } } else { - this._grayscaleData = data.filter((clr, i) => i % 4 === 0); + outData = data.filter((clr, i) => i % 4 === 0); } + + this._grayscaleData = outData; } // Retrieve mono data without aplpha channel @@ -209,7 +250,7 @@ export class PNG extends Stream { return this._grayscaleData; } - initPropData(shrinkMin = false, shrinkMax = false) { + initPropData(shrinkMin: boolean = false, shrinkMax: boolean = false) { if (this.color) { this._propData = propData.color( this.data, @@ -239,7 +280,7 @@ export class PNG extends Stream { // Retrieve colors as proportions instead of integers // if you want to limit the max proporiton to the bufferEqual // max/min value then set the shrinkMax/shrinkMin. - propData(shrinkMin = false, shrinkMax = false) { + propData(shrinkMin: boolean = false, shrinkMax: boolean = false) { const { data } = this; if (!data) { throw new Error('Invalid call - no data to convert'); diff --git a/package.json b/package.json index a1ece37..b615af3 100644 --- a/package.json +++ b/package.json @@ -40,11 +40,12 @@ "test": "test" }, "scripts": { - "build": "npm run compile && npm run browserify", + "build": "npm run compile && npm run build:flow && npm run build:browserify", + "build:flow": "flow-copy-source -v -i 'test/**' lib dist", + "build:clean": "rimraf dist", + "build:browserify": "browserify dist/png.js --standalone png > browser.js && cp dist/png.js.flow browser.js.flow", "prepublish": "npm run build", - "clean:dist": "rimraf dist", - "compile": "npm run clean:dist && babel -d dist/ lib/", - "browserify": "browserify dist/png.js --standalone png > browser.js", + "compile": "npm run build:clean && babel -d dist/ lib/", "coverage": "NODE_ENV=test nyc babel-tape-runner test/*-spec.js nolarge| tap-nyc", "coveralls": "nyc report --reporter=text-lcov | coveralls", "monitor": "nodemon --watch lib --delay 2.5s --exec \"npm run build\"", @@ -67,8 +68,10 @@ }, "devDependencies": { "babel-cli": "^6.26.0", + "babel-eslint": "^8.1.2", "babel-plugin-istanbul": "^4.1.5", "babel-preset-env": "^1.6.1", + "babel-preset-flow": "^6.23.0", "babel-register": "^6.26.0", "babel-tape-runner": "^2.0.1", "browserify": "^14.5.0", @@ -76,6 +79,9 @@ "connect": "^3.6.5", "coveralls": "^3.0.0", "eslint": "^4.14.0", + "eslint-plugin-flowtype": "^2.40.1", + "flow-bin": "^0.61.0", + "flow-copy-source": "^1.2.1", "istanbul": "^0.4.4", "nodemon": "^1.14.3", "nyc": "^11.4.1", diff --git a/yarn.lock b/yarn.lock index 317141b..ebed511 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,59 @@ # yarn lockfile v1 +"@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" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +"@babel/helper-function-name@7.0.0-beta.31": + version "7.0.0-beta.31" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.31.tgz#afe63ad799209989348b1109b44feb66aa245f57" + dependencies: + "@babel/helper-get-function-arity" "7.0.0-beta.31" + "@babel/template" "7.0.0-beta.31" + "@babel/traverse" "7.0.0-beta.31" + "@babel/types" "7.0.0-beta.31" + +"@babel/helper-get-function-arity@7.0.0-beta.31": + version "7.0.0-beta.31" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.31.tgz#1176d79252741218e0aec872ada07efb2b37a493" + dependencies: + "@babel/types" "7.0.0-beta.31" + +"@babel/template@7.0.0-beta.31": + version "7.0.0-beta.31" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.0.0-beta.31.tgz#577bb29389f6c497c3e7d014617e7d6713f68bda" + dependencies: + "@babel/code-frame" "7.0.0-beta.31" + "@babel/types" "7.0.0-beta.31" + babylon "7.0.0-beta.31" + lodash "^4.2.0" + +"@babel/traverse@7.0.0-beta.31": + version "7.0.0-beta.31" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.0.0-beta.31.tgz#db399499ad74aefda014f0c10321ab255134b1df" + dependencies: + "@babel/code-frame" "7.0.0-beta.31" + "@babel/helper-function-name" "7.0.0-beta.31" + "@babel/types" "7.0.0-beta.31" + babylon "7.0.0-beta.31" + debug "^3.0.1" + globals "^10.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + +"@babel/types@7.0.0-beta.31": + version "7.0.0-beta.31" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.0.0-beta.31.tgz#42c9c86784f674c173fb21882ca9643334029de4" + dependencies: + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^2.0.0" + JSONStream@^1.0.3: version "1.3.2" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea" @@ -274,6 +327,17 @@ babel-core@^6.26.0: slash "^1.0.0" source-map "^0.5.6" +babel-eslint@^8.1.2: + version "8.1.2" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.1.2.tgz#a39230b0c20ecbaa19a35d5633bf9b9ca2c8116f" + dependencies: + "@babel/code-frame" "7.0.0-beta.31" + "@babel/traverse" "7.0.0-beta.31" + "@babel/types" "7.0.0-beta.31" + babylon "7.0.0-beta.31" + eslint-scope "~3.7.1" + eslint-visitor-keys "^1.0.0" + babel-generator@^6.18.0, babel-generator@^6.26.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.0.tgz#ac1ae20070b79f6e3ca1d3269613053774f20dc5" @@ -416,6 +480,10 @@ babel-plugin-syntax-exponentiation-operator@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" +babel-plugin-syntax-flow@^6.18.0: + version "6.18.0" + resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d" + babel-plugin-syntax-trailing-function-commas@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" @@ -604,6 +672,13 @@ babel-plugin-transform-exponentiation-operator@^6.22.0: babel-plugin-syntax-exponentiation-operator "^6.8.0" babel-runtime "^6.22.0" +babel-plugin-transform-flow-strip-types@^6.22.0: + version "6.22.0" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf" + dependencies: + babel-plugin-syntax-flow "^6.18.0" + babel-runtime "^6.22.0" + babel-plugin-transform-regenerator@^6.22.0: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" @@ -660,6 +735,12 @@ babel-preset-env@^1.6.1: invariant "^2.2.2" semver "^5.3.0" +babel-preset-flow@^6.23.0: + version "6.23.0" + resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d" + dependencies: + babel-plugin-transform-flow-strip-types "^6.22.0" + babel-register@^6.26.0, babel-register@^6.3.13: version "6.26.0" resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" @@ -720,6 +801,10 @@ babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26 lodash "^4.17.4" to-fast-properties "^1.0.3" +babylon@7.0.0-beta.31: + version "7.0.0-beta.31" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.31.tgz#7ec10f81e0e456fd0f855ad60fa30c2ac454283f" + babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" @@ -1314,7 +1399,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.6.8: dependencies: ms "2.0.0" -debug@^3.1.0: +debug@^3.0.1, debug@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" dependencies: @@ -1528,7 +1613,13 @@ escodegen@1.8.x: optionalDependencies: source-map "~0.2.0" -eslint-scope@^3.7.1: +eslint-plugin-flowtype@^2.40.1: + version "2.40.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.40.1.tgz#f78a8e6a4cc6da831dd541eb61e803ff0279b796" + dependencies: + lodash "^4.15.0" + +eslint-scope@^3.7.1, eslint-scope@~3.7.1: version "3.7.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" dependencies: @@ -1794,7 +1885,7 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.1.0: +find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" dependencies: @@ -1809,6 +1900,20 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" +flow-bin@^0.61.0: + version "0.61.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.61.0.tgz#d0473a8c35dbbf4de573823f4932124397d32d35" + +flow-copy-source@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/flow-copy-source/-/flow-copy-source-1.2.1.tgz#705c2fa8fb29a281118e1c4b66218dec24b745ec" + dependencies: + chokidar "^1.7.0" + fs-extra "^3.0.1" + glob "^7.0.0" + kefir "^3.7.3" + yargs "^8.0.2" + for-each@~0.3.2: version "0.3.2" resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.2.tgz#2c40450b9348e97f281322593ba96704b9abd4d4" @@ -1872,6 +1977,14 @@ fs-extra@^1.0.0: jsonfile "^2.1.0" klaw "^1.0.0" +fs-extra@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-3.0.1.tgz#3794f378c58b342ea7dbbb23095109c4b3b62291" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^3.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" @@ -1972,25 +2085,25 @@ glob@^6.0.1: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.3, glob@^7.0.5: - version "7.1.1" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" +glob@^7.0.0, glob@^7.0.6, glob@^7.1.0, glob@^7.1.2, glob@~7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.2" + minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.6, glob@^7.1.0, glob@^7.1.2, glob@~7.1.2: - version "7.1.2" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" +glob@^7.0.3, glob@^7.0.5: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" - minimatch "^3.0.4" + minimatch "^3.0.2" once "^1.3.0" path-is-absolute "^1.0.0" @@ -2000,6 +2113,10 @@ global-dirs@^0.1.0: dependencies: ini "^1.3.4" +globals@^10.0.0: + version "10.4.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-10.4.0.tgz#5c477388b128a9e4c5c5d01c7a2aca68c68b2da7" + globals@^11.0.1: version "11.1.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.1.0.tgz#632644457f5f0e3ae711807183700ebf2e4633e4" @@ -2295,7 +2412,7 @@ insert-module-globals@^7.0.0: through2 "^2.0.0" xtend "^4.0.0" -invariant@^2.2.2: +invariant@^2.2.0, invariant@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360" dependencies: @@ -2642,6 +2759,12 @@ jsonfile@^2.1.0: optionalDependencies: graceful-fs "^4.1.6" +jsonfile@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-3.0.1.tgz#a5ecc6f65f53f662c4415c7675a0331d0992ec66" + optionalDependencies: + graceful-fs "^4.1.6" + jsonify@~0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" @@ -2659,6 +2782,12 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.3.6" +kefir@^3.7.3: + version "3.8.0" + resolved "https://registry.yarnpkg.com/kefir/-/kefir-3.8.0.tgz#63b5dce575f1a7ab3286788e771eb104b181b676" + dependencies: + symbol-observable "1.0.4" + kew@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b" @@ -2732,6 +2861,15 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + locate-path@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" @@ -2743,7 +2881,7 @@ lodash.memoize@~3.0.3: version "3.0.4" resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-3.0.4.tgz#2dcbd2c287cbc0a55cc42328bd0c736150d53e3f" -lodash@^4.17.4, lodash@^4.3.0: +lodash@^4.15.0, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -3256,6 +3394,12 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + pause-stream@0.0.11: version "0.0.11" resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" @@ -3470,6 +3614,13 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" @@ -3478,6 +3629,14 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + readable-stream@^2.0.0, readable-stream@^2.1.5, readable-stream@^2.2.2: version "2.2.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.6.tgz#8b43aed76e71483938d12a8d46c6cf1a00b1f816" @@ -4044,6 +4203,10 @@ strip-bom@^2.0.0: dependencies: is-utf8 "^0.2.0" +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" @@ -4074,6 +4237,10 @@ supports-color@^4.0.0: dependencies: has-flag "^2.0.0" +symbol-observable@1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" + syntax-error@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/syntax-error/-/syntax-error-1.3.0.tgz#1ed9266c4d40be75dc55bf9bb1cb77062bb96ca1" @@ -4218,6 +4385,10 @@ to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + touch@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b" @@ -4302,6 +4473,10 @@ unique-string@^1.0.0: dependencies: crypto-random-string "^1.0.0" +universalify@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" + unpipe@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" @@ -4481,6 +4656,12 @@ yallist@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" +yargs-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" + dependencies: + camelcase "^4.1.0" + yargs-parser@^8.0.0: version "8.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.1.0.tgz#f1376a33b6629a5d063782944da732631e966950" @@ -4504,6 +4685,24 @@ yargs@^10.0.3: y18n "^3.2.1" yargs-parser "^8.0.0" +yargs@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360" + dependencies: + camelcase "^4.1.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^2.0.0" + read-pkg-up "^2.0.0" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^2.0.0" + which-module "^2.0.0" + y18n "^3.2.1" + yargs-parser "^7.0.0" + yargs@~3.10.0: version "3.10.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"