forked from facebook/react
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
merge #2
Merged
Merged
merge #2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Add bundle linting and tests to the release script - add yarn lint-build - use yarn lint-build in circle ci build.sh - add yarn lint-build, yarn test-prod, yarn test-build, and yarn test-build-prod to the realse script * Improve readability of release test messages * Run prettier * Updating package versions for release 16.2.0 * Seperate bundle specific tests - Moved the runYarnTask into utils since its being used two files now - Uncomment out checks I mistakenly committed * Revert a bunch of version bump changes Mistakenly commited by release script * .js for consistency
* Remove accidentally duplicated tests * Refactor: move unmock() call into the only test needing it This makes the intent more explicit.
URLs were updated to use HTTPS protocol in README files.
* Add rule to ignore default handling of not linting hidden files * Undo changes * Add function to validate warnings * Use validateWarnings when reporting linc command * Restore files * Contain code to line file
* add appveyor config file * migrate circleci 1.0 to circleci 2.0 * remove upload step in favour of #11666
* Move ReactFiberTreeReflection to react-reconciler/reflection #11659 * Use * for react-reconciler We don't know the latest local version, and release script currently doesn't bump deps automatically. * Remove unused field * Use CommonJS in entry point for consistency * Undo the CommonJS change I didn't realize it would break the build. * Record sizes * Remove reconciler fixtures They're unnecessary now that we run real tests on reconciler bundles.
* Fix for root memory leak * forgot to add code
…1691) * Blacklist spyOn(). Add explicit spyOnProd() and spyOnDevAndProd() * Wording tweak. * Fixed lint no-shadow warning
* Added ReactFeatureFlags shim for React Native * Fixed header license comment
API for batching top-level updates and deferring the commit. - `root.createBatch` creates a batch with an async expiration time associated with it. - `batch.render` updates the children that the batch renders. - `batch.then` resolves when the root has completed. - `batch.commit` synchronously flushes any remaining work and commits. No two batches can have the same expiration time. The only way to commit a batch is by calling its `commit` method. E.g. flushing one batch will not cause a different batch to also flush.
In the current implementation, pendingProps is null if there are no new props since the last commit. When that happens, we bail out and reuse the current props. But it makes more sense to always set pendingProps to whatever the next props will be. In other words, pendingProps is never null: it points to either new props, or to the current props. Modeling it this way lets us delete lots of code branches and is easier to reason about bail outs: just compare the pending props to the current props.
Convert scripts/error-codes to use ES6 syntax
* rewrite two phase traversal tests with public APIs * rewrite enter/leave tests * lift render into beforeEach, organise variables * move getLowestCommonAncestor test * remove internal tree traversal test * fix linter errors * move creation of outer nodes into {before,after}Each * explain why getLowestCommonAncestor test was moved * remove unnessecary ARG and ARG2 token these were used for testing the internal API to simulate synthetic events passed to traverseEnterLeave. since we're now dealing with actual synthetic events we can remove them. * run prettier
* Harden tests around init/addition/update/removal of aliased attributes I noticed some patterns weren't being tested. * Call setValueForProperty() for null and undefined The branching before the call is unnecessary because setValueForProperty() already has an internal branch that delegates to deleteValueForProperty() for null and undefined through the shouldIgnoreValue() check. The goal is to start unifying these methods because their separation doesn't reflect the current behavior (e.g. for unknown properties) anymore, and obscures what actually happens with different inputs. * Inline deleteValueForProperty() into setValueForProperty() Now we don't read propertyInfo twice in this case. I also dropped a few early returns. I added them a while ago when we had Stack-only tracking of DOM operations, and some operations were being counted twice because of how this code is structured. This isn't a problem anymore (both because we don't track operations, and because I've just inlined this method call). * Inline deleteValueForAttribute() into setValueForAttribute() The special cases for null and undefined already exist in setValueForAttribute(). * Delete some dead code * Make setValueForAttribute() a branch of setValueForProperty() Their naming is pretty confusing by now. For example setValueForProperty() calls setValueForAttribute() when shouldSetAttribute() is false (!). I want to refactor (as in, inline and then maybe factor it out differently) the relation between them. For now, I'm consolidating the callers to use setValueForProperty(). * Make it more obvious where we skip and when we reset attributes The naming of these methods is still very vague and conflicting in some cases. Will need further work. * Rewrite setValueForProperty() with early exits This makes the flow clearer in my opinion. * Move shouldIgnoreValue() into DOMProperty It was previously duplicated. It's also suspiciously similar in purpose to shouldTreatAttributeValueAsNull() so I want to see if there is a way to unify them. * Use more specific methods for testing validity * Unify shouldTreatAttributeValueAsNull() and shouldIgnoreValue() * Remove shouldSetAttribute() Its naming was confusing and it was used all over the place instead of more specific checks. Now that we only have one call site, we might as well inline and get rid of it. * Remove unnecessary condition * Remove another unnecessary condition * Add Flow coverage * Oops * Fix lint (ESLint complains about Flow suppression) * Fix treatment of Symbol/Function values on boolean attributes They weren't being properly skipped because of the early return. I added tests for this case. * Avoid getPropertyInfo() calls I think this PR looks worse on benchmarks because we have to read propertyInfo in different places. Originally I tried to get rid of propertyInfo, but looks like it's important for performance after all. So now I'm going into the opposite direction, and precompute propertyInfo as early as possible, and then just pass it around. This way we can avoid extra lookups but keep functions nice and modular. * Pass propertyInfo as argument to getValueForProperty() It always exists because this function is only called for known properties. * Make it clearer this branch is boolean-specific I wrote this and then got confused myself. * Memoize whether propertyInfo accepts boolean value Since we run these checks for all booleans, might as well remember it. * Fix a crash when numeric property is given a Symbol * Record attribute table The changes reflect that SSR doesn't crash with symbols anymore (and just warns, consistently with the client). * Refactor attribute initialization Instead of using flags, explicitly group similar attributes/properties. * Optimization: we know built-in attributes are never invalid * Use strict comparison * Rename methods for clarity * Lint nit * Minor tweaks * Document all the different attribute types
* use different eslint config for es6 and es5 * remove confusing eslint/baseConfig.js & add more eslint setting for es5, es6 * more clear way to run eslint on es5 & es6 file * seperate ESNext, ES6, ES6 path, and use different lint config * rename eslint config file & update eslint rules * Undo yarn.lock changes * Rename a file * Remove unnecessary exceptions * Refactor a little bit * Refactor and tweak the logic * Minor issues
* Call and Return components should use ReactElement ReactChildFiber contains lots of branches that do the same thing for different child types. We can unify them by having more child types be ReactElements. This requires that the `type` and `key` fields are sufficient to determine the identity of the child. The main benefit is decreased file size, especially as we add more component types, like context providers and consumers. This updates Call and Return components to use ReactElement. Portals are left alone for now because their identity includes the host instance. * Move server render invariant for call and return types * Sort ReactElement type checks by most likely * Performance timeline should skip over call components Don't think these were intentionally omitted from the blacklist of component types. I went ahead and updated getComponentName to include special types, even though I don't think they're used anywhere right now. * Remove surrounding brackets from internal display names
* Add basic snapshot tests to ReactART components (Circle, Rectangle, Wedge) * More tests on Circle, Rectangle, Wedge * linc warning fixes * - remove tests to Wedge component internal function * More test on Wedge component, update snapshots
The BeforeInputPlugin dispatches null elements in an array if composition or beforeInput events are not extracted. This causes a an extra array allocation, but more importantly creates null states in later event dispatch methods that are annoying to account for. This commit makes it so that BeforeInputPlugin never returns a null element inside an array.
We added this to Flow in v0.25 (about 2 years ago), but never actually deprecated the legacy `declare var exports` syntax. Hoping to do that soon, so clearing up uses that I can find. Test Plan: flow
This will let us upload the updated stats to the server to fix this script
I promise, we're close to fixing this. I fixed the last bug and now just need to run this to upload a "good" file and then re-enable it again...
I'm running out of ideas to keep these commit messages entertaining. Thankfully this should keep the CI green and we can forget any of it ever happened.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before submitting a pull request, please make sure the following is done:
master
.yarn
in the repository root.yarn test
). Tip:yarn test --watch TestName
is helpful in development.yarn test-prod
to test in the production environment. It supports the same options asyarn test
.yarn prettier
).yarn lint
). Tip:yarn linc
to only check changed files.yarn flow
).Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html