From 8378d4952e4c396ea2053bde78ecf18a8b87fe0b Mon Sep 17 00:00:00 2001 From: Erik Arvidsson Date: Mon, 6 Feb 2017 15:13:53 -0800 Subject: [PATCH] Jest (#3145) This changes to use Jest. Benefits of jest is parallel tests and jest can run the minimal set of tests that are affected by a change (by looking at dependencies). The main work was to disentangle our cyclic dependencies. To do this I had to remove some runtime assertions in encode value as well as expose the values of a struct without going through a struct mirror. --- js/noms/.gitignore | 1 + js/noms/package.json | 15 +- js/noms/src/absolute-path-test.js | 2 +- js/noms/src/assert-test.js | 2 +- js/noms/src/assert-type-test.js | 2 +- js/noms/src/base32-test.js | 2 +- js/noms/src/binary-noms-reader.js | 33 ++ js/noms/src/binary-noms-writer.js | 45 ++ js/noms/src/blob-test.js | 2 +- js/noms/src/buzhash-test.js | 2 +- js/noms/src/bytes-test.js | 2 +- js/noms/src/chunk-serializer-test.js | 2 +- js/noms/src/chunk-test.js | 2 +- js/noms/src/codec.js | 130 ----- js/noms/src/commit-test.js | 2 +- js/noms/src/compare-test.js | 2 +- js/noms/src/database-test.js | 4 +- js/noms/src/dataset-test.js | 2 +- js/noms/src/decode-value.js | 28 + js/noms/src/edit-distance-test.js | 2 +- js/noms/src/encode-human-readable-test.js | 2 +- js/noms/src/encode-value.js | 24 + js/noms/src/encoding-test.js | 5 +- js/noms/src/fetch-test.js | 2 +- js/noms/src/get-hash-test.js | 2 +- js/noms/src/get-hash.js | 10 +- js/noms/src/hash-test.js | 2 +- js/noms/src/http-batch-store-test.js | 19 +- js/noms/src/http-error-test.js | 2 +- js/noms/src/indexed-sequence.js | 2 + js/noms/src/jest.js | 24 + js/noms/src/json-convert-test.js | 2 +- js/noms/src/list-test.js | 2 +- js/noms/src/map-test.js | 2 +- js/noms/src/memory-store-test.js | 2 +- js/noms/src/meta-sequence-test.js | 2 +- js/noms/src/noms-reader.js | 22 + js/noms/src/noms-writer.js | 20 + js/noms/src/noms.js | 4 +- js/noms/src/ordered-sequence-diff-test.js | 2 +- js/noms/src/path-test.js | 2 +- js/noms/src/put-cache-test.js | 2 +- js/noms/src/remote-batch-store-test.js | 4 +- js/noms/src/sequence-test.js | 2 +- js/noms/src/set-test.js | 2 +- js/noms/src/signed-varint-test.js | 2 +- js/noms/src/spec-test.js | 2 +- js/noms/src/specs-test.js | 2 +- js/noms/src/struct-test.js | 2 +- js/noms/src/struct.js | 10 + js/noms/src/type-cache-test.js | 2 +- js/noms/src/type-test.js | 5 +- js/noms/src/value-decoder.js | 2 +- js/noms/src/value-encoder.js | 81 ++- js/noms/src/value-store-test.js | 4 +- js/noms/src/value-store.js | 4 +- js/noms/src/walk-test.js | 2 +- js/noms/src/xp-test.js | 2 +- js/noms/yarn.lock | 618 +++++++++++++++++++++- 59 files changed, 919 insertions(+), 265 deletions(-) create mode 100644 js/noms/src/binary-noms-reader.js create mode 100644 js/noms/src/binary-noms-writer.js delete mode 100644 js/noms/src/codec.js create mode 100644 js/noms/src/decode-value.js create mode 100644 js/noms/src/encode-value.js create mode 100644 js/noms/src/jest.js create mode 100644 js/noms/src/noms-reader.js create mode 100644 js/noms/src/noms-writer.js diff --git a/js/noms/.gitignore b/js/noms/.gitignore index 46322f84b6..7ac7619592 100644 --- a/js/noms/.gitignore +++ b/js/noms/.gitignore @@ -3,3 +3,4 @@ dist generated-docs .nyc_output coverage.lcov +coverage diff --git a/js/noms/package.json b/js/noms/package.json index 657eee8aec..616e8c1e99 100644 --- a/js/noms/package.json +++ b/js/noms/package.json @@ -1,7 +1,7 @@ { "name": "@attic/noms", "license": "Apache-2.0", - "version": "69.6.0", + "version": "69.6.1", "description": "Noms JS SDK", "repository": "https://github.com/attic-labs/noms/tree/master/js/noms", "main": "dist/commonjs/noms.js", @@ -27,6 +27,7 @@ "flow-bin": "^0.38.0", "flow-copy-source": "^1.1.0", "fs-extra": "^2.0.0", + "jest": "^18.1.0", "mocha": "^3.2.0", "mock-require": "^2.0.1", "nyc": "^10.1.2" @@ -34,10 +35,8 @@ "scripts": { "lint": "eslint src/", "flow": "flow src/", - "pretest": "yarn run lint && yarn run flow", - "ts": "mocha --ui tdd --timeout=4000 --reporter dot --slow=50 --invert --grep='LONG:' --compilers js:babel-core/register src/*-test.js", - "test-no-cov": "mocha --ui tdd --timeout=30000 --reporter dot --compilers js:babel-core/register src/*-test.js", - "test": "nyc yarn run test-no-cov && nyc report --reporter=text-lcov > coverage.lcov", + "jest": "jest", + "test": "yarn run lint && yarn run flow && jest --coverage", "prepublish": "rm -rf dist/ && yarn run compile && yarn run flow-copy-source", "compile": "yarn run compile-to-commonjs", "compile-to-commonjs": "BABEL_ENV=production babel -d dist/commonjs src/ > /dev/null", @@ -52,5 +51,11 @@ "./dist/commonjs/fetch.js": "./dist/commonjs/browser/fetch.js", "./src/put-cache.js": "./src/browser/put-cache.js", "./dist/commonjs/put-cache.js": "./dist/commonjs/browser/put-cache.js" + }, + "jest": { + "testRegex": ".+-test\\.js$", + "testPathIgnorePatterns": [ + "/dist/" + ] } } diff --git a/js/noms/src/absolute-path-test.js b/js/noms/src/absolute-path-test.js index 5831b977da..70b13db42b 100644 --- a/js/noms/src/absolute-path-test.js +++ b/js/noms/src/absolute-path-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {equals} from './compare.js'; import {invariant, notNull} from './assert.js'; diff --git a/js/noms/src/assert-test.js b/js/noms/src/assert-test.js index 465fafa8ee..96840937e0 100644 --- a/js/noms/src/assert-test.js +++ b/js/noms/src/assert-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {assert} from 'chai'; import {invariant, notNull} from './assert.js'; diff --git a/js/noms/src/assert-type-test.js b/js/noms/src/assert-type-test.js index 7794234444..4d38ec926e 100644 --- a/js/noms/src/assert-type-test.js +++ b/js/noms/src/assert-type-test.js @@ -10,7 +10,7 @@ import List from './list.js'; import Map from './map.js'; import Set from './set.js'; import {newStruct} from './struct.js'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import assertSubtype, {isSubtype} from './assert-type.js'; import type {Type} from './type.js'; import { diff --git a/js/noms/src/base32-test.js b/js/noms/src/base32-test.js index 75f1009f28..6ee95dbf80 100644 --- a/js/noms/src/base32-test.js +++ b/js/noms/src/base32-test.js @@ -7,7 +7,7 @@ import {encode, decode} from './base32.js'; import {assert} from 'chai'; import {alloc} from './bytes.js'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; suite('base32', () => { test('encode', () => { diff --git a/js/noms/src/binary-noms-reader.js b/js/noms/src/binary-noms-reader.js new file mode 100644 index 0000000000..918fd71ffa --- /dev/null +++ b/js/noms/src/binary-noms-reader.js @@ -0,0 +1,33 @@ +// Copyright 2016 Attic Labs, Inc. All rights reserved. +// Licensed under the Apache License, version 2.0: +// http://www.apache.org/licenses/LICENSE-2.0 + +// @flow + +import * as Bytes from './bytes.js'; +import Hash, {byteLength as hashByteLength} from './hash.js'; +import type TypeCache from './type-cache.js'; +import {BinaryReader} from './binary-rw.js'; + +export default class BinaryNomsReader extends BinaryReader { + constructor(buff: Uint8Array) { + super(buff); + } + + readIdent(tc: TypeCache): number { + const str = this.readString(); // TODO: Figure out how to do this without allocating. + let id = tc.identTable.entries.get(str); + if (id === undefined) { + id = tc.identTable.getId(str); + } + + return id; + } + + readHash(): Hash { + // Make a copy of the data. + const digest = Bytes.slice(this.buff, this.offset, this.offset + hashByteLength); + this.offset += hashByteLength; + return new Hash(digest); + } +} diff --git a/js/noms/src/binary-noms-writer.js b/js/noms/src/binary-noms-writer.js new file mode 100644 index 0000000000..0b9d01df6a --- /dev/null +++ b/js/noms/src/binary-noms-writer.js @@ -0,0 +1,45 @@ +// Copyright 2016 Attic Labs, Inc. All rights reserved. +// Licensed under the Apache License, version 2.0: +// http://www.apache.org/licenses/LICENSE-2.0 + +// @flow + +import * as Bytes from './bytes.js'; +import Hash, {byteLength as hashByteLength} from './hash.js'; +import ValueEncoder from './value-encoder.js'; +import type {Type} from './type.js'; +import {notNull} from './assert.js'; +import {BinaryWriter} from './binary-rw.js'; + +function ensureTypeSerialization(t: Type) { + if (!t.serialization) { + const w = new BinaryNomsWriter(); + const enc = new ValueEncoder(w, null); + enc.writeType(t, []); + t.serialization = w.data; + } +} + +export default class BinaryNomsWriter extends BinaryWriter { + constructor() { + super(); + } + + writeHash(h: Hash): void { + this.ensureCapacity(hashByteLength); + Bytes.copy(h.digest, this.buff, this.offset); + this.offset += hashByteLength; + } + + appendType(t: Type): void { + // Note: The JS & Go impls differ here. The Go impl eagerly serializes types as they are + // constructed. The JS does it lazily so as to avoid cyclic package dependencies. + ensureTypeSerialization(t); + const data = notNull(t.serialization); + const size = data.byteLength; + this.ensureCapacity(size); + + Bytes.copy(data, this.buff, this.offset); + this.offset += size; + } +} diff --git a/js/noms/src/blob-test.js b/js/noms/src/blob-test.js index 3db03aad88..880692fb2f 100644 --- a/js/noms/src/blob-test.js +++ b/js/noms/src/blob-test.js @@ -7,7 +7,7 @@ import {blobType, makeRefType} from './type.js'; import {assert} from 'chai'; import Blob, {BlobReader, BlobWriter} from './blob.js'; -import {suite, suiteSetup, suiteTeardown, test, setup, teardown} from 'mocha'; +import {suite, suiteSetup, suiteTeardown, test, setup, teardown} from './jest.js'; import { assertChunkCountAndType, assertValueHash, diff --git a/js/noms/src/buzhash-test.js b/js/noms/src/buzhash-test.js index b940553e54..1de9f18436 100644 --- a/js/noms/src/buzhash-test.js +++ b/js/noms/src/buzhash-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {assert} from 'chai'; import BuzHash from './buzhash.js'; import * as Bytes from './bytes.js'; diff --git a/js/noms/src/bytes-test.js b/js/noms/src/bytes-test.js index 848a443df0..80c335ea2d 100644 --- a/js/noms/src/bytes-test.js +++ b/js/noms/src/bytes-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import * as NodeBytes from './bytes.js'; import * as BrowserBytes from './browser/bytes.js'; diff --git a/js/noms/src/chunk-serializer-test.js b/js/noms/src/chunk-serializer-test.js index 3c9091e796..31b1ba3b6f 100644 --- a/js/noms/src/chunk-serializer-test.js +++ b/js/noms/src/chunk-serializer-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {assert} from 'chai'; import Chunk from './chunk.js'; import type Hash from './hash.js'; diff --git a/js/noms/src/chunk-test.js b/js/noms/src/chunk-test.js index 208c66fbfd..9fe66be8c7 100644 --- a/js/noms/src/chunk-test.js +++ b/js/noms/src/chunk-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {assert} from 'chai'; import Chunk from './chunk.js'; import Hash from './hash.js'; diff --git a/js/noms/src/codec.js b/js/noms/src/codec.js deleted file mode 100644 index ea7ba62603..0000000000 --- a/js/noms/src/codec.js +++ /dev/null @@ -1,130 +0,0 @@ -// Copyright 2016 Attic Labs, Inc. All rights reserved. -// Licensed under the Apache License, version 2.0: -// http://www.apache.org/licenses/LICENSE-2.0 - -// @flow - -import * as Bytes from './bytes.js'; -import Chunk from './chunk.js'; -import Hash, {byteLength as hashByteLength} from './hash.js'; -import ValueDecoder from './value-decoder.js'; -import ValueEncoder from './value-encoder.js'; -import type Value from './value.js'; -import type {Type} from './type.js'; -import type {ValueReader, ValueWriter} from './value-store.js'; -import {default as TypeCache, staticTypeCache} from './type-cache.js'; -import {notNull} from './assert.js'; -import {setEncodeValue} from './get-hash.js'; -import {setHash, ValueBase} from './value.js'; -import {BinaryReader, BinaryWriter} from './binary-rw.js'; - -export function encodeValue(v: Value, vw: ?ValueWriter): Chunk { - const w = new BinaryNomsWriter(); - const enc = new ValueEncoder(w, vw); - enc.writeValue(v); - const chunk = new Chunk(w.data); - if (v instanceof ValueBase) { - setHash(v, chunk.hash); - } - - return chunk; -} - -setEncodeValue(encodeValue); - -export function decodeValue(chunk: Chunk, vr: ValueReader): Value { - const data = chunk.data; - const br = new BinaryNomsReader(data); - const dec = new ValueDecoder(br, vr, staticTypeCache); - const v = dec.readValue(); - if (br.pos() !== data.byteLength) { - throw new Error('Invalid chunk data: not all bytes consumed'); - } - if (v instanceof ValueBase) { - setHash(v, chunk.hash); - } - - return v; -} - -function ensureTypeSerialization(t: Type) { - if (!t.serialization) { - const w = new BinaryNomsWriter(); - const enc = new ValueEncoder(w, null); - enc.writeType(t, []); - t.serialization = w.data; - } -} - -export interface NomsReader { - pos(): number; - seek(pos: number): void; - readBytes(): Uint8Array; - readUint8(): number; - readUint32(): number; - readUint64(): number; - readNumber(): number; - readBool(): boolean; - readString(): string; - readIdent(tc: TypeCache): number; - readHash(): Hash; -} - -export interface NomsWriter { - writeBytes(v: Uint8Array): void; - writeUint8(v: number): void; - writeUint32(v: number): void; - writeUint64(v: number): void; - writeNumber(v: number): void; - writeBool(v: boolean): void; - writeString(v: string): void; - writeHash(h: Hash): void; - appendType(t: Type): void; -} - -export class BinaryNomsReader extends BinaryReader { - constructor(buff: Uint8Array) { - super(buff); - } - - readIdent(tc: TypeCache): number { - const str = this.readString(); // TODO: Figure out how to do this without allocating. - let id = tc.identTable.entries.get(str); - if (id === undefined) { - id = tc.identTable.getId(str); - } - - return id; - } - - readHash(): Hash { - // Make a copy of the data. - const digest = Bytes.slice(this.buff, this.offset, this.offset + hashByteLength); - this.offset += hashByteLength; - return new Hash(digest); - } -} - -export class BinaryNomsWriter extends BinaryWriter { - constructor() { - super(); - } - - writeHash(h: Hash): void { - this.ensureCapacity(hashByteLength); - Bytes.copy(h.digest, this.buff, this.offset); - this.offset += hashByteLength; - } - - appendType(t: Type): void { - // Note: The JS & Go impls differ here. The Go impl eagerly serializes types as they are - // constructed. The JS does it lazily so as to avoid cyclic package dependencies. - ensureTypeSerialization(t); - const data = notNull(t.serialization); - const size = data.byteLength; - this.ensureCapacity(size); - - Bytes.copy(data, this.buff, this.offset); - this.offset += size; - } -} diff --git a/js/noms/src/commit-test.js b/js/noms/src/commit-test.js index aa8bf0ee9c..52dc4fbabd 100644 --- a/js/noms/src/commit-test.js +++ b/js/noms/src/commit-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {assert} from 'chai'; import {equals} from './compare.js'; import { diff --git a/js/noms/src/compare-test.js b/js/noms/src/compare-test.js index b051a74ae3..379c5f127b 100644 --- a/js/noms/src/compare-test.js +++ b/js/noms/src/compare-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {assert} from 'chai'; import {equals, compare} from './compare.js'; import { diff --git a/js/noms/src/database-test.js b/js/noms/src/database-test.js index ce0bdffa8a..7ed8e79a53 100644 --- a/js/noms/src/database-test.js +++ b/js/noms/src/database-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import makeRemoteBatchStoreFake from './remote-batch-store-fake.js'; import {TestingDelegate} from './remote-batch-store-fake.js'; import RemoteBatchStore from './remote-batch-store.js'; @@ -15,7 +15,7 @@ import Database from './database.js'; import {notNull} from './assert.js'; import List from './list.js'; import Struct, {newStruct} from './struct.js'; -import {encodeValue} from './codec.js'; +import encodeValue from './encode-value.js'; import NomsSet from './set.js'; // namespace collision with JS Set import {invariant} from './assert.js'; import {Kind} from './noms-kind.js'; diff --git a/js/noms/src/dataset-test.js b/js/noms/src/dataset-test.js index 2644e8c94f..ecd0f002d6 100644 --- a/js/noms/src/dataset-test.js +++ b/js/noms/src/dataset-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import makeRemoteBatchStoreFake from './remote-batch-store-fake.js'; import {assert} from 'chai'; import Database from './database.js'; diff --git a/js/noms/src/decode-value.js b/js/noms/src/decode-value.js new file mode 100644 index 0000000000..86b1767206 --- /dev/null +++ b/js/noms/src/decode-value.js @@ -0,0 +1,28 @@ +// Copyright 2016 Attic Labs, Inc. All rights reserved. +// Licensed under the Apache License, version 2.0: +// http://www.apache.org/licenses/LICENSE-2.0 + +// @flow + +import type Chunk from './chunk.js'; +import ValueDecoder from './value-decoder.js'; +import type Value from './value.js'; +import type {ValueReader} from './value-store.js'; +import {staticTypeCache} from './type-cache.js'; +import {setHash, ValueBase} from './value.js'; +import BinaryNomsReader from './binary-noms-reader.js'; + +export default function decodeValue(chunk: Chunk, vr: ValueReader): Value { + const data = chunk.data; + const br = new BinaryNomsReader(data); + const dec = new ValueDecoder(br, vr, staticTypeCache); + const v = dec.readValue(); + if (br.pos() !== data.byteLength) { + throw new Error('Invalid chunk data: not all bytes consumed'); + } + if (v instanceof ValueBase) { + setHash(v, chunk.hash); + } + + return v; +} diff --git a/js/noms/src/edit-distance-test.js b/js/noms/src/edit-distance-test.js index 4fd68b768e..87bd89e3bd 100644 --- a/js/noms/src/edit-distance-test.js +++ b/js/noms/src/edit-distance-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import type {Splice} from './edit-distance.js'; import {assert} from 'chai'; import {DEFAULT_MAX_SPLICE_MATRIX_SIZE, calcSplices} from './edit-distance.js'; diff --git a/js/noms/src/encode-human-readable-test.js b/js/noms/src/encode-human-readable-test.js index a06c4d4c5b..9a77674acf 100644 --- a/js/noms/src/encode-human-readable-test.js +++ b/js/noms/src/encode-human-readable-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {invariant, notNull} from './assert.js'; import {TypeWriter} from './encode-human-readable.js'; diff --git a/js/noms/src/encode-value.js b/js/noms/src/encode-value.js new file mode 100644 index 0000000000..c24aecc540 --- /dev/null +++ b/js/noms/src/encode-value.js @@ -0,0 +1,24 @@ +// Copyright 2016 Attic Labs, Inc. All rights reserved. +// Licensed under the Apache License, version 2.0: +// http://www.apache.org/licenses/LICENSE-2.0 + +// @flow + +import Chunk from './chunk.js'; +import ValueEncoder from './value-encoder.js'; +import type Value from './value.js'; +import type {ValueWriter} from './value-store.js'; +import {setHash, ValueBase} from './value.js'; +import BinaryNomsWriter from './binary-noms-writer.js'; + +export default function encodeValue(v: Value, vw: ?ValueWriter): Chunk { + const w = new BinaryNomsWriter(); + const enc = new ValueEncoder(w, vw); + enc.writeValue(v); + const chunk = new Chunk(w.data); + if (v instanceof ValueBase) { + setHash(v, chunk.hash); + } + + return chunk; +} diff --git a/js/noms/src/encoding-test.js b/js/noms/src/encoding-test.js index a12b6c986c..59967c6806 100644 --- a/js/noms/src/encoding-test.js +++ b/js/noms/src/encoding-test.js @@ -5,7 +5,7 @@ /* eslint-disable max-len */ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {assert} from 'chai'; import Blob from './blob.js'; @@ -22,7 +22,8 @@ import type Value from './value.js'; import {ValueBase} from './value.js'; import {Kind} from './noms-kind.js'; import {TestDatabase} from './test-util.js'; -import {encodeValue, decodeValue} from './codec.js'; +import encodeValue from './encode-value.js'; +import decodeValue from './decode-value.js'; import {equals} from './compare.js'; import {invariant, notNull} from './assert.js'; import {newStruct, newStructWithType} from './struct.js'; diff --git a/js/noms/src/fetch-test.js b/js/noms/src/fetch-test.js index 2ee1b5b9f1..b9f5b65857 100644 --- a/js/noms/src/fetch-test.js +++ b/js/noms/src/fetch-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, test, setup, teardown} from 'mocha'; +import {suite, test, setup, teardown} from './jest.js'; import mock from 'mock-require'; suite('fetch', () => { diff --git a/js/noms/src/get-hash-test.js b/js/noms/src/get-hash-test.js index b1b5a2514a..7101348cb4 100644 --- a/js/noms/src/get-hash-test.js +++ b/js/noms/src/get-hash-test.js @@ -7,7 +7,7 @@ import Hash from './hash.js'; import {assert} from 'chai'; import {ensureHash} from './get-hash.js'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; suite('get hash', () => { test('ensureHash', () => { diff --git a/js/noms/src/get-hash.js b/js/noms/src/get-hash.js index 2bb453e39b..d6b5fd8ca5 100644 --- a/js/noms/src/get-hash.js +++ b/js/noms/src/get-hash.js @@ -4,16 +4,12 @@ // @flow -import type Chunk from './chunk.js'; import type Hash from './hash.js'; -import type {ValueWriter} from './value-store.js'; import {notNull} from './assert.js'; import type Value from './value.js'; import {getTypeOfValue} from './type.js'; import {ValueBase} from './value.js'; - -type encodeFn = (v: Value, vw: ?ValueWriter) => Chunk; -let encodeValue: ?encodeFn = null; +import encodeValue from './encode-value.js'; /** * Returns the hash of a Noms value. All Noms values have a unique hash and if two values have the @@ -38,7 +34,3 @@ export function ensureHash(h: ?Hash, v: Value): Hash { return getHash(v); } - -export function setEncodeValue(encode: encodeFn) { - encodeValue = encode; -} diff --git a/js/noms/src/hash-test.js b/js/noms/src/hash-test.js index 338cfb9b66..609b0b9e72 100644 --- a/js/noms/src/hash-test.js +++ b/js/noms/src/hash-test.js @@ -8,7 +8,7 @@ import Hash, {emptyHash} from './hash.js'; import {assert} from 'chai'; import * as Bytes from './bytes.js'; import {notNull} from './assert.js'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; suite('Hash', () => { test('parse', () => { diff --git a/js/noms/src/http-batch-store-test.js b/js/noms/src/http-batch-store-test.js index b16f47e9a4..8262bd0509 100644 --- a/js/noms/src/http-batch-store-test.js +++ b/js/noms/src/http-batch-store-test.js @@ -4,16 +4,17 @@ // @flow -import {suite, test, setup, teardown} from 'mocha'; +import jest, {suite, test, setup, teardown} from './jest.js'; import {assert} from 'chai'; import Hash from './hash.js'; import {emptyHash} from './hash.js'; import HttpBatchStore from './http-batch-store.js'; -import mock from 'mock-require'; +import {invariant} from './assert.js'; + suite('HttpBatchStore', () => { setup(() => { - mock('http', { + jest.mock('http', () => ({ request(options, cb) { cb({statusCode: 409}); return { @@ -22,11 +23,11 @@ suite('HttpBatchStore', () => { setTimeout() {}, }; }, - }); + })); }); teardown(() => { - mock.stopAll(); + jest.resetModules(); }); test('endpoints', async () => { @@ -58,11 +59,11 @@ suite('HttpBatchStore', () => { }); test('updateRoot conflict', async () => { - mock.reRequire('./fetch.js'); - const HttpBatchStore = mock.reRequire('./http-batch-store.js').default; + const HttpBatchStore = require('./http-batch-store.js').default; const store = new HttpBatchStore('http://nowhere.com'); - assert.isFalse( - await store.updateRoot(Hash.parse('00001111000011110000111100001111'), emptyHash)); + const h = Hash.parse('00001111000011110000111100001111'); + invariant(h); + assert.isFalse(await store.updateRoot(h, emptyHash)); }); }); diff --git a/js/noms/src/http-error-test.js b/js/noms/src/http-error-test.js index a0e4b8d006..63414f0896 100644 --- a/js/noms/src/http-error-test.js +++ b/js/noms/src/http-error-test.js @@ -6,7 +6,7 @@ import HttpError from './http-error.js'; import {assert} from 'chai'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; suite('http-error', () => { test('prototype', () => { diff --git a/js/noms/src/indexed-sequence.js b/js/noms/src/indexed-sequence.js index 1afaf15b90..e6891bfae5 100644 --- a/js/noms/src/indexed-sequence.js +++ b/js/noms/src/indexed-sequence.js @@ -17,6 +17,8 @@ export async function newCursorAtIndex(sequence: Sequence, idx: number, while (sequence) { cursor = new IndexedSequenceCursor(cursor, sequence, 0, readAhead); idx -= cursor.advanceToOffset(idx); + // TODO: The Sequence type needs to be cleaned up. + // $FlowIssue: xxx sequence = await cursor.getChildSequence(); } diff --git a/js/noms/src/jest.js b/js/noms/src/jest.js new file mode 100644 index 0000000000..f17a03aa0a --- /dev/null +++ b/js/noms/src/jest.js @@ -0,0 +1,24 @@ +// Copyright 2016 Attic Labs, Inc. All rights reserved. +// Licensed under the Apache License, version 2.0: +// http://www.apache.org/licenses/LICENSE-2.0 + +// @flow + +// Tell flow about these. When running the tests these are globals. +declare var afterAll; +declare var afterEach; +declare var beforeAll; +declare var beforeEach; +declare var describe; +declare var it; +declare var jest; + +export { + afterAll as suiteTeardown, + afterEach as teardown, + beforeAll as suiteSetup, + beforeEach as setup, + describe as suite, + it as test, + jest as default, +}; diff --git a/js/noms/src/json-convert-test.js b/js/noms/src/json-convert-test.js index ef5f5edafe..8571b8a76e 100644 --- a/js/noms/src/json-convert-test.js +++ b/js/noms/src/json-convert-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {assert} from 'chai'; import jsonToNoms from './json-convert.js'; diff --git a/js/noms/src/list-test.js b/js/noms/src/list-test.js index 193f1c1bdb..77a959eb7f 100644 --- a/js/noms/src/list-test.js +++ b/js/noms/src/list-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, setup, teardown, test} from 'mocha'; +import {suite, setup, teardown, test} from './jest.js'; import List, {ListWriter, ListLeafSequence, newListLeafSequence} from './list.js'; import Ref from './ref.js'; diff --git a/js/noms/src/map-test.js b/js/noms/src/map-test.js index 3ef4276d16..2b18770b0c 100644 --- a/js/noms/src/map-test.js +++ b/js/noms/src/map-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, setup, teardown, test} from 'mocha'; +import {suite, setup, teardown, test} from './jest.js'; import Blob from './blob.js'; import Ref from './ref.js'; diff --git a/js/noms/src/memory-store-test.js b/js/noms/src/memory-store-test.js index fd0db0f72c..7dd3a6f6cb 100644 --- a/js/noms/src/memory-store-test.js +++ b/js/noms/src/memory-store-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import Chunk from './chunk.js'; import MemoryStore from './memory-store.js'; import Hash from './hash.js'; diff --git a/js/noms/src/meta-sequence-test.js b/js/noms/src/meta-sequence-test.js index 432f005c7a..a14ac83d80 100644 --- a/js/noms/src/meta-sequence-test.js +++ b/js/noms/src/meta-sequence-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import List from './list.js'; import {OrderedKey} from './sequence.js'; diff --git a/js/noms/src/noms-reader.js b/js/noms/src/noms-reader.js new file mode 100644 index 0000000000..62d471006b --- /dev/null +++ b/js/noms/src/noms-reader.js @@ -0,0 +1,22 @@ +// Copyright 2016 Attic Labs, Inc. All rights reserved. +// Licensed under the Apache License, version 2.0: +// http://www.apache.org/licenses/LICENSE-2.0 + +// @flow + +import type Hash from './hash.js'; +import type TypeCache from './type-cache.js'; + +export interface NomsReader { + pos(): number; + seek(pos: number): void; + readBytes(): Uint8Array; + readUint8(): number; + readUint32(): number; + readUint64(): number; + readNumber(): number; + readBool(): boolean; + readString(): string; + readIdent(tc: TypeCache): number; + readHash(): Hash; +} diff --git a/js/noms/src/noms-writer.js b/js/noms/src/noms-writer.js new file mode 100644 index 0000000000..f6a5053474 --- /dev/null +++ b/js/noms/src/noms-writer.js @@ -0,0 +1,20 @@ +// Copyright 2016 Attic Labs, Inc. All rights reserved. +// Licensed under the Apache License, version 2.0: +// http://www.apache.org/licenses/LICENSE-2.0 + +// @flow + +import type Hash from './hash.js'; +import type {Type} from './type.js'; + +export interface NomsWriter { + writeBytes(v: Uint8Array): void; + writeUint8(v: number): void; + writeUint32(v: number): void; + writeUint64(v: number): void; + writeNumber(v: number): void; + writeBool(v: boolean): void; + writeString(v: string): void; + writeHash(h: Hash): void; + appendType(t: Type): void; +} diff --git a/js/noms/src/noms.js b/js/noms/src/noms.js index 6a06797c2a..8792398ff8 100644 --- a/js/noms/src/noms.js +++ b/js/noms/src/noms.js @@ -11,7 +11,7 @@ export {default as Commit} from './commit.js'; export {default as Database} from './database.js'; export {default as Dataset} from './dataset.js'; export {default as Blob, BlobReader, BlobWriter} from './blob.js'; -export {decodeValue} from './codec.js'; +export {default as decodeValue} from './decode-value.js'; export {default as Chunk} from './chunk.js'; export {getHashOfValue} from './get-hash.js'; export {BatchStoreAdaptor} from './batch-store.js'; @@ -30,7 +30,7 @@ export { createStructClass, escapeStructField, } from './struct.js'; -export {encodeValue} from './codec.js'; +export {default as encodeValue} from './encode-value.js'; export {invariant, notNull} from './assert.js'; export {isPrimitiveKind, Kind, kindToString} from './noms-kind.js'; export {default as List, ListWriter, ListLeafSequence} from './list.js'; diff --git a/js/noms/src/ordered-sequence-diff-test.js b/js/noms/src/ordered-sequence-diff-test.js index 3bb0b3c340..ff2cc2be2f 100644 --- a/js/noms/src/ordered-sequence-diff-test.js +++ b/js/noms/src/ordered-sequence-diff-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, suiteSetup, suiteTeardown, test} from 'mocha'; +import {suite, suiteSetup, suiteTeardown, test} from './jest.js'; import {assert} from 'chai'; import {OrderedKey} from './sequence.js'; import {MetaTuple, newSetMetaSequence} from './meta-sequence.js'; diff --git a/js/noms/src/path-test.js b/js/noms/src/path-test.js index 2ff1fa4360..dda35ba23e 100644 --- a/js/noms/src/path-test.js +++ b/js/noms/src/path-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {equals} from './compare.js'; import {getHash} from './get-hash.js'; diff --git a/js/noms/src/put-cache-test.js b/js/noms/src/put-cache-test.js index 5a895ba5b7..42828807ca 100644 --- a/js/noms/src/put-cache-test.js +++ b/js/noms/src/put-cache-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {assert} from 'chai'; import {notNull} from './assert.js'; import NodeOrderedPutCache from './put-cache.js'; diff --git a/js/noms/src/remote-batch-store-test.js b/js/noms/src/remote-batch-store-test.js index 1b24e15dce..29a0d8e955 100644 --- a/js/noms/src/remote-batch-store-test.js +++ b/js/noms/src/remote-batch-store-test.js @@ -4,10 +4,10 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {assert} from 'chai'; import makeRemoteBatchStoreFake from './remote-batch-store-fake.js'; -import {encodeValue} from './codec.js'; +import encodeValue from './encode-value.js'; suite('BatchStore', () => { test('get after schedulePut works immediately', async () => { diff --git a/js/noms/src/sequence-test.js b/js/noms/src/sequence-test.js index d74d64e473..02e365cbfe 100644 --- a/js/noms/src/sequence-test.js +++ b/js/noms/src/sequence-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {assert} from 'chai'; import Sequence, {SequenceCursor} from './sequence.js'; import {notNull} from './assert.js'; diff --git a/js/noms/src/set-test.js b/js/noms/src/set-test.js index de1b042685..97886e0b76 100644 --- a/js/noms/src/set-test.js +++ b/js/noms/src/set-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, setup, teardown, test} from 'mocha'; +import {suite, setup, teardown, test} from './jest.js'; import Ref from './ref.js'; import Set, {SetLeafSequence} from './set.js'; diff --git a/js/noms/src/signed-varint-test.js b/js/noms/src/signed-varint-test.js index 38273934b5..3ec47d0950 100644 --- a/js/noms/src/signed-varint-test.js +++ b/js/noms/src/signed-varint-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {encodingLength, encode, decode, maxVarintLength} from './signed-varint.js'; import {alloc} from './bytes.js'; diff --git a/js/noms/src/spec-test.js b/js/noms/src/spec-test.js index c01b09b466..f2e3627cde 100644 --- a/js/noms/src/spec-test.js +++ b/js/noms/src/spec-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {invariant} from './assert.js'; import {getHash} from './get-hash.js'; import List from './list.js'; diff --git a/js/noms/src/specs-test.js b/js/noms/src/specs-test.js index 94aaff7383..3fa18dde35 100644 --- a/js/noms/src/specs-test.js +++ b/js/noms/src/specs-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {invariant} from './assert.js'; import {getHash} from './get-hash.js'; import List from './list.js'; diff --git a/js/noms/src/struct-test.js b/js/noms/src/struct-test.js index b5e879829b..1b4c31feb1 100644 --- a/js/noms/src/struct-test.js +++ b/js/noms/src/struct-test.js @@ -22,7 +22,7 @@ import { numberType, stringType, } from './type.js'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {equals} from './compare.js'; import List from './list.js'; import Map from './map.js'; diff --git a/js/noms/src/struct.js b/js/noms/src/struct.js index e10b046ce8..5fc3220c89 100644 --- a/js/noms/src/struct.js +++ b/js/noms/src/struct.js @@ -85,6 +85,16 @@ export default class Struct extends ValueBase { mirror.forEachField(add); return chunks; } + + /** + * Gets the values of the struct in the same order as the fields. To get the field names you can + * inspect the type or use a StructMirror. + */ + get values(): Value[] { + // This is exposed this way to allow us breaking cyclic dependencies. + // TODO: Use Symbol and expose symbol internally instead? + return this._values; + } } function validate(type: Type, values: Value[]): void { diff --git a/js/noms/src/type-cache-test.js b/js/noms/src/type-cache-test.js index 70d53bd1f8..5e2b1d209c 100644 --- a/js/noms/src/type-cache-test.js +++ b/js/noms/src/type-cache-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {Kind} from './noms-kind.js'; import {equals} from './compare.js'; import { diff --git a/js/noms/src/type-test.js b/js/noms/src/type-test.js index ee3fb60220..bdd2d18c2b 100644 --- a/js/noms/src/type-test.js +++ b/js/noms/src/type-test.js @@ -20,9 +20,10 @@ import { getTypeOfValue, } from './type.js'; import type {Type} from './type.js'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {equals} from './compare.js'; -import {encodeValue, decodeValue} from './codec.js'; +import encodeValue from './encode-value.js'; +import decodeValue from './decode-value.js'; import {notNull} from './assert.js'; suite('Type', () => { diff --git a/js/noms/src/value-decoder.js b/js/noms/src/value-decoder.js index ec2075a6fc..b05b09d62a 100644 --- a/js/noms/src/value-decoder.js +++ b/js/noms/src/value-decoder.js @@ -24,7 +24,7 @@ import Set, {SetLeafSequence} from './set.js'; import {MetaSequence} from './meta-sequence.js'; import type Value from './value.js'; import type {ValueReader} from './value-store.js'; -import type {NomsReader} from './codec.js'; +import type {NomsReader} from './noms-reader.js'; import type TypeCache from './type-cache.js'; export default class ValueDecoder { diff --git a/js/noms/src/value-encoder.js b/js/noms/src/value-encoder.js index b28273df33..392ca2c685 100644 --- a/js/noms/src/value-encoder.js +++ b/js/noms/src/value-encoder.js @@ -4,21 +4,22 @@ // @flow -import Blob, {BlobLeafSequence} from './blob.js'; -import List, {ListLeafSequence} from './list.js'; -import Map, {MapLeafSequence} from './map.js'; -import Ref, {constructRef} from './ref.js'; +import type {BlobLeafSequence} from './blob.js'; +import type {ListLeafSequence} from './list.js'; +import type {MapLeafSequence} from './map.js'; +import type Ref from './ref.js'; +import {constructRef} from './ref.js'; import Sequence from './sequence.js'; -import Set, {SetLeafSequence} from './set.js'; -import Struct, {StructMirror} from './struct.js'; +import type {SetLeafSequence} from './set.js'; +import type Struct from './struct.js'; import type Value from './value.js'; import type {NomsKind} from './noms-kind.js'; -import type {NomsWriter} from './codec.js'; +import type {NomsWriter} from './noms-writer.js'; import type {ValueWriter} from './value-store.js'; import type {primitive} from './primitives.js'; -import {MetaTuple} from './meta-sequence.js'; -import {boolType, CycleDesc, getTypeOfValue, makeRefType, StructDesc, Type} from './type.js'; -import {describeTypeOfValue} from './encode-human-readable.js'; +import type {MetaTuple} from './meta-sequence.js'; +import {boolType, CycleDesc, getTypeOfValue, makeRefType, StructDesc} from './type.js'; +import type {Type} from './type.js'; import {invariant, notNull} from './assert.js'; import {isPrimitiveKind, kindToString, Kind} from './noms-kind.js'; @@ -111,7 +112,7 @@ export default class ValueEncoder { this._w.writeUint32(count); for (let i = 0; i < count; i++) { const tuple: MetaTuple = v.items[i]; - invariant(tuple instanceof MetaTuple); + // invariant(tuple instanceof MetaTuple); const child = tuple.child; if (child && this._vw) { this._vw.writeValue(child); @@ -135,85 +136,75 @@ export default class ValueEncoder { this._w.appendType(t); switch (t.kind) { case Kind.Blob: { - invariant(v instanceof Blob, - () => `Failed to write Blob. Invalid type: ${describeTypeOfValue(v)}`); + // $FlowIssue: We know v is a Blob here. const sequence = v.sequence; if (this.maybeWriteMetaSequence(sequence)) { break; } - invariant(sequence instanceof BlobLeafSequence); this.writeBlobLeafSequence(sequence); break; } - case Kind.Bool: - invariant(typeof v === 'boolean', - () => `Failed to write Bool. Invalid type: ${describeTypeOfValue(v)}`); - this._w.writeBool(v); + case Kind.Bool: { + // $FlowIssue: We know b is a boolean here. + const b: boolean = v; + this._w.writeBool(b); break; - case Kind.Number: - invariant(typeof v === 'number', - () => `Failed to write Number. Invalid type: ${describeTypeOfValue(v)}`); - if (!Number.isFinite(v)) { - throw new Error(`${v} is not a supported number`); + } + case Kind.Number: { + // $FlowIssue: We know n is a number here. + const n: number = v; + if (!Number.isFinite(n)) { + throw new Error(`${n} is not a supported number`); } - this._w.writeNumber(v); + this._w.writeNumber(n); break; + } case Kind.List: { - invariant(v instanceof List, - () => `Failed to write List. Invalid type: ${describeTypeOfValue(v)}`); + // $FlowIssue: We know v is a List here. const sequence = v.sequence; if (this.maybeWriteMetaSequence(sequence)) { break; } - invariant(sequence instanceof ListLeafSequence); this.writeListLeafSequence(sequence); break; } case Kind.Map: { - invariant(v instanceof Map, - () => `Failed to write Map. Invalid type: ${describeTypeOfValue(v)}`); + // $FlowIssue: We know v is a Map here. const sequence = v.sequence; if (this.maybeWriteMetaSequence(sequence)) { break; } - invariant(sequence instanceof MapLeafSequence); this.writeMapLeafSequence(sequence); break; } case Kind.Ref: - invariant(v instanceof Ref, - () => `Failed to write Ref. Invalid type: ${describeTypeOfValue(v)}`); + // $FlowIssue: We know v is a Ref here. this.writeRef(v); break; case Kind.Set: { - invariant(v instanceof Set, - () => `Failed to write Set. Invalid type: ${describeTypeOfValue(v)}`); + // $FlowIssue: We know v is a Set here. const sequence = v.sequence; if (this.maybeWriteMetaSequence(sequence)) { break; } - invariant(sequence instanceof SetLeafSequence); this.writeSetLeafSequence(sequence); break; } case Kind.String: - invariant(typeof v === 'string', - () => `Failed to write String. Invalid type: ${describeTypeOfValue(v)}`); + // $FlowIssue: We know v is a string here. this._w.writeString(v); break; case Kind.Type: - invariant(v instanceof Type, - () => `Failed to write Type. Invalid type: ${describeTypeOfValue(v)}`); + // $FlowIssue: We know v is a Type here. this.writeType(v, []); break; case Kind.Struct: - invariant(v instanceof Struct, - () => `Failed to write Struct. Invalid type: ${describeTypeOfValue(v)}`); + // $FlowIssue: We know v is a Struct here. this.writeStruct(v); break; case Kind.Cycle: @@ -226,10 +217,10 @@ export default class ValueEncoder { } writeStruct(s: Struct) { - const mirror = new StructMirror(s); - mirror.forEachField(field => { - this.writeValue(field.value); - }); + const {values} = s; + for (let i = 0; i < values.length; i++) { + this.writeValue(values[i]); + } } writeCycle(i: number) { diff --git a/js/noms/src/value-store-test.js b/js/noms/src/value-store-test.js index d5380a7e52..056f7f3c11 100644 --- a/js/noms/src/value-store-test.js +++ b/js/noms/src/value-store-test.js @@ -4,13 +4,13 @@ // @flow -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import {assert} from 'chai'; import MemoryStore from './memory-store.js'; import {BatchStoreAdaptor} from './batch-store.js'; import ValueStore from './value-store.js'; import List from './list.js'; -import {encodeValue} from './codec.js'; +import encodeValue from './encode-value.js'; import {equals} from './compare.js'; import Hash from './hash.js'; import {getHash} from './get-hash.js'; diff --git a/js/noms/src/value-store.js b/js/noms/src/value-store.js index d7cadcd199..8287893a66 100644 --- a/js/noms/src/value-store.js +++ b/js/noms/src/value-store.js @@ -18,9 +18,9 @@ import { } from './type.js'; import {Kind} from './noms-kind.js'; import {ValueBase} from './value.js'; -import {decodeValue} from './codec.js'; +import decodeValue from './decode-value.js'; import {invariant, notNull} from './assert.js'; -import {encodeValue} from './codec.js'; +import encodeValue from './encode-value.js'; import {describeType, describeTypeOfValue} from './encode-human-readable.js'; import {equals} from './compare.js'; diff --git a/js/noms/src/walk-test.js b/js/noms/src/walk-test.js index b7793ab6c4..dd907b99c1 100644 --- a/js/noms/src/walk-test.js +++ b/js/noms/src/walk-test.js @@ -4,7 +4,7 @@ // @flow -import {suite, suiteSetup, suiteTeardown, test} from 'mocha'; +import {suite, suiteSetup, suiteTeardown, test} from './jest.js'; import {assert} from 'chai'; import {createStructClass} from './struct.js'; diff --git a/js/noms/src/xp-test.js b/js/noms/src/xp-test.js index 13db9f998e..2f02c80ec4 100644 --- a/js/noms/src/xp-test.js +++ b/js/noms/src/xp-test.js @@ -5,7 +5,7 @@ // @flow import {assert} from 'chai'; -import {suite, test} from 'mocha'; +import {suite, test} from './jest.js'; import type Value from './value.js'; import {TestDatabase} from './test-util.js'; import {equals} from './compare.js'; diff --git a/js/noms/yarn.lock b/js/noms/yarn.lock index 0b3fb4cbd7..d622ccb9f3 100644 --- a/js/noms/yarn.lock +++ b/js/noms/yarn.lock @@ -9,10 +9,20 @@ JSONStream@^1.0.3: jsonparse "^1.2.0" through ">=2.2.7 <3" +abab@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/abab/-/abab-1.0.3.tgz#b81de5f7274ec4e756d797cd834f303642724e5d" + abbrev@1: version "1.0.9" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" +acorn-globals@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-3.1.0.tgz#fd8270f71fbb4996b004fa880ee5d46573a731bf" + dependencies: + acorn "^4.0.4" + acorn-jsx@^3.0.0, acorn-jsx@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" @@ -23,7 +33,7 @@ acorn@^3.0.4, acorn@^3.1.0: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" -acorn@^4.0.1: +acorn@^4.0.1, acorn@^4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" @@ -50,7 +60,7 @@ 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: +ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" @@ -66,6 +76,10 @@ ansi-styles@^2.0.1, ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" +ansicolors@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/ansicolors/-/ansicolors-0.2.1.tgz#be089599097b74a5c9c4a84a0cdbcdb62bd87aef" + anymatch@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" @@ -110,6 +124,10 @@ arr-flatten@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.1.tgz#e5ffe54d45e19f32f216e91eb99c8ce892bb604b" +array-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" + array-iterate@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/array-iterate/-/array-iterate-1.1.0.tgz#4f13148ffffa5f2756b50460e5eac8eed31a14e6" @@ -162,6 +180,12 @@ async@^1.4.0, async@^1.4.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" +async@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4" + dependencies: + lodash "^4.14.0" + async@~0.2.6: version "0.2.10" resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1" @@ -207,7 +231,7 @@ babel-code-frame@^6.16.0, babel-code-frame@^6.20.0: esutils "^2.0.2" js-tokens "^2.0.0" -babel-core@^6.0.14, babel-core@^6.14.0, babel-core@^6.17.0, babel-core@^6.18.0: +babel-core@^6.0.0, babel-core@^6.0.14, babel-core@^6.14.0, babel-core@^6.17.0, babel-core@^6.18.0: version "6.21.0" resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.21.0.tgz#75525480c21c803f826ef3867d22c19f080a3724" dependencies: @@ -391,6 +415,14 @@ babel-helpers@^6.16.0: babel-runtime "^6.0.0" babel-template "^6.16.0" +babel-jest@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-18.0.0.tgz#17ebba8cb3285c906d859e8707e4e79795fb65e3" + dependencies: + babel-core "^6.0.0" + babel-plugin-istanbul "^3.0.0" + babel-preset-jest "^18.0.0" + babel-messages@^6.8.0: version "6.8.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.8.0.tgz#bf504736ca967e6d65ef0adb5a2a5f947c8e0eb9" @@ -403,6 +435,19 @@ babel-plugin-check-es2015-constants@^6.3.13: dependencies: babel-runtime "^6.0.0" +babel-plugin-istanbul@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-3.1.2.tgz#11d5abde18425ec24b5d648c7e0b5d25cd354a22" + dependencies: + find-up "^1.1.2" + istanbul-lib-instrument "^1.4.2" + object-assign "^4.1.0" + test-exclude "^3.3.0" + +babel-plugin-jest-hoist@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-18.0.0.tgz#4150e70ecab560e6e7344adc849498072d34e12a" + babel-plugin-syntax-async-functions@^6.13.0, babel-plugin-syntax-async-functions@^6.8.0: version "6.13.0" resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" @@ -817,6 +862,12 @@ babel-preset-es2016@^6.16.0: dependencies: babel-plugin-transform-exponentiation-operator "^6.3.13" +babel-preset-jest@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-18.0.0.tgz#84faf8ca3ec65aba7d5e3f59bbaed935ab24049e" + dependencies: + babel-plugin-jest-hoist "^18.0.0" + babel-preset-noms@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/babel-preset-noms/-/babel-preset-noms-1.0.1.tgz#b6160863cb34d713e3cda8a7367bb85727eedb08" @@ -1002,7 +1053,7 @@ braces@^1.8.2: preserve "^0.2.0" repeat-element "^1.1.2" -browser-resolve@^1.7.0: +browser-resolve@^1.11.2, browser-resolve@^1.7.0: version "1.11.2" resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce" dependencies: @@ -1012,6 +1063,12 @@ browser-stdout@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f" +bser@1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bser/-/bser-1.0.2.tgz#381116970b2a6deea5646dd15dd7278444b56169" + dependencies: + node-int64 "^0.4.0" + bson@0.2.x: version "0.2.22" resolved "https://registry.yarnpkg.com/bson/-/bson-0.2.22.tgz#fcda103f26d0c074d5a52d50927db80fd02b4b39" @@ -1054,6 +1111,10 @@ callsites@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" +callsites@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50" + camelcase@^1.0.2: version "1.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" @@ -1066,6 +1127,13 @@ camelcase@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" +cardinal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-1.0.0.tgz#50e21c1b0aa37729f9377def196b5a9cec932ee9" + dependencies: + ansicolors "~0.2.1" + redeyed "~1.0.0" + caseless@~0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" @@ -1130,6 +1198,10 @@ chokidar@^1.0.0, chokidar@^1.2.0, chokidar@^1.6.0: optionalDependencies: fsevents "^1.0.0" +ci-info@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.0.0.tgz#dc5285f2b4e251821683681c381c3388f46ec534" + circular-json@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" @@ -1140,6 +1212,19 @@ cli-cursor@^1.0.1: dependencies: restore-cursor "^1.0.1" +cli-table@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23" + dependencies: + colors "1.0.3" + +cli-usage@^0.1.1: + version "0.1.4" + resolved "https://registry.yarnpkg.com/cli-usage/-/cli-usage-0.1.4.tgz#7c01e0dc706c234b39c933838c8e20b2175776e2" + dependencies: + marked "^0.3.6" + marked-terminal "^1.6.2" + cli-width@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a" @@ -1196,6 +1281,10 @@ collapse-white-space@^1.0.0, collapse-white-space@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.2.tgz#9c463fb9c6d190d2dcae21a356a01bcae9eeef6d" +colors@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" + combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" @@ -1242,6 +1331,10 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" +content-type-parser@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94" + continuable-cache@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/continuable-cache/-/continuable-cache-0.3.1.tgz#bd727a7faed77e71ff3985ac93351a912733ad0f" @@ -1271,6 +1364,16 @@ cryptiles@2.x.x: dependencies: boom "2.x.x" +cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0": + version "0.3.2" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.2.tgz#b8036170c79f07a90ff2f16e22284027a243848b" + +"cssstyle@>= 0.2.37 < 0.3.0": + version "0.2.37" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-0.2.37.tgz#541097234cb2513c83ceed3acddc27ff27987d54" + dependencies: + cssom "0.3.x" + d@^0.1.1, d@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/d/-/d-0.1.1.tgz#da184c535d18d8ee7ba2aa229b914009fae11309" @@ -1374,6 +1477,10 @@ diff@1.4.0, diff@^1.3.2: version "1.4.0" resolved "https://registry.yarnpkg.com/diff/-/diff-1.4.0.tgz#7f28d2eb9ee7b15a97efd89ce63dcfdaa3ccbabf" +diff@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.2.0.tgz#c9ce393a4b7cbd0b058a725c93df299027868ff9" + disparity@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/disparity/-/disparity-2.0.0.tgz#57ddacb47324ae5f58d2cc0da886db4ce9eeb718" @@ -1480,6 +1587,12 @@ end-of-stream@1.0.0: dependencies: once "~1.3.0" +"errno@>=0.1.1 <0.2.0-0": + version "0.1.4" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.4.tgz#b896e23a9e5e8ba33871fc996abd3635fc9a1c7d" + dependencies: + prr "~0.0.0" + error-ex@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9" @@ -1549,6 +1662,17 @@ escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1 version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" +escodegen@^1.6.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-1.8.1.tgz#5a5b53af4693110bebb0867aa3430dd3b70a1018" + dependencies: + esprima "^2.7.1" + estraverse "^1.9.1" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.2.0" + escope@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" @@ -1664,10 +1788,14 @@ espree@^3.3.1: acorn "^4.0.1" acorn-jsx "^3.0.0" -esprima@^2.6.0: +esprima@^2.6.0, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" +esprima@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.0.0.tgz#53cf247acda77313e551c3aa2e73342d3fb4f7d9" + esrecurse@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.1.0.tgz#4713b6536adf7f2ac4f327d559e7756bff648220" @@ -1675,6 +1803,10 @@ esrecurse@^4.1.0: estraverse "~4.1.0" object-assign "^4.0.1" +estraverse@^1.9.1: + version "1.9.3" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44" + estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" @@ -1694,6 +1826,12 @@ event-emitter@~0.3.4: d "~0.1.1" es5-ext "~0.10.7" +exec-sh@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.0.tgz#14f75de3f20d286ef933099b2ce50a90359cef10" + dependencies: + merge "^1.1.3" + exit-hook@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" @@ -1740,6 +1878,12 @@ faye-websocket@~0.10.0: dependencies: websocket-driver ">=0.5.1" +fb-watchman@^1.8.0, fb-watchman@^1.9.0: + version "1.9.2" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-1.9.2.tgz#a24cf47827f82d38fb59a69ad70b76e3b6ae7383" + dependencies: + bser "1.0.2" + figures@^1.3.5: version "1.7.0" resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" @@ -1758,6 +1902,13 @@ filename-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775" +fileset@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0" + dependencies: + glob "^7.0.3" + minimatch "^3.0.3" + fill-range@^2.1.0: version "2.2.3" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" @@ -2044,6 +2195,10 @@ growl@1.9.2: version "1.9.2" resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" +growly@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" + gulp-sourcemaps@1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz#b86ff349d801ceb56e1d9e7dc7bbcb4b7dee600c" @@ -2153,6 +2308,12 @@ hosted-git-info@^2.1.4: version "2.1.5" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b" +html-encoding-sniffer@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-1.0.1.tgz#79bf7a785ea495fe66165e734153f363ff5437da" + dependencies: + whatwg-encoding "^1.0.1" + html-void-elements@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/html-void-elements/-/html-void-elements-1.0.1.tgz#f929bea267a19e3535950502ca12c159f1b559af" @@ -2165,6 +2326,10 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" +iconv-lite@0.4.13: + version "0.4.13" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" + ignore@^3.1.5, ignore@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.0.tgz#8d88f03c3002a0ac52114db25d2c673b0bf1e435" @@ -2266,6 +2431,12 @@ is-builtin-module@^1.0.0: dependencies: builtin-modules "^1.0.0" +is-ci@^1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.0.10.tgz#f739336b2632365061a9d48270cd56ae3369318e" + dependencies: + ci-info "^1.0.0" + is-decimal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.0.tgz#940579b6ea63c628080a69e62bda88c8470b4fe0" @@ -2441,6 +2612,22 @@ isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" +istanbul-api@^1.1.0-alpha.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.1.1.tgz#d36e2f1560d1a43ce304c4ff7338182de61c8f73" + dependencies: + async "^2.1.4" + fileset "^2.0.2" + istanbul-lib-coverage "^1.0.0" + istanbul-lib-hook "^1.0.0" + istanbul-lib-instrument "^1.3.0" + istanbul-lib-report "^1.0.0-alpha.3" + istanbul-lib-source-maps "^1.1.0" + istanbul-reports "^1.0.0" + js-yaml "^3.7.0" + mkdirp "^0.5.1" + once "^1.4.0" + istanbul-lib-coverage@^1.0.0, istanbul-lib-coverage@^1.0.0-alpha, istanbul-lib-coverage@^1.0.0-alpha.0, istanbul-lib-coverage@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.0.1.tgz#f263efb519c051c5f1f3343034fc40e7b43ff212" @@ -2451,7 +2638,7 @@ istanbul-lib-hook@^1.0.0: dependencies: append-transform "^0.4.0" -istanbul-lib-instrument@^1.4.2: +istanbul-lib-instrument@^1.1.1, istanbul-lib-instrument@^1.3.0, istanbul-lib-instrument@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.4.2.tgz#0e2fdfac93c1dabf2e31578637dc78a19089f43e" dependencies: @@ -2489,6 +2676,188 @@ istanbul-reports@^1.0.0: dependencies: handlebars "^4.0.3" +jest-changed-files@^17.0.2: + version "17.0.2" + resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-17.0.2.tgz#f5657758736996f590a51b87e5c9369d904ba7b7" + +jest-cli@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-18.1.0.tgz#5ead36ecad420817c2c9baa2aa7574f63257b3d6" + dependencies: + ansi-escapes "^1.4.0" + callsites "^2.0.0" + chalk "^1.1.1" + graceful-fs "^4.1.6" + is-ci "^1.0.9" + istanbul-api "^1.1.0-alpha.1" + istanbul-lib-coverage "^1.0.0" + istanbul-lib-instrument "^1.1.1" + jest-changed-files "^17.0.2" + jest-config "^18.1.0" + jest-environment-jsdom "^18.1.0" + jest-file-exists "^17.0.0" + jest-haste-map "^18.1.0" + jest-jasmine2 "^18.1.0" + jest-mock "^18.0.0" + jest-resolve "^18.1.0" + jest-resolve-dependencies "^18.1.0" + jest-runtime "^18.1.0" + jest-snapshot "^18.1.0" + jest-util "^18.1.0" + json-stable-stringify "^1.0.0" + node-notifier "^4.6.1" + sane "~1.4.1" + strip-ansi "^3.0.1" + throat "^3.0.0" + which "^1.1.1" + worker-farm "^1.3.1" + yargs "^6.3.0" + +jest-config@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-18.1.0.tgz#6111740a6d48aab86ff5a9e6ab0b98bd993b6ff4" + dependencies: + chalk "^1.1.1" + jest-environment-jsdom "^18.1.0" + jest-environment-node "^18.1.0" + jest-jasmine2 "^18.1.0" + jest-mock "^18.0.0" + jest-resolve "^18.1.0" + jest-util "^18.1.0" + json-stable-stringify "^1.0.0" + +jest-diff@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-18.1.0.tgz#4ff79e74dd988c139195b365dc65d87f606f4803" + dependencies: + chalk "^1.1.3" + diff "^3.0.0" + jest-matcher-utils "^18.1.0" + pretty-format "^18.1.0" + +jest-environment-jsdom@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-18.1.0.tgz#18b42f0c4ea2bae9f36cab3639b1e8f8c384e24e" + dependencies: + jest-mock "^18.0.0" + jest-util "^18.1.0" + jsdom "^9.9.1" + +jest-environment-node@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-18.1.0.tgz#4d6797572c8dda99acf5fae696eb62945547c779" + dependencies: + jest-mock "^18.0.0" + jest-util "^18.1.0" + +jest-file-exists@^17.0.0: + version "17.0.0" + resolved "https://registry.yarnpkg.com/jest-file-exists/-/jest-file-exists-17.0.0.tgz#7f63eb73a1c43a13f461be261768b45af2cdd169" + +jest-haste-map@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-18.1.0.tgz#06839c74b770a40c1a106968851df8d281c08375" + dependencies: + fb-watchman "^1.9.0" + graceful-fs "^4.1.6" + micromatch "^2.3.11" + sane "~1.4.1" + worker-farm "^1.3.1" + +jest-jasmine2@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-18.1.0.tgz#094e104c2c189708766c77263bb2aecb5860a80b" + dependencies: + graceful-fs "^4.1.6" + jest-matcher-utils "^18.1.0" + jest-matchers "^18.1.0" + jest-snapshot "^18.1.0" + jest-util "^18.1.0" + +jest-matcher-utils@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-18.1.0.tgz#1ac4651955ee2a60cef1e7fcc98cdfd773c0f932" + dependencies: + chalk "^1.1.3" + pretty-format "^18.1.0" + +jest-matchers@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-matchers/-/jest-matchers-18.1.0.tgz#0341484bf87a1fd0bac0a4d2c899e2b77a3f1ead" + dependencies: + jest-diff "^18.1.0" + jest-matcher-utils "^18.1.0" + jest-util "^18.1.0" + pretty-format "^18.1.0" + +jest-mock@^18.0.0: + version "18.0.0" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-18.0.0.tgz#5c248846ea33fa558b526f5312ab4a6765e489b3" + +jest-resolve-dependencies@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-18.1.0.tgz#8134fb5caf59c9ed842fe0152ab01c52711f1bbb" + dependencies: + jest-file-exists "^17.0.0" + jest-resolve "^18.1.0" + +jest-resolve@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-18.1.0.tgz#6800accb536658c906cd5e29de412b1ab9ac249b" + dependencies: + browser-resolve "^1.11.2" + jest-file-exists "^17.0.0" + jest-haste-map "^18.1.0" + resolve "^1.2.0" + +jest-runtime@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-18.1.0.tgz#3abfd687175b21fc3b85a2b8064399e997859922" + dependencies: + babel-core "^6.0.0" + babel-jest "^18.0.0" + babel-plugin-istanbul "^3.0.0" + chalk "^1.1.3" + graceful-fs "^4.1.6" + jest-config "^18.1.0" + jest-file-exists "^17.0.0" + jest-haste-map "^18.1.0" + jest-mock "^18.0.0" + jest-resolve "^18.1.0" + jest-snapshot "^18.1.0" + jest-util "^18.1.0" + json-stable-stringify "^1.0.0" + micromatch "^2.3.11" + yargs "^6.3.0" + +jest-snapshot@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-18.1.0.tgz#55b96d2ee639c9bce76f87f2a3fd40b71c7a5916" + dependencies: + jest-diff "^18.1.0" + jest-file-exists "^17.0.0" + jest-matcher-utils "^18.1.0" + jest-util "^18.1.0" + natural-compare "^1.4.0" + pretty-format "^18.1.0" + +jest-util@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-18.1.0.tgz#3a99c32114ab17f84be094382527006e6d4bfc6a" + dependencies: + chalk "^1.1.1" + diff "^3.0.0" + graceful-fs "^4.1.6" + jest-file-exists "^17.0.0" + jest-mock "^18.0.0" + mkdirp "^0.5.1" + +jest@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/jest/-/jest-18.1.0.tgz#bcebf1e203dee5c2ad2091c805300a343d9e6c7d" + dependencies: + jest-cli "^18.1.0" + jodid25519@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/jodid25519/-/jodid25519-1.0.2.tgz#06d4912255093419477d425633606e0e90782967" @@ -2503,7 +2872,7 @@ js-tokens@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.0.tgz#a2f2a969caae142fb3cd56228358c89366957bd1" -js-yaml@^3.3.1, js-yaml@^3.5.1: +js-yaml@^3.3.1, js-yaml@^3.5.1, js-yaml@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" dependencies: @@ -2514,6 +2883,30 @@ jsbn@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd" +jsdom@^9.9.1: + version "9.10.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.10.0.tgz#72d04d9fd5f1164d016dc350ef889af6d0d1a25a" + dependencies: + abab "^1.0.3" + acorn "^4.0.4" + acorn-globals "^3.1.0" + array-equal "^1.0.0" + content-type-parser "^1.0.1" + cssom ">= 0.3.2 < 0.4.0" + cssstyle ">= 0.2.37 < 0.3.0" + escodegen "^1.6.1" + html-encoding-sniffer "^1.0.1" + nwmatcher ">= 1.3.9 < 2.0.0" + parse5 "^1.5.1" + request "^2.79.0" + sax "^1.2.1" + symbol-tree "^3.2.1" + tough-cookie "^2.3.2" + webidl-conversions "^3.0.1" + whatwg-encoding "^1.0.1" + whatwg-url "^4.3.0" + xml-name-validator "^2.0.1" + jsesc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" @@ -2643,6 +3036,14 @@ load-plugin@^2.0.0: npm-prefix "^1.2.0" resolve-from "^2.0.0" +lodash._arraycopy@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._arraycopy/-/lodash._arraycopy-3.0.0.tgz#76e7b7c1f1fb92547374878a562ed06a3e50f6e1" + +lodash._arrayeach@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._arrayeach/-/lodash._arrayeach-3.0.0.tgz#bab156b2a90d3f1bbd5c653403349e5e5933ef9e" + lodash._baseassign@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash._baseassign/-/lodash._baseassign-3.2.0.tgz#8c38a099500f215ad09e59f1722fd0c52bfe0a4e" @@ -2650,6 +3051,17 @@ lodash._baseassign@^3.0.0: lodash._basecopy "^3.0.0" lodash.keys "^3.0.0" +lodash._baseclone@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/lodash._baseclone/-/lodash._baseclone-3.3.0.tgz#303519bf6393fe7e42f34d8b630ef7794e3542b7" + dependencies: + lodash._arraycopy "^3.0.0" + lodash._arrayeach "^3.0.0" + lodash._baseassign "^3.0.0" + lodash._basefor "^3.0.0" + lodash.isarray "^3.0.0" + lodash.keys "^3.0.0" + lodash._basecopy@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" @@ -2658,6 +3070,14 @@ lodash._basecreate@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/lodash._basecreate/-/lodash._basecreate-3.0.3.tgz#1bc661614daa7fc311b7d03bf16806a0213cf821" +lodash._basefor@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/lodash._basefor/-/lodash._basefor-3.0.3.tgz#7550b4e9218ef09fad24343b612021c79b4c20c2" + +lodash._bindcallback@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._bindcallback/-/lodash._bindcallback-3.0.1.tgz#e531c27644cf8b57a99e17ed95b35c748789392e" + lodash._getnative@^3.0.0: version "3.9.1" resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" @@ -2666,6 +3086,17 @@ lodash._isiterateecall@^3.0.0: version "3.0.9" resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" +lodash.assign@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" + +lodash.clonedeep@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-3.0.2.tgz#a0a1e40d82a5ea89ff5b147b8444ed63d92827db" + dependencies: + lodash._baseclone "^3.0.0" + lodash._bindcallback "^3.0.0" + lodash.create@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/lodash.create/-/lodash.create-3.1.1.tgz#d7f2849f0dbda7e04682bb8cd72ab022461debe7" @@ -2702,7 +3133,7 @@ lodash@^4.0.0, lodash@^4.11.1, lodash@^4.2.0, lodash@^4.3.0, lodash@~4.11.x: version "4.11.2" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.11.2.tgz#d6b4338b110a58e21dae5cebcfdbbfd2bc4cdb3b" -lodash@^4.15.0: +lodash@^4.14.0, lodash@^4.15.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -2733,6 +3164,12 @@ lru-cache@^4.0.1: pseudomap "^1.0.1" yallist "^2.0.0" +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + dependencies: + tmpl "1.0.x" + map-cache@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -2745,6 +3182,20 @@ markdown-table@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/markdown-table/-/markdown-table-1.0.0.tgz#5f768d5ae1b98f31ce673cd24686251decf2c460" +marked-terminal@^1.6.2: + version "1.7.0" + resolved "https://registry.yarnpkg.com/marked-terminal/-/marked-terminal-1.7.0.tgz#c8c460881c772c7604b64367007ee5f77f125904" + dependencies: + cardinal "^1.0.0" + chalk "^1.1.3" + cli-table "^0.3.1" + lodash.assign "^4.2.0" + node-emoji "^1.4.1" + +marked@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" + md5-hex@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4" @@ -2814,6 +3265,10 @@ merge-stream@^1.0.0: dependencies: readable-stream "^2.0.1" +merge@^1.1.3: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + micromatch@^2.1.5, micromatch@^2.1.6, micromatch@^2.3.11, micromatch@^2.3.7: version "2.3.11" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" @@ -2846,7 +3301,7 @@ mime@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2: +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" dependencies: @@ -2856,7 +3311,7 @@ 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.0, minimist@^1.2.0: +minimist@^1.1.0, minimist@^1.1.1, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -2927,6 +3382,28 @@ natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" +node-emoji@^1.4.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.5.1.tgz#fd918e412769bf8c448051238233840b2aff16a1" + dependencies: + string.prototype.codepointat "^0.2.0" + +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + +node-notifier@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-4.6.1.tgz#056d14244f3dcc1ceadfe68af9cff0c5473a33f3" + dependencies: + cli-usage "^0.1.1" + growly "^1.2.0" + lodash.clonedeep "^3.0.0" + minimist "^1.1.1" + semver "^5.1.0" + shellwords "^0.1.0" + which "^1.0.5" + node-pre-gyp@^0.6.29: version "0.6.32" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz#fc452b376e7319b3d255f5f34853ef6fd8fe1fd5" @@ -2985,6 +3462,10 @@ number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" +"nwmatcher@>= 1.3.9 < 2.0.0": + version "1.3.9" + resolved "https://registry.yarnpkg.com/nwmatcher/-/nwmatcher-1.3.9.tgz#8bab486ff7fa3dfd086656bbe8b17116d3692d2a" + nyc@^10.1.2: version "10.1.2" resolved "https://registry.yarnpkg.com/nyc/-/nyc-10.1.2.tgz#ea7acaa20a235210101604f4e7d56d28453b0274" @@ -3032,7 +3513,7 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" -once@^1.3.0, once@^1.3.3: +once@^1.3.0, once@^1.3.3, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" dependencies: @@ -3055,7 +3536,7 @@ optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" -optionator@^0.8.2: +optionator@^0.8.1, optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" dependencies: @@ -3148,6 +3629,10 @@ parse-url@^1.3.0: is-ssh "^1.3.0" protocols "^1.4.0" +parse5@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-1.5.1.tgz#9b7f3b0de32be78dc2401b17573ccaf0f6f59d94" + path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -3220,6 +3705,12 @@ preserve@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" +pretty-format@^18.1.0: + version "18.1.0" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-18.1.0.tgz#fb65a86f7a7f9194963eee91865c1bcf1039e284" + dependencies: + ansi-styles "^2.2.1" + private@^0.1.6: version "0.1.6" resolved "https://registry.yarnpkg.com/private/-/private-0.1.6.tgz#55c6a976d0f9bafb9924851350fe47b9b5fbb7c1" @@ -3240,6 +3731,10 @@ protocols@^1.1.0, protocols@^1.4.0: version "1.4.3" resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.3.tgz#635b1c0785f0b389e8a012df1b1afffda9608b76" +prr@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/prr/-/prr-0.0.0.tgz#1a84b85908325501411853d0081ee3fa86e2926a" + pseudomap@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" @@ -3357,6 +3852,12 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" +redeyed@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/redeyed/-/redeyed-1.0.1.tgz#e96c193b40c0816b00aec842698e61185e55498a" + dependencies: + esprima "~3.0.0" + regenerate@^1.2.1: version "1.3.2" resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.2.tgz#d1941c67bad437e1be76433add5b385f95b19260" @@ -3555,7 +4056,7 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.1.3, resolve@^1.1.6: +resolve@^1.1.3, resolve@^1.1.6, resolve@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c" @@ -3596,7 +4097,22 @@ safe@~0.3.9: version "0.3.9" resolved "https://registry.yarnpkg.com/safe/-/safe-0.3.9.tgz#178159bee45791ac21628aee2dabb74a52d5d072" -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@~5.3.0: +sane@~1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/sane/-/sane-1.4.1.tgz#88f763d74040f5f0c256b6163db399bf110ac715" + dependencies: + exec-sh "^0.2.0" + fb-watchman "^1.8.0" + minimatch "^3.0.2" + minimist "^1.1.1" + walker "~1.0.5" + watch "~0.10.0" + +sax@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" + +"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -3624,6 +4140,10 @@ shellsubstitute@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shellsubstitute/-/shellsubstitute-1.2.0.tgz#e4f702a50c518b0f6fe98451890d705af29b6b70" +shellwords@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" + signal-exit@^2.0.0: version "2.1.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-2.1.2.tgz#375879b1f92ebc3b334480d038dc546a6d558564" @@ -3666,6 +4186,12 @@ source-map@^0.5.0, source-map@^0.5.3, source-map@~0.5.1: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" +source-map@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.2.0.tgz#dab73fbcfc2ba819b4de03bd6f6eaa48164b3f9d" + dependencies: + amdefine ">=0.0.4" + space-separated-tokens@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.0.tgz#9e8c60407aa527742cd9eaee2541dec639f1269b" @@ -3760,6 +4286,10 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^3.0.0" +string.prototype.codepointat@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/string.prototype.codepointat/-/string.prototype.codepointat-0.2.0.tgz#6b26e9bd3afcaa7be3b4269b526de1b82000ac78" + string_decoder@0.10, string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" @@ -3833,6 +4363,10 @@ symbol-observable@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d" +symbol-tree@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.1.tgz#8549dd1d01fa9f893c18cc9ab0b106b4d9b168cb" + table@^3.7.8: version "3.8.3" resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" @@ -3879,6 +4413,10 @@ text-table@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" +throat@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/throat/-/throat-3.0.0.tgz#e7c64c867cbb3845f10877642f7b60055b8ec0d6" + through2-filter@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec" @@ -3924,6 +4462,10 @@ tiny-lr@^1.0.3: object-assign "^4.1.0" qs "^6.2.0" +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + to-absolute-glob@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f" @@ -3934,12 +4476,16 @@ to-fast-properties@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" -tough-cookie@~2.3.0: +tough-cookie@^2.3.2, tough-cookie@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" dependencies: punycode "^1.4.1" +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" + trim-lines@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/trim-lines/-/trim-lines-1.1.0.tgz#9926d03ede13ba18f7d42222631fb04c79ff26fe" @@ -4190,6 +4736,20 @@ vinyl@^2.0.0: remove-trailing-separator "^1.0.1" replace-ext "^1.0.0" +walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + dependencies: + makeerror "1.0.x" + +watch@~0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.10.0.tgz#77798b2da0f9910d595f1ace5b0c2258521f21dc" + +webidl-conversions@^3.0.0, webidl-conversions@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" + websocket-driver@>=0.5.1: version "0.6.5" resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.6.5.tgz#5cb2556ceb85f4373c6d8238aa691c8454e13a36" @@ -4200,11 +4760,24 @@ websocket-extensions@>=0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.1.tgz#76899499c184b6ef754377c2dbb0cd6cb55d29e7" +whatwg-encoding@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.1.tgz#3c6c451a198ee7aec55b1ec61d0920c67801a5f4" + dependencies: + iconv-lite "0.4.13" + +whatwg-url@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-4.3.0.tgz#92aaee21f4f2a642074357d70ef8500a7cbb171a" + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" + 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.4, which@^1.2.9: +which@^1.0.5, which@^1.1.1, which@^1.2.4, which@^1.2.9: version "1.2.12" resolved "https://registry.yarnpkg.com/which/-/which-1.2.12.tgz#de67b5e450269f194909ef23ece4ebe416fa1192" dependencies: @@ -4236,6 +4809,13 @@ wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" +worker-farm@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.3.1.tgz#4333112bb49b17aa050b87895ca6b2cacf40e5ff" + dependencies: + errno ">=0.1.1 <0.2.0-0" + xtend ">=4.0.0 <4.1.0-0" + wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" @@ -4265,6 +4845,10 @@ x-is-string@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/x-is-string/-/x-is-string-0.1.0.tgz#474b50865af3a49a9c4657f05acd145458f77d82" +xml-name-validator@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635" + "xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -4295,7 +4879,7 @@ yargs@^3.32.0: window-size "^0.1.4" y18n "^3.2.0" -yargs@^6.0.0, yargs@^6.6.0: +yargs@^6.0.0, yargs@^6.3.0, yargs@^6.6.0: version "6.6.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" dependencies: