Skip to content

Commit

Permalink
chore: update deps (jestjs#7618)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB authored Jan 13, 2019
1 parent c6b214b commit 066f0e3
Show file tree
Hide file tree
Showing 23 changed files with 1,926 additions and 2,233 deletions.
3 changes: 2 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[ignore]
.*/examples/.*
.*/node_modules/metro-bundler/.*
.*/node_modules/metro/.*
.*/node_modules/module-deps/.*

[options]
Expand All @@ -18,4 +19,4 @@ untyped-import
untyped-type-import

[version]
^0.85.0
^0.90.0
6 changes: 6 additions & 0 deletions examples/react-native/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
preset: 'react-native',
transform: {
'^.+\\.js$': require.resolve('react-native/jest/preprocessor.js'),
},
};
10 changes: 2 additions & 8 deletions examples/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,14 @@
"test": "jest"
},
"dependencies": {
"react": "16.6.0-alpha.8af6728",
"react-native": "0.57.3"
"react": "16.6.3",
"react-native": "0.57.8"
},
"devDependencies": {
"@babel/preset-env": "*",
"babel-jest": "*",
"jest": "*",
"metro-react-native-babel-preset": "*",
"react-test-renderer": "*"
},
"jest": {
"preset": "react-native",
"transform": {
"^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
}
}
}
4 changes: 2 additions & 2 deletions examples/react-testing-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.0.0",
"name": "example-react-testing-library",
"dependencies": {
"react": "^16.4.0",
"react-dom": "^16.4.0"
"react": "^16.7.0",
"react-dom": "^16.7.0"
},
"devDependencies": {
"@babel/preset-env": "*",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lerna": "3.4.0",
"lerna": "3.10.5",
"version": "23.6.0",
"npmClient": "yarn",
"useWorkspaces": true
Expand Down
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"private": true,
"devDependencies": {
"@babel/core": "^7.1.0",
"@babel/plugin-external-helpers": "^7.0.0",
"@babel/plugin-transform-strict-mode": "^7.0.0",
"@babel/preset-env": "^7.1.0",
"@babel/preset-flow": "^7.0.0",
Expand All @@ -23,26 +22,26 @@
"eslint-plugin-jest": "^22.0.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-markdown": "^1.0.0-beta.6",
"eslint-plugin-prettier": "^2.7.0",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.1.0",
"eslint-plugin-relay": "~0.0.19",
"execa": "^1.0.0",
"flow-bin": "^0.85.0",
"flow-bin": "^0.90.0",
"glob": "^7.1.1",
"graceful-fs": "^4.1.15",
"isbinaryfile": "^3.0.3",
"istanbul-api": "^2.0.8",
"istanbul-lib-coverage": "^2.0.2",
"jasmine-reporters": "^2.2.0",
"jest-junit": "^5.1.0",
"jest-junit": "^6.0.1",
"jest-silent-reporter": "^0.1.1",
"jquery": "^3.2.1",
"karma": "^3.0.0",
"karma-browserify": "^5.1.1",
"karma": "^3.1.4",
"karma-browserify": "^6.0.0",
"karma-chrome-launcher": "^2.1.1",
"karma-mocha": "^1.3.0",
"left-pad": "^1.1.1",
"lerna": "3.4.0",
"lerna": "3.10.5",
"micromatch": "^2.3.11",
"mkdirp": "^0.5.1",
"mocha": "^5.0.1",
Expand All @@ -55,14 +54,14 @@
"regenerator-runtime": "^0.12.1",
"resolve": "^1.4.0",
"rimraf": "^2.6.2",
"rollup": "^0.66.1",
"rollup-plugin-babel": "^4.0.0",
"rollup": "^1.1.0",
"rollup-plugin-babel": "^4.3.0",
"rollup-plugin-commonjs": "^9.1.8",
"rollup-plugin-flow": "^1.1.1",
"rollup-plugin-json": "^3.1.0",
"rollup-plugin-node-builtins": "^2.1.1",
"rollup-plugin-node-globals": "^1.4.0",
"rollup-plugin-node-resolve": "^3.4.0",
"rollup-plugin-node-resolve": "^4.0.0",
"slash": "^2.0.0",
"string-length": "^2.0.0",
"strip-ansi": "^5.0.0",
Expand Down
3 changes: 0 additions & 3 deletions packages/babel-plugin-jest-hoist/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,6 @@ FUNCTIONS.disableAutomock = FUNCTIONS.enableAutomock = args =>
args.length === 0;

module.exports = () => {
const isJest = callee =>
callee.get('object').isIdentifier(JEST_GLOBAL) ||
(callee.isMemberExpression() && isJest(callee.get('object')));
const shouldHoistExpression = expr => {
if (!expr.isCallExpression()) {
return false;
Expand Down
6 changes: 3 additions & 3 deletions packages/eslint-config-fb-strict/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"eslint-config-fbjs": "^2.1.0"
},
"peerDependencies": {
"babel-eslint": "^9.0.0",
"babel-eslint": "^9.0.0 || ^10.0.0",
"eslint": "^4.2.0 || ^5.0.0",
"eslint-plugin-babel": "^5.0.0",
"eslint-plugin-flowtype": "^2.35.0",
"eslint-plugin-flowtype": "^2.35.0 || ^3.0.0",
"eslint-plugin-jest": "^21.0.0 || ^22.0.0",
"eslint-plugin-jsx-a11y": "^6.0.2",
"eslint-plugin-react": "^7.1.0",
"eslint-plugin-relay": "~0.0.8"
"eslint-plugin-relay": "~0.0.8 || ^1.0.0"
},
"engines": {
"node": ">= 6"
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-circus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"chalk": "^2.0.1",
"co": "^4.6.0",
"expect": "^23.6.0",
"is-generator-fn": "^1.0.0",
"is-generator-fn": "^2.0.0",
"jest-diff": "^23.6.0",
"jest-each": "^23.6.0",
"jest-matcher-utils": "^23.6.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/jest-circus/src/eventHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @flow strict-local
*/

import type {EventHandler} from 'types/Circus';
import type {EventHandler, Exception} from 'types/Circus';

import {
addErrorToEachTestUnderDescribe,
Expand Down Expand Up @@ -130,7 +130,8 @@ const eventHandler: EventHandler = (event, state): void => {
break;
}
case 'test_retry': {
event.test.errors = [];
const errors: Array<[?Exception, Exception]> = [];
event.test.errors = errors;
break;
}
case 'run_start': {
Expand Down
4 changes: 3 additions & 1 deletion packages/jest-circus/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,12 @@ export const makeTest = (
_mode = parent.mode;
}

const errors: Array<[?Exception, Exception]> = [];

return {
asyncError,
duration: null,
errors: [],
errors,
fn,
invocations: 0,
mode: _mode,
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"glob": "^7.1.2",
"graceful-fs": "^4.1.15",
"import-local": "^2.0.0",
"is-ci": "^1.0.10",
"is-ci": "^2.0.0",
"istanbul-api": "^2.0.8",
"istanbul-lib-coverage": "^2.0.2",
"istanbul-lib-instrument": "^3.0.1",
Expand All @@ -32,7 +32,7 @@
"jest-worker": "^23.2.0",
"micromatch": "^2.3.11",
"node-notifier": "^5.2.1",
"prompts": "^1.1.0",
"prompts": "^2.0.1",
"realpath-native": "^1.0.0",
"rimraf": "^2.5.4",
"slash": "^2.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/jest-cli/src/plugins/quit.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class QuitPlugin extends BaseWatchPlugin {

async run() {
if (typeof this._stdin.setRawMode === 'function') {
// $FlowFixMe
this._stdin.setRawMode(false);
}
this._stdout.write('\n');
Expand Down
2 changes: 2 additions & 0 deletions packages/jest-cli/src/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ export default function watch(
const onKeypress = (key: string) => {
if (key === KEYS.CONTROL_C || key === KEYS.CONTROL_D) {
if (typeof stdin.setRawMode === 'function') {
// $FlowFixMe
stdin.setRawMode(false);
}
outputStream.write('\n');
Expand Down Expand Up @@ -400,6 +401,7 @@ export default function watch(
};

if (typeof stdin.setRawMode === 'function') {
// $FlowFixMe
stdin.setRawMode(true);
stdin.resume();
stdin.setEncoding('utf8');
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-jasmine2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"chalk": "^2.0.1",
"co": "^4.6.0",
"expect": "^23.6.0",
"is-generator-fn": "^1.0.0",
"is-generator-fn": "^2.0.0",
"jest-diff": "^23.6.0",
"jest-each": "^23.6.0",
"jest-matcher-utils": "^23.6.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"license": "MIT",
"main": "build/index.js",
"dependencies": {
"callsites": "^2.0.0",
"callsites": "^3.0.0",
"chalk": "^2.0.1",
"graceful-fs": "^4.1.15",
"is-ci": "^1.0.10",
"is-ci": "^2.0.0",
"jest-message-util": "^23.4.0",
"mkdirp": "^0.5.1",
"slash": "^2.0.0",
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-util/src/convertDescriptorToString.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ export default function convertDescriptorToString(
const stringified = descriptor.toString();
const typeDescriptorMatch = stringified.match(/class|function/);
const indexOfNameSpace =
// $FlowFixMe
typeDescriptorMatch.index + typeDescriptorMatch[0].length;
// $FlowFixMe
const indexOfNameAfterSpace = stringified.search(/\(|\{/, indexOfNameSpace);
const name = stringified.substring(indexOfNameSpace, indexOfNameAfterSpace);
return name.trim();
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"main": "build/index.js",
"dependencies": {
"merge-stream": "^1.0.1",
"supports-color": "^5.5.0"
"supports-color": "^6.1.0"
},
"engines": {
"node": ">= 6"
Expand Down
2 changes: 0 additions & 2 deletions packages/jest-worker/src/workers/ChildProcessWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export default class ChildProcessWorker implements WorkerInterface {
child.on('message', this.onMessage.bind(this));
child.on('exit', this.onExit.bind(this));

// $FlowFixMe: wrong "ChildProcess.send" signature.
child.send([
CHILD_MESSAGE_INITIALIZE,
false,
Expand Down Expand Up @@ -165,7 +164,6 @@ export default class ChildProcessWorker implements WorkerInterface {
this._onProcessEnd = onProcessEnd;

this._retries = 0;
// $FlowFixMe
this._child.send(request);
}

Expand Down
1 change: 0 additions & 1 deletion packages/pretty-format/src/__tests__/react.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,6 @@ test('supports forwardRef with a child', () => {
}

expect(
// $FlowFixMe - https://github.com/facebook/flow/issues/6103
formatElement(React.createElement(React.forwardRef(Cat), null, 'mouse')),
).toEqual('<ForwardRef(Cat)>\n mouse\n</ForwardRef(Cat)>');
});
Expand Down
3 changes: 0 additions & 3 deletions packages/pretty-format/src/plugins/ReactTestComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ export const serialize = (
object.props
? printProps(
getPropKeys(object),
// Despite ternary expression, Flow 0.51.0 found incorrect error:
// undefined is incompatible with the expected param type of Object
// $FlowFixMe
object.props,
config,
indentation + config.indent,
Expand Down
9 changes: 2 additions & 7 deletions scripts/browserBuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ const babelEs5Options = {
// Dont load other config files
babelrc: false,
configFile: false,
plugins: [
'@babel/plugin-transform-strict-mode',
'@babel/plugin-external-helpers',
],
plugins: ['@babel/plugin-transform-strict-mode'],
presets: [
[
'@babel/preset-env',
Expand All @@ -42,8 +39,7 @@ const babelEs5Options = {

function browserBuild(pkgName, entryPath, destination) {
return rollup({
entry: entryPath,
onwarn: () => {},
input: entryPath,
plugins: [
{
resolveId(id) {
Expand All @@ -60,7 +56,6 @@ function browserBuild(pkgName, entryPath, destination) {
rollupBuiltins(),
rollupResolve(),
],
strict: false,
}).then(bundle =>
bundle.write({
file: destination,
Expand Down
Loading

0 comments on commit 066f0e3

Please sign in to comment.