profile
viewpoint
Christoph Nakazawa cpojer Facebook Facebook http://cpojer.net Formerly Pojer · 👨🏻‍💻 Engineering Manager at Facebook · 🚇 Metro · 🃏 Jest · 📦 Yarn

cpojer/jasmine-jstd-adapter 3

Jasmine JsTestDriver Adapter. Write Jasmine BDD code, and run it on JsTD.

cpojer/cordova-plugin-media 1

Mirror of Apache Cordova Plugin media

cpojer/event-stack 1

Helps you Escape.

cpojer/ast-types 0

Esprima-compatible implementation of the Mozilla JS Parser API

cpojer/AwesomeProject 0

React Native jest snapshot test example

cpojer/babel 0

Babel is a compiler for writing next generation JavaScript.

cpojer/cli-usage 0

Easily show the usage of your CLI tool from a Markdown string or file

cpojer/commoner 0

Flexible tool for translating any dialect of JavaScript to Node-readable CommonJS modules

pull request commentfacebook/jest

Change Code of Conduct Version to 2.0

Using the one provided by fb seems like a good idea :+1:

ChenKuanSun

comment created time in 3 days

issue commentfacebook/react-native

CC_MD5 is deprecated (in addition to being broken)

Unfortunately we haven't gotten around to cleaning up the repo yet. How did the open source version of async storage deal with the same issue? Can we backport the fix for now?

jonthanon

comment created time in 4 days

pull request commentfacebook/react-native

Migrating RNTester to Packages Directory

You cannot call it "RNTester" if it is inside of the packages folder. It'll have to be either packages/tester or packages/rn-tester or maybe packages/test-app or similar.

stealthanthrax

comment created time in 8 days

push eventfacebook/react-native-website

Eli White

commit sha ab1fdcbf535f898ad639ab26e1af560012a2b930

Blog post for team principles

view details

Eli White

commit sha 57113584259a36dd4eac0bd3caff891e2e5970b0

reword

view details

Eli White

commit sha 1adc43b448e7c77bbe69359e3b9276f638b11680

Apply suggestions from code review Incorporating Rick's changes Co-authored-by: Ricky <rickhanlonii@gmail.com>

view details

push time in 24 days

PR merged facebook/react-native-website

Blog post for team principles CLA Signed Partner RN Team p: Facebook

We want to share the principles that drive our team.

screencapture-localhost-3000-blog-2020-07-17-react-native-principles-2020-07-17-11_20_56

+53 -0

2 comments

1 changed file

TheSavior

pr closed time in 24 days

created repositorycpojer/cpojer

created time in a month

PR closed facebook/react-native

simplify code which throws errors for the removed components CLA Signed Type: Enhancement

Summary

This PR simplifies the invariant errors definitions for the removed components by creating helper function in DEV mode.

errorOnAccess function performs practically the same code (one space has been replaced with \n in the message). It sole purpose is to reduce redundancy and cleanup the code.

Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog -->

[Internal] [Added] - add helper which throws error for removed component

Test Plan

I have run the tests using RNTester and local working copy of React Native.

Preview

IMG_6569

+74 -145

4 comments

1 changed file

Simek

pr closed time in a month

pull request commentfacebook/react-native

simplify code which throws errors for the removed components

Thanks for proposing this. I don't think reusing the same function here is necessary and don't think saving a few lines of development only code is worth it.

Simek

comment created time in a month

startedcode-hike/codehike

started time in a month

pull request commentfacebook/jest

setMock for nonexistent modules

Yes this was shipped using jest.mock('moduleName', fn, {virtual: true}).

Kureev

comment created time in a month

issue commentreactjs/react-codemod

unable to publish react-codemod to npm

Not sure what issue you ran into, maybe the registry had issues when you tried?

I published react-codemod@5.2.1. I don't have access to this repo to close this issue though :D

Hope you are well.

threepointone

comment created time in a month

issue commentfacebook/metro

Follow symlinks?

Locking this issue due to spam. Will reopen in the future.

jeanlauliac

comment created time in 2 months

create barnchfacebook/react

branch : cpojer-patch-1

created branch time in 2 months

PR opened facebook/react

Fix react-runtime `main` field

The "main" field in this package points to a non-existent file. This fixes it.

+1 -1

0 comment

1 changed file

pr created time in 2 months

pull request commentcallstack/react-native-paper

[Test] Do not publish lib

I'm actually using it like this:

"react-native-paper": "npm:react-native-paper-light@^4.0.0-alpha.1",
Trancever

comment created time in 2 months

pull request commentcallstack/react-native-paper

[Test] Do not publish lib

This is amazing, thanks for doing this <3

Trancever

comment created time in 2 months

issue commentoblador/react-native-vector-icons

Next release or RC release?

It would be great if a new release could be made!

zabojad

comment created time in 2 months

push eventfacebook/jest

Joe Lencioni

commit sha 504cacee18b844a974e76e5c45b2568bf023d3ac

Improve Jest startup time and test runtime, particularly when running with coverage, by caching micromatch and avoiding recreating RegExp instances (#10131) Co-authored-by: Christoph Nakazawa <cpojer@fb.com>

view details

push time in 2 months

PR merged facebook/jest

Reviewers
Improve Jest startup time and test runtime, particularly when running with coverage, by caching micromatch and avoiding recreating RegExp instances cla signed

I was profiling some Jest runs at Airbnb and noticed that on my MacBook Pro, we can spend over 2 seconds at Jest startup time in SearchSource getTestPaths. I believe that this will grow as the size of the codebase increases.

Looking at the call stacks, it appears to be calling micromatch repeatedly, which calls picomatch, which builds a regex out of the globs. It seems that the parsing and regex building also triggers the garbage collector frequently.

Upon testing, I noticed that the globs don't actually change between these calls, so we can save a bunch of work by making a micromatch matcher and reusing that function for all of the paths.

micromatch has some logic internally to handle lists of globs that may include negated globs. A naive approach of just checking if it matched any of the globs won't capture that, so I copied and simplified the logic from within micromatch.

https://github.com/micromatch/micromatch/blob/fe4858b0/index.js#L27-L77

In my profiling of this change locally, this brings down the time of startRun from about 2000ms to about 200ms.

Before: image

Before, zoomed in: image

After:

image


Avoid recreating RegExp instances in regexToMatcher

After optimizing globsToMatcher, I noticed that there was still a lot of unnecessary overhead at Jest startup time spent recreating the same RegExp instances repeatedly. Thankfully, we can be a little smarter about this and create them all ahead of time and just reuse them.

On top of my globsToMatcher optimization, this brings the speed of the ArrayMap in startRun down from about 160ms to about 7ms.

Before: image

After: image


Optimize micromatch and RegExps in shouldInstrument

I've been profiling running Jest with code coverage at Airbnb, and noticed that shouldInstrument is called often and is fairly expensive. It also seems to call micromatch and new RegExp repeatedly, both of which can be optimized by caching the work to convert globs and strings into matchers and regexes.

I profiled this change by running a set of 27 fairly simple tests. Before this change, about 6-7 seconds was spent in shouldInstrument. After this change, only 400-500 ms is spent there. I would expect this delta to increase along with the number of tests and size of their dependency graphs.

A typical shouldInstrument call before this change: image

A typical shouldInstrument call after this change (most are actually too fast to even show up in the profiler now): image


I was profiling some Jest runs at Airbnb and noticed that on my MacBook Pro, we can spend over 30 seconds after running Jest with code coverage as the coverage reporter adds all of the untested files. I believe that this will grow as the size of the codebase increases.

Looking at the call stacks, it appears to be calling micromatch repeatedly, which calls picomatch, which builds a regex out of the globs. It seems that the parsing and regex building also triggers the garbage collector frequently.

Since this is in a tight loop and the globs won't change between checks, we can greatly improve the performance here by using micromatch.matcher.

This optimization reduces the block of time here from about 30s to about 10s. The aggregated total time of coverage reporter's onRunComplete goes from 23s to 600ms.

Before:

image

Before, zoomed in: image

After:

image

After, zoomed in: image

<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. -->

<!-- Please remember to update CHANGELOG.md in the root of the project if you have not done so. -->

Summary

<!-- Explain the motivation for making this change. What existing problem does the pull request solve? --> Motivation: Improve slow Jest startup and runtime speed, particularly when running with coverage

Test plan

<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. -->

I ran jest in the Airbnb frontend monorepo with and without coverage options, with a path argument.

+244 -19

8 comments

9 changed files

lencioni

pr closed time in 2 months

push eventlencioni/jest

Christoph Nakazawa

commit sha 03c800467f7d73e979809cda9deae8e10522cbea

Update globsToMatcher.ts

view details

push time in 2 months

Pull request review commentfacebook/jest

Watchman crawler now includes dotfiles

 const CHANGE_INTERVAL = 30; const MAX_WAIT_TIME = 240000; const NODE_MODULES = path.sep + 'node_modules' + path.sep; const PACKAGE_JSON = path.sep + 'package.json';+const VCS_DIRECTORIES = ['.git', '.svn', '.hg']+  .map(vcs => '/' + vcs + '/')

This should use ^ and $, right?

grosto

comment created time in 2 months

issue commentreact-native-community/releases

v0.63.0 Discussion

Locking this issue to maintainers as the discussion went off topic and wasn't focused on the actual release any longer. We'll release 0.63.0 soon.

TheSavior

comment created time in 2 months

issue openedfacebook/jest

Single line inline snapshots conflict with `babel/quotes` in eslint

When I have an assertion like:

 expect(warningMessages[0]).toMatchInlineSnapshot(
        `"Could not connect to the HTTP cache. Original error: HTTP error: 502"`,
);

eslint will report this issue in some setups:

Strings must use singlequote. (babel/quotes)
Lint code: ESLINT
Lint name: babel/quotes

This is not ideal. Could we change the snapshot inliner to use single-quotes if the result is only a single line?

created time in 2 months

pull request commentfacebook/react-native

Create bundle registry in Executor and pass bundle to register bundle (follow-up to #27844)

This diff adds OTA-like functionality to React Native core which we cannot currently support. From looking at the code it will also break a bunch of stuff at FB so it'll likely be very hard to integrate. It's confusing to add a "bundleId" to so many callsites, I don't think it is necessary to increase complexity like this.

I think we should take a different approach. I landed a diff that exposes a new loader on the bridge, which will allow you to build your own TurboModule to load bundles outside of React Native. It also comes with an example TurboModule that should only be used for development purposes (ie. we will not be accepting changes to this module to make it work in prod). This should give you an idea of what it would take to build your own OTA client including downloading, verification, storage and evaluation of code outside of RN core.

See https://github.com/facebook/react-native/commit/ad879e50bcd51caca76b1073720f2b63df485ff1

simka

comment created time in 2 months

PR closed facebook/metro

Bump websocket-extensions from 0.1.3 to 0.1.4 in /website CLA Signed dependencies

Bumps websocket-extensions from 0.1.3 to 0.1.4. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md">websocket-extensions's changelog</a>.</em></p> <blockquote> <h3>0.1.4 / 2020-06-02</h3> <ul> <li>Remove a ReDoS vulnerability in the header parser (CVE-2020-7662, reported by Robert McLaughlin)</li> <li>Change license from MIT to Apache 2.0</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/faye/websocket-extensions-node/commit/8efd0cd6e35faf9bb9cb08759be1e27082177d43"><code>8efd0cd</code></a> Bump version to 0.1.4</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/3dad4ad44a8c5f74d4f8f4efd3f9d6e0b5df3051"><code>3dad4ad</code></a> Remove ReDoS vulnerability in the Sec-WebSocket-Extensions header parser</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/4a76c75efb1c5d6a2f60550e9501757458d19533"><code>4a76c75</code></a> Add Node versions 13 and 14 on Travis</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/44a677a9c0631daed0b0f4a4b68c095b624183b8"><code>44a677a</code></a> Formatting change: {...} should have spaces inside the braces</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/f6c50aba0c20ff45b0f87cea33babec1217ec3f5"><code>f6c50ab</code></a> Let npm reformat package.json</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/2d211f3705d52d9efb4f01daf5a253adf828592e"><code>2d211f3</code></a> Change markdown formatting of docs.</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/0b620834cc1e1f2eace1d55ab17f71d90d88271d"><code>0b62083</code></a> Update Travis target versions.</li> <li><a href="https://github.com/faye/websocket-extensions-node/commit/729a4653073fa8dd020561113513bfa2e2119415"><code>729a465</code></a> Switch license to Apache 2.0.</li> <li>See full diff in <a href="https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4">compare view</a></li> </ul> </details> <br />

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


<details> <summary>Dependabot commands and options</summary> <br />

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the Security Alerts page.

</details>

+3 -2

0 comment

1 changed file

dependabot[bot]

pr closed time in 2 months

push eventfacebook/react-native-website

Bartosz Kaszubowski

commit sha c1e141e31c0e4b8b685766f61768327d822664fc

mimic more reactjs.org BLM banner style, add grayscale

view details

push time in 2 months

PR merged facebook/react-native-website

Reviewers
mimic more reactjs.org BLM banner style, add grayscale filter

This PR is an attempt to mimic more reactjs.org style of BLM banner and small design changes on the reactnative.dev. The changes includes banner at the top, content grayscale filter and some minor improvements to prevent white background before the BLM banner loads and jumping of the header after the BLM banner loads (this problem has occured when components switched their places).

Preview

Annotation 2020-06-06 000313

+24 -6

1 comment

2 changed files

Simek

pr closed time in 2 months

fork cpojer/react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.

https://developers.facebook.com/docs/react-native

fork in 2 months

pull request commentfacebook/jest

feat(jest-haste-map): Enable crawling for symlink test files

We should move to the haste config but I honestly don't see why we need a CLI argument for this. Why would you toggle this for some invocations and not others? I think this should be a config only option.

mrmeku

comment created time in 2 months

push eventfacebook/react-native-website

cpojer

commit sha af18c1dcf6757a8903896c548dd55c81ed0c219b

Black Lives Matter banner

view details

Christoph Nakazawa

commit sha 491131c37ab4049768acd0531ee85fb275c868a8

Update website/static/css/homepage/HeaderHero.css Co-authored-by: Ricky <rickhanlonii@gmail.com>

view details

Christoph Nakazawa

commit sha 20b92a935d7c485d9e94453243980a77ddd680f6

Merge pull request #1971 from cpojer/master

view details

push time in 2 months

PR merged facebook/react-native-website

Black Lives Matter banner Partner RN Team p: Facebook

Supporting a movement that is important and will hopefully make a difference.

Screen Shot 2020-06-04 at 21 44 41

Screen Shot 2020-06-04 at 1 55 52 PM

+41 -2

1 comment

2 changed files

cpojer

pr closed time in 2 months

push eventcpojer/react-native-website

Christoph Nakazawa

commit sha 491131c37ab4049768acd0531ee85fb275c868a8

Update website/static/css/homepage/HeaderHero.css Co-authored-by: Ricky <rickhanlonii@gmail.com>

view details

push time in 2 months

PR opened facebook/react-native-website

Black Lives Matter banner

Supporting a movement that is important and will hopefully make a difference.

Screen Shot 2020-06-04 at 21 44 41

+39 -2

0 comment

2 changed files

pr created time in 2 months

push eventcpojer/react-native-website

cpojer

commit sha af18c1dcf6757a8903896c548dd55c81ed0c219b

Black Lives Matter banner

view details

push time in 2 months

push eventcpojer/react-native-website

Nat Alison

commit sha 9ecd6d9f9c3a7dc0479c3f2b3ff9f459f95770a9

redesign the header

view details

Nat Alison

commit sha 582dc5f48cfe1fe9bc93860b50670740266a742a

change to all new file for ease

view details

Nat Alison

commit sha 41fd5cd579100153da22ecde5f24090fe20bdf27

add features text

view details

Nat Alison

commit sha 4c95a837a5128316fdd3fec84df52e89fb7e6c44

doc reloading placeholder

view details

Nat Alison

commit sha cdfca74fcd0c05ed361204c92dc83e36baad0769

Merge branch 'master' into redesign-homepage

view details

Nat Alison

commit sha 36ce58faec7338b9042fdca6b77f4bddd56cb2d3

mockup for docs and talks

view details

Nat Alison

commit sha b4f1cce4167f5eb58f8aa76f211b010f5b7aae77

app showcase

view details

Nat Alison

commit sha b0c47d51008952dfce0a41b371dac1f7eaed12bf

get started instructions

view details

Nat Alison

commit sha 5d05d9dd51ea900fcaf2d9bd7790c5a9b2cfc43d

refactor

view details

Nat Alison

commit sha ab491efb7c92a1fadc489e47918cd9d4b27d321b

add stuff to the thing

view details

Nat Alison

commit sha 5707cba7ee32d5a41604e605b803f2180c2df7d5

adjustments

view details

Nat Alison

commit sha 32435b9efc1c7c4b94e5ee9b07cf3f59b861da13

doodles on the terminal

view details

Nat Alison

commit sha fd0e602df30cde986e739ca95c0114026c2343fe

add facebook logo

view details

Nat Alison

commit sha e40f4919b42730884568e7c877395e2ffd4670e8

more pinned apps

view details

Nat Alison

commit sha dbdcaeb2caa2a6c158037038294f7a2147f6be48

cross platform image

view details

Nat Alison

commit sha 9d1b32d6bd8be14c3f6366d39b99ade1ffb8af1d

code sample

view details

Nat Alison

commit sha 4ef299590952d69f7c97c11dc20530509151698e

add more images

view details

Nat Alison

commit sha 64dde1869aa60d0304a0a75019ab94a32167bf4d

start preparing for mobile styling

view details

Nat Alison

commit sha b235ae19d1bc53448864bc84a8addabde83cbbea

more mobile stylings

view details

Nat Alison

commit sha 3ab91cdddce317eddaf45deb3872b91aafc0d839

twitter link

view details

push time in 2 months

Pull request review commentfacebook/jest

feat(jest-haste-map): Enable crawling for symlink test files

 class HasteMap extends EventEmitter {       roots: options.roots,     }; +    const watchmanConfigPath = path.join(options.rootDir, '.watchmanconfig');+    if (existsSync(watchmanConfigPath)) {+      try {+        const configStr = readFileSync(watchmanConfigPath).toString().trim();+        const watchmanConfig = configStr === '' ? {} : JSON.parse(configStr);+        const watchSymlinks = Boolean(watchmanConfig['watch_symlinks']);++        // Automatically enable symlink crawling in node crawler if watchman is+        // set up to crawl symlinks.+        if (watchSymlinks) {+          if (!crawlerOptions.crawlSymlinks) {+            this._console.warn(+              `jest-haste-map: watch_symlinks is enabled in .watchmanconfig ` ++                `but --crawlSymlinks was not passed to jest as a flag. ` ++                `  This will result in different behavior when watchman ` ++                `is enabled/disabled`,+            );+          }+        } else {+          if (crawlerOptions.crawlSymlinks) {+            this._console.warn(+              `jest-haste-map: --crawlSymlinks was passed but symlink ` ++                `crawling is not enabled in .watchmanconfig.\n` ++                `  To enable symlink crawling in .watchmanconfig set ` ++                `"watch_symlinks": true`,+            );+          }+        }+      } catch (e) {
      } catch (error) {
mrmeku

comment created time in 2 months

Pull request review commentfacebook/jest

feat(jest-haste-map): Enable crawling for symlink test files

 class HasteMap extends EventEmitter {       roots: options.roots,     }; +    const watchmanConfigPath = path.join(options.rootDir, '.watchmanconfig');+    if (existsSync(watchmanConfigPath)) {+      try {+        const configStr = readFileSync(watchmanConfigPath).toString().trim();+        const watchmanConfig = configStr === '' ? {} : JSON.parse(configStr);+        const watchSymlinks = Boolean(watchmanConfig['watch_symlinks']);++        // Automatically enable symlink crawling in node crawler if watchman is+        // set up to crawl symlinks.+        if (watchSymlinks) {+          if (!crawlerOptions.crawlSymlinks) {+            this._console.warn(+              `jest-haste-map: watch_symlinks is enabled in .watchmanconfig ` ++                `but --crawlSymlinks was not passed to jest as a flag. ` ++                `  This will result in different behavior when watchman ` ++                `is enabled/disabled`,+            );+          }+        } else {+          if (crawlerOptions.crawlSymlinks) {+            this._console.warn(+              `jest-haste-map: --crawlSymlinks was passed but symlink ` ++                `crawling is not enabled in .watchmanconfig.\n` ++                `  To enable symlink crawling in .watchmanconfig set ` ++                `"watch_symlinks": true`,+            );+          }+        }+      } catch (e) {+        this._console.warn(+          `jest-haste-map: Failed to parse .watchmanconfig.\n  ${e}`,
          `jest-haste-map: Failed to parse .watchmanconfig.\n  Original Error: ${e}`,
mrmeku

comment created time in 2 months

Pull request review commentfacebook/jest

feat(jest-haste-map): Enable crawling for symlink test files

 class HasteMap extends EventEmitter {       roots: options.roots,     }; +    const watchmanConfigPath = path.join(options.rootDir, '.watchmanconfig');+    if (existsSync(watchmanConfigPath)) {+      try {+        const configStr = readFileSync(watchmanConfigPath).toString().trim();+        const watchmanConfig = configStr === '' ? {} : JSON.parse(configStr);+        const watchSymlinks = Boolean(watchmanConfig['watch_symlinks']);++        // Automatically enable symlink crawling in node crawler if watchman is+        // set up to crawl symlinks.+        if (watchSymlinks) {+          if (!crawlerOptions.crawlSymlinks) {+            this._console.warn(+              `jest-haste-map: watch_symlinks is enabled in .watchmanconfig ` ++                `but --crawlSymlinks was not passed to jest as a flag. ` ++                `  This will result in different behavior when watchman ` ++                `is enabled/disabled`,+            );+          }+        } else {+          if (crawlerOptions.crawlSymlinks) {+            this._console.warn(+              `jest-haste-map: --crawlSymlinks was passed but symlink ` ++                `crawling is not enabled in .watchmanconfig.\n` ++                `  To enable symlink crawling in .watchmanconfig set ` ++                `"watch_symlinks": true`,
                `"watch_symlinks": true.`,
mrmeku

comment created time in 2 months

Pull request review commentfacebook/jest

feat(jest-haste-map): Enable crawling for symlink test files

 class HasteMap extends EventEmitter {       roots: options.roots,     }; +    const watchmanConfigPath = path.join(options.rootDir, '.watchmanconfig');+    if (existsSync(watchmanConfigPath)) {+      try {+        const configStr = readFileSync(watchmanConfigPath).toString().trim();+        const watchmanConfig = configStr === '' ? {} : JSON.parse(configStr);+        const watchSymlinks = Boolean(watchmanConfig['watch_symlinks']);
        const watchSymlinks = Boolean(watchmanConfig.watch_symlinks);
mrmeku

comment created time in 2 months

Pull request review commentfacebook/jest

feat(jest-haste-map): Enable crawling for symlink test files

 function find(            // This logic is unnecessary for node > v10.10, but leaving it in           // since we need it for backwards-compatibility still.-          if (!err && stat && !stat.isSymbolicLink()) {+          if (!err && stat) {             if (stat.isDirectory()) {               search(file);+            }+            if (stat.isSymbolicLink()) {

This pyramid code is extremely hard to follow. Any chance of refactoring and flattening it a bit?

mrmeku

comment created time in 2 months

Pull request review commentfacebook/jest

feat(jest-haste-map): Enable crawling for symlink test files

 export async function runCLI(     argv,     projects,   );-

why?

mrmeku

comment created time in 2 months

Pull request review commentfacebook/jest

feat(jest-haste-map): Enable crawling for symlink test files

 export type DefaultOptions = {   coveragePathIgnorePatterns: Array<string>;   coverageReporters: Array<string | [string, any]>;   coverageProvider: CoverageProvider;+  crawlSymlinks: boolean;

Oh yeah this should definitely go into haste because that will make it work with tools like Metro more easily.

mrmeku

comment created time in 2 months

Pull request review commentfacebook/jest

feat(jest-haste-map): Enable crawling for symlink test files

 export type DefaultOptions = {   coveragePathIgnorePatterns: Array<string>;   coverageReporters: Array<string | [string, any]>;   coverageProvider: CoverageProvider;+  crawlSymlinks: boolean;

Can we call this enableSymlinks or move it into haste and call it symlinks?

mrmeku

comment created time in 2 months

Pull request review commentfacebook/jest

feat(jest-haste-map): Enable crawling for symlink test files

 class HasteMap extends EventEmitter {       roots: options.roots,     }; +    const watchmanConfigPath = path.join(options.rootDir, '.watchmanconfig');+    if (existsSync(watchmanConfigPath)) {+      try {+        const configStr = readFileSync(watchmanConfigPath).toString().trim();+        const watchmanConfig = configStr === '' ? {} : JSON.parse(configStr);+        const watchSymlinks = Boolean(watchmanConfig['watch_symlinks']);++        // Automatically enable symlink crawling in node crawler if watchman is+        // set up to crawl symlinks.+        if (watchSymlinks) {+          if (!crawlerOptions.crawlSymlinks) {+            this._console.warn(+              `jest-haste-map: watch_symlinks is enabled in .watchmanconfig ` ++                `but --crawlSymlinks was not passed to jest as a flag. ` ++                `  This will result in different behavior when watchman ` ++                `is enabled/disabled`,
                `is enabled/disabled.`,
mrmeku

comment created time in 2 months

Pull request review commentfacebook/jest

feat(jest-haste-map): Enable crawling for symlink test files

 class HasteMap extends EventEmitter {       roots: options.roots,     }; +    const watchmanConfigPath = path.join(options.rootDir, '.watchmanconfig');+    if (existsSync(watchmanConfigPath)) {+      try {+        const configStr = readFileSync(watchmanConfigPath).toString().trim();+        const watchmanConfig = configStr === '' ? {} : JSON.parse(configStr);+        const watchSymlinks = Boolean(watchmanConfig['watch_symlinks']);++        // Automatically enable symlink crawling in node crawler if watchman is+        // set up to crawl symlinks.+        if (watchSymlinks) {+          if (!crawlerOptions.crawlSymlinks) {+            this._console.warn(+              `jest-haste-map: watch_symlinks is enabled in .watchmanconfig ` ++                `but --crawlSymlinks was not passed to jest as a flag. ` +

"Jest"

mrmeku

comment created time in 2 months

pull request commentfacebook/metro

[rn-babel-transformer]: use async transform

Why would this affect performance positively? Can you share some numbers?

jrylan

comment created time in 2 months

pull request commentfacebook/metro

[rn-babel-transformer]: use async transform

This diff breaks React Native on master, and it has incorrect flow type definitions.

Could you fix the flow issue (we have custom babel types in this repo which you'll need to adjust) and ensure this works with the master version of both Metro and React Native? Otherwise we won't be able to land this.

jrylan

comment created time in 2 months

pull request commentfacebook/react-native

update link contributor covenant in CODE_OF_CONDUCT.md

Could you sign the FB CLA under code.facebook.com/cla?

luism3861

comment created time in 3 months

delete branch cpojer/react-native-sensors

delete branch : patch-1

delete time in 3 months

pull request commentreact-native-sensors/react-native-sensors

Remove dev dependencies from the published npm package

Done! I hope the bot is happy with me :)

cpojer

comment created time in 3 months

push eventcpojer/react-native-sensors

Christoph Nakazawa

commit sha 4b10610f3d6e8c5306c4291b39cfde4aeb7baabf

fix: remove dev dependencies from the published npm package

view details

push time in 3 months

pull request commentromejs/rome

Add governance document

This is possibly the wrong place for this discussion but I think there is something to be said about reported violations that can be one-sided, like what if somebody's aim is to discredit somebody else after they got into a fight, or somebody sharing a really skewed perspective of what happened. I think it would be great to list the process in detail, including talking to the person who is accused of wrongdoing and identifying the root cause, instead of saying that a contributor will be banned after a violation is reported. While likely not the usual case (I do not want to discredit any future people who make use of the email address and report violations), it is possible that a report is wrong and the situation is explainable. Ideally the process will ensure that everyone is given privacy and space to deal with it instead of making quick decisions to resolve a tough situation.

(Note: this is me observing other projects, I have not been involved in such discussions or violations myself)

sebmck

comment created time in 3 months

Pull request review commentromejs/rome

Add governance document

+# Governance++This document outlines the governance model for Rome. This includes the contributor model, code review, merging, and the consequences and process for code of conduct violations.++## Member Roles++All members must follow the [code of conduct](./CODE_OF_CONDUCT.md). Consequences for member violations are detailed in [Moderation](#moderation).++### Core Contributor++Core Contributors are those who have proved themselves as an active contributor by being involved in project management or by submitting high quality pull requests.

I think specifying them as minimums is a good idea then.

sebmck

comment created time in 3 months

Pull request review commentromejs/rome

Add governance document

+# Governance++This document outlines the governance model for Rome. This includes the contributor model, code review, merging, and the consequences and process for code of conduct violations.++## Member Roles++All members must follow the [code of conduct](./CODE_OF_CONDUCT.md). Consequences for member violations are detailed in [Moderation](#moderation).++### Core Contributor++Core Contributors are those who have proved themselves as an active contributor by being involved in project management or by submitting high quality pull requests.++There are no expectations around activity. There may be a time where contributor privileges are restricted or removed for inactivity. However you will not lose org membership.++New contributors will be decided based on a general consensus by the existing core contributors.++### Admin++The amount of admins will be kept deliberately small. An admin has additional privileges over a core contributor including:++- Access to the [@romejsdev Twitter account](https://twitter.com/romejsdev)+- Administration privileges on the [Rome GitHub org](https://github.com/romejs)+- Administration privileges on the [Rome Discord server](https://github.com/romejs)+- Publish access to the [`rome` npm package](https://www.npmjs.com/package/rome)+- Domain registrar and DNS access to all `romejs.*` domains+- Administration access to the `romejs.dev` Netlify account+- Ability to decide on moderation decisions involving core contributors+- Access to the `*@romejs.dev` email address++The separation of Core Contributor and Admin allows for a minimum access of privileges.++New admins will be decided based on a general consensus by the existing admins.++### Owners++Certain parts of the codebase can be owned by one or more people. This process is informal and inclusion could be a result of substantial contribution or delegation by other members. It's the responsibility of a core contributor to identify the relevant owners and ensure there's an understanding when it comes to code review.++## Current Members++Members listed in alphabetical order.++### Admins++- [Sebastian McKenzie @sebmck](https://github.com/sebmck)++### Core Contributors++- [Eduardo Lopes @EduardoLopes](https://github.com/EduardoLopes)+- [Florent Cailhol @ooflorent](https://github.com/ooflorent)+- [Jamie Kyle @jamiebuilds](https://github.com/jamiebuilds)+- [Kevin Kelbie](https://github.com/KevinKelbie)+- [Olivier Dusabimana @diokey](https://github.com/diokey)+- [Paul Bouchon @bitpshr](https://github.com/bitpshr)+- [Victor Hom @VictorHom](https://github.com/VictorHom)++## Code review and merging++- All code needs to go through pull requests and must pass status checks before being merged. If a PR is merged that breaks `master` due to the branch not being up to date, then it should either be reverted or a quick fix merged as a separate PR.+- If a PR is against code that you have previously committed and is either small changes, bug fixes, or refactors, then you're free to merge it without any review. However if you don't feel confident in your changes then wait for approval from another core contributor.+- If you are an owner of a particular area you are free to merge it without any review despite PR size.+- If an area involves multiple owners then it's up to .+- If after a PR is merged and there are comments or suggestions after the fact, allow yourself time to address them in a follow up PR. If you don't think you will be able to respond in a reasonable timeframe then create an issue to track.+- You are welcome to use the `rome` repo for your WIP branches. However you should prefix branches with your username. ie. `git branch sebmck/feature`. Branches not involved in an active PR will be regularly pruned.+- If you are adding a new feature then ensure that it has been discussed or approved on GitHub or Discord.++## Moderation++Users found to be in violation of the projects [code of conduct](./CODE_OF_CONDUCT.md) will be:++- Banned from the GitHub org and Discord server+- Have their contributor status revoked (if applicable)+- Have admin privileges revoked (if applicable)+- Action listed in [`MODERATION.md`](./MODERATION.md). There may be some scenarios where discretion is required and some details omitted to protect individuals.++Code of conduct violations can be reported to <conduct@romejs.dev> which is listed in the [code of conduct](./CODE_OF_CONDUCT.md). This email address is monitored by admins.

The other doc made me think that it goes to "community leaders" that are separate from the admins. It may make sense to clarify that there. Also, bummer, because if I think an admin violated the CoC and this email goes out to all admins I don't really get protection as the person in question will also see my complaint and that it's coming from me. This may intimidate members from the community to report possible violations.

sebmck

comment created time in 3 months

Pull request review commentromejs/rome

Add governance document

+# Governance++This document outlines the governance model for Rome. This includes the contributor model, code review, merging, and the consequences and process for code of conduct violations.++## Member Roles++All members must follow the [code of conduct](./CODE_OF_CONDUCT.md). Consequences for member violations are detailed in [Moderation](#moderation).++### Core Contributor++Core Contributors are those who have proved themselves as an active contributor by being involved in project management or by submitting high quality pull requests.++There are no expectations around activity. There may be a time where contributor privileges are restricted or removed for inactivity. However you will not lose org membership.++New contributors will be decided based on a general consensus by the existing core contributors.++### Admin++The amount of admins will be kept deliberately small. An admin has additional privileges over a core contributor including:++- Access to the [@romejsdev Twitter account](https://twitter.com/romejsdev)+- Administration privileges on the [Rome GitHub org](https://github.com/romejs)+- Administration privileges on the [Rome Discord server](https://github.com/romejs)+- Publish access to the [`rome` npm package](https://www.npmjs.com/package/rome)+- Domain registrar and DNS access to all `romejs.*` domains+- Administration access to the `romejs.dev` Netlify account+- Ability to decide on moderation decisions involving core contributors+- Access to the `*@romejs.dev` email address++The separation of Core Contributor and Admin allows for a minimum access of privileges.++New admins will be decided based on a general consensus by the existing admins.++### Owners++Certain parts of the codebase can be owned by one or more people. This process is informal and inclusion could be a result of substantial contribution or delegation by other members. It's the responsibility of a core contributor to identify the relevant owners and ensure there's an understanding when it comes to code review.++## Current Members++Members listed in alphabetical order.++### Admins++- [Sebastian McKenzie @sebmck](https://github.com/sebmck)++### Core Contributors++- [Eduardo Lopes @EduardoLopes](https://github.com/EduardoLopes)+- [Florent Cailhol @ooflorent](https://github.com/ooflorent)+- [Jamie Kyle @jamiebuilds](https://github.com/jamiebuilds)+- [Kevin Kelbie](https://github.com/KevinKelbie)+- [Olivier Dusabimana @diokey](https://github.com/diokey)+- [Paul Bouchon @bitpshr](https://github.com/bitpshr)+- [Victor Hom @VictorHom](https://github.com/VictorHom)++## Code review and merging++- All code needs to go through pull requests and must pass status checks before being merged. If a PR is merged that breaks `master` due to the branch not being up to date, then it should either be reverted or a quick fix merged as a separate PR.+- If a PR is against code that you have previously committed and is either small changes, bug fixes, or refactors, then you're free to merge it without any review. However if you don't feel confident in your changes then wait for approval from another core contributor.+- If you are an owner of a particular area you are free to merge it without any review despite PR size.+- If an area involves multiple owners then it's up to .+- If after a PR is merged and there are comments or suggestions after the fact, allow yourself time to address them in a follow up PR. If you don't think you will be able to respond in a reasonable timeframe then create an issue to track.+- You are welcome to use the `rome` repo for your WIP branches. However you should prefix branches with your username. ie. `git branch sebmck/feature`. Branches not involved in an active PR will be regularly pruned.+- If you are adding a new feature then ensure that it has been discussed or approved on GitHub or Discord.++## Moderation++Users found to be in violation of the projects [code of conduct](./CODE_OF_CONDUCT.md) will be:++- Banned from the GitHub org and Discord server+- Have their contributor status revoked (if applicable)+- Have admin privileges revoked (if applicable)+- Action listed in [`MODERATION.md`](./MODERATION.md). There may be some scenarios where discretion is required and some details omitted to protect individuals.

"protect individuals" or "protect and individual's privacy"?

sebmck

comment created time in 3 months

Pull request review commentromejs/rome

Add governance document

+# Governance++This document outlines the governance model for Rome. This includes the contributor model, code review, merging, and the consequences and process for code of conduct violations.++## Member Roles++All members must follow the [code of conduct](./CODE_OF_CONDUCT.md). Consequences for member violations are detailed in [Moderation](#moderation).++### Core Contributor++Core Contributors are those who have proved themselves as an active contributor by being involved in project management or by submitting high quality pull requests.++There are no expectations around activity. There may be a time where contributor privileges are restricted or removed for inactivity. However you will not lose org membership.++New contributors will be decided based on a general consensus by the existing core contributors.++### Admin++The amount of admins will be kept deliberately small. An admin has additional privileges over a core contributor including:++- Access to the [@romejsdev Twitter account](https://twitter.com/romejsdev)+- Administration privileges on the [Rome GitHub org](https://github.com/romejs)+- Administration privileges on the [Rome Discord server](https://github.com/romejs)+- Publish access to the [`rome` npm package](https://www.npmjs.com/package/rome)+- Domain registrar and DNS access to all `romejs.*` domains+- Administration access to the `romejs.dev` Netlify account+- Ability to decide on moderation decisions involving core contributors+- Access to the `*@romejs.dev` email address++The separation of Core Contributor and Admin allows for a minimum access of privileges.++New admins will be decided based on a general consensus by the existing admins.++### Owners++Certain parts of the codebase can be owned by one or more people. This process is informal and inclusion could be a result of substantial contribution or delegation by other members. It's the responsibility of a core contributor to identify the relevant owners and ensure there's an understanding when it comes to code review.++## Current Members++Members listed in alphabetical order.++### Admins++- [Sebastian McKenzie @sebmck](https://github.com/sebmck)++### Core Contributors++- [Eduardo Lopes @EduardoLopes](https://github.com/EduardoLopes)+- [Florent Cailhol @ooflorent](https://github.com/ooflorent)+- [Jamie Kyle @jamiebuilds](https://github.com/jamiebuilds)+- [Kevin Kelbie](https://github.com/KevinKelbie)+- [Olivier Dusabimana @diokey](https://github.com/diokey)+- [Paul Bouchon @bitpshr](https://github.com/bitpshr)+- [Victor Hom @VictorHom](https://github.com/VictorHom)++## Code review and merging++- All code needs to go through pull requests and must pass status checks before being merged. If a PR is merged that breaks `master` due to the branch not being up to date, then it should either be reverted or a quick fix merged as a separate PR.+- If a PR is against code that you have previously committed and is either small changes, bug fixes, or refactors, then you're free to merge it without any review. However if you don't feel confident in your changes then wait for approval from another core contributor.+- If you are an owner of a particular area you are free to merge it without any review despite PR size.+- If an area involves multiple owners then it's up to .+- If after a PR is merged and there are comments or suggestions after the fact, allow yourself time to address them in a follow up PR. If you don't think you will be able to respond in a reasonable timeframe then create an issue to track.+- You are welcome to use the `rome` repo for your WIP branches. However you should prefix branches with your username. ie. `git branch sebmck/feature`. Branches not involved in an active PR will be regularly pruned.+- If you are adding a new feature then ensure that it has been discussed or approved on GitHub or Discord.++## Moderation++Users found to be in violation of the projects [code of conduct](./CODE_OF_CONDUCT.md) will be:

Is this a one-strike policy?

sebmck

comment created time in 3 months

Pull request review commentromejs/rome

Add governance document

+# Governance++This document outlines the governance model for Rome. This includes the contributor model, code review, merging, and the consequences and process for code of conduct violations.++## Member Roles++All members must follow the [code of conduct](./CODE_OF_CONDUCT.md). Consequences for member violations are detailed in [Moderation](#moderation).++### Core Contributor++Core Contributors are those who have proved themselves as an active contributor by being involved in project management or by submitting high quality pull requests.++There are no expectations around activity. There may be a time where contributor privileges are restricted or removed for inactivity. However you will not lose org membership.++New contributors will be decided based on a general consensus by the existing core contributors.++### Admin++The amount of admins will be kept deliberately small. An admin has additional privileges over a core contributor including:++- Access to the [@romejsdev Twitter account](https://twitter.com/romejsdev)+- Administration privileges on the [Rome GitHub org](https://github.com/romejs)+- Administration privileges on the [Rome Discord server](https://github.com/romejs)+- Publish access to the [`rome` npm package](https://www.npmjs.com/package/rome)+- Domain registrar and DNS access to all `romejs.*` domains+- Administration access to the `romejs.dev` Netlify account+- Ability to decide on moderation decisions involving core contributors+- Access to the `*@romejs.dev` email address++The separation of Core Contributor and Admin allows for a minimum access of privileges.++New admins will be decided based on a general consensus by the existing admins.++### Owners++Certain parts of the codebase can be owned by one or more people. This process is informal and inclusion could be a result of substantial contribution or delegation by other members. It's the responsibility of a core contributor to identify the relevant owners and ensure there's an understanding when it comes to code review.++## Current Members++Members listed in alphabetical order.++### Admins++- [Sebastian McKenzie @sebmck](https://github.com/sebmck)++### Core Contributors++- [Eduardo Lopes @EduardoLopes](https://github.com/EduardoLopes)+- [Florent Cailhol @ooflorent](https://github.com/ooflorent)+- [Jamie Kyle @jamiebuilds](https://github.com/jamiebuilds)+- [Kevin Kelbie](https://github.com/KevinKelbie)+- [Olivier Dusabimana @diokey](https://github.com/diokey)+- [Paul Bouchon @bitpshr](https://github.com/bitpshr)+- [Victor Hom @VictorHom](https://github.com/VictorHom)++## Code review and merging++- All code needs to go through pull requests and must pass status checks before being merged. If a PR is merged that breaks `master` due to the branch not being up to date, then it should either be reverted or a quick fix merged as a separate PR.+- If a PR is against code that you have previously committed and is either small changes, bug fixes, or refactors, then you're free to merge it without any review. However if you don't feel confident in your changes then wait for approval from another core contributor.+- If you are an owner of a particular area you are free to merge it without any review despite PR size.+- If an area involves multiple owners then it's up to .
  • "up to cpojer to act as a tie breaker" or whatever else you wanted to write here.
sebmck

comment created time in 3 months

Pull request review commentromejs/rome

Add governance document

+# Governance++This document outlines the governance model for Rome. This includes the contributor model, code review, merging, and the consequences and process for code of conduct violations.++## Member Roles++All members must follow the [code of conduct](./CODE_OF_CONDUCT.md). Consequences for member violations are detailed in [Moderation](#moderation).++### Core Contributor++Core Contributors are those who have proved themselves as an active contributor by being involved in project management or by submitting high quality pull requests.++There are no expectations around activity. There may be a time where contributor privileges are restricted or removed for inactivity. However you will not lose org membership.++New contributors will be decided based on a general consensus by the existing core contributors.++### Admin++The amount of admins will be kept deliberately small. An admin has additional privileges over a core contributor including:++- Access to the [@romejsdev Twitter account](https://twitter.com/romejsdev)+- Administration privileges on the [Rome GitHub org](https://github.com/romejs)+- Administration privileges on the [Rome Discord server](https://github.com/romejs)+- Publish access to the [`rome` npm package](https://www.npmjs.com/package/rome)+- Domain registrar and DNS access to all `romejs.*` domains+- Administration access to the `romejs.dev` Netlify account+- Ability to decide on moderation decisions involving core contributors+- Access to the `*@romejs.dev` email address++The separation of Core Contributor and Admin allows for a minimum access of privileges.++New admins will be decided based on a general consensus by the existing admins.++### Owners++Certain parts of the codebase can be owned by one or more people. This process is informal and inclusion could be a result of substantial contribution or delegation by other members. It's the responsibility of a core contributor to identify the relevant owners and ensure there's an understanding when it comes to code review.++## Current Members++Members listed in alphabetical order.++### Admins++- [Sebastian McKenzie @sebmck](https://github.com/sebmck)++### Core Contributors++- [Eduardo Lopes @EduardoLopes](https://github.com/EduardoLopes)+- [Florent Cailhol @ooflorent](https://github.com/ooflorent)+- [Jamie Kyle @jamiebuilds](https://github.com/jamiebuilds)+- [Kevin Kelbie](https://github.com/KevinKelbie)+- [Olivier Dusabimana @diokey](https://github.com/diokey)+- [Paul Bouchon @bitpshr](https://github.com/bitpshr)+- [Victor Hom @VictorHom](https://github.com/VictorHom)++## Code review and merging++- All code needs to go through pull requests and must pass status checks before being merged. If a PR is merged that breaks `master` due to the branch not being up to date, then it should either be reverted or a quick fix merged as a separate PR.+- If a PR is against code that you have previously committed and is either small changes, bug fixes, or refactors, then you're free to merge it without any review. However if you don't feel confident in your changes then wait for approval from another core contributor.+- If you are an owner of a particular area you are free to merge it without any review despite PR size.

wowza, that's a lot of power. Should this include some level of testing as a minimum requirement?

sebmck

comment created time in 3 months

Pull request review commentromejs/rome

Add governance document

+# Governance++This document outlines the governance model for Rome. This includes the contributor model, code review, merging, and the consequences and process for code of conduct violations.++## Member Roles++All members must follow the [code of conduct](./CODE_OF_CONDUCT.md). Consequences for member violations are detailed in [Moderation](#moderation).++### Core Contributor++Core Contributors are those who have proved themselves as an active contributor by being involved in project management or by submitting high quality pull requests.++There are no expectations around activity. There may be a time where contributor privileges are restricted or removed for inactivity. However you will not lose org membership.++New contributors will be decided based on a general consensus by the existing core contributors.++### Admin++The amount of admins will be kept deliberately small. An admin has additional privileges over a core contributor including:++- Access to the [@romejsdev Twitter account](https://twitter.com/romejsdev)+- Administration privileges on the [Rome GitHub org](https://github.com/romejs)+- Administration privileges on the [Rome Discord server](https://github.com/romejs)+- Publish access to the [`rome` npm package](https://www.npmjs.com/package/rome)+- Domain registrar and DNS access to all `romejs.*` domains+- Administration access to the `romejs.dev` Netlify account+- Ability to decide on moderation decisions involving core contributors+- Access to the `*@romejs.dev` email address++The separation of Core Contributor and Admin allows for a minimum access of privileges.++New admins will be decided based on a general consensus by the existing admins.++### Owners++Certain parts of the codebase can be owned by one or more people. This process is informal and inclusion could be a result of substantial contribution or delegation by other members. It's the responsibility of a core contributor to identify the relevant owners and ensure there's an understanding when it comes to code review.++## Current Members++Members listed in alphabetical order.++### Admins++- [Sebastian McKenzie @sebmck](https://github.com/sebmck)++### Core Contributors++- [Eduardo Lopes @EduardoLopes](https://github.com/EduardoLopes)+- [Florent Cailhol @ooflorent](https://github.com/ooflorent)+- [Jamie Kyle @jamiebuilds](https://github.com/jamiebuilds)+- [Kevin Kelbie](https://github.com/KevinKelbie)+- [Olivier Dusabimana @diokey](https://github.com/diokey)+- [Paul Bouchon @bitpshr](https://github.com/bitpshr)+- [Victor Hom @VictorHom](https://github.com/VictorHom)++## Code review and merging++- All code needs to go through pull requests and must pass status checks before being merged. If a PR is merged that breaks `master` due to the branch not being up to date, then it should either be reverted or a quick fix merged as a separate PR.+- If a PR is against code that you have previously committed and is either small changes, bug fixes, or refactors, then you're free to merge it without any review. However if you don't feel confident in your changes then wait for approval from another core contributor.

"then wait" -> "you can wait"

sebmck

comment created time in 3 months

Pull request review commentromejs/rome

Add governance document

+# Governance++This document outlines the governance model for Rome. This includes the contributor model, code review, merging, and the consequences and process for code of conduct violations.++## Member Roles++All members must follow the [code of conduct](./CODE_OF_CONDUCT.md). Consequences for member violations are detailed in [Moderation](#moderation).++### Core Contributor++Core Contributors are those who have proved themselves as an active contributor by being involved in project management or by submitting high quality pull requests.++There are no expectations around activity. There may be a time where contributor privileges are restricted or removed for inactivity. However you will not lose org membership.++New contributors will be decided based on a general consensus by the existing core contributors.++### Admin++The amount of admins will be kept deliberately small. An admin has additional privileges over a core contributor including:++- Access to the [@romejsdev Twitter account](https://twitter.com/romejsdev)+- Administration privileges on the [Rome GitHub org](https://github.com/romejs)+- Administration privileges on the [Rome Discord server](https://github.com/romejs)+- Publish access to the [`rome` npm package](https://www.npmjs.com/package/rome)+- Domain registrar and DNS access to all `romejs.*` domains+- Administration access to the `romejs.dev` Netlify account+- Ability to decide on moderation decisions involving core contributors+- Access to the `*@romejs.dev` email address++The separation of Core Contributor and Admin allows for a minimum access of privileges.++New admins will be decided based on a general consensus by the existing admins.++### Owners++Certain parts of the codebase can be owned by one or more people. This process is informal and inclusion could be a result of substantial contribution or delegation by other members. It's the responsibility of a core contributor to identify the relevant owners and ensure there's an understanding when it comes to code review.++## Current Members++Members listed in alphabetical order.++### Admins++- [Sebastian McKenzie @sebmck](https://github.com/sebmck)++### Core Contributors++- [Eduardo Lopes @EduardoLopes](https://github.com/EduardoLopes)+- [Florent Cailhol @ooflorent](https://github.com/ooflorent)+- [Jamie Kyle @jamiebuilds](https://github.com/jamiebuilds)+- [Kevin Kelbie](https://github.com/KevinKelbie)+- [Olivier Dusabimana @diokey](https://github.com/diokey)+- [Paul Bouchon @bitpshr](https://github.com/bitpshr)+- [Victor Hom @VictorHom](https://github.com/VictorHom)++## Code review and merging++- All code needs to go through pull requests and must pass status checks before being merged. If a PR is merged that breaks `master` due to the branch not being up to date, then it should either be reverted or a quick fix merged as a separate PR.

"through Pull Requests (PR)" – you are later using an abbreviation so gotta introduce it.

sebmck

comment created time in 3 months

Pull request review commentromejs/rome

Add governance document

+# Governance++This document outlines the governance model for Rome. This includes the contributor model, code review, merging, and the consequences and process for code of conduct violations.++## Member Roles++All members must follow the [code of conduct](./CODE_OF_CONDUCT.md). Consequences for member violations are detailed in [Moderation](#moderation).++### Core Contributor++Core Contributors are those who have proved themselves as an active contributor by being involved in project management or by submitting high quality pull requests.++There are no expectations around activity. There may be a time where contributor privileges are restricted or removed for inactivity. However you will not lose org membership.++New contributors will be decided based on a general consensus by the existing core contributors.

Majority vote? Unanimous vote?

sebmck

comment created time in 3 months

Pull request review commentromejs/rome

Add governance document

+# Governance++This document outlines the governance model for Rome. This includes the contributor model, code review, merging, and the consequences and process for code of conduct violations.++## Member Roles++All members must follow the [code of conduct](./CODE_OF_CONDUCT.md). Consequences for member violations are detailed in [Moderation](#moderation).++### Core Contributor++Core Contributors are those who have proved themselves as an active contributor by being involved in project management or by submitting high quality pull requests.++There are no expectations around activity. There may be a time where contributor privileges are restricted or removed for inactivity. However you will not lose org membership.++New contributors will be decided based on a general consensus by the existing core contributors.++### Admin++The amount of admins will be kept deliberately small. An admin has additional privileges over a core contributor including:

Why

sebmck

comment created time in 3 months

Pull request review commentromejs/rome

Add governance document

+# Governance++This document outlines the governance model for Rome. This includes the contributor model, code review, merging, and the consequences and process for code of conduct violations.++## Member Roles++All members must follow the [code of conduct](./CODE_OF_CONDUCT.md). Consequences for member violations are detailed in [Moderation](#moderation).++### Core Contributor++Core Contributors are those who have proved themselves as an active contributor by being involved in project management or by submitting high quality pull requests.++There are no expectations around activity. There may be a time where contributor privileges are restricted or removed for inactivity. However you will not lose org membership.

Maybe clarify "once core contributor status is granted […]"

Also: "a time when"?

sebmck

comment created time in 3 months

Pull request review commentromejs/rome

Add governance document

+# Governance++This document outlines the governance model for Rome. This includes the contributor model, code review, merging, and the consequences and process for code of conduct violations.++## Member Roles++All members must follow the [code of conduct](./CODE_OF_CONDUCT.md). Consequences for member violations are detailed in [Moderation](#moderation).++### Core Contributor++Core Contributors are those who have proved themselves as an active contributor by being involved in project management or by submitting high quality pull requests.

"proving themselves" sounds intimidating. Maybe "are those who have been an active contributor for a long period of time by being involved in project management or by submitting high quality pull requests."

You can also specify the period of time directly, like "one month" or "six months" or "two days".

sebmck

comment created time in 3 months

Pull request review commentromejs/rome

Add governance document

+# Governance++This document outlines the governance model for Rome. This includes the contributor model, code review, merging, and the consequences and process for code of conduct violations.++## Member Roles++All members must follow the [code of conduct](./CODE_OF_CONDUCT.md). Consequences for member violations are detailed in [Moderation](#moderation).

"Code of Conduct"?

sebmck

comment created time in 3 months

issue commentfacebook/jest

Make jest small

@probil JSDOM will become optional in Jest 28: https://jestjs.io/blog/2020/05/05/jest-26

Right now it's the default, so Jest 27 will make the node env the default, and then 28 will stop shipping it.

Note that for the monorepo at Facebook where we develop React Native, we blackhole jest-environment-jsdom to an empty module.

styfle

comment created time in 3 months

issue commentfacebook/jest

Make jest small

@SimenB is removing sane in https://github.com/facebook/jest/pull/10048.

styfle

comment created time in 3 months

Pull request review commentfacebook/jest

feat: replace `sane` with `chokidar`

 class HasteMap extends EventEmitter {     let mustCopy = true;      const createWatcher = (root: Config.Path): Promise<Watcher> => {-      // @ts-expect-error: TODO how? "Cannot use 'new' with an expression whose type lacks a call or construct signature."-      const watcher = new Watcher(root, {-        dot: false,-        glob: extensions.map(extension => '**/*.' + extension),-        ignored: ignorePattern,-      });+      const useWatchman = canUseWatchman && this._options.useWatchman;+      const patterns = extensions.map(extension => '**/*.' + extension);+      // Prefer Watchman over Chokidar+      const watcher = useWatchman+        ? new WatchmanWatcher(root, {+            dot: false,+            glob: patterns,+            ignored: ignorePattern,+          })+        : chokidarWatch(patterns, {

Surprising but .. they expose almost the same API? :O

SimenB

comment created time in 3 months

issue commentfacebook/jest

Make jest small

Let's remove node-notifier and make it an optional plugin. I don't know of anyone who uses it, and the people who do can install a separate package to hook it in. Does anyone want to work on a PR to make it its own package that will be used only when installed (and explicitly enabled)?

Note it is already an optional dependency (and at FB we blackhole it to an empty package).

styfle

comment created time in 3 months

PR closed facebook/metro

allow defaultConfigOverrides to work with configModule function CLA Signed

<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. The two fields below are mandatory. -->

Summary

<!-- Explain the motivation for making this change. What existing problem does the pull request solve? -->

I was attempting to write a custom config for a react-native project (mostly for cache control), so I set up my metro.config.js to look something like this:

module.exports = async (defaultConfig) => ({
  ...defaultConfig,
  cacheStores: [
    new FileStore(/* config */),
	...defaultConfig.cacheStores,
  ],
});

However, when I did that, I got compilation errors because of flow syntax not being compiled away. @react-native-community/cli passes in it's own default config as overrides when calling loadConfig.

Unfortunately, these are silently thrown away when you set metro.config.js to export a function.

This is one option for a "fix" (this will make my code work, but may not be generally liked). Another would be:

- const resultedConfig = await configModule(defaultConfig);
+ const resultedConfig = await configModule(defaultConfig, defaultConfigOverrides);

That one would be backwards compatible, because wouldn't touch the default config for older configModules, and newer ones could accept the second argument.

Test plan

<!-- Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI. -->

Unsure at this stage - if there is appetite for this change, I can look at adding tests.

+3 -1

2 comments

1 changed file

deecewan

pr closed time in 3 months

pull request commentfacebook/metro

allow defaultConfigOverrides to work with configModule function

Thanks for the PR! I believe https://github.com/facebook/metro/pull/559 will resolve the same issue, and it has tests, so I'll merge that one.

deecewan

comment created time in 3 months

Pull request review commentfacebook/metro

[rn-babel-transformer]: use async transform

 function buildBabelConfig(filename, options, plugins?: BabelPlugins = []) {   return Object.assign({}, babelRC, config); } -function transform({filename, options, src, plugins}: BabelTransformerArgs) {+async function transform({filename, options, src, plugins}: BabelTransformerArgs) {

What about the callsite of this? Does it already await or work with Promises?

jrylan

comment created time in 3 months

issue commentbabel/babel

Babel 8 Release Plan

@hzoo I think that's a great idea, thank you for thinking about this.

nicolo-ribaudo

comment created time in 3 months

more