profile
viewpoint
Moti Zilberman motiz88 @facebook London, UK

dwyl/aws-sdk-mock 600

:rainbow: AWSomocks for Javascript/Node.js aws-sdk tested, documented & maintained. Contributions welcome!

FormidableLabs/react-context-composer 58

[DEPRECATED] Clean composition of React's new Context API

motiz88/babel-plugin-transform-hoist-nested-functions 30

Babel plugin to move nested functions to outer scopes

motiz88/animated.macro 29

A tiny language for arithmetic over React Native's Animated values. 🕺🏽🔢

motiz88/aws-sdk-flow-decl-gen 4

Flow type declarations generator for AWS SDK

motiz88/aws-sdk-flow-decls 2

Flow type declarations for AWS SDK

motiz88/babel-plugin-add-jsdoc-properties 2

Adds JSDoc annotations to source code

motiz88/babel-plugin-transform-react-loadable 2

Experimental Babel plugin to make advanced usage of react-loadable easier.

lilachzilberman/tomcat-python-base-image 0

A Tomcat 8 and Python 3 base image with image processing & machine learning dependencies preinstalled.

issue commentmotiz88/node-praat

Praat 6.0+ does not use praatcon on Windows

Hey, I'm not actively maintaining this package but I'm happy to merge any relevant PRs including README updates. Also, please note that I haven't published a new version of this since Praat 6.0.05 (>4 years ago).

jjatria

comment created time in 13 hours

PR opened facebook/react

[WIP] Add component location to component stacks under Hermes

NOTE: This is based on https://github.com/facebook/react/pull/18043 (compare).

<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory.

Before submitting a pull request, please make sure the following is done:

  1. Fork the repository and create your branch from master.
  2. Run yarn in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (yarn test). Tip: yarn test --watch TestName is helpful in development.
  5. Run yarn test-prod to test in the production environment. It supports the same options as yarn test.
  6. If you need a debugger, run yarn debug-test --watch TestName, open chrome://inspect, and press "Inspect".
  7. Format your code with prettier (yarn prettier).
  8. Make sure your code lints (yarn lint). Tip: yarn linc to only check changed files.
  9. Run the Flow typechecks (yarn flow).
  10. If you haven't already, complete the CLA.

Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html -->

Summary

Prints the source location of each component in component stack traces. This is the location where the component is defined (as opposed to used). It's obtained from a Hermes-specific API since there is no standard JS API to retrieve the location of an arbitrary function. With this, apps targeting Hermes will log component stacks that can be decoded using a source map.

This is a WIP PR intended as a basis for discussion and to inform changes to https://github.com/facebook/react/pull/18043.

TODO

  • [ ] Agree on serialisation format; currently it's an optional JSON object embedded in each individual stack trace line.
  • [ ] Normalise terminology and update parameter/property names etc: source (element source location) vs location (component source location) is confusing.
  • [ ] Update as needed to match changes in https://github.com/facebook/react/pull/18043 (e.g. import the parser from react-debug-tools rather than from ReactSharedInternals).
  • [ ] Decide whether we need to implement special support for drilling through user-defined HOCs.
  • [ ] Complete the implementation in DevTools console wrapper.

Test Plan

Added tests

+689 -5

0 comment

12 changed files

pr created time in 2 days

push eventmotiz88/react

Moti Zilberman

commit sha 681e0f285c33dabb7709f1e418966e13d4adb35f

WIP: add component location to stack trace on Hermes

view details

push time in 2 days

create barnchmotiz88/react

branch : error-info-with-source-location

created branch time in 2 days

delete branch motiz88/react-docgen

delete branch : function-component-statics

delete time in 2 days

issue commentfacebook/react-native

Include sourcesContent in composed Hermes source map

No, the relevant build script is part of the RN+Hermes integration which lives in this repo.

motiz88

comment created time in 2 days

push eventmotiz88/website

Moti Zilberman

commit sha 670cf0a3452908110ef7f9e1b844e3747dfd2d64

column -> columnNumber, make 1-based Updated for https://github.com/babel/babel/pull/11139/commits/9fb61ddb753faac5b32c1ddeb57008a14923484b

view details

push time in 3 days

push eventmotiz88/babel

Moti Zilberman

commit sha 9fb61ddb753faac5b32c1ddeb57008a14923484b

Rename column -> columnNumber, make 1-based

view details

push time in 3 days

pull request commentbabel/babel

feat(react-jsx-source): add column property

I'll change to columnNumber. Actually, how do you feel about making it 1-based as well?

motiz88

comment created time in 3 days

push eventmotiz88/react

Moti Zilberman

commit sha 6d6c8c916d5528c785eb5625a7b07aaee4a2c0d8

Add component stack parser

view details

push time in 3 days

PR opened facebook/react

Add component stack parser

<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory.

Before submitting a pull request, please make sure the following is done:

  1. Fork the repository and create your branch from master.
  2. Run yarn in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (yarn test). Tip: yarn test --watch TestName is helpful in development.
  5. Run yarn test-prod to test in the production environment. It supports the same options as yarn test.
  6. If you need a debugger, run yarn debug-test --watch TestName, open chrome://inspect, and press "Inspect".
  7. Format your code with prettier (yarn prettier).
  8. Make sure your code lints (yarn lint). Tip: yarn linc to only check changed files.
  9. Run the Flow typechecks (yarn flow).
  10. If you haven't already, complete the CLA.

Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html -->

Summary

Adds a parser for component stack strings, acting roughly as the inverse of getStackByFiberInDevAndProd. It's exposed only via ReactSharedInternals and there is no plan to make it an officially supported public API.

This API is intended to allow privileged consumers (React Native etc) to process the information in component stacks without rolling their own parsers (and without requiring direct access to React's internal data structures). Additionally, this will allow React to change the format of component stacks as needed without breaking these consumers.

This specific design is informed by a previous discussion between @sebmarkbage, @gaearon, @rickhanlonii and myself. The implementation is the best I could come up with naively but I'm sure there are wrinkles to be ironed out.

Context for this change

We want to make it possible to decode component stacks using a source map, as a sustainable alternative to adding displayName properties to components in minified builds. Thanks to function maps in Metro and the Hermes getFunctionLocation API, this will first be possible for React Native apps using Hermes, but can translate to other environments given the required support from build tooling and VMs.

The plan is for React to feature-detect this Hermes API, call it on each component and encode the result in the component stack string, as well as expose it in the output of this parser.

Test Plan

Tests, Flow

+381 -1

0 comment

5 changed files

pr created time in 3 days

push eventmotiz88/react

Moti Zilberman

commit sha 34df3228519259ee10f633be2f5487a125af658e

Add component stack parser

view details

push time in 3 days

push eventmotiz88/react

Moti Zilberman

commit sha 7d9d8c8f359d4ed259f6858ef98e9098ec13f387

Add component stack parser

view details

push time in 3 days

push eventmotiz88/react

Moti Zilberman

commit sha f75b8eca2df0437cce48687689bbfa1c11b8517a

Add component stack parser

view details

push time in 3 days

create barnchmotiz88/react

branch : error-info-parser

created branch time in 3 days

PR opened babel/website

react-jsx-source: add column property

Docs PR to go with https://github.com/babel/babel/pull/11139

+1 -1

0 comment

1 changed file

pr created time in 4 days

push eventmotiz88/website

Moti Zilberman

commit sha 806a8c6ed564b36a91876dee27d6e8bec47e98b2

react-jsx-source: add column property Docs PR to go with https://github.com/babel/babel/pull/11139

view details

push time in 4 days

pull request commentbabel/babel

feat(react-jsx-source): add column property

Fixed tests and corrected the information in the PR description (I had a 👍 under Breaking Change, which this isn't)

motiz88

comment created time in 4 days

push eventmotiz88/babel

Nicolò Ribaudo

commit sha d21e2217d5eac46f94b08ae1939d4ef49641fd32

Skip newlines around inline `#__PURE__` annotations (#11133) * Skip newlines around #__PURE__ annotations * Update tests

view details

Nicolò Ribaudo

commit sha 4cfbd64f6cb0dea588734e2b87db7fa892d2169d

Add Yarn 2 files to .gitignore (#11143) [skip ci]

view details

liuxingbaoyu

commit sha 31b05060409107caa5737f90bdf79fc3538c0a2d

fix: @babel/traverse can't use path.remove() with noScope (#11136)

view details

Moti Zilberman

commit sha 6d5988d20b9e31a2b20bb479ebed9c7ab94e776a

feat(react-jsx-source): add column property This will be useful to tools that consume the injected `__source` prop, allowing precise source locations to be displayed.

view details

push time in 4 days

pull request commentreactjs/react-docgen

Support for importing types

@ltroller the fix for that is https://github.com/motiz88/react-docgen/commit/8976160a674da2f484fcd1e4035873bdab85b7ef.

devongovett

comment created time in 4 days

pull request commentreactjs/react-docgen

Support for importing types

@smolations, the ast-types fix getting merged is necessary but not sufficient. It's unlikely I'll open a PR for this soon. At minimum I believe this still needs a way to cache parsed ASTs within a single run, plus some API concerns should probably be addressed (like how to make module resolution pluggable).

devongovett

comment created time in 4 days

pull request commentbabel/babel

feat(react-jsx-source): add column property

Yeah, probably. We could make up a convention that ...Number is for 1-based values and thus leave it as column (or change to columnIndex) to signify that it's 0-based... But that's just me having been bitten by too many off-by-one bugs involving source locations :) I'll change it to whatever you prefer.

motiz88

comment created time in 5 days

pull request commentreactjs/react-docgen

Support for importing types

Notwithstanding the limitations in the current approach (and FWIW I agree with @devongovett's observations in https://github.com/reactjs/react-docgen/pull/352#issuecomment-575930267), I have a squashed version of this branch with conflicts resolved as https://github.com/motiz88/react-docgen/commit/37b7ce80189077c7dc699079746740e5cd79544c.

I've found that Flow support, specifically, also required https://github.com/benjamn/ast-types/pull/371 which has yet to be merged into ast-types. On top of that I've fixed some issues for my use case, in https://github.com/motiz88/react-docgen/commit/8976160a674da2f484fcd1e4035873bdab85b7ef and https://github.com/motiz88/react-docgen/commit/0252ca77f2653f74e16647a4d851c2985ace6cac (and https://github.com/motiz88/react-docgen/commit/1369fe45f0062e880c30b2f91f1e77a3925795c6, but that's more of a temporary hack).

devongovett

comment created time in 6 days

PR opened babel/babel

feat(react-jsx-source): add column property

This will be useful to tools that consume the injected __source prop, allowing precise source locations to be displayed.

<!-- Before making a PR, please read our contributing guidelines https://github.com/babel/babel/blob/master/CONTRIBUTING.md

Please note that the Babel Team requires two approvals before merging most PRs.

For issue references: Add a comma-separated list of a closing word followed by the ticket number fixed by the PR. (it should be underlined in the preview if done correctly)

If you are making a change that should have a docs update: submit another PR to https://github.com/babel/website -->

Q A <!--(Can use an emoji 👍) -->
Fixed Issues?
Patch: Bug Fix?
Major: Breaking Change? 👍
Minor: New Feature?
Tests Added + Pass? 👍
Documentation PR Link <!-- If only readme change, add [skip ci] to your commits -->
Any Dependency Changes?
License MIT

<!-- Describe your changes below in as much detail as possible -->

+22 -7

0 comment

2 changed files

pr created time in 6 days

create barnchmotiz88/babel

branch : react-jsx-source-column

created branch time in 6 days

push eventmotiz88/react-docgen

Moti Zilberman

commit sha 0fa71de972db443d52f863d448645426053d2b5f

fix(flow): support empty type (#431)

view details

Moti Zilberman

commit sha b5e6d97d9fbabf0b233109afd8f7befec98071eb

fix: support forwardRef with out of line argument (#430)

view details

Daniel Tschinder

commit sha ff7bed1f4fdc9c08eed4af419a2aba60c9be9e64

5.2.1

view details

Moti Zilberman

commit sha b34977abf1ee9a7620236a3d43f6bd9b7538260f

fix(traverse): only visit paths, not nodes Traversing nodes detaches the resulting paths from the root File node, so they can end up crashing getFlowType which needs to grab the source code from the File.

view details

Moti Zilberman

commit sha 04f573f762c469af526728de129479b50b3eb8b9

fix: avoid circular reference when resolving name from within assignment This minimal tweak to `resolveToValue` allows us, in particular, to follow some reassignments of the variable holding a component, e.g. when wrapping it with a HOC.

view details

Moti Zilberman

commit sha f9d5490b1f358ae4faad5190a563e33cd05ea9b9

fix: infer displayName given forwardRef() node

view details

Moti Zilberman

commit sha d71c3d2711720d58f835cd16e0b0eabaf5b1ee03

fix: handle docblock on out-of-line forwardRef

view details

Moti Zilberman

commit sha 72a234467c26caace8fc0ad0d11677c6e98d1421

feat(methods): support static methods on function components

view details

Moti Zilberman

commit sha 5fdd8f1f1b01da3c5ce0480b1af7be57ac607b04

Merge remote-tracking branch 'upstream/master'

view details

push time in 6 days

push eventmotiz88/react-docgen

Moti Zilberman

commit sha da050cac94939ebe54edcaa4d47f40d8530f59f1

fix: infer displayName given forwardRef() node

view details

push time in 6 days

push eventmotiz88/react-docgen

Moti Zilberman

commit sha 505e1f8c02c0125c15dad4cdf8707559c453e8b7

fix: avoid circular reference when resolving name from within assignment This minimal tweak to `resolveToValue` allows us, in particular, to follow some reassignments of the variable holding a component, e.g. when wrapping it with a HOC.

view details

push time in 6 days

PR opened reactjs/react-docgen

fix: infer displayName given forwardRef() node

Makes displayNameHandler succeed when invoked on the CallExpression node representing a forwardRef call, rather than on the function expression that is its argument. (The latter scenario already works and is what the existing tests cover.)

+26 -1

0 comment

2 changed files

pr created time in 6 days

PR opened reactjs/react-docgen

fix: handle docblock on out-of-line forwardRef

In the same vein as #430. With this change, we read the description docblock for a forwardRef'd function component either from the forwardRef call itself, or failing that, from its resolved argument.

+48 -8

0 comment

2 changed files

pr created time in 6 days

create barnchmotiz88/react-docgen

branch : fix-forwardref-docblock

created branch time in 6 days

create barnchmotiz88/react-docgen

branch : displayname-forwardref

created branch time in 6 days

PR opened reactjs/react-docgen

fix: avoid circular reference when resolving name from within assignment

When calling resolveToValue, currently it may resolve to an expression containing the very reference we were trying to resolve, even though the correct resolution in terms of program flow is an earlier assignment. In particular, this arises in some handlers when we reassign a variable holding a component, e.g when wrapping it with a HOC:

import React from 'react';
let Component = (props, ref) => {};
//              ^
//              expected resolution
Component = React.forwardRef(     Component     );
//          ^                     ^
//          actual resolution     reference

Here, we minimally tweak resolveToValue to (1) take an Identifier path instead of a name; and (2) not resolve to an assignment expression's RHS if the assignment contains the reference we're trying to resolve. Note that this isn't a complete solution for tracking reassignments (e.g. it doesn't account for ordering or more complex ASTs) but it should be a satisfactory fix for this particular pattern.

+50 -3

0 comment

3 changed files

pr created time in 6 days

create barnchmotiz88/react-docgen

branch : resolve-no-circular

created branch time in 6 days

PR opened reactjs/react-docgen

feat(methods): support static methods on function components

Extends componentMethodsHandler to recognise static methods added to function components via assignment. Internally to the handler, methods may now be represented either by AssignmentExpression nodes or by object/class method nodes.

+235 -15

0 comment

4 changed files

pr created time in 6 days

create barnchmotiz88/react-docgen

branch : function-component-statics

created branch time in 6 days

push eventmotiz88/react-docgen

Moti Zilberman

commit sha 638e6df57a6cd80ea0d154451537f67c82e7c581

fix(methods): fix static method collection cases

view details

push time in 6 days

PR opened reactjs/react-docgen

fix(traverse): only visit paths, not nodes

Traversing with visit using a node as the root creates a new NodePath, which detaches the resulting paths from the root File node. I've seen this lead to getFlowType crashing later when it tries to grab the source code from the no-longer-reachable File node[1]. Traversing from a NodePathkeeps everything correctly linked and has no downsides AFAICT, so here I changed traverseShallow (which wraps visit) to only accept paths.

[1] I don't have the exact repro case to hand, unfortunately, but this was in the course of working on https://github.com/facebook/react-native-website/pull/1628.

+3 -3

0 comment

2 changed files

pr created time in 6 days

create barnchmotiz88/react-docgen

branch : fix-visit-paths

created branch time in 6 days

push eventmotiz88/react-docgen

Moti Zilberman

commit sha d8002c9828d37664e08c55d9a8559b88823eb134

fix: avoid circular reference when resolving name from within assignment This minimal tweak to `resolveToValue` allows us, in particular, to follow some reassignments of the variable holding a component, e.g. when wrapping it with a HOC.

view details

Moti Zilberman

commit sha 1977147a90a0a037967cd7fe7d196cf6b6190446

fix: infer displayName given forwardRef() node

view details

Moti Zilberman

commit sha ee9b8f598881d84ef3e76883bf4422b753b8f9ed

fix: handle docblock on out-of-line forwardRef

view details

push time in 6 days

delete branch motiz88/react-docgen

delete branch : non-inline-forwardref

delete time in 6 days

delete branch motiz88/react-docgen

delete branch : flow-empty-type

delete time in 6 days

push eventmotiz88/react-native-website

Moti Zilberman

commit sha 97d0dc773444b459001cce5c2f35f8e986bb2685

Add experimental script to sync API docs from code

view details

Moti Zilberman

commit sha 01111875b840f12e891e2ccda2f4e0f6794cf5d7

sync-api-docs: Support methods

view details

Moti Zilberman

commit sha f6b4bc07cd44a450845fedb543f8041917c79df8

sync-api-docs: add docs extraction script

view details

Moti Zilberman

commit sha d73b913ac591ded131f8969a5a9234d6e0c6b010

sync-api-docs: Improvements to method docs

view details

Moti Zilberman

commit sha 13837683f232c3ca0c0a082416c89daf5fde5d14

sync-api-docs: update docgen fork to 0.0.1

view details

Moti Zilberman

commit sha f9610da52f61035c9dd42953198c7cd7d8a2bbe6

sync-api-docs: pass filename into react-docgen

view details

Moti Zilberman

commit sha 55a49ac381d6777a62a317606e4916462c1db43f

sync-api-docs: don't use PropTypes composition handler We have Flow types for this.

view details

Moti Zilberman

commit sha 7c0bb49cf06ae325f26f9f17b6250b7df793ed0c

sync-api-docs: remove unused comment-parser

view details

Moti Zilberman

commit sha 3ac32632ed784d3f97f077a09e290d52e22fee34

sync-api-docs: bump docgen fork to 0.0.2

view details

Moti Zilberman

commit sha 2c0501a9a107a6ad6f22559b2f1d535039ba7b15

sync-api-docs: roll our own naive jsdoc tokenizer I'm sure this will end well.

view details

Moti Zilberman

commit sha 9c1f021cefb99dba4f4dc49fd5a7476232e87900

sync-api-docs: don’t include props with the empty type

view details

push time in 6 days

PR opened facebook/react-native-website

Add experimental script to sync API docs from code

Adds an experimental script that generates Markdown files from documentation comments in the React Native repo. This does not replace the existing workflow for updating the website, but the goal is to eventually be able to fully automate the API reference section of the website with this approach - thereby ensuring that the documentation always stays accurate and up-to-date.

Current status

This is a work in progress. The script is usable with certain components but the output is not ready to be put on the website. I'm making this PR to make it easier to iterate from this point.

What's new

This is a continuation of https://github.com/facebook/react-native/commit/eb7dbc8532ce12d912c750c395ed555f444f436e by @TheSavior which used react-docgen to extract information about component APIs from the code.

Key changes from that work include:

  • We now have a rudimentary Markdown generator in place that recreates the overall structure of the API pages, and generates partial documentation for props and methods.
  • The script now relies on a fork of react-docgen (currently published as @motiz88/react-native-docgen) for practical reasons. The fork borrows heavily from @devongovett's work on supporting type imports and includes other fixes (e.g https://github.com/reactjs/react-docgen/pull/430, https://github.com/reactjs/react-docgen/pull/431, https://github.com/benjamn/ast-types/pull/371) and customisations needed to get it working on the current RN codebase. Ideally this can all be upstreamed at some point, once proven and stable.
  • The logic that invokes react-docgen on the source files and collects the information now lives in the website repo instead of in the main React Native repo. This too is for practical reasons. We may eventually want to go back to @TheSavior's proposed model of checking in a JSON docgen artifact on the RN side (which can be updated and validated in lockstep with code changes).

How to use this (if you really want to)

Besides the basic setup, you'll also need a clone of the react-native repo.

In the react-native repo, add a /* @generate-docs */ comment to any component file (under Libraries/) from which you want to generate docs. See example in Switch.js.

From the root of the react-native-website repo, run:

cd website
# Change the next line to point to your clone of react-native
node scripts/sync-api-docs/sync-api-docs.js ../../react-native

You should see log output similar to:

/Users/moti/github/react-native/Libraries/Components/Switch/Switch.js
Generated /Users/moti/github/react-native-website/docs/switch.md

At which point, if you have Docusaurus running, the updated pages will be available at http://localhost:3000/react-native/docs/next/switch (etc).

cc @rachelnabors @TheSavior @hramos @cpojer

+691 -4

0 comment

9 changed files

pr created time in 6 days

push eventmotiz88/react-native-website

Moti Zilberman

commit sha 2ce03dffde2154d79fcfd584b89b5c403430a5cb

Add experimental script to sync API docs from code

view details

Moti Zilberman

commit sha a240fbc985cced3031c1b347ac89ca7d14bad501

sync-api-docs: Support methods

view details

Moti Zilberman

commit sha ae90cdeb753b6678671850c065d3ba124b7902af

sync-api-docs: add docs extraction script

view details

Moti Zilberman

commit sha d982e3c52aab552c88e8598a5aa1aff6328ef101

sync-api-docs: Improvements to method docs

view details

Moti Zilberman

commit sha 4844c071f18d689b144c3b84615715291e8d31b1

sync-api-docs: update docgen fork to 0.0.1

view details

Moti Zilberman

commit sha 8ad5b10ecbc0e7459f1e8f4368bae44f3fcc9f7f

sync-api-docs: pass filename into react-docgen

view details

Moti Zilberman

commit sha 36cd964bf78cce31c05d7f34c1f7f1b1c8bb7345

sync-api-docs: don't use PropTypes composition handler We have Flow types for this.

view details

Moti Zilberman

commit sha 1f236e0aa755cf7387155e96e11601f4957f07c2

sync-api-docs: remove unused comment-parser

view details

Moti Zilberman

commit sha c1ee940de08ad0c04a477a89420ec5e4f3389244

sync-api-docs: bump docgen fork to 0.0.2

view details

Moti Zilberman

commit sha 1392bb628b8f198648a8d38f8c61bc1142620fa8

sync-api-docs: roll our own naive jsdoc tokenizer I'm sure this will end well.

view details

Moti Zilberman

commit sha a9cecccd851d437e72df03fde65cca227597f45a

sync-api-docs: don’t include props with the empty type

view details

push time in 6 days

push eventmotiz88/react-native-website

Moti Zilberman

commit sha de2463c95c24a92c5fd37e77906c0e0fbafa4d71

sync-api-docs: Support methods

view details

Moti Zilberman

commit sha 299292c6fdde4a7c01968895649e4247ce942bbd

sync-api-docs: add docs extraction script

view details

Moti Zilberman

commit sha b2a8cc37f2cbb3778e872a60a99a778f95f280cd

sync-api-docs: Improvements to method docs

view details

Moti Zilberman

commit sha 0d1efcf38306294c1cbc8663740cb671fd099d05

sync-api-docs: update docgen fork to 0.0.1

view details

Moti Zilberman

commit sha d3a022bd83869675731e271f6d49ceec53e109f1

sync-api-docs: pass filename into react-docgen

view details

Moti Zilberman

commit sha 0f25458706440086e3f0379ca00c1bb6c8636a08

sync-api-docs: don't use PropTypes composition handler We have Flow types for this.

view details

Moti Zilberman

commit sha 4606850b8148dc52fdb557d466c7ca820c04c3c2

sync-api-docs: remove unused comment-parser

view details

Moti Zilberman

commit sha 651e327f76083f09165fdb6ec28a0559bd14a56e

sync-api-docs: bump docgen fork to 0.0.2

view details

Moti Zilberman

commit sha 6871f69eb0bd790d94d58c06dcc964e29c7eed22

sync-api-docs: roll our own naive jsdoc tokenizer I'm sure this will end well.

view details

Moti Zilberman

commit sha 2ecac743786d6e2abf409cfc2b950bab756ba93a

sync-api-docs: don’t include props with the empty type

view details

push time in 6 days

create barnchmotiz88/react-native-website

branch : experimental-sync-api-docs-1

created branch time in 6 days

push eventmotiz88/react-docgen

Moti Zilberman

commit sha 7ec9d8fbbf0361138932bf4b13ccae68ab4efe74

fix(flow): support empty type

view details

Moti Zilberman

commit sha 1369fe45f0062e880c30b2f91f1e77a3925795c6

feat(flow): don't resolve imported types in spread This is not airtight. 1. We may need to make this configurable with a pragma comment. 2. We should probably shallowly resolve the import and record the file and exported name of the alias, instead of just the local name.

view details

Moti Zilberman

commit sha 3de0f71e8ce338f90d61f0d9aa5499bd2b5e0bb0

Merge branch 'flow-empty-type'

view details

push time in 7 days

PR opened reactjs/react-docgen

fix(flow): support empty type

The Flow empty type (EmptyTypeAnnotation) is currently represented by the catch-all string "unknown". With this change it will be represented by "empty".

+2 -0

0 comment

2 changed files

pr created time in 7 days

create barnchmotiz88/react-docgen

branch : flow-empty-type

created branch time in 7 days

push eventmotiz88/react-native-website

Moti Zilberman

commit sha 78a5cc4f28c02474a6915428f81fb6ee9e1cf837

[remove before merging] write extracted.json

view details

Moti Zilberman

commit sha b1a0425773b8d7da87292da8f122c3449921b89e

sync-api-docs: pass filename into react-docgen

view details

Moti Zilberman

commit sha 2943dd989f938a6a09829726ea6ec6bd4fff965d

sync-api-docs: don't use PropTypes composition handler We have Flow types for this.

view details

Moti Zilberman

commit sha cad146cfc346bfcc90b3e2d38187e677b8bcf1b8

sync-api-docs: remove unused comment-parser

view details

Moti Zilberman

commit sha eca8238d5cf5fb21c488c743c30673c46d513832

sync-api-docs: bump docgen fork to 0.0.2

view details

Moti Zilberman

commit sha 4064bbf0652cdc66bec836fb63264d87f800e333

[remove before merging] update Markdown files

view details

push time in 7 days

created tagmotiz88/react-docgen

tagfork-v0.0.2

A CLI and toolbox to extract information from React component files for documentation generation purposes.

created time in 7 days

push eventmotiz88/react-docgen

Moti Zilberman

commit sha 37b7ce80189077c7dc699079746740e5cd79544c

Support for importing types by devongovett Squashed commit of the following: commit 3b3bbf63063b0d2f98d6c7cd87eee19e253b2d91 Author: Daniel Tschinder <daniel@tschinder.de> Date: Thu Nov 21 21:52:40 2019 +0100 Add additional test commit 048646d1cd726c0ba6fd84d8e9abffc0a7060a57 Author: Daniel Tschinder <daniel@tschinder.de> Date: Thu Nov 21 21:41:41 2019 +0100 Fix order of deps commit e69ef4f37271592f3b98a198931790fe7baa8a17 Author: Daniel Tschinder <daniel@tschinder.de> Date: Thu Nov 21 21:39:59 2019 +0100 Add mjs commit 26874eeb1507e13c52a681003c525baebb038289 Merge: 02649b7 b3601b6 Author: Daniel Tschinder <daniel@tschinder.de> Date: Fri Oct 25 22:25:43 2019 +0200 Merge branch 'master' into importing # Conflicts: # src/utils/isReactComponentClass.js commit 02649b700b73762d0576da10ec0cea1f3af6f715 Merge: 8c0a15f aa54200 Author: Daniel Tschinder <daniel@tschinder.de> Date: Fri Oct 25 22:21:51 2019 +0200 Merge branch 'master' into importing # Conflicts: # src/__tests__/__snapshots__/main-test.js.snap # src/__tests__/fixtures/component_28.tsx commit 8c0a15fcae4053b1d2115bd7dbd24252cf70b228 Author: Devon Govett <devongovett@gmail.com> Date: Sat May 4 17:56:04 2019 -0700 Missing typedef commit 08b5e7f7fd5b9ffacd2ce753f8f3ce6cd1a15bcb Author: Devon Govett <devongovett@gmail.com> Date: Sat May 4 17:45:34 2019 -0700 Fix lint commit c180af85a42cbb447dc265684fe0e06c2124a0bc Author: Devon Govett <devongovett@gmail.com> Date: Sat May 4 15:08:19 2019 -0700 Support named re-exports commit 80200c8f43513ab93b3acf1097098c3ae99491c0 Author: Devon Govett <devongovett@gmail.com> Date: Sat May 4 13:18:59 2019 -0700 Handle recursive imports commit 79a814f038df087b99fdad0e762150a0d0423a24 Author: Devon Govett <devongovett@gmail.com> Date: Sat May 4 13:09:16 2019 -0700 Support export all declaration commit 840ca88c3bcb5b0fb5b69edb55b1ac0f8b805876 Author: Devon Govett <devongovett@gmail.com> Date: Fri May 3 23:25:57 2019 -0700 Handle namespace imports commit 268b828e94abfe938234bf47585c95f3d9a2174d Author: Devon Govett <devongovett@gmail.com> Date: Fri May 3 22:51:00 2019 -0700 Add noop browser version of resolveImportedValue commit 00b3d350a89ddda3ec24ef3fcff4138fa51ba0e5 Author: Devon Govett <devongovett@gmail.com> Date: Sun Apr 28 21:59:00 2019 -0700 Initial support for importing prop types

view details

Moti Zilberman

commit sha f5b69d9e60a6025e979e0d6f122a2a2d5201c407

[fork] switch to forked ast-types Needed for https://github.com/benjamn/ast-types/pull/371

view details

Moti Zilberman

commit sha dc4d8a5af2e2dc9b1dddd26984c11f2fbdedb428

fix(flow): don't add names of spread generics to "composes"

view details

Moti Zilberman

commit sha 8976160a674da2f484fcd1e4035873bdab85b7ef

fix(imports): visit paths, not nodes

view details

Moti Zilberman

commit sha 0252ca77f2653f74e16647a4d851c2985ace6cac

test(imports): add tests for Flow & type spreads

view details

Moti Zilberman

commit sha b644e6fa9e10a08fd84372361029c39919a1c661

[fork] bump to 0.0.2

view details

push time in 7 days

push eventmotiz88/ast-types

Moti Zilberman

commit sha f4584175faa103fae402c8dbb479ca63b2299178

Flow: Add ObjectTypeAnnotation.exact This reflects new syntax first published in Flow 0.32.0.

view details

Pat Cavit

commit sha bd4d38767ce8acf67b3cf9aacab7a8ca63c1e467

types.getFieldValue shouldn't explode on undefined

view details

greenkeeperio-bot

commit sha 763b73774b5401dbafd374652a8c83bfa872fb6f

chore(package): update mocha to version 3.1.1 https://greenkeeper.io/

view details

Henry Zhu

commit sha 4c7b343b37ba8ed3efd75fe22de79bc568ad92f8

babel 6 node types

view details

Ben Newman

commit sha d1732320406e0571d576798c017090d955050ed8

Merge pull request #162 from hzoo/jamestalmage-make-forkable Babel 6 types

view details

Ben Newman

commit sha f2b01bdcb92dbea124ba04c66e2f97e466c94348

Merge pull request #178 from tivac/getfieldvalue-undefined types.getFieldValue shouldn't assert on undefined

view details

Ben Newman

commit sha f5cd1985855682ded0e23c4def6f6dbb1d14b8b6

Merge pull request #177 from motiz88/flow-exact Flow: Add ObjectTypeAnnotation.exact

view details

Ben Newman

commit sha 56a768f946ce1f9c1e52da125f5e81ae57178bcd

Merge pull request #185 from benjamn/greenkeeper-mocha-3.1.1 Update mocha to version 3.1.1 🚀

view details

Ben Newman

commit sha 690c4f7f742321948f9828a19bc058c622cf4955

Bump NPM version to 0.9.1 in preparation for publishing.

view details

Henry Zhu

commit sha 20dc7fc90d3b9c22ccaf4793a9de6fdd526218ea

allow older nodes in ClassBody body field

view details

Henry Zhu

commit sha c19c8eaca973ddd592a15daa4ebcb272728776b9

add older types for ObjectExpression and ObjectPattern

view details

Johannes Würbach

commit sha b80c373307d218da0ab4dfdd058c52a067dc57b0

Default decorator to null in ObjectPattern Fixes `no value or default function given for field "decorators" of ObjectPattern("properties": [Property | RestProperty | ObjectProperty])` when using `recast.types.builders.objectPattern([])`.

view details

Ben Newman

commit sha 57c4f373b08dfdcf517ce09a23c26f3a6696f2e5

Bump NPM version to 0.9.2 in preparation for publishing.

view details

J. Renée Beach

commit sha 8ec76e90196881cde48dd20cc51a81b424b06dab

Provide missing importKind field definition on ImportDeclaration (#173) * Add an importKind field to the ImportDeclaration node type * Update the ImportDeclaration test to include the importKind field and a value of type * Responding to @benjamn feedback

view details

Ben Newman

commit sha b622fb3adc2449708db246bf223a8286c7b5de46

Bump NPM version to 0.9.3 in preparation for publishing.

view details

Brendan Annable

commit sha 22c0d725f0719e05cbf6c1febf5a620bd1a2fea3

Add optional name attribute to File node

view details

James Long

commit sha af4e902db6f7f978bf8512582b4814a6eaea0bbd

Add Flow's DeclareExportAllDeclaration type (#201)

view details

Ben Newman

commit sha d0c9aca2517ea6d75381b429497b07725615c079

Bump NPM version to 0.9.4 in preparation for publishing.

view details

Ben Newman

commit sha 7f0a5271439dc8dd1e5a5cbaffe8dfb8d1bf2c98

Reindent def/babel6.js.

view details

Ben Newman

commit sha 1bb3049feae622dd80e86f94259ef4201b888d3d

Add the Import keyword type to def/babel6.js.

view details

push time in 7 days

PR opened benjamn/ast-types

Add Flow type imports to scope types, not bindings

Previously, Flow import type specifiers would erroneously be counted as creating value bindings in a scope. With this change they are correctly added to scopeTypes instead.

+21 -10

0 comment

2 changed files

pr created time in 7 days

create barnchmotiz88/ast-types

branch : fix-import-type-scope

created branch time in 7 days

push eventmotiz88/react-native-website

Moti Zilberman

commit sha b3699adf39071949bbc4eafad8e8a27b36551c64

sync-api-docs: add docs extraction script

view details

Moti Zilberman

commit sha b6e57c57b8f815564409fd0113d999a31c5b3fec

sync-api-docs: Improvements to method docs

view details

Moti Zilberman

commit sha 41fb8d2072fa59c9ff4dc1e19be20352436dd9d6

sync-api-docs: update docgen fork to 0.0.1

view details

push time in 7 days

created tagmotiz88/react-docgen

tagfork-v0.0.1

A CLI and toolbox to extract information from React component files for documentation generation purposes.

created time in 7 days

release motiz88/react-docgen

fork-v0.0.1

released time in 7 days

delete tag motiz88/react-docgen

delete tag : fork-v0.0.1

delete time in 7 days

push eventmotiz88/react-docgen

Moti Zilberman

commit sha f34ebe83df60c674118b524cbda79d90aed7cb0a

Recognise static methods added to function components

view details

Moti Zilberman

commit sha 16d8de145ff86b79246d9d8c64c98f25f77323a4

fix(traverse): only visit paths, not nodes Traversing nodes detaches the resulting paths from the root File node, so they can end up crashing getFlowType which needs to grab the source code from the File.

view details

Moti Zilberman

commit sha 84ace40556a5d94367a571e910ad644122b1c161

[fork] Bump to 0.0.1

view details

push time in 7 days

created tagmotiz88/react-docgen

tagfork-v0.0.1

A CLI and toolbox to extract information from React component files for documentation generation purposes.

created time in 7 days

release motiz88/react-docgen

fork-v0.0.1

released time in 7 days

push eventmotiz88/react-docgen

Moti Zilberman

commit sha c92b5411c132497e4bcc2874d967d1434b45a55a

Recognise static methods added to function components

view details

Moti Zilberman

commit sha b195d6cf4fccc8ef26b152ab881782faf02892a0

fix(traverse): only visit paths, not nodes Traversing nodes detaches the resulting paths from the root File node, so they can end up crashing getFlowType which needs to grab the source code from the File.

view details

Moti Zilberman

commit sha 96ba4ed8d06218c96b95a7c20afb05f508d598e9

[fork] Bump to 0.0.1

view details

push time in 7 days

release motiz88/react-docgen

fork-v0.0.0

released time in 8 days

created tagmotiz88/react-docgen

tagfork-v0.0.0

A CLI and toolbox to extract information from React component files for documentation generation purposes.

created time in 8 days

created tagmotiz88/react-docgen

tagv5.2.0

A CLI and toolbox to extract information from React component files for documentation generation purposes.

created time in 8 days

push eventmotiz88/react-docgen

Moti Zilberman

commit sha f30cddb66251d0481adc00dbaf388bea80f4a929

[fork] .gitignore for watchman config

view details

Moti Zilberman

commit sha 50e683254eaabf9a5992cbe0fa2290846067371b

[fork] Setup forked package

view details

Moti Zilberman

commit sha 37a1f9c0553b1e45cd839c1c0adb5d169792d6b6

[fork] create npm publish github action

view details

push time in 8 days

push eventmotiz88/react-docgen

Bryan Manuele

commit sha 2c42e8cd4ff50faa56277066e6654c2515c674be

fix(flow): Fix to Flow Maximum Callstack exceeded error on recursive generic structs (#428) * implemented fix to flow recursive struct error * added test case for flow overflow issue with react class component

view details

Daniel Tschinder

commit sha cfe9f27a911c69822d671594a82ee909bb32d842

chore: Upgrade babel dependencies and adjust tests for ne parser

view details

Daniel Tschinder

commit sha 6999fc25c848217c59d8424a5a56fe2946a4981e

chore: Upgrade all dependencies

view details

Daniel Tschinder

commit sha b64a9f04abd5270bef5d8fa8b19635ae6e881369

5.2.0

view details

Daniel Tschinder

commit sha d50e5b2eda64f8b1977db2307c49582acd7bd91e

chore: Do not test on 8 anymore

view details

Daniel Tschinder

commit sha 68503d886c63bf472cb6ec9478333f75f298233b

docs(website): Update dependencies

view details

Moti Zilberman

commit sha 552bc7cd45390f6ee8c15419fe202f6851be66b9

fix: support forwardRef with out of line argument

view details

Moti Zilberman

commit sha 9c4c4c98ae430a3dbd4fd1f44912ec66f816a91b

WIP statics on function components

view details

Moti Zilberman

commit sha 1e3994ffeb96980c844782ad52639d8eef3996af

[fork] .gitignore for watchman config

view details

Moti Zilberman

commit sha d7bb19b54d22943a6e50c0131031953d9d77860c

[fork] Setup forked package

view details

Moti Zilberman

commit sha f2676525df45f5255928bfb6ddaca2a6679331a5

Merge branch 'master' of https://github.com/motiz88/react-docgen

view details

push time in 8 days

push eventmotiz88/react-docgen

Moti Zilberman

commit sha c2b390f29bbd22ef4d01e0b088e20a50129236eb

[fork] create npm publish github action

view details

push time in 8 days

push eventmotiz88/react-docgen

Moti Zilberman

commit sha 1db47b17ab8e16990435eb0cf7b30e0792abc942

fix: support forwardRef with out of line argument

view details

push time in 8 days

PR opened reactjs/react-docgen

fix: support forwardRef with out of line argument

Enables handlers that support forwardRef (defaultProps and Flow type handling) to work when the argument to forwardRef is a reference to a function defined outside of the forwardRef call:

import React from 'react';
const ComponentImpl = ({ foo = 'bar' }, ref) => <div ref={ref}>{foo}</div>;
React.forwardRef(ComponentImpl);

This is achieved by reusing resolveToValue.

Note that this does not fix the rebinding case, which I intend to tackle separately:

import React from 'react';
let ComponentImpl = ({ foo = 'bar' }, ref) => <div ref={ref}>{foo}</div>;
ComponentImpl = React.forwardRef(ComponentImpl);
+68 -3

0 comment

5 changed files

pr created time in 8 days

push eventmotiz88/react-docgen

Moti Zilberman

commit sha 824422ffdacc84cdb5e5539d7cc8232a044c08e7

fix: support forwardRef with out of line argument

view details

push time in 8 days

create barnchmotiz88/react-docgen

branch : non-inline-forwardref

created branch time in 11 days

push eventmotiz88/react-native-website

Moti Zilberman

commit sha e9403083f29f03042a4cf9b126f1907644141563

[remove before merging] Netlify fix

view details

push time in 13 days

push eventmotiz88/react-native-website

Moti Zilberman

commit sha 694dfd9c45adc6426d806de0426fd4b2b87c2c8c

[remove before merging] Sync some API docs

view details

push time in 13 days

push eventmotiz88/react-native-website

Moti Zilberman

commit sha e221ea0ef7057dd8a2d96613c189cf80f88bfd40

sync-api-docs: Support methods

view details

push time in 13 days

fork motiz88/react-docgen

A CLI and toolbox to extract information from React component files for documentation generation purposes.

http://reactcommunity.org/react-docgen/

fork in 13 days

create barnchmotiz88/react-native-website

branch : experimental-sync-api-docs

created branch time in 13 days

push eventmotiz88/react-native-website

Christoph Nakazawa

commit sha ba0a553c165a3c475e24f74af7627e7ca393d9ed

Merge pull request #714 from rigdern/rigdern/letterSpacing Text: Indicate that `letterSpacing` works on Android

view details

Christoph Nakazawa

commit sha b5d0add3f415a3b99b393dbaa008d920a2b44902

Merge pull request #715 from rigdern/rigdern/maxFontSizeMultiplier Text/TextInput: Document `maxFontSizeMultiplier` prop

view details

Christoph Nakazawa

commit sha 0c969d607d3aeaafd4fa994d57af2da32f0073c8

Merge pull request #724 from mloureiro/nested-text-element-does-not-support-numberOfLines Add no support for numberOfLines on nested Text

view details

Christoph Nakazawa

commit sha 6cbae1bea41ba1b65c139fab9f44b0c19ca9e144

Update getting-started.md

view details

Christoph Nakazawa

commit sha 63a75fd6c7a1f1071cbbc25a5d9c0d6dd647b080

Merge pull request #726 from cptiwari20/patch-1 Update getting started for AMD users.

view details

Christoph Nakazawa

commit sha 868667f1784efa90c1e7b4bd375a5606a51ce395

More modest introduction to React Native. (#730)

view details

Christoph Nakazawa

commit sha 98d9b6e345bc28fecfbb1b0aa4cc0e62bb785b8f

Minor header changes (#729)

view details

Trần Tiến Đức

commit sha f1780fd3322bcf4ebfd0e57f333ab74c60836557

Update style.md using camel casing to `bigblue` property

view details

Rick Hanlon II

commit sha 31831b53e528be8b94df5af37415222b839fa0c5

Merge pull request #732 from trantienduchn/patch-2 Update style.md

view details

Lorenzo Sciandra

commit sha 92a35f43d72a65e712f140bb8f347dd95d618b16

Blogpost about the State of React Native Community in 2018 (#719) <!-- Thank you for the PR! Contributors like you keep React Native awesome! Please see the Contribution Guide for guidelines: https://github.com/facebook/react-native-website/blob/master/CONTRIBUTING.md If your PR references an existing issue, please add the issue number below: #<Issue> --> Hey everyone, this is the new blogpost we discussed in the core. LMK of anything to fix english wise 😊 I’d like to see this merged before the end of the year 😎

view details

Lorenzo Sciandra

commit sha 8c08e7c8bc177a228a53c93962f8a79992994daa

Update and rename 2019-01-06-state-of-react-native-community.md to 2019-01-07-state-of-react-native-community.md just a couple of quick updates to the blogpost

view details

Paul Kim

commit sha edf60767e86f3dc61a3f0a8d274be15a15db4010

Fix showcase app layout and icon (#733) - Added some responsiveness to the showcase layout (Breaks from 100% to 50%, to the 25%) - Fixed stretched out image because of a max-width without a max-height

view details

Joseph Kandi

commit sha 55b972c5861e98c0464b972511bbe979e0751f4f

Update state.md Grammar correction

view details

Rick Hanlon II

commit sha 3d7b84f824949b2d805e22d1592a44c8d19c6cd5

Update docs/state.md Co-Authored-By: josephkandi <joseph@apps4u.co.za>

view details

Rick Hanlon II

commit sha daea66cf51c559f8077e78ef0808cfd8c54b961d

Merge pull request #748 from josephkandi/patch-1 Update state.md

view details

Ran Greenberg

commit sha e73a52374fed9f9292d2710686e947aa0a16898c

Change showcast Wix logo (#752) * change showcast wix logo app * fix file name

view details

David Schumann

commit sha bfbd6b8ce291c63dca1336f0cabd4ec9b0905d2f

fix typo in asyncstorage.md (#751)

view details

Jamon Holmgren

commit sha 4f22b139841b41f5e4fb3ee833304eacf8e1d0ee

Add Ignite CLI to Getting Started guide (#749)

view details

Samih

commit sha cd50a374f6e4ef99c4779881ca70248bfa21ab70

Update direct-manipulation.md (#753) * Update direct-manipulation.md `findNodeHandle` is now directly imported from ReactNative as `import { findNodeHandle } from 'react-native'` instead of the static method. * Update direct-manipulation.md

view details

Joe Bernard

commit sha ded576cc72dda3223faecec22e114ed942c4595e

Fixing presentLocalNotificationLink (#744) Needs to be lowercase to work correctly

view details

push time in 14 days

push eventmotiz88/react-native-website

Moti Zilberman

commit sha bb3fb8a55607573f7ea449a748fa12ea12233758

[do not commit] Dummy change to switch.md

view details

push time in 14 days

pull request commentfacebook/metro

[babel-plugin] Don't add es6 transforms when `unstable_disableES6Transforms` is set

That's actually a FB-internal plugin. However, I'm afraid the specific failure mode is just a symptom of deeper Babel weirdness triggered by this change somehow.

For instance, this plugin had a ClassDeclaration visitor but it was suddenly being called with ClassExpression nodes (which have a billable id, hence the error). When we had worked around that, we started seeing other exceptions in Babel plugins. (Something with super in async methods? I'd need to dig up the exact error)

The most viable way forward IMO is to ensure this has the exact same transform behaviour when the flag is off, as Rick mentioned above.

janicduplessis

comment created time in 18 days

push eventradex/react-native

Andres Suarez

commit sha 10f55e752d1b3e1fd9b993a72c692750118f0608

Tidy up license headers Summary: Changelog: [General] [Fixed] - License header cleanup Differential Revision: D18060535 fbshipit-source-id: f5c07e983c54a055bf3c42662c99f288643aa27c

view details

David Vacca

commit sha 7935174d48b698edfaeea14bf8ea690106ee56f4

Fix negative letterspacing in Fabric android Summary: This diff adds support for negative letterspacing values in Fabric android Changelog: add support fot negative letterspacing values in Fabric android Reviewed By: JoshuaGross Differential Revision: D18054648 fbshipit-source-id: de1b906e6b8c0b021ffdc2e4bdad243075230667

view details

Luna Wei

commit sha 7455ae48b365af1d68964fdd4ab662a113ac1a4a

Use ImageLoader native module Summary: Changelog: [Internal][iOS] Use ImageLoader's `getSize` in image.ios.js. See D17607364 for native definition Background: ImageViewManager is a ViewManager. But we are loading and calling this method as if it is a NativeModule ``` const {ImageViewManager} = NativeModules. ``` This change calls the new method on the actual native module instead of the view manager. This is consistent with the existing behavior on android. Reviewed By: TheSavior Differential Revision: D17607363 fbshipit-source-id: 771e60c54d2c311dee8647ea341a530302895a85

view details

Luna Wei

commit sha 92c14f15628ccde6d5f42bb1c62bee4836622021

Use ImageLoader for getSizeWithHeaders Summary: Changelog: - [iOS][Internal] Use ImageLoader's `getSizeWithHeaders` in image.ios.js. See D17693907 for native definition Background: ImageViewManager is a ViewManager. But we are loading and calling this method as if it is a NativeModule ``` const {ImageViewManager} = NativeModules. ``` This change calls the new method on the actual native module instead of the view manager. This is consistent with the existing behavior on android. Reviewed By: JoshuaGross, TheSavior Differential Revision: D17704091 fbshipit-source-id: 916ae82fd6f302532f04c1fa590eed8cdd5f63a8

view details

Luna Wei

commit sha 0167dff2094e1b1c42d981c0b97f9baf3707921f

Use prefetchImage method in Image Summary: Changelog: - [iOS][Internal] Use ImageLoader's `prefetchImage` in image.ios.js. See D17714519 for native definition Background: ImageViewManager is a ViewManager. But we are loading and calling this method as if it is a NativeModule ``` const {ImageViewManager} = NativeModules. ``` This change calls the new method on the actual native module instead of the view manager. This is consistent with the existing behavior on android. Reviewed By: zackargyle, TheSavior Differential Revision: D17704732 fbshipit-source-id: 510cb8f4a5609258414d3e9d98f57b50e80305c5

view details

Luna Wei

commit sha 76ab5062e973dd70d52ee5e9b0ed2a0cc1def323

Use queryCache in image Summary: Changelog: [iOS][internal] - Use ImageLoader's `queryCache` in image.ios.js. See D17714521 for native definition Background: ImageViewManager is a ViewManager. But we are loading and calling this method as if it is a NativeModule ``` const {ImageViewManager} = NativeModules. ``` This change calls the new method on the actual native module instead of the view manager. This is consistent with the existing behavior on android. Reviewed By: zackargyle, TheSavior Differential Revision: D17714520 fbshipit-source-id: b67a62d880978d6b94228cbff8b7e49c54dc44cc

view details

Sidharth Guglani

commit sha 25e4265fc7dcbd3b7f84e7cc36db32c3e2f31992

Add exception handling in vanilla jni Summary: Exception handling in vanilla jni ## Changelog: [Internal] [Added] Added exception handling for vanilla jni implementation in yoga Reviewed By: amir-shalem Differential Revision: D18036134 fbshipit-source-id: 965eaa2fddbc00b9ac0120b79678608e280d03db

view details

Moti Zilberman

commit sha 468d1a2d2e6c72d7c6d435ecaad8499997584de6

Render collapsed frames in RedBox Summary: Renders frames in RedBox in a greyed-out style when their `collapse` field is set to `true`. This avoids outright hiding information in the stack trace while still drawing attention to frames that are likely to be more meaningful. Changelog: [General] [Changed] - Render collapsed JavaScript frames in RedBox Reviewed By: rickhanlonii Differential Revision: D18039438 fbshipit-source-id: 527588f11c0bff495842be7036cd1293bab65eb9

view details

Joe Loser

commit sha ba18ee9b87a35fccec4385a67d393ab4a09f5b29

Replace folly::make_unique with std::make_unique (#26730) Summary: There is a mixed usage of `folly::make_unique` and `std::make_unique`. Soon, `folly::make_unique` may be removed (see [this PR](https://github.com/facebook/folly/pull/1150)). Since `react-native` only supports C++14-compilers and later, switch to always using `std::make_unique`. ## Changelog [Internal] [Removed] - Replace folly::make_unique with std::make_unique Pull Request resolved: https://github.com/facebook/react-native/pull/26730 Test Plan: Running the existing test suite. No change in behavior is expected. Joshua Gross: buck install -r fb4a, make sure MP Home and forced teardown works okay on android Reviewed By: shergin Differential Revision: D18062400 Pulled By: JoshuaGross fbshipit-source-id: 978ca794c7e972db872a8dcc57c31bdec7451481

view details

Rick Hanlon

commit sha 1801dbd3339913684c70098d04200593d59ce644

LogBox - Better detection for component stack traces Summary: In YellowBox we were parsing the component stack trace in a narrow set of use cases, which are commonly missed (I see this working ~50% of the time). That seems to be overly cautious. In LogBox, since there's a nice UI for component stack traces, let's be more aggressive about finding the component stack and we can address it with feedback if we find that there are real issues with this strategy in practice Changelog: [Internal] Reviewed By: cpojer Differential Revision: D18053389 fbshipit-source-id: 48f116e2bd3f8cc43d53d3668fd6d5b8d7cba2a4

view details

Rick Hanlon

commit sha fb8e6610e5431282d334c754d8ce9e9b57803323

LogBox - remove ignored logs as perf improvement Summary: This diff improves LogBox performance by not storing and updating logs that are ignored. Previous we stored all logs, including ignored, as a set. This was so that later, when we show a list of all logs, we would be able to show the ignored logs as well if toggled on. We stored the logs as: ``` const logs = new Set([ { message: "Not ignored", ignored: false, }, { message: "Ignored", ignored: true, }, // 100s more ignored logs ]); ``` But it turns out, we can have hundreds of ignored logs within seconds in some parts of the app. This means we we're re-rendering the LogBoxContainer hundreds of times with a filter on this set to filter out the ignored logs, just to change none of the content. Now we store as: ``` const logs = new Set([ { message: "Not ignored", }, ]); ``` Later, when we want to show ignored logs, we'll store these separately. Changelog: [Internal] Reviewed By: cpojer Differential Revision: D18055799 fbshipit-source-id: f5e21f66bb4ab6137d5d3908e8c03e119e3805d5

view details

Rick Hanlon

commit sha c55aa1dd8ca52c6c01f24f811bdc1aa63a69120b

LogBox - Change count from grouping number to total count Summary: Previously we were should the count for the group (similar to how Chrome show the count on logs). This makes it difficult (impossible) to know how many logs are in the console without opening up the inspector. This diff changes it so that the count shows the total number of warnings in the console instead. Changelog: [Internal] Reviewed By: cpojer Differential Revision: D18056028 fbshipit-source-id: c94a446708fb0885962e5c7dde75300cbedbab9b

view details

Rick Hanlon

commit sha 41b0d0a67224f9a4709348c0cac226afab877518

LogBox - Clean up and test message substitutions Summary: This diff cleans up some of the message substitution logic and adds unit tests Changelog: [Internal] Reviewed By: cpojer Differential Revision: D18056241 fbshipit-source-id: 6173961c049071ab8aeff6cd273bd3590ee21e60

view details

Rick Hanlon

commit sha cc056907cf02d7fb54b043bbc59994a0c6e50184

Clean up API for LogBoxLogParser Summary: This diff cleans up two functions from: ``` LogBoxLogData.add({args: ['A']}); LogBoxLogParser({args: ['A']}); ``` to: ``` LogBoxLogData.add(['A']); LogBoxLogParser.parseLog(['A']); ``` Changelog: [Internal] Reviewed By: cpojer Differential Revision: D18056462 fbshipit-source-id: be6108069fc24b1f25d1382ad31c314183c793f8

view details

Eli White

commit sha 7d8dfa500c08898abe34f01ad6c57c14f5e36a26

Fix flowfixme in ScrollViewExample Summary: $title Changelog: [Internal] Reviewed By: JoshuaGross Differential Revision: D17949318 fbshipit-source-id: 9daa8890d4a65678c6ebf800b1c66d4ed2f4d80f

view details

David Vacca

commit sha 229fa32ab6c530d1d7fe8c8d4fe6930a8a8eab7d

Fix TextAlign prop in Fabric Summary: Text didn't support horizontal textAlign in Fabric for Android, this diff fixes that Changelog: Add support for TextAlign prop in Fabric Reviewed By: makovkastar Differential Revision: D18068072 fbshipit-source-id: 3f8b1ba46989b55197fe9aa60ba2fb055b003d67

view details

Panagiotis Vekris

commit sha 94845b57834b8d73c0abb5c12319c3566f1ce1b7

Suppress private property accesses Summary: Changelog: [Internal] Reviewed By: rijn Differential Revision: D18055795 fbshipit-source-id: c48e1b7c14dc052b9cebc48037ac745dd2890969

view details

Ramanpreet Nara

commit sha 002d3c179dd2515f0a4d894d9b7f70c4e538f728

Retain cropData object in ImageEditingManager.cropImage Summary: All struct args are passed into NativeModule methods via references. If blocks access those references, we don't move those references to the heap. This means that by the time that the block accesses the struct arg, it could be freed. This can crash the program. The solution is simple: we copy the struct arg, and access the copy in the block. This ensures that the block will make a copy, which prevents the underlying data structures from being released by the time that the block accesses the struct arg. Changelog: [iOS][Fixed] - Retain cropData struct arg in ImageEditingManager.cropImage call Differential Revision: D18076026 fbshipit-source-id: 1a7bb602606ff1afac38ad5451662c82fa86f205

view details

David Vacca

commit sha d9f7f99d919e5b91712e4457b452e0b4974e15a0

Report error if font size value is zero or negative Summary: Text font size should not be negative, this diff throws an exception if TextView uses negative of zero font size Changelog: [[internal]] Reviewed By: shergin Differential Revision: D18068071 fbshipit-source-id: 4074dca2019b6223eef68a407570258adbceaa43

view details

Luna Wei

commit sha b6343408f9ebd519f6771977c237b8898ae69ec4

Back out "Back out "Convert scrollresponder dipatches to native commands"" Summary: Changelog: [Internal] Convert scrollTo, scrollToEnd, flashScrollIndicators to use native commands This was reverted because of a circular dependency that was found in AMA. See D18065033 for fixing the circular dependency Reviewed By: TheSavior Differential Revision: D18063703 fbshipit-source-id: 7bd0125833f4f9e9e2f227732af0d6e38f009c06

view details

push time in 23 days

pull request commentfacebook/react-native

Make JSStringToSTLString 23x faster

@shergin Sure, I'll push my changes in a bit.

radex

comment created time in 23 days

pull request commentfacebook/react

Give unresolved lazy() a name in component stack

Updated the description, sorry for the confusion.

For my part, I will happily bring back displayName support if you folks view it as acceptable. Personally my take on it is:

  1. it solves a real (if niche) problem;
  2. it doesn't meaningfully increase the size/complexity of React;
  3. the cost to applications that don't use displayName is zero (or next to zero, see 2);
  4. the size cost to applications that do use displayName is proportional to the number of lazy components they apply it to, which is the same deal as for displayName in general;
  5. perf might not be a problem if displayName is applied uniformly (e.g. via a Babel plugin) - my understanding of hidden classes is that adding properties in a predictable order is a fast path;
  6. until such a time as displayName is officially deprecated and something better is available to replace it, it makes sense to support it on all types of components.

The counterargument could be made that dropping displayName support on newer APIs is a way of soft-deprecating it because it's too expensive to begin with. But a good alternative to it doesn't exist yet, so I personally think taking it away is premature.

motiz88

comment created time in a month

pull request commentfacebook/react

Give unresolved lazy() a name in component stack

@bvaughn Oops, the description is stale. I did implement this with displayName support initially (45458ad) and then IIRC had an off-GitHub conversation with @gaearon where he fed back that we shouldn't add displayName.

motiz88

comment created time in a month

issue commentmicrosoft/appcenter-cli

[React-native] Purpose of compose-source-maps.js?

Hi, the author of compose-source-maps.js here :)

This script merges two inputs:

  • Source map from Hermes bytecode → bundled JS, produced by the Hermes compiler
  • Source map from bundled JS → JS source files, produced by the Metro bundler (or another bundler)

into a single output:

  • Source map from Hermes bytecode -> JS source files

Using the composed source map, services like Bugsnag can symbolicate/unminify stack traces produced by apps running Hermes bytecode.

As @blueberry6401 pointed out, this is all set up out of the box in the default Gradle release build for React Native apps that use Hermes. I don't know much about the specifics of CodePush, but if it manages its own bundling process and supports Hermes, it likely should run compose-source-maps.js as well.

blueberry6401

comment created time in 2 months

pull request commentjest-community/eslint-plugin-jest

feat(valid-expect): warn on `await expect()` with no assertions

It's interesting that it doesn't already pick this up

There might be a case for inverting the check on the parent node altogether. What if we made it so expect() had to be the object of a MemberExpression, and anything else would error with noAssertions?

Is the following a common/allowed pattern at all? (And if so, how do we feel about forbidding it?)

const ex = expect(fooBar());
ex.toBe(true);
ex.not.toBe(false);
// etc

This doesn't have to block this PR. Just curious :)

motiz88

comment created time in 2 months

push eventmotiz88/eslint-plugin-jest

Moti Zilberman

commit sha d737cdfccd930bef83a3d2da5858c12985746b82

feat(valid-expect): warn on `await expect()` with no assertions

view details

push time in 2 months

Pull request review commentjest-community/eslint-plugin-jest

feat(valid-expect): warn on `await expect()` with no assertions

 const isAcceptableReturnNode = (     AST_NODE_TYPES.AwaitExpression,   ].includes(node.type); +const isNoAssertionsParentNode = (node: TSESTree.Node): boolean =>+  node.type === AST_NODE_TYPES.ExpressionStatement ||+  (node.type === AST_NODE_TYPES.AwaitExpression &&+    node.parent!.type === AST_NODE_TYPES.ExpressionStatement);

node.parent && doesn't typecheck because it's not strictly a boolean. I'll go with node.parent !== undefined && if that's OK with you

motiz88

comment created time in 2 months

push eventmotiz88/eslint-plugin-jest

Moti Zilberman

commit sha 07f0c76aca0b1c891299c8e62be8db1f194ebdeb

feat(valid-expect): warn on `await expect()` with no assertions

view details

push time in 2 months

PR opened jest-community/eslint-plugin-jest

feat(valid-expect): warn on `await expect()` with no assertions

Makes the following an error under the valid-expect rule:

await expect('something'); // No assertion was called on expect().

Rationale

As this plugin already has a rule for expect-with-no-assertions, I thought I'd add a similar one for await expect.

Speaking from recent experience, the simple mistake of awaiting the wrong thing (await expect('something') instead of await 'something') can be a pain to track down and fix, as its effects are likely to be felt far from the line containing the actual mistake (which itself will never throw at runtime).

+17 -4

0 comment

3 changed files

pr created time in 2 months

create barnchmotiz88/eslint-plugin-jest

branch : await-no-assertions

created branch time in 2 months

issue commentfacebook/react

DevTools: Provide full file path for React Native component stacks

The concrete solution for structured stack traces still needs to be designed, but it boils down to this: RN's LogBox and ReactFiberErrorDialog need to have access to a Fiber reference (or maybe an array of ReactElements or some other intermediate projection) instead of a preformatted string for the component stack.

For the ReactFiberErrorDialog path, this amounts to refactoring internal interfaces within React and the renderers. For the LogBox path, we may need to rethink how we wrap and forward console.error and console.warn. For instance, maybe we can wrap the methods just once, in LogBox, and directly consume the same private API that DevTools uses to get at the current fiber.

rickhanlonii

comment created time in 2 months

fork motiz88/the-platform

Web. Components. 😂

fork in 3 months

PR opened facebook/react

Reviewers
[RN] Hoist static deepDiffer options object

Hoists the options object literal from defaultDiffer to the module scope so it's not recreated on every prop update. Addresses https://github.com/facebook/react/pull/17282#discussion_r343677204.

+5 -1

0 comment

1 changed file

pr created time in 3 months

create barnchmotiz88/react

branch : hoist-deepdiffer-options

created branch time in 3 months

push eventfacebook/react

Moti Zilberman

commit sha 61d3dd0e08a53eebeaf06537b84b78dedbc92168

Update deepDiffer usage in React Native renderer (#17282) * Add RN prop diffing test with function values * Update RN deepDiffer mock * Explicitly ignore functions in RN prop differ

view details

push time in 3 months

PR merged facebook/react

Update deepDiffer usage in React Native renderer CLA Signed

React Native exposes a function, deepDiffer, which react-native-renderer uses to compute prop updates. This comparison function has surprising behaviour when it comes to function values: it will treat any two functions as equal, entirely ignoring function identity.

https://github.com/facebook/react-native/commit/99d229e186e1e5d08cb1fc417b4b911ade7aef33 added an explicit flag to switch this surprising behaviour on or off - the default behaviour is unchanged at the moment, but I plan to change it eventually once I've accounted for all existing call sites.

This PR opts react-native-renderer into the surprising behaviour (it's the one place it actually makes sense, and probably where it originated - see e.g. this comment). I've also updated the vendored deepDiffer mock to match the version currently in React Native master, and added a test explicitly covering this behaviour.

+83 -8

3 comments

4 changed files

motiz88

pr closed time in 3 months

more