Commit Graph

75 Commits

Author SHA1 Message Date
Paul O’Shannessy 1573baaee8 Use Object.assign directly and inject object-assign at compile 2016-04-04 09:53:25 -07:00
Michael McDermott 18af9bc91e Fixed some linting warnings and some mis-spacing in SyntheticEvent warnings. 2016-03-02 18:40:23 -05:00
Rick Beerendonk bef45b0b1a Year-agnostic copyright message, like React Native uses, to prevent the need for yearly changes. 2015-12-29 20:20:32 +01:00
Jim 3afced6a75 Error boundaries. 2015-12-16 12:15:26 -08:00
Ben Alpert 46f5251c66 Remove @typechecks
These don't really do anything.

```
codemod.py -d src --extensions js -m '\s* \* @typechecks.*?\n' '\n'
```

with "yes to all".
2015-12-10 11:26:45 -08:00
Ben Alpert 6b3ee0e74d Merge pull request #5576 from spicyj/log-top-level
Log top-level renders with console.time
2015-12-01 11:34:40 -08:00
Ben Alpert a0f88d29df Log top-level renders with console.time
Behind a flag.
2015-12-01 11:29:13 -08:00
Paul O’Shannessy f44a0778e3 Don't use key when defined on String, Number prototypes 2015-11-23 15:33:34 -08:00
Ben Alpert ea31f924b8 Merge pull request #5368 from spicyj/adler32
adler32: Properly break loop into 4096-char blocks
2015-11-11 22:21:22 -08:00
Ben Alpert b80f676d27 Add hooks back for devtools 2015-11-04 11:39:44 -08:00
Ben Alpert 35543c6312 Remove unused modules
- Remove last references to ReactInstanceHandles (still used in responder unit test)
- Remove ClientReactRootIndex/ServerReactRootIndex
2015-11-04 11:39:44 -08:00
Ben Alpert ff6714064f adler32: Properly break loop into 4096-char blocks
I believe this was lost in translation in #4400. Can't say I fully understand why this is significant at all though...
2015-11-02 11:29:48 -08:00
Christoph Pojer 1384d43f53 Merge pull request #5321 from cpojer/update-tests
Update tests
2015-10-29 18:42:12 -07:00
Paul O’Shannessy 12c214a992 Merge pull request #5328 from zpao/non-native-event-name-dispatch
Use a custom event type for our event dispatching in ReactErrorUtils
2015-10-29 17:54:18 -07:00
Paul O’Shannessy 29523d0113 Use a custom event type for our event dispatching in ReactErrorUtils
It turns out that IE doesn't like when native events types are used. There may
have been more involved at play but this fixes the issue.
2015-10-29 15:39:14 -07:00
Paul O’Shannessy d95a2239a8 Use a getter for canDefineProperty check.
This ensures that we treat es5-sham as a broken implementation of defineProperty and we won't try to use it.
2015-10-29 15:17:50 -07:00
cpojer 2ecfc4f8fb Codemod old APIs away. 2015-10-29 12:40:52 -07:00
Timothy Yung cdaea311a3 Remove "Invariant Violation: " from Invariant Error Messages 2015-10-16 16:09:28 -07:00
Ben Alpert 8e67b7f624 Merge pull request #4988 from spicyj/fdn
Walk down internal tree to find DOM node
2015-10-14 14:31:28 -07:00
Ben Alpert 5c5d2ec182 Walk down internal tree to find DOM node
This reduces our reliance on hierarchical IDs.
2015-10-14 14:22:53 -07:00
Ben Alpert 1206d8d2eb Add feature test for document.createEvent
See #5157.
2015-10-13 16:34:05 -07:00
Ben Alpert 6488a4c187 Use 'document.createEvent' not 'new Event'
Fixes #5153.

This seems to work in all browsers I tested, including old Android and all IE > 8 which didn't work before.
2015-10-13 11:14:23 -07:00
Matias Singers f8f2be05ce Consistently use calls[n].args[n] instead of argsForCall[n][n] for Jasmine spies 2015-10-12 22:39:19 +08:00
Ben Alpert 2253405dcc Merge pull request #5085 from spicyj/cdp
Extract defineProperty feature testing to one file
2015-10-08 11:33:07 -07:00
Ben Alpert 3fb2d3f5d4 Extract defineProperty feature testing to one file
This makes it slightly more bearable to debug in IE8 with an exception breakpoint. Also the old way was just silly and could mask other bugs.
2015-10-07 18:33:13 -07:00
Ben Alpert 2637a8eaf4 Move escapeTextContentForBrowser and quoteAttributeValueForBrowser to DOM directory
Only DOM files use these.
2015-10-07 18:11:15 -07:00
Paul O’Shannessy 693dd3567b Update to fbjs@0.3
As far as we're concerned, the only difference is that we moved some files from React to fbjs.
2015-10-01 14:30:05 -07:00
Ben Alpert d561949711 Improve warning for old element objects
Fixes #4996.
2015-09-29 18:02:47 -07:00
Ben Alpert ab03f34965 Merge pull request #4951 from spicyj/gh-4840
Improve traverseAllChildren object error message
2015-09-23 12:17:35 -07:00
Ben Alpert 1922db1711 Improve traverseAllChildren object error message
Fixes #4840.
2015-09-23 12:17:20 -07:00
Ben Alpert 57c516cb0e Don't use magic browser event dispatching for simulated events
When calling ReactTestUtils.Simulate, sometimes you want to test that an exception is thrown by the event handler. This lets you do that without relying on the fact that old jsdom doesn't implement `Event`.
2015-09-22 15:31:08 -07:00
Paul O’Shannessy 20f0b0f464 Upgrade eslint to 1.4.1 2015-09-16 12:16:46 -07:00
Ben Alpert 14ede77123 Merge pull request #4827 from spicyj/occured
occured -> occurred
2015-09-09 16:29:43 -07:00
Ben Alpert 0b857a473a occured -> occurred 2015-09-09 16:19:40 -07:00
Ben Alpert b004bc5f22 Don't try to iterate over non-objects
Fixes #4776.
2015-09-09 09:03:05 -07:00
Ben Alpert c04d02e5e8 Add warnings to React module 2015-09-01 14:36:41 -07:00
Paul O’Shannessy 7645c07720 Use eslintrc from fbjs 2015-08-31 23:05:04 -07:00
Ben Alpert 6013105a9c Make React.Children.map do one pass only
Changed: createFragment no longer includes nulls in its output (since toArray doesn't and they share code).

Changed: React.Children.map no longer warns for clashing keys; traverseAllChildren will later when rendering.

Also change the generated key format around to accomodate. My keys are probably not bulletproof but should definitely be safe against accidental collisions.
2015-08-31 18:47:09 -07:00
Olivier Tassinari 0304051591 [adler32] fix wrong name 2015-08-29 19:07:36 +01:00
Paul O’Shannessy 2e5b047f04 Reverse condition of a ternary for readability 2015-08-28 11:34:50 -07:00
Ben Alpert 16d8f20576 Add destructors to pooled classes in ReactChildren
And make destructors mandatory so we're less likely to forget again.
2015-08-27 19:05:56 -07:00
Ben Alpert 6abf025d46 Make createFragment return an array, disallow objects as children 2015-08-24 16:09:08 -07:00
Sebastian Markbåge d3f338ff27 Fix typecheck 2015-08-12 00:32:52 -07:00
Sebastian Markbage 16cc45156f Move guards from auto binding to event dispatch
This wraps a proper guard around event dispatching so that errors doesn't
interupt other event callbacks.

Instead we rethrow the first error after all callbacks have been invoked.

For DEV mode we use native event dispatching if available. This has the
benefit that caught exceptions show up in the dev tools even without caught
exceptions being turned on. Yet, all callbacks are guaranteed to fire.
2015-08-11 11:55:07 -07:00
Paul O’Shannessy ecb34de574 Upgrade ESLint, fix code 2015-08-10 17:04:29 -07:00
Paul O’Shannessy be5c09c24d Update fbjs dependency
- remove a file that got moved over there
- update for renamed babel transform
2015-07-27 13:37:48 -07:00
Paul O’Shannessy 1d0c1b1817 Use fbjs package from npm, gulp
This reworks a few things in building and distributing React. The biggest change is using fbjs to share dependencies with other libraries. We're also using Gulp for some build steps.
2015-07-23 15:48:02 -07:00
Paul O’Shannessy ac5e5d789f Merge pull request #4367 from Simek/traverse-children-cleanup
traverseAllChildren code clarity
2015-07-23 14:48:23 -07:00
Jim 57e9e5bf23 Improved performance for our adler32 implementation 2015-07-20 18:50:05 -07:00
Bartosz Kaszubowski da11691e26 invert few if-else with negation for readability 2015-07-18 00:19:28 +02:00