Commit Graph

579 Commits

Author SHA1 Message Date
Dan Abramov
4c45058355 Record sizes 2017-09-24 17:44:13 +02:00
Brian Vaughn
836d1c5d0c ReactNativeBridgeEventPlugin supports lazily-registered event types (#10679)
* ReactNativeBridgeEventPlugin supports lazily-registered event types
This accompanies changes on the native side to now specify which event types each view manager supports as part of its view config. Ultimately the goal is to lazily initialize view managers on the native side as well.
* Bubbling and direct attributes are optional on view config
This should help ease transition for pre-existing JS-only components.
2017-09-14 14:55:32 -07:00
Dan Abramov
03443a2e23 Record sizes 2017-09-14 14:04:11 +01:00
Dan Abramov
07f129bec2 Update error codes 2017-09-14 13:37:26 +01:00
Dan Abramov
bacaf60e15 Update sizes 2017-09-14 13:27:27 +01:00
Dan Abramov
af36a05d5a Fix FB isomorphic build (#10704)
* Freeze bundle configs before the build

This ensures we don't accidentally mutate it.

* Fix config mutation during the build uncovered by freeze

* Fix FB isomorphic build by marking object-assign as an external

* Bye bye redundant check
2017-09-14 01:24:31 +01:00
Dan Abramov
43dae749aa Stop exposing shallow renderer from TestUtils (#10682)
* Stop exposing ShallowRenderer from TestUtils

* Record sizes

* Lint
2017-09-12 19:29:28 +01:00
Dan Abramov
f74981beee Share Object.assign polyfill between UMD builds (#10671) 2017-09-11 19:22:59 +01:00
Dan Abramov
6552519a21 Update sizes 2017-09-11 16:51:58 +01:00
François Chalifour
83b63e5ff8 Fix test names in ReactDOMComponent-test (#10113)
* Fix test names in ReactDOMComponent-test

* Run record-tests script for Fiber
2017-09-10 14:52:09 -07:00
Nikoloz Buligini
c294b0995a adds missing else clause (#10660) 2017-09-10 12:42:53 -07:00
guoyong yi
8b7082eced Add license headers on build bundles (#10490)
* Add license headers on build bundles

* Add the filename IMO to header

* Preserve headers in production bundles

* Use ECMASCRIPT5_STRICT to preserve "use strict"
2017-09-07 19:38:16 +01:00
Flarnie Marchan
49c8d717a0 16.0.0-rc.1 (#10630) 2017-09-06 15:43:22 -07:00
Flarnie Marchan
8e4654015a Update error codes and results.json (#10619)
* Update results.json

**what is the change?:**
Ran the build after updating Yarn lockfile and recorded latest build
size results.

**why make this change?:**
Let's get an idea of bundle size at this point, when we are preparing
the 16.0 RC.

**test plan:**
NA

**issue:**
https://github.com/facebook/react/issues/8854

* Update error codes

https://github.com/facebook/react/tree/master/scripts/release-manager#update-the-error-codes
2017-09-06 11:11:19 -07:00
Nikita Lebedev
a8845587a3 Fix typo in script function name (#10611) 2017-09-05 10:28:34 -07:00
Dan Abramov
9f772abdc6 Update sizes 2017-08-31 22:35:42 -07:00
Brian Vaughn
e34ac7c066 Embed ReactNative event types in JavaScript (#10567)
* ReactNative doesn't query UIManager for native event types
This is a pre-req to unblock Prepack optimiations for ReactNative apps
* Replaced mock ReactNativeEventTypes with mock Platform
* Added Platform.OS to RN host hooks Flow types
2017-08-31 15:27:54 -07:00
Brian Vaughn
5ee72dcd82 Add --sync-www flag to build script (#10571) 2017-08-30 09:38:14 -07:00
Brian Vaughn
99171321c3 Lint command fails if there are any warnings (#10572)
You get a lint failure! You get a lint failure! Eeeeverybody gets a lint failure!
2017-08-30 08:03:17 -07:00
Andrew Clark
b9c8e4e9df Remove UMD builds from fixture directory (#10547) 2017-08-25 17:17:31 -07:00
Andrew Clark
2d5c4542df Update eslintignore and prettier config to ignore UMD builds of React 2017-08-25 11:35:43 -07:00
Andrew Clark
5fd942a03c Move attribite-behavior to fixtures 2017-08-25 10:40:09 -07:00
Andrew Clark
b775e74e4e Use monospace font-family 2017-08-25 10:37:46 -07:00
Andrew Clark
888c537121 Wrap string values in quotes
All other types are formatted as as <type: param>
2017-08-25 10:37:46 -07:00
Andrew Clark
5f71165486 Add table of attribute behavior (#10536)
* [WIP] Table of attribute behavior

* getAttribute helper

* add getters for attributes V-Z

* More special cases

* Add getters for more attributes

* Add tagName to attribute config

* Switch default accessor to getProperty instead of getAttribute

* Add containerTagName and tagName config

* Compare result to default value

* Add overrideStringValue config option

* add section for Sebastian and update a couple more attributes

* 'array with string' should use string override, too

* Add additional value types

Strings on, off, true, false

* more attribute updates

* More attributes

* Remove old directory

* add more attribute configs

* More attributes

* just a couple more attribute updates

* More attributes

* Fix the seb parts

* Fix the seb parts

# Conflicts:
#	scripts/attribute-behavior/src/App.js

* More attributes

* Prettier

* More attributes

* More attributes

* Fix some bugs in seb's set

* Fix the rest of flarnie's section

* More attributes

* Prettier

* Finish my section (Andrew)

* Compare against UMD build of master

Once we get past MVP stage we can hook this up to the build system so
these files are automatically copied over.

* Fix attributes that don't have compatible properties

Avoid all undefined reads.

* Test multiple input types

Tests different input types and valueAsNumber property. This value is often
NaN. To compare that we also need to switch to Object.is.

* Ignore checked in copies of React 15 bundles in attribute fixture

**what is the change?:**
We checked in bundles of React v15 to run comparisons of attribute
behavior on DOM elements between 15 and 16.

This commit tells prettier and eslint to ignore those files, and fixes a
prettier lint in one other file from that fixture.

**why make this change?:**
To get CI passing.

**test plan:**
`yarn prettier` doesn't change anything, eslint passes

**issue:**

* update README for attribute table fixture

* run prettier again
2017-08-25 10:03:30 -07:00
Brian Vaughn
2fa38ac1cc Delete ReactNativeStack 🎉 🎉 🎉 (#10511)
* Removed createReactNativeComponentClassStack and renamed createReactNativeComponentClassFiber => createReactNativeComponentClass

* Removed findNumericNodeHandleStack and renamed findNumericNodeHandleFiber => findNumericNodeHandle

* Renamed ReactNativeFiberEntry => ReactNativeEntry

* Removed all references to ReactNativeFeatureFlags and RN stack

* Removed severl RN modules that are no longer used

* Renamed ReactNativeEntry => ReactNativeFiberEntry for now. We'll probably remove 'fiber' references later

* Update build results json

* Deleted snapshot

* Re-add accidentally deleted test

* Remove now-unnecessary hack in test

* Fix lint

* RN findNodeHandle no longer adds props directly to read-only owner (#10520)

* Added ReactNativeMount-test snapshot for 'renders and reorders children' test
2017-08-23 15:53:55 -07:00
Brian Vaughn
e464cf2def Removed ReactNativeFeatureFlag shim from RN bundle (#10472) 2017-08-18 08:26:11 -07:00
Ian Sutherland
7f6b940919 Added unit tests for creating an element with a ref in a constructor. Only set ReactCurrentOwner.current in dev mode when the component has no constructor. (#10025) 2017-08-15 11:21:49 +02:00
Brandon Dail
5ff5700625 Add explicit invariant when ReactDOM is loaded w/o React (#10449) 2017-08-13 13:16:13 -05:00
Sasha Aickin
4d08914985 Fix for #10388. Renames renderToStream to renderToNodeStream. (#10425) 2017-08-10 12:23:00 -07:00
Brian Vaughn
8b1b0720cc Wrap warning() calls in a DEV check for RN_* builds too (#10428)
* Wrap warning() calls in a DEV check for RN_* builds too.
* Wrapped several warning() imports and calls in if-DEV checks.
* Removed a useless variable (allTypesByEventName) and loop from ReactNativeBridgeEventPlugin.
2017-08-10 08:41:51 -07:00
Dominic Gannaway
e97143cca5 Use Closure Compiler for UMD/Node bundles instead of Uglify (#10236)
* Use GCC instead of Uglify for UMD/NODE bundles

* Prettier run

* Fixes fixtures that were alterated by Pretter and trailing function commas

* prettier on prettier

* updated prettier config

* altered prettier config slightly

* Reverted prettier changes

* updated results.json
2017-08-10 11:12:29 +01:00
Dominic Gannaway
b9e92c6747 Moved around package dependencies fixes #10335 (#10424) 2017-08-09 18:47:52 +01:00
Mateusz Burzyński
9166cf9b8d Add test for duplicate events with nested dispatch 2017-08-09 09:30:08 -05:00
Brian Vaughn
c3718c48f0 16 beta 5 version bump and results JSON 2017-08-08 10:25:25 -07:00
Brian Vaughn
9ebd0c9e9a Updated packages and results JSON for 16 beta 4 2017-08-08 09:08:17 -07:00
Dan Abramov
327d126392 Move PooledClass to Stack folder (#10386) 2017-08-04 19:10:07 +01:00
Brandon Dail
755724a24c Implement event-specific pooling for SyntheticEvent (#10237)
* Remove PooledClass from FallbackCompositionState

The only module that uses FallbackCompositonState is BeforeInputEventPlugin. The way its structured means there can only be a single instance of FallbackCompositionState at any given time (stored in a local variable at the top-level) so we don't really need pooling here at all. Instead, a single object is now stored in FallbackCompositionState, and access (initializing, reseting, getting data) is gaurded by the exported helper object.

* Use new FallbackCompositionState API in BeforeInputEventPlugin

* Implement event-specific pooling in SyntheticEvent

* Remove PooledClass from TopLevelCallbackBookKeeping

* Update results.json

* Add pooled event test fixtures (#1)

* Fix fixture lint
2017-08-04 18:24:48 +01:00
Devedse
25894e82c2 Wop optimized this repository (#10374)
The Web Optimization Project optimized this repository. This commit contains the optimized files in this repository.
2017-08-04 14:41:38 +01:00
Brian Vaughn
230d41218e Built 16.0.0 beta 3. Updated versions, results.json, and error codes 2017-08-03 16:05:28 -07:00
Dan Abramov
c1833b4b7e Fix CI maybe 2017-08-03 00:59:40 +01:00
Dan Abramov
fc86ef0f3d Use single entry point for SSR via browser field (#10362)
* Use single entry point for SSR via browser field

* Add server.browser entry point and smoke tests

* Tweak bundle naming

* Fix import

* Re-record

* Fix the robot nits

* Add resetModules for some extra isolation
2017-08-03 00:41:09 +01:00
Brian Vaughn
630afb3186 Wrap contents of if-DEV condition in an IIFE (#10361)
This avoids strict mode conflicts for certain browsers wrt functions being defined within an if-block.
Also re-added the if-DEV condition for the ReactNative renderer since it was removed for this reason.
2017-08-02 14:24:43 -07:00
Brian Vaughn
f3e502c613 FB bundles wrap warning() calls in __DEV__ (#10314)
FB bundles wrap warning() calls in __DEV__

Split dev-mode transforms into separate parts:
1) umd+cjs+fb: Wrap warning calls with process.env checks
2) umd+cjs: Replace error messages with minified codes

Also updated transforms to use __DEV__ since it transforms to smaller code after stripEnvVariables is run.

Also renamed 'scripts/error-codes/dev-expression-with-codes.js' -> 'scripts/error-codes/replace-invariant-error-codes.js'
2017-08-02 14:14:26 -07:00
Michał Pierzchała
73217a74a0 Fix error-codes not updating correctly (#10348)
* Fix error-codes not updating correctly

* Revert changes to codes.json
2017-08-02 10:38:27 +01:00
Dan Abramov
a2ed7a6d96 Make unexpected console.warn() calls fail tests (#10341)
* Make console.warn() calls fail tests

* Replace matchers with a more straightforward cleanup
2017-08-01 19:53:37 +01:00
Dominic Gannaway
ca46c5278f Move line to within DEV block (#10316)
* move line to within DEV block

* addressed code review feedback
2017-07-27 17:31:34 -07:00
Dan Abramov
138224f6b3 16.0.0-beta.2 2017-07-27 18:06:26 +01:00
Keyan Zhang
3abbcc48a5 Fix ReactPartialRenderer in production (#10300) 2017-07-27 10:19:05 +01:00
Brian Vaughn
834d2c6954 Updated package versions and Rollup results 2017-07-26 12:55:31 -07:00