diff --git a/package.json b/package.json
index 08cfc625f..3962b9e1a 100644
--- a/package.json
+++ b/package.json
@@ -39,7 +39,7 @@
"@commitlint/config-angular": "7.3.1",
"babel-cli": "6.26.0",
"babel-eslint": "10.0.1",
- "babel-jest": "22.2.2",
+ "babel-jest": "23.6.0",
"babel-preset-es2015": "6.24.1",
"babel-preset-flow": "6.23.0",
"babel-preset-react": "6.24.1",
@@ -57,11 +57,11 @@
"eslint-plugin-prettier": "3.0.1",
"eslint-plugin-react": "7.12.4",
"esm": "3.1.1",
- "expect": "22.3.0",
+ "expect": "23.6.0",
"flow-bin": "0.91.0",
"flow-copy-source": "2.0.2",
"husky": "1.3.1",
- "jest": "22.3.0",
+ "jest": "23.6.0",
"json": "9.0.6",
"lint-staged": "8.1.0",
"mversion": "1.12.0",
diff --git a/src/formatter/formatFunction.js b/src/formatter/formatFunction.js
index 474316163..f8474436b 100644
--- a/src/formatter/formatFunction.js
+++ b/src/formatter/formatFunction.js
@@ -2,7 +2,16 @@ import type { Options } from './../options';
function noRefCheck() {}
-const defaultFunctionValue = (fn: any): any => fn.toString();
+export const inlineFunction = (fn: any): string =>
+ fn
+ .toString()
+ .split('\n')
+ .map(line => line.trim())
+ .join('');
+
+export const preserveFunctionLineBreak = (fn: any): string => fn.toString();
+
+const defaultFunctionValue = inlineFunction;
export default (fn: Function, options: Options): string => {
const { functionValue = defaultFunctionValue, showFunctions } = options;
diff --git a/src/formatter/formatFunction.spec.js b/src/formatter/formatFunction.spec.js
index 429f91e0b..8a199696b 100644
--- a/src/formatter/formatFunction.spec.js
+++ b/src/formatter/formatFunction.spec.js
@@ -22,10 +22,9 @@ describe('formatFunction', () => {
});
it('should format a function if showFunctions is true', () => {
- expect(formatFunction(hello, { showFunctions: true }))
- .toEqual(`function hello() {
- return 1;
-}`);
+ expect(formatFunction(hello, { showFunctions: true })).toEqual(
+ 'function hello() {return 1;}'
+ );
});
it('should format a function without name if showFunctions is true', () => {
diff --git a/src/index.js b/src/index.js
index 882b39c11..a275b02b9 100644
--- a/src/index.js
+++ b/src/index.js
@@ -41,3 +41,8 @@ const reactElementToJsxString = (
};
export default reactElementToJsxString;
+
+export {
+ inlineFunction,
+ preserveFunctionLineBreak,
+} from './formatter/formatFunction';
diff --git a/src/index.spec.js b/src/index.spec.js
index 20b66234a..9103d139a 100644
--- a/src/index.spec.js
+++ b/src/index.spec.js
@@ -5,7 +5,7 @@
import React, { Fragment, Component } from 'react';
import { createRenderer } from 'react-test-renderer/shallow';
import { mount } from 'enzyme';
-import reactElementToJSXString from './index';
+import reactElementToJSXString, { preserveFunctionLineBreak } from './index';
import AnonymousStatelessComponent from './AnonymousStatelessComponent';
class TestComponent extends React.Component {}
@@ -889,13 +889,25 @@ describe('reactElementToJSXString(ReactElement)', () => {
reactElementToJSXString(
, {
showFunctions: true,
})
- ).toEqual(
- ``);
+ });
+
+ it('should expose the multiline "functionValue" formatter', () => {
+ /* eslint-disable arrow-body-style */
+ const fn = () => {
+ return 'value';
+ };
+
+ expect(
+ reactElementToJSXString(, {
+ showFunctions: true,
+ functionValue: preserveFunctionLineBreak,
+ })
+ ).toEqual(``
- );
+ />`);
});
it('reactElementToJSXString()', () => {
diff --git a/tests/smoke/smoke.js b/tests/smoke/smoke.js
index 169bf732d..ca0c4dd7b 100755
--- a/tests/smoke/smoke.js
+++ b/tests/smoke/smoke.js
@@ -8,7 +8,7 @@ const requireReactElementToJsxString = buildType => {
if (buildType === 'esm') {
return require(`./../../dist/esm`).default;
} else if (buildType === 'cjs') {
- return require('./../../dist/cjs');
+ return require('./../../dist/cjs').default;
}
throw new Error(`Unknown build type: "${buildType}"`);
diff --git a/yarn.lock b/yarn.lock
index 30042a49a..b849cb72c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -772,12 +772,12 @@ babel-helpers@^6.24.1:
babel-runtime "^6.22.0"
babel-template "^6.24.1"
-babel-jest@22.2.2, babel-jest@^22.2.2:
- version "22.2.2"
- resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-22.2.2.tgz#eda38dca284e32cc5257f96a9b51351975de4e04"
+babel-jest@23.6.0, babel-jest@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1"
dependencies:
- babel-plugin-istanbul "^4.1.5"
- babel-preset-jest "^22.2.0"
+ babel-plugin-istanbul "^4.1.6"
+ babel-preset-jest "^23.2.0"
babel-messages@^6.23.0:
version "6.23.0"
@@ -791,17 +791,18 @@ babel-plugin-check-es2015-constants@^6.22.0:
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-istanbul@^4.1.5:
- version "4.1.5"
- resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.5.tgz#6760cdd977f411d3e175bb064f2bc327d99b2b6e"
+babel-plugin-istanbul@^4.1.6:
+ version "4.1.6"
+ resolved "https://registry.yarnpkg.com/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45"
dependencies:
+ babel-plugin-syntax-object-rest-spread "^6.13.0"
find-up "^2.1.0"
- istanbul-lib-instrument "^1.7.5"
- test-exclude "^4.1.1"
+ istanbul-lib-instrument "^1.10.1"
+ test-exclude "^4.2.1"
-babel-plugin-jest-hoist@^22.2.0:
- version "22.2.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-22.2.0.tgz#bd34f39d652406669713b8c89e23ef25c890b993"
+babel-plugin-jest-hoist@^23.2.0:
+ version "23.2.0"
+ resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167"
babel-plugin-syntax-async-functions@^6.8.0:
version "6.13.0"
@@ -1152,11 +1153,11 @@ babel-preset-flow@6.23.0, babel-preset-flow@^6.23.0:
dependencies:
babel-plugin-transform-flow-strip-types "^6.22.0"
-babel-preset-jest@^22.2.0:
- version "22.2.0"
- resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-22.2.0.tgz#f77b43f06ef4d8547214b2e206cc76a25c3ba0e2"
+babel-preset-jest@^23.2.0:
+ version "23.2.0"
+ resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46"
dependencies:
- babel-plugin-jest-hoist "^22.2.0"
+ babel-plugin-jest-hoist "^23.2.0"
babel-plugin-syntax-object-rest-spread "^6.13.0"
babel-preset-react@6.24.1:
@@ -1218,7 +1219,7 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0:
babylon "^6.18.0"
lodash "^4.17.4"
-babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0:
+babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
dependencies:
@@ -1232,7 +1233,7 @@ babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0:
invariant "^2.2.2"
lodash "^4.17.4"
-babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0:
+babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
dependencies:
@@ -1385,9 +1386,9 @@ browser-process-hrtime@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz#425d68a58d3447f02a04aa894187fce8af8b7b8e"
-browser-resolve@^1.11.2:
- version "1.11.2"
- resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.2.tgz#8ff09b0a2c421718a1051c260b32e48f442938ce"
+browser-resolve@^1.11.3:
+ version "1.11.3"
+ resolved "https://registry.yarnpkg.com/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6"
dependencies:
resolve "1.1.7"
@@ -1459,6 +1460,10 @@ buffer-es6@^4.9.2, buffer-es6@^4.9.3:
version "4.9.3"
resolved "https://registry.yarnpkg.com/buffer-es6/-/buffer-es6-4.9.3.tgz#f26347b82df76fd37e18bcb5288c4970cfd5c404"
+buffer-from@^1.0.0:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
+
buffer-xor@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
@@ -1727,14 +1732,6 @@ cliui@^2.1.0:
right-align "^0.1.1"
wordwrap "0.0.2"
-cliui@^3.2.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
- dependencies:
- string-width "^1.0.1"
- strip-ansi "^3.0.1"
- wrap-ansi "^2.0.0"
-
cliui@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.0.0.tgz#743d4650e05f36d1ed2575b59638d87322bfbbcc"
@@ -2858,16 +2855,16 @@ expand-range@^1.8.1:
dependencies:
fill-range "^2.1.0"
-expect@22.3.0, expect@^22.3.0:
- version "22.3.0"
- resolved "https://registry.yarnpkg.com/expect/-/expect-22.3.0.tgz#b1cb7db27a951ab6055f43937277152a9f668028"
+expect@23.6.0, expect@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98"
dependencies:
ansi-styles "^3.2.0"
- jest-diff "^22.1.0"
+ jest-diff "^23.6.0"
jest-get-type "^22.1.0"
- jest-matcher-utils "^22.2.0"
- jest-message-util "^22.2.0"
- jest-regex-util "^22.1.0"
+ jest-matcher-utils "^23.6.0"
+ jest-message-util "^23.4.0"
+ jest-regex-util "^23.3.0"
extend-shallow@^2.0.1:
version "2.0.1"
@@ -3699,6 +3696,12 @@ invariant@^2.2.2:
dependencies:
loose-envify "^1.0.0"
+invariant@^2.2.4:
+ version "2.2.4"
+ resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
+ dependencies:
+ loose-envify "^1.0.0"
+
invert-kv@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6"
@@ -4110,78 +4113,78 @@ isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
-istanbul-api@^1.1.14:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.2.1.tgz#0c60a0515eb11c7d65c6b50bba2c6e999acd8620"
+istanbul-api@^1.3.1:
+ version "1.3.7"
+ resolved "https://registry.yarnpkg.com/istanbul-api/-/istanbul-api-1.3.7.tgz#a86c770d2b03e11e3f778cd7aedd82d2722092aa"
dependencies:
async "^2.1.4"
fileset "^2.0.2"
- istanbul-lib-coverage "^1.1.1"
- istanbul-lib-hook "^1.1.0"
- istanbul-lib-instrument "^1.9.1"
- istanbul-lib-report "^1.1.2"
- istanbul-lib-source-maps "^1.2.2"
- istanbul-reports "^1.1.3"
+ istanbul-lib-coverage "^1.2.1"
+ istanbul-lib-hook "^1.2.2"
+ istanbul-lib-instrument "^1.10.2"
+ istanbul-lib-report "^1.1.5"
+ istanbul-lib-source-maps "^1.2.6"
+ istanbul-reports "^1.5.1"
js-yaml "^3.7.0"
mkdirp "^0.5.1"
once "^1.4.0"
-istanbul-lib-coverage@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.1.1.tgz#73bfb998885299415c93d38a3e9adf784a77a9da"
+istanbul-lib-coverage@^1.2.0, istanbul-lib-coverage@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0"
-istanbul-lib-hook@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b"
+istanbul-lib-hook@^1.2.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86"
dependencies:
append-transform "^0.4.0"
-istanbul-lib-instrument@^1.7.5, istanbul-lib-instrument@^1.8.0, istanbul-lib-instrument@^1.9.1:
- version "1.9.1"
- resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.9.1.tgz#250b30b3531e5d3251299fdd64b0b2c9db6b558e"
+istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.10.2:
+ version "1.10.2"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca"
dependencies:
babel-generator "^6.18.0"
babel-template "^6.16.0"
babel-traverse "^6.18.0"
babel-types "^6.18.0"
babylon "^6.18.0"
- istanbul-lib-coverage "^1.1.1"
+ istanbul-lib-coverage "^1.2.1"
semver "^5.3.0"
-istanbul-lib-report@^1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.2.tgz#922be27c13b9511b979bd1587359f69798c1d425"
+istanbul-lib-report@^1.1.5:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c"
dependencies:
- istanbul-lib-coverage "^1.1.1"
+ istanbul-lib-coverage "^1.2.1"
mkdirp "^0.5.1"
path-parse "^1.0.5"
supports-color "^3.1.2"
-istanbul-lib-source-maps@^1.2.1, istanbul-lib-source-maps@^1.2.2:
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.2.tgz#750578602435f28a0c04ee6d7d9e0f2960e62c1c"
+istanbul-lib-source-maps@^1.2.4, istanbul-lib-source-maps@^1.2.6:
+ version "1.2.6"
+ resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f"
dependencies:
debug "^3.1.0"
- istanbul-lib-coverage "^1.1.1"
+ istanbul-lib-coverage "^1.2.1"
mkdirp "^0.5.1"
rimraf "^2.6.1"
source-map "^0.5.3"
-istanbul-reports@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.1.3.tgz#3b9e1e8defb6d18b1d425da8e8b32c5a163f2d10"
+istanbul-reports@^1.5.1:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a"
dependencies:
handlebars "^4.0.3"
-jest-changed-files@^22.2.0:
- version "22.2.0"
- resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-22.2.0.tgz#517610c4a8ca0925bdc88b0ca53bd678aa8d019e"
+jest-changed-files@^23.4.2:
+ version "23.4.2"
+ resolved "https://registry.yarnpkg.com/jest-changed-files/-/jest-changed-files-23.4.2.tgz#1eed688370cd5eebafe4ae93d34bb3b64968fe83"
dependencies:
throat "^4.0.0"
-jest-cli@^22.3.0:
- version "22.3.0"
- resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-22.3.0.tgz#3fd986f2674f4168c91965be56ab9917a82a45db"
+jest-cli@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-cli/-/jest-cli-23.6.0.tgz#61ab917744338f443ef2baa282ddffdd658a5da4"
dependencies:
ansi-escapes "^3.0.0"
chalk "^2.0.1"
@@ -4190,127 +4193,143 @@ jest-cli@^22.3.0:
graceful-fs "^4.1.11"
import-local "^1.0.0"
is-ci "^1.0.10"
- istanbul-api "^1.1.14"
- istanbul-lib-coverage "^1.1.1"
- istanbul-lib-instrument "^1.8.0"
- istanbul-lib-source-maps "^1.2.1"
- jest-changed-files "^22.2.0"
- jest-config "^22.3.0"
- jest-environment-jsdom "^22.3.0"
+ istanbul-api "^1.3.1"
+ istanbul-lib-coverage "^1.2.0"
+ istanbul-lib-instrument "^1.10.1"
+ istanbul-lib-source-maps "^1.2.4"
+ jest-changed-files "^23.4.2"
+ jest-config "^23.6.0"
+ jest-environment-jsdom "^23.4.0"
jest-get-type "^22.1.0"
- jest-haste-map "^22.3.0"
- jest-message-util "^22.2.0"
- jest-regex-util "^22.1.0"
- jest-resolve-dependencies "^22.1.0"
- jest-runner "^22.3.0"
- jest-runtime "^22.3.0"
- jest-snapshot "^22.2.0"
- jest-util "^22.3.0"
- jest-worker "^22.2.2"
+ jest-haste-map "^23.6.0"
+ jest-message-util "^23.4.0"
+ jest-regex-util "^23.3.0"
+ jest-resolve-dependencies "^23.6.0"
+ jest-runner "^23.6.0"
+ jest-runtime "^23.6.0"
+ jest-snapshot "^23.6.0"
+ jest-util "^23.4.0"
+ jest-validate "^23.6.0"
+ jest-watcher "^23.4.0"
+ jest-worker "^23.2.0"
micromatch "^2.3.11"
node-notifier "^5.2.1"
+ prompts "^0.1.9"
realpath-native "^1.0.0"
rimraf "^2.5.4"
slash "^1.0.0"
string-length "^2.0.0"
strip-ansi "^4.0.0"
which "^1.2.12"
- yargs "^10.0.3"
+ yargs "^11.0.0"
-jest-config@^22.3.0:
- version "22.3.0"
- resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-22.3.0.tgz#94c7149f123933a872ee24c1719687419c4a623c"
+jest-config@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d"
dependencies:
+ babel-core "^6.0.0"
+ babel-jest "^23.6.0"
chalk "^2.0.1"
glob "^7.1.1"
- jest-environment-jsdom "^22.3.0"
- jest-environment-node "^22.3.0"
+ jest-environment-jsdom "^23.4.0"
+ jest-environment-node "^23.4.0"
jest-get-type "^22.1.0"
- jest-jasmine2 "^22.3.0"
- jest-regex-util "^22.1.0"
- jest-resolve "^22.3.0"
- jest-util "^22.3.0"
- jest-validate "^22.2.2"
- pretty-format "^22.1.0"
-
-jest-diff@^22.1.0:
- version "22.1.0"
- resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-22.1.0.tgz#0fad9d96c87b453896bf939df3dc8aac6919ac38"
+ jest-jasmine2 "^23.6.0"
+ jest-regex-util "^23.3.0"
+ jest-resolve "^23.6.0"
+ jest-util "^23.4.0"
+ jest-validate "^23.6.0"
+ micromatch "^2.3.11"
+ pretty-format "^23.6.0"
+
+jest-diff@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d"
dependencies:
chalk "^2.0.1"
diff "^3.2.0"
jest-get-type "^22.1.0"
- pretty-format "^22.1.0"
+ pretty-format "^23.6.0"
-jest-docblock@^22.2.2:
- version "22.2.2"
- resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-22.2.2.tgz#617f13edb16ec64202002b3c336cd14ae36c0631"
+jest-docblock@^23.2.0:
+ version "23.2.0"
+ resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7"
dependencies:
detect-newline "^2.1.0"
-jest-environment-jsdom@^22.3.0:
- version "22.3.0"
- resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-22.3.0.tgz#c267a063e5dc16219fba0e07542d8aa2576a1c88"
+jest-each@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575"
dependencies:
- jest-mock "^22.2.0"
- jest-util "^22.3.0"
+ chalk "^2.0.1"
+ pretty-format "^23.6.0"
+
+jest-environment-jsdom@^23.4.0:
+ version "23.4.0"
+ resolved "https://registry.yarnpkg.com/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023"
+ dependencies:
+ jest-mock "^23.2.0"
+ jest-util "^23.4.0"
jsdom "^11.5.1"
-jest-environment-node@^22.3.0:
- version "22.3.0"
- resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-22.3.0.tgz#97d34d9706a718d743075149d1950555c10338c0"
+jest-environment-node@^23.4.0:
+ version "23.4.0"
+ resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10"
dependencies:
- jest-mock "^22.2.0"
- jest-util "^22.3.0"
+ jest-mock "^23.2.0"
+ jest-util "^23.4.0"
jest-get-type@^22.1.0:
version "22.1.0"
resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-22.1.0.tgz#4e90af298ed6181edc85d2da500dbd2753e0d5a9"
-jest-haste-map@^22.3.0:
- version "22.3.0"
- resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-22.3.0.tgz#e7f048a88735bae07ca12de8785eb8bc522adeab"
+jest-haste-map@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-23.6.0.tgz#2e3eb997814ca696d62afdb3f2529f5bbc935e16"
dependencies:
fb-watchman "^2.0.0"
graceful-fs "^4.1.11"
- jest-docblock "^22.2.2"
- jest-worker "^22.2.2"
+ invariant "^2.2.4"
+ jest-docblock "^23.2.0"
+ jest-serializer "^23.0.1"
+ jest-worker "^23.2.0"
micromatch "^2.3.11"
sane "^2.0.0"
-jest-jasmine2@^22.3.0:
- version "22.3.0"
- resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-22.3.0.tgz#ea127dfbb04c6e03998ae0358225435e47520666"
+jest-jasmine2@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0"
dependencies:
- callsites "^2.0.0"
+ babel-traverse "^6.0.0"
chalk "^2.0.1"
co "^4.6.0"
- expect "^22.3.0"
- graceful-fs "^4.1.11"
+ expect "^23.6.0"
is-generator-fn "^1.0.0"
- jest-diff "^22.1.0"
- jest-matcher-utils "^22.2.0"
- jest-message-util "^22.2.0"
- jest-snapshot "^22.2.0"
- source-map-support "^0.5.0"
+ jest-diff "^23.6.0"
+ jest-each "^23.6.0"
+ jest-matcher-utils "^23.6.0"
+ jest-message-util "^23.4.0"
+ jest-snapshot "^23.6.0"
+ jest-util "^23.4.0"
+ pretty-format "^23.6.0"
-jest-leak-detector@^22.1.0:
- version "22.1.0"
- resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-22.1.0.tgz#08376644cee07103da069baac19adb0299b772c2"
+jest-leak-detector@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz#e4230fd42cf381a1a1971237ad56897de7e171de"
dependencies:
- pretty-format "^22.1.0"
+ pretty-format "^23.6.0"
-jest-matcher-utils@^22.2.0:
- version "22.2.0"
- resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-22.2.0.tgz#5390f823c18c748543d463825aa8e4df0db253ca"
+jest-matcher-utils@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80"
dependencies:
chalk "^2.0.1"
jest-get-type "^22.1.0"
- pretty-format "^22.1.0"
+ pretty-format "^23.6.0"
-jest-message-util@^22.2.0:
- version "22.2.0"
- resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-22.2.0.tgz#84a6bb34186d8b9af7e0732fabbef63f7355f7b2"
+jest-message-util@^23.4.0:
+ version "23.4.0"
+ resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f"
dependencies:
"@babel/code-frame" "^7.0.0-beta.35"
chalk "^2.0.1"
@@ -4318,120 +4337,143 @@ jest-message-util@^22.2.0:
slash "^1.0.0"
stack-utils "^1.0.1"
-jest-mock@^22.2.0:
- version "22.2.0"
- resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-22.2.0.tgz#444b3f9488a7473adae09bc8a77294afded397a7"
+jest-mock@^23.2.0:
+ version "23.2.0"
+ resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134"
-jest-regex-util@^22.1.0:
- version "22.1.0"
- resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-22.1.0.tgz#5daf2fe270074b6da63e5d85f1c9acc866768f53"
+jest-regex-util@^23.3.0:
+ version "23.3.0"
+ resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5"
-jest-resolve-dependencies@^22.1.0:
- version "22.1.0"
- resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-22.1.0.tgz#340e4139fb13315cd43abc054e6c06136be51e31"
+jest-resolve-dependencies@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz#b4526af24c8540d9a3fab102c15081cf509b723d"
dependencies:
- jest-regex-util "^22.1.0"
+ jest-regex-util "^23.3.0"
+ jest-snapshot "^23.6.0"
-jest-resolve@^22.3.0:
- version "22.3.0"
- resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-22.3.0.tgz#648e797f708e8701071a0fa9fac652c577bb66d9"
+jest-resolve@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae"
dependencies:
- browser-resolve "^1.11.2"
+ browser-resolve "^1.11.3"
chalk "^2.0.1"
+ realpath-native "^1.0.0"
-jest-runner@^22.3.0:
- version "22.3.0"
- resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-22.3.0.tgz#70393f62770be754e2d14f5ca3d896e408aa001a"
+jest-runner@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-23.6.0.tgz#3894bd219ffc3f3cb94dc48a4170a2e6f23a5a38"
dependencies:
exit "^0.1.2"
- jest-config "^22.3.0"
- jest-docblock "^22.2.2"
- jest-haste-map "^22.3.0"
- jest-jasmine2 "^22.3.0"
- jest-leak-detector "^22.1.0"
- jest-message-util "^22.2.0"
- jest-runtime "^22.3.0"
- jest-util "^22.3.0"
- jest-worker "^22.2.2"
+ graceful-fs "^4.1.11"
+ jest-config "^23.6.0"
+ jest-docblock "^23.2.0"
+ jest-haste-map "^23.6.0"
+ jest-jasmine2 "^23.6.0"
+ jest-leak-detector "^23.6.0"
+ jest-message-util "^23.4.0"
+ jest-runtime "^23.6.0"
+ jest-util "^23.4.0"
+ jest-worker "^23.2.0"
+ source-map-support "^0.5.6"
throat "^4.0.0"
-jest-runtime@^22.3.0:
- version "22.3.0"
- resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-22.3.0.tgz#1883d6a4227c1f6af276ead3ed27654257d1ef8c"
+jest-runtime@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-23.6.0.tgz#059e58c8ab445917cd0e0d84ac2ba68de8f23082"
dependencies:
babel-core "^6.0.0"
- babel-jest "^22.2.2"
- babel-plugin-istanbul "^4.1.5"
+ babel-plugin-istanbul "^4.1.6"
chalk "^2.0.1"
convert-source-map "^1.4.0"
exit "^0.1.2"
+ fast-json-stable-stringify "^2.0.0"
graceful-fs "^4.1.11"
- jest-config "^22.3.0"
- jest-haste-map "^22.3.0"
- jest-regex-util "^22.1.0"
- jest-resolve "^22.3.0"
- jest-util "^22.3.0"
- json-stable-stringify "^1.0.1"
+ jest-config "^23.6.0"
+ jest-haste-map "^23.6.0"
+ jest-message-util "^23.4.0"
+ jest-regex-util "^23.3.0"
+ jest-resolve "^23.6.0"
+ jest-snapshot "^23.6.0"
+ jest-util "^23.4.0"
+ jest-validate "^23.6.0"
micromatch "^2.3.11"
realpath-native "^1.0.0"
slash "^1.0.0"
strip-bom "3.0.0"
write-file-atomic "^2.1.0"
- yargs "^10.0.3"
+ yargs "^11.0.0"
-jest-snapshot@^22.2.0:
- version "22.2.0"
- resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-22.2.0.tgz#0c0ba152d296ef70fa198cc84977a2cc269ee4cf"
+jest-serializer@^23.0.1:
+ version "23.0.1"
+ resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165"
+
+jest-snapshot@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a"
dependencies:
+ babel-types "^6.0.0"
chalk "^2.0.1"
- jest-diff "^22.1.0"
- jest-matcher-utils "^22.2.0"
+ jest-diff "^23.6.0"
+ jest-matcher-utils "^23.6.0"
+ jest-message-util "^23.4.0"
+ jest-resolve "^23.6.0"
mkdirp "^0.5.1"
natural-compare "^1.4.0"
- pretty-format "^22.1.0"
+ pretty-format "^23.6.0"
+ semver "^5.5.0"
-jest-util@^22.3.0:
- version "22.3.0"
- resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-22.3.0.tgz#d05bff567a3a86c0e9b3838d812f8290aa768097"
+jest-util@^23.4.0:
+ version "23.4.0"
+ resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561"
dependencies:
callsites "^2.0.0"
chalk "^2.0.1"
graceful-fs "^4.1.11"
is-ci "^1.0.10"
- jest-message-util "^22.2.0"
- jest-validate "^22.2.2"
+ jest-message-util "^23.4.0"
mkdirp "^0.5.1"
+ slash "^1.0.0"
+ source-map "^0.6.0"
-jest-validate@^22.2.2:
- version "22.2.2"
- resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-22.2.2.tgz#9cdce422c93cc28395e907ac6bbc929158d9a6ba"
+jest-validate@^23.5.0:
+ version "23.5.0"
+ resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.5.0.tgz#f5df8f761cf43155e1b2e21d6e9de8a2852d0231"
dependencies:
chalk "^2.0.1"
jest-get-type "^22.1.0"
leven "^2.1.0"
- pretty-format "^22.1.0"
+ pretty-format "^23.5.0"
-jest-validate@^23.5.0:
- version "23.5.0"
- resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.5.0.tgz#f5df8f761cf43155e1b2e21d6e9de8a2852d0231"
+jest-validate@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474"
dependencies:
chalk "^2.0.1"
jest-get-type "^22.1.0"
leven "^2.1.0"
- pretty-format "^23.5.0"
+ pretty-format "^23.6.0"
+
+jest-watcher@^23.4.0:
+ version "23.4.0"
+ resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-23.4.0.tgz#d2e28ce74f8dad6c6afc922b92cabef6ed05c91c"
+ dependencies:
+ ansi-escapes "^3.0.0"
+ chalk "^2.0.1"
+ string-length "^2.0.0"
-jest-worker@^22.2.2:
- version "22.2.2"
- resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-22.2.2.tgz#c1f5dc39976884b81f68ec50cb8532b2cbab3390"
+jest-worker@^23.2.0:
+ version "23.2.0"
+ resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9"
dependencies:
merge-stream "^1.0.1"
-jest@22.3.0:
- version "22.3.0"
- resolved "https://registry.yarnpkg.com/jest/-/jest-22.3.0.tgz#07434314d2e8662ea936552d950680b7e6551b0d"
+jest@23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d"
dependencies:
import-local "^1.0.0"
- jest-cli "^22.3.0"
+ jest-cli "^23.6.0"
js-tokens@^3.0.0, js-tokens@^3.0.2:
version "3.0.2"
@@ -4593,6 +4635,10 @@ kind-of@^6.0.0, kind-of@^6.0.2:
version "6.0.2"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.2.tgz#01146b36a6218e64e58f3a8d66de5d7fc6f6d051"
+kleur@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/kleur/-/kleur-2.0.2.tgz#b704f4944d95e255d038f0cb05fb8a602c55a300"
+
latest-version@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15"
@@ -5831,16 +5877,16 @@ prettier@1.16.0:
version "1.16.0"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.16.0.tgz#104dd25f5ee3d0c9d0a6ce4bb40ced8481d51219"
-pretty-format@^22.1.0:
- version "22.1.0"
- resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-22.1.0.tgz#2277605b40ed4529ae4db51ff62f4be817647914"
+pretty-format@^23.5.0:
+ version "23.5.0"
+ resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.5.0.tgz#0f9601ad9da70fe690a269cd3efca732c210687c"
dependencies:
ansi-regex "^3.0.0"
ansi-styles "^3.2.0"
-pretty-format@^23.5.0:
- version "23.5.0"
- resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.5.0.tgz#0f9601ad9da70fe690a269cd3efca732c210687c"
+pretty-format@^23.6.0:
+ version "23.6.0"
+ resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760"
dependencies:
ansi-regex "^3.0.0"
ansi-styles "^3.2.0"
@@ -5865,6 +5911,13 @@ progress@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f"
+prompts@^0.1.9:
+ version "0.1.14"
+ resolved "https://registry.yarnpkg.com/prompts/-/prompts-0.1.14.tgz#a8e15c612c5c9ec8f8111847df3337c9cbd443b2"
+ dependencies:
+ kleur "^2.0.1"
+ sisteransi "^0.1.1"
+
prop-types@^15.6.2:
version "15.6.2"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102"
@@ -6727,6 +6780,10 @@ simple-git@^1.85.0:
dependencies:
debug "^4.0.1"
+sisteransi@^0.1.1:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-0.1.1.tgz#5431447d5f7d1675aac667ccd0b865a4994cb3ce"
+
slash@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
@@ -6800,10 +6857,11 @@ source-map-support@^0.4.15:
dependencies:
source-map "^0.5.6"
-source-map-support@^0.5.0:
- version "0.5.0"
- resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.0.tgz#2018a7ad2bdf8faf2691e5fddab26bed5a2bacab"
+source-map-support@^0.5.6:
+ version "0.5.9"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f"
dependencies:
+ buffer-from "^1.0.0"
source-map "^0.6.0"
source-map-url@^0.4.0:
@@ -7108,9 +7166,9 @@ term-size@^1.2.0:
dependencies:
execa "^0.7.0"
-test-exclude@^4.1.1:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.1.1.tgz#4d84964b0966b0087ecc334a2ce002d3d9341e26"
+test-exclude@^4.2.1:
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20"
dependencies:
arrify "^1.0.1"
micromatch "^2.3.11"
@@ -7703,17 +7761,17 @@ yargs-parser@^10.1.0:
dependencies:
camelcase "^4.1.0"
-yargs-parser@^8.0.0:
- version "8.0.0"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-8.0.0.tgz#21d476330e5a82279a4b881345bf066102e219c6"
+yargs-parser@^9.0.2:
+ version "9.0.2"
+ resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077"
dependencies:
camelcase "^4.1.0"
-yargs@^10.0.3:
- version "10.0.3"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.0.3.tgz#6542debd9080ad517ec5048fb454efe9e4d4aaae"
+yargs@^11.0.0:
+ version "11.1.0"
+ resolved "http://registry.npmjs.org/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77"
dependencies:
- cliui "^3.2.0"
+ cliui "^4.0.0"
decamelize "^1.1.1"
find-up "^2.1.0"
get-caller-file "^1.0.1"
@@ -7724,7 +7782,7 @@ yargs@^10.0.3:
string-width "^2.0.0"
which-module "^2.0.0"
y18n "^3.2.1"
- yargs-parser "^8.0.0"
+ yargs-parser "^9.0.2"
yargs@^12.0.1:
version "12.0.1"