diff --git a/.circleci/config.yml b/.circleci/config.yml index 4be16be12997b..4536865fea183 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,3 +40,9 @@ jobs: key: v1-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }} paths: - node_modules + + - store_artifacts: + path: ./node_modules.tgz + + - store_artifacts: + path: ./scripts/error-codes/codes.json \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js index 4444c643eab89..51c9395f73c52 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,5 +1,10 @@ 'use strict'; +const { + es5Paths, + esNextPaths, +} = require('./scripts/shared/pathsByLanguageVersion'); + const OFF = 0; const ERROR = 2; @@ -16,6 +21,15 @@ module.exports = { 'react-internal', ], + parser: 'espree', + parserOptions: { + ecmaVersion: 2017, + sourceType: 'script', + ecmaFeatures: { + experimentalObjectRestSpread: true, + }, + }, + // We're stricter than the default config, mostly. We'll override a few rules // and then enable some React specific ones. rules: { @@ -44,6 +58,13 @@ module.exports = { 'space-before-function-paren': OFF, 'valid-typeof': [ERROR, {requireStringLiterals: true}], + // We apply these settings to files that should run on Node. + // They can't use JSX or ES6 modules, and must be in strict mode. + // They can, however, use other ES6 features. + // (Note these rules are overridden later for source files.) + 'no-var': ERROR, + strict: ERROR, + // React & JSX // Our transforms set this automatically 'react/jsx-boolean-value': [ERROR, 'always'], @@ -71,6 +92,33 @@ module.exports = { }, overrides: [ + { + // We apply these settings to files that we ship through npm. + // They must be ES5. + files: es5Paths, + parser: 'espree', + parserOptions: { + ecmaVersion: 5, + sourceType: 'script', + }, + rules: { + 'no-var': OFF, + strict: ERROR, + }, + }, + { + // We apply these settings to the source files that get compiled. + // They can use all features including JSX (but shouldn't use `var`). + files: esNextPaths, + parser: 'babel-eslint', + parserOptions: { + sourceType: 'module', + }, + rules: { + 'no-var': ERROR, + strict: OFF, + }, + }, { files: ['**/__tests__/*.js'], rules: { diff --git a/CHANGELOG.md b/CHANGELOG.md index 27462b134ac18..aba934bfdae7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,56 @@ Changes that have landed in master but are not yet released. Click to see more. - +## 16.7.0 (December 19, 2018) + +### React DOM + +* Fix performance of `React.lazy` for large numbers of lazily-loaded components. ([@acdlite](http://github.com/acdlite) in [#14429](https://github.com/facebook/react/pull/14429)) +* Clear fields on unmount to avoid memory leaks. ([@trueadm](http://github.com/trueadm) in [#14276](https://github.com/facebook/react/pull/14276)) +* Fix bug with SSR and context when mixing `react-dom/server@16.6` and `react@<16.6`. ([@gaearon](http://github.com/gaearon) in [#14291](https://github.com/facebook/react/pull/14291)) +* Fix a performance regression in profiling mode. ([@bvaughn](http://github.com/bvaughn) in [#14383](https://github.com/facebook/react/pull/14383)) + +### Scheduler (Experimental) + +* Post to MessageChannel instead of window. ([@acdlite](http://github.com/acdlite) in [#14234](https://github.com/facebook/react/pull/14234)) +* Reduce serialization overhead. ([@developit](http://github.com/developit) in [#14249](https://github.com/facebook/react/pull/14249)) +* Fix fallback to `setTimeout` in testing environments. ([@bvaughn](http://github.com/bvaughn) in [#14358](https://github.com/facebook/react/pull/14358)) +* Add methods for debugging. ([@mrkev](http://github.com/mrkev) in [#14053](https://github.com/facebook/react/pull/14053)) + + +## 16.6.3 (November 12, 2018) + +### React DOM + +* Fix bugs in `Suspense` and `lazy`. ([@acdlite](https://github.com/acdlite) in [#14133](https://github.com/facebook/react/pull/14133), [#14157](https://github.com/facebook/react/pull/14157), and [#14164](https://github.com/facebook/react/pull/14164)) +* Fix highlighting of `React.memo` updates in React DevTools. ([@bvaughn](https://github.com/bvaughn) in [#14141](https://github.com/facebook/react/pull/14141)) +* Fix interaction of Suspense with the React Profiler. ([@bvaughn](https://github.com/bvaughn) in [#14065](https://github.com/facebook/react/pull/14065)) +* Fix a false positive warning when using Suspense. ([@acdlite](https://github.com/acdlite) in [#14158](https://github.com/facebook/react/pull/14158)) + +### React DOM Server + +* Fix incorrect sharing of context state between `renderToNodeStream()` calls. ([@sebmarkbage](https://github.com/sebmarkbage) in [#14182](https://github.com/facebook/react/pull/14182)) +* Add a warning about incorrect usage of the context API. ([@trueadm](https://github.com/trueadm) in [#14033](https://github.com/facebook/react/pull/14033)) + +## 16.6.2 (November 12, 2018) + +This release was published in a broken state and should be skipped. + +## 16.6.1 (November 6, 2018) + +### React DOM + +* Fallback should not remount every time a promise resolves. ([@acdlite](https://github.com/acdlite) in [#14083](https://github.com/facebook/react/pull/14083)) +* Fix bug where Suspense keeps showing fallback even after everything finishes loading. ([@acdlite](https://github.com/acdlite) in [#14083](https://github.com/facebook/react/pull/14083)) +* Fix unresolved default props in lifecycle methods of a lazy component. ([@gaearon](https://github.com/gaearon) in [#14112](https://github.com/facebook/react/pull/14112)) +* Fix bug when recovering from an error thrown during complete phase. ([@gaearon](https://github.com/gaearon) in [#14104](https://github.com/facebook/react/pull/14104)) + +### Scheduler (Experimental) + +* Switch from deadline object to `shouldYield` API. ([@acdlite](https://github.com/acdlite) in [#14025](https://github.com/facebook/react/pull/14025)) + ## 16.6.0 (October 23, 2018) @@ -95,7 +142,7 @@ * Fix incorrect data in `compositionend` event when typing Korean on IE11 ([@crux153](https://github.com/crux153) in [#12563](https://github.com/facebook/react/issues/12563)) * Fix a crash when using dynamic `children` in the `