diff --git a/package.json b/package.json index 081973184bb..0a3be799398 100644 --- a/package.json +++ b/package.json @@ -25,13 +25,13 @@ "get-port": "^4.2.0", "globby": "^9.1.0", "husky": "^1.3.1", - "jest": "24.7.1", - "lerna": "3.13.2", + "jest": "24.8.0", + "lerna": "3.16.4", "lerna-changelog": "~0.8.2", "lint-staged": "^8.0.4", "meow": "^5.0.0", "multimatch": "^3.0.0", - "prettier": "1.16.4", + "prettier": "1.18.2", "puppeteer": "^1.13.0", "strip-ansi": "^5.1.0", "svg-term-cli": "^2.1.1", diff --git a/packages/babel-plugin-named-asset-import/package.json b/packages/babel-plugin-named-asset-import/package.json index f58812bf83d..e0343d2dd1c 100644 --- a/packages/babel-plugin-named-asset-import/package.json +++ b/packages/babel-plugin-named-asset-import/package.json @@ -20,7 +20,7 @@ }, "devDependencies": { "babel-plugin-tester": "^6.0.1", - "jest": "24.7.1" + "jest": "24.8.0" }, "scripts": { "test": "jest" diff --git a/packages/babel-preset-react-app/package.json b/packages/babel-preset-react-app/package.json index 8d36e24c037..56c3bd0aaf5 100644 --- a/packages/babel-preset-react-app/package.json +++ b/packages/babel-preset-react-app/package.json @@ -21,23 +21,23 @@ "test.js" ], "dependencies": { - "@babel/core": "7.4.3", - "@babel/plugin-proposal-class-properties": "7.4.0", - "@babel/plugin-proposal-decorators": "7.4.0", - "@babel/plugin-proposal-object-rest-spread": "7.4.3", + "@babel/core": "7.5.5", + "@babel/plugin-proposal-class-properties": "7.5.5", + "@babel/plugin-proposal-decorators": "7.4.4", + "@babel/plugin-proposal-object-rest-spread": "7.5.5", "@babel/plugin-syntax-dynamic-import": "7.2.0", - "@babel/plugin-transform-classes": "7.4.3", - "@babel/plugin-transform-destructuring": "7.4.3", - "@babel/plugin-transform-flow-strip-types": "7.4.0", - "@babel/plugin-transform-react-constant-elements": "7.2.0", + "@babel/plugin-transform-classes": "7.5.5", + "@babel/plugin-transform-destructuring": "7.5.0", + "@babel/plugin-transform-flow-strip-types": "7.4.4", + "@babel/plugin-transform-react-constant-elements": "7.5.0", "@babel/plugin-transform-react-display-name": "7.2.0", - "@babel/plugin-transform-runtime": "7.4.3", - "@babel/preset-env": "7.4.3", + "@babel/plugin-transform-runtime": "7.5.5", + "@babel/preset-env": "7.5.5", "@babel/preset-react": "7.0.0", "@babel/preset-typescript": "7.3.3", - "@babel/runtime": "7.4.3", - "babel-plugin-dynamic-import-node": "2.2.0", - "babel-plugin-macros": "2.5.1", + "@babel/runtime": "7.5.5", + "babel-plugin-dynamic-import-node": "2.3.0", + "babel-plugin-macros": "2.6.1", "babel-plugin-transform-react-remove-prop-types": "0.4.24" } } diff --git a/packages/confusing-browser-globals/package.json b/packages/confusing-browser-globals/package.json index b5b8b7aba0f..02b91d8b8d1 100644 --- a/packages/confusing-browser-globals/package.json +++ b/packages/confusing-browser-globals/package.json @@ -20,6 +20,6 @@ "index.js" ], "devDependencies": { - "jest": "24.7.1" + "jest": "24.8.0" } } diff --git a/packages/create-react-app/package.json b/packages/create-react-app/package.json index e265819ffd6..d608f0d2468 100644 --- a/packages/create-react-app/package.json +++ b/packages/create-react-app/package.json @@ -27,13 +27,13 @@ }, "dependencies": { "chalk": "2.4.2", - "commander": "2.19.0", + "commander": "2.20.0", "cross-spawn": "6.0.5", - "envinfo": "7.1.0", + "envinfo": "7.3.1", "fs-extra": "7.0.1", "hyperquest": "2.1.3", - "inquirer": "6.2.2", - "semver": "6.0.0", + "inquirer": "6.5.0", + "semver": "6.3.0", "tar-pack": "3.4.1", "tmp": "0.0.33", "validate-npm-package-name": "3.0.0" diff --git a/packages/react-app-polyfill/package.json b/packages/react-app-polyfill/package.json index 1dd3b2c441c..fe6ac5aaa49 100644 --- a/packages/react-app-polyfill/package.json +++ b/packages/react-app-polyfill/package.json @@ -21,11 +21,11 @@ "stable.js" ], "dependencies": { - "core-js": "3.0.1", + "core-js": "3.1.4", "object-assign": "4.1.1", - "promise": "8.0.2", + "promise": "8.0.3", "raf": "3.4.1", - "regenerator-runtime": "0.13.2", + "regenerator-runtime": "0.13.3", "whatwg-fetch": "3.0.0" } } diff --git a/packages/react-dev-utils/package.json b/packages/react-dev-utils/package.json index d05e7f2ebb6..4e019d6513f 100644 --- a/packages/react-dev-utils/package.json +++ b/packages/react-dev-utils/package.json @@ -50,22 +50,22 @@ "webpackHotDevClient.js" ], "dependencies": { - "@babel/code-frame": "7.0.0", - "address": "1.0.3", - "browserslist": "4.5.4", + "@babel/code-frame": "7.5.5", + "address": "1.1.0", + "browserslist": "4.6.6", "chalk": "2.4.2", "cross-spawn": "6.0.5", "detect-port-alt": "1.1.6", "escape-string-regexp": "1.0.5", "filesize": "3.6.1", "find-up": "3.0.0", - "fork-ts-checker-webpack-plugin": "1.1.1", + "fork-ts-checker-webpack-plugin": "1.5.0", "global-modules": "2.0.0", "globby": "8.0.2", - "gzip-size": "5.0.0", + "gzip-size": "5.1.1", "immer": "1.10.0", - "inquirer": "6.2.2", - "is-root": "2.0.0", + "inquirer": "6.5.0", + "is-root": "2.1.0", "loader-utils": "1.2.3", "open": "^6.3.0", "pkg-up": "2.0.0", @@ -78,7 +78,7 @@ }, "devDependencies": { "cross-env": "^5.2.0", - "jest": "24.7.1" + "jest": "24.8.0" }, "scripts": { "test": "cross-env FORCE_COLOR=true jest" diff --git a/packages/react-error-overlay/package.json b/packages/react-error-overlay/package.json index 356defb8a98..ecfafd3ab0c 100644 --- a/packages/react-error-overlay/package.json +++ b/packages/react-error-overlay/package.json @@ -34,28 +34,28 @@ "lib/index.js" ], "devDependencies": { - "@babel/code-frame": "7.0.0", - "@babel/core": "7.4.3", + "@babel/code-frame": "7.5.5", + "@babel/core": "7.5.5", "anser": "1.4.8", "babel-eslint": "10.0.2", "babel-jest": "^24.8.0", - "babel-loader": "8.0.5", + "babel-loader": "8.0.6", "babel-preset-react-app": "^9.0.0", "chalk": "^2.4.2", "chokidar": "^2.1.2", "cross-env": "5.2.0", "eslint": "^6.1.0", "eslint-config-react-app": "^4.0.1", - "eslint-plugin-flowtype": "3.12.1", + "eslint-plugin-flowtype": "3.13.0", "eslint-plugin-import": "2.18.2", "eslint-plugin-jsx-a11y": "6.2.3", "eslint-plugin-react": "7.14.3", "flow-bin": "^0.63.1", "html-entities": "1.2.1", - "jest": "24.7.1", + "jest": "24.8.0", "jest-fetch-mock": "2.1.2", "object-assign": "4.1.1", - "promise": "8.0.2", + "promise": "8.0.3", "raw-loader": "^1.0.0", "react": "^16.8.4", "react-app-polyfill": "^1.0.1", @@ -63,7 +63,7 @@ "rimraf": "^2.6.3", "settle-promise": "1.0.0", "source-map": "0.5.6", - "terser-webpack-plugin": "1.2.3", + "terser-webpack-plugin": "1.4.1", "webpack": "^4.35.0" }, "jest": { diff --git a/packages/react-scripts/fixtures/kitchensink/.template.dependencies.json b/packages/react-scripts/fixtures/kitchensink/.template.dependencies.json index 05b7ba5571a..ab1e531e7e8 100644 --- a/packages/react-scripts/fixtures/kitchensink/.template.dependencies.json +++ b/packages/react-scripts/fixtures/kitchensink/.template.dependencies.json @@ -1,10 +1,10 @@ { "dependencies": { - "bootstrap": "4.1.1", - "jest": "24.7.1", - "node-sass": "4.8.3", + "bootstrap": "4.3.1", + "jest": "24.8.0", + "node-sass": "4.12.0", "normalize.css": "7.0.0", - "prop-types": "15.5.6", - "test-integrity": "1.0.0" + "prop-types": "15.7.2", + "test-integrity": "2.0.1" } } diff --git a/packages/react-scripts/fixtures/kitchensink/integration/config.test.js b/packages/react-scripts/fixtures/kitchensink/integration/config.test.js index 6d09b56c481..d7bcb5e5ec9 100644 --- a/packages/react-scripts/fixtures/kitchensink/integration/config.test.js +++ b/packages/react-scripts/fixtures/kitchensink/integration/config.test.js @@ -9,11 +9,17 @@ import initDOM from './initDOM'; describe('Integration', () => { describe('jsconfig.json/tsconfig.json', () => { + let doc; + + afterEach(() => { + doc && doc.defaultView.close(); + doc = undefined; + }); + it('Supports setting baseUrl to src', async () => { - const doc = await initDOM('base-url'); + doc = await initDOM('base-url'); expect(doc.getElementById('feature-base-url').childElementCount).toBe(4); - doc.defaultView.close(); }); }); }); diff --git a/packages/react-scripts/fixtures/kitchensink/integration/initDOM.js b/packages/react-scripts/fixtures/kitchensink/integration/initDOM.js index a5d019828da..c4c6d5d053e 100644 --- a/packages/react-scripts/fixtures/kitchensink/integration/initDOM.js +++ b/packages/react-scripts/fixtures/kitchensink/integration/initDOM.js @@ -24,11 +24,11 @@ export const fetchFile = url => { ); }; -const fileResourceLoader = new class FileResourceLoader extends ResourceLoader { +const fileResourceLoader = new (class FileResourceLoader extends ResourceLoader { fetch(href, options) { return Promise.resolve(fetchFile(url.parse(href))); } -}(); +})(); if (!process.env.E2E_FILE && !process.env.E2E_URL) { it.only('can run jsdom (at least one of "E2E_FILE" or "E2E_URL" environment variables must be provided)', () => { @@ -63,6 +63,13 @@ export default feature => const { document } = window; + const cancelToken = setTimeout(() => { + // Cleanup jsdom instance since we don't need it anymore + window.close(); + + reject(`Timed out loading feature: ${feature}`); + }, 10000); + document.addEventListener( 'ReactFeatureDidMount', () => resolve(document), @@ -71,6 +78,8 @@ export default feature => document.addEventListener( 'ReactFeatureError', () => { + clearTimeout(cancelToken); + // Cleanup jsdom instance since we don't need it anymore window.close(); diff --git a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/DynamicImport.test.js b/packages/react-scripts/fixtures/kitchensink/src/features/webpack/DynamicImport.test.js index 21e90154a9a..0c7071b3305 100644 --- a/packages/react-scripts/fixtures/kitchensink/src/features/webpack/DynamicImport.test.js +++ b/packages/react-scripts/fixtures/kitchensink/src/features/webpack/DynamicImport.test.js @@ -10,10 +10,9 @@ import ReactDOM from 'react-dom'; describe('dynamic import', () => { it('renders without crashing', async () => { - import('./DynamicImport').then(DynamicImport => { - const div = document.createElement('div'); - ReactDOM.render(, div); - expect(div.textContent).toBe('Hello World!'); - }); + const DynamicImport = (await import('./DynamicImport')).default; + const div = document.createElement('div'); + ReactDOM.render(, div); + expect(div.textContent).toBe('Hello World!'); }); }); diff --git a/packages/react-scripts/package.json b/packages/react-scripts/package.json index b6a1421dc62..608aa09a7b5 100644 --- a/packages/react-scripts/package.json +++ b/packages/react-scripts/package.json @@ -28,13 +28,13 @@ }, "types": "./lib/react-app.d.ts", "dependencies": { - "@babel/core": "7.4.3", - "@svgr/webpack": "4.3.1", + "@babel/core": "7.5.5", + "@svgr/webpack": "4.3.2", "@typescript-eslint/eslint-plugin": "1.13.0", "@typescript-eslint/parser": "1.13.0", "babel-eslint": "10.0.2", "babel-jest": "^24.8.0", - "babel-loader": "8.0.5", + "babel-loader": "8.0.6", "babel-plugin-named-asset-import": "^0.3.2", "babel-preset-react-app": "^9.0.0", "camelcase": "^5.2.0", @@ -45,7 +45,7 @@ "eslint": "^6.1.0", "eslint-config-react-app": "^4.0.1", "eslint-loader": "2.2.1", - "eslint-plugin-flowtype": "3.12.1", + "eslint-plugin-flowtype": "3.13.0", "eslint-plugin-import": "2.18.2", "eslint-plugin-jsx-a11y": "6.2.3", "eslint-plugin-react": "7.14.3", @@ -55,32 +55,32 @@ "html-webpack-plugin": "4.0.0-beta.5", "identity-obj-proxy": "3.0.0", "is-wsl": "^1.1.0", - "jest": "24.7.1", + "jest": "24.8.0", "jest-environment-jsdom-fourteen": "0.1.0", - "jest-resolve": "24.7.1", - "jest-watch-typeahead": "0.3.0", + "jest-resolve": "24.8.0", + "jest-watch-typeahead": "0.3.1", "mini-css-extract-plugin": "0.5.0", - "optimize-css-assets-webpack-plugin": "5.0.1", - "pnp-webpack-plugin": "1.2.1", + "optimize-css-assets-webpack-plugin": "5.0.3", + "pnp-webpack-plugin": "1.5.0", "postcss-flexbugs-fixes": "4.1.0", "postcss-loader": "3.0.0", "postcss-normalize": "7.0.1", - "postcss-preset-env": "6.6.0", + "postcss-preset-env": "6.7.0", "postcss-safe-parser": "4.0.1", "react-app-polyfill": "^1.0.1", "react-dev-utils": "^9.0.1", - "resolve": "1.10.0", - "resolve-url-loader": "3.0.1", + "resolve": "1.12.0", + "resolve-url-loader": "3.1.0", "sass-loader": "7.1.0", - "semver": "6.0.0", - "style-loader": "0.23.1", - "terser-webpack-plugin": "1.2.3", + "semver": "6.3.0", + "style-loader": "1.0.0", + "terser-webpack-plugin": "1.4.1", "ts-pnp": "1.1.2", - "url-loader": "2.0.1", - "webpack": "4.35.0", + "url-loader": "2.1.0", + "webpack": "4.39.1", "webpack-dev-server": "3.2.1", "webpack-manifest-plugin": "2.0.4", - "workbox-webpack-plugin": "4.2.0" + "workbox-webpack-plugin": "4.3.1" }, "devDependencies": { "react": "^16.8.4", diff --git a/packages/react-scripts/template-typescript/public/index.html b/packages/react-scripts/template-typescript/public/index.html index 86b03a7af9c..a146b6fd776 100644 --- a/packages/react-scripts/template-typescript/public/index.html +++ b/packages/react-scripts/template-typescript/public/index.html @@ -5,8 +5,11 @@ - - + +