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/jasmine-node 3

Integration of Jasmine Spec framework with Node.js

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

Pull request review commentfacebook/metro

add optional dependency support

 describe('reorderGraph', () => {     ]);   }); });++describe('optional dependency', () => {+  let localGraph;+  let localOptions;+  const getAllDependencies = () => {+    const all = new Set();+    mockedDependencyTree.forEach(deps => {+      deps.forEach(r => all.add(r.name));+    });+    return all;+  };+  const assertResults = (dependencies, expectedMissing) => {+    let count = 0;+    const allDependency = getAllDependencies();+    allDependency.forEach(m => {+      const data = dependencies.get(`/${m}`);+      if (expectedMissing.includes(m)) {+        expect(data).toBeUndefined();+      } else {+        expect(data).not.toBeUndefined();+      }+      count += 1;+    });+    expect(count).toBeGreaterThan(0);+    expect(count).toBe(allDependency.size);+  };++  beforeEach(() => {+    // create our own data set+    mockedDependencies = new Set();+    mockedDependencyTree = new Map();++    entryModule = Actions.createFile('/bundle-o');+    // entryModule = Actions.createFile('/regular-a');+    entryModule = Actions.createFile('/optional-c');+    // entryModule = Actions.createFile('/regular-e');++    Actions.addDependency('/bundle-o', '/regular-a');+    Actions.addDependency('/bundle-o', '/optional-b');+    Actions.addDependency('/bundle-o', '/optional-c');+    Actions.addDependency('/optional-c', '/optional-d');+    Actions.addDependency('/optional-c', '/regular-e');++    // remove optional-b+    Actions.deleteFile('/optional-b');++    localOptions = {+      ...options,+      transform(path) {+        const result = options.transform.apply(this, arguments);+        result.dependencies.forEach(dep => {+          if (dep.name.includes('optional-')) {+            dep.data.isOptional = true;+          }+        });+        return result;+      },+    };+    localGraph = {+      dependencies: new Map(),+      entryPoints: ['/bundle-o'],+    };+  });+  describe('when allowOptionalDependencies config is true', () => {+    beforeEach(() => {+      localOptions.allowOptionalDependencies = true;+    });+    it('will ignore only the failed optional dependency', async () => {+      const result = await initialTraverseDependencies(+        localGraph,+        localOptions,+      );++      const dependencies = result.added;++      // only optional-b is actually missing,+      // the other optional modules: optional-c and optional-d will+      // still be included+      assertResults(dependencies, ['optional-b']);+    });+  });+  describe('when allowOptionalDependencies config is false', () => {+    beforeEach(() => {+      localOptions.allowOptionalDependencies = false;+    });+    it('will not ignore failed optional dependency', async () => {+      await expect(+        initialTraverseDependencies(localGraph, localOptions),+      ).rejects.toThrow('Dependency not found: /optional-b->optional-b');+    });+  });+  describe('when allowOptionalDependencies with exclude', () => {+    it('will not ignore the excluded optional dependency', async () => {+      localOptions.allowOptionalDependencies = {exclude: ['optional-b']};+      await expect(+        initialTraverseDependencies(localGraph, localOptions),+      ).rejects.toThrow('Dependency not found: /optional-b->optional-b');+    });+    it('but will still ignore the non-excluded optional dependency', async () => {+      localOptions.allowOptionalDependencies = {exclude: ['optional-d']};+      const result = await initialTraverseDependencies(+        localGraph,+        localOptions,+      );++      const dependencies = result.added;++      // only optional-b is actually missing,+      // the other optional modules: optional-c and optional-d will+      // still be included
      // Only optional-b is actually missing,
      // the other optional modules `optional-c` and `optional-d` will
      // still be included.
connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 describe('reorderGraph', () => {     ]);   }); });++describe('optional dependency', () => {+  let localGraph;+  let localOptions;+  const getAllDependencies = () => {+    const all = new Set();+    mockedDependencyTree.forEach(deps => {+      deps.forEach(r => all.add(r.name));+    });+    return all;+  };+  const assertResults = (dependencies, expectedMissing) => {+    let count = 0;+    const allDependency = getAllDependencies();+    allDependency.forEach(m => {+      const data = dependencies.get(`/${m}`);+      if (expectedMissing.includes(m)) {+        expect(data).toBeUndefined();+      } else {+        expect(data).not.toBeUndefined();+      }+      count += 1;+    });+    expect(count).toBeGreaterThan(0);+    expect(count).toBe(allDependency.size);+  };++  beforeEach(() => {+    // create our own data set+    mockedDependencies = new Set();+    mockedDependencyTree = new Map();++    entryModule = Actions.createFile('/bundle-o');+    // entryModule = Actions.createFile('/regular-a');+    entryModule = Actions.createFile('/optional-c');+    // entryModule = Actions.createFile('/regular-e');++    Actions.addDependency('/bundle-o', '/regular-a');+    Actions.addDependency('/bundle-o', '/optional-b');+    Actions.addDependency('/bundle-o', '/optional-c');+    Actions.addDependency('/optional-c', '/optional-d');+    Actions.addDependency('/optional-c', '/regular-e');++    // remove optional-b+    Actions.deleteFile('/optional-b');++    localOptions = {+      ...options,+      transform(path) {+        const result = options.transform.apply(this, arguments);+        result.dependencies.forEach(dep => {+          if (dep.name.includes('optional-')) {+            dep.data.isOptional = true;+          }+        });+        return result;+      },+    };+    localGraph = {+      dependencies: new Map(),+      entryPoints: ['/bundle-o'],+    };+  });+  describe('when allowOptionalDependencies config is true', () => {+    beforeEach(() => {+      localOptions.allowOptionalDependencies = true;+    });+    it('will ignore only the failed optional dependency', async () => {+      const result = await initialTraverseDependencies(+        localGraph,+        localOptions,+      );++      const dependencies = result.added;++      // only optional-b is actually missing,+      // the other optional modules: optional-c and optional-d will
      // the other optional modules `optional-c` and `optional-d` will
connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 describe('reorderGraph', () => {     ]);   }); });++describe('optional dependency', () => {+  let localGraph;+  let localOptions;+  const getAllDependencies = () => {+    const all = new Set();+    mockedDependencyTree.forEach(deps => {+      deps.forEach(r => all.add(r.name));+    });+    return all;+  };+  const assertResults = (dependencies, expectedMissing) => {+    let count = 0;+    const allDependency = getAllDependencies();+    allDependency.forEach(m => {+      const data = dependencies.get(`/${m}`);+      if (expectedMissing.includes(m)) {+        expect(data).toBeUndefined();+      } else {+        expect(data).not.toBeUndefined();+      }+      count += 1;+    });+    expect(count).toBeGreaterThan(0);+    expect(count).toBe(allDependency.size);+  };++  beforeEach(() => {+    // create our own data set+    mockedDependencies = new Set();+    mockedDependencyTree = new Map();++    entryModule = Actions.createFile('/bundle-o');+    // entryModule = Actions.createFile('/regular-a');+    entryModule = Actions.createFile('/optional-c');+    // entryModule = Actions.createFile('/regular-e');++    Actions.addDependency('/bundle-o', '/regular-a');+    Actions.addDependency('/bundle-o', '/optional-b');+    Actions.addDependency('/bundle-o', '/optional-c');+    Actions.addDependency('/optional-c', '/optional-d');+    Actions.addDependency('/optional-c', '/regular-e');++    // remove optional-b+    Actions.deleteFile('/optional-b');++    localOptions = {+      ...options,+      transform(path) {+        const result = options.transform.apply(this, arguments);+        result.dependencies.forEach(dep => {+          if (dep.name.includes('optional-')) {+            dep.data.isOptional = true;+          }+        });+        return result;+      },+    };+    localGraph = {+      dependencies: new Map(),+      entryPoints: ['/bundle-o'],+    };+  });+  describe('when allowOptionalDependencies config is true', () => {+    beforeEach(() => {+      localOptions.allowOptionalDependencies = true;+    });+    it('will ignore only the failed optional dependency', async () => {+      const result = await initialTraverseDependencies(+        localGraph,+        localOptions,+      );++      const dependencies = result.added;++      // only optional-b is actually missing,+      // the other optional modules: optional-c and optional-d will+      // still be included
      // still be included.
connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 describe('reorderGraph', () => {     ]);   }); });++describe('optional dependency', () => {+  let localGraph;+  let localOptions;+  const getAllDependencies = () => {+    const all = new Set();+    mockedDependencyTree.forEach(deps => {+      deps.forEach(r => all.add(r.name));+    });+    return all;+  };+  const assertResults = (dependencies, expectedMissing) => {+    let count = 0;+    const allDependency = getAllDependencies();+    allDependency.forEach(m => {+      const data = dependencies.get(`/${m}`);+      if (expectedMissing.includes(m)) {+        expect(data).toBeUndefined();+      } else {+        expect(data).not.toBeUndefined();+      }+      count += 1;+    });+    expect(count).toBeGreaterThan(0);+    expect(count).toBe(allDependency.size);+  };++  beforeEach(() => {+    // create our own data set+    mockedDependencies = new Set();+    mockedDependencyTree = new Map();++    entryModule = Actions.createFile('/bundle-o');+    // entryModule = Actions.createFile('/regular-a');+    entryModule = Actions.createFile('/optional-c');+    // entryModule = Actions.createFile('/regular-e');++    Actions.addDependency('/bundle-o', '/regular-a');+    Actions.addDependency('/bundle-o', '/optional-b');+    Actions.addDependency('/bundle-o', '/optional-c');+    Actions.addDependency('/optional-c', '/optional-d');+    Actions.addDependency('/optional-c', '/regular-e');++    // remove optional-b+    Actions.deleteFile('/optional-b');++    localOptions = {+      ...options,+      transform(path) {+        const result = options.transform.apply(this, arguments);+        result.dependencies.forEach(dep => {+          if (dep.name.includes('optional-')) {+            dep.data.isOptional = true;+          }+        });+        return result;+      },+    };+    localGraph = {+      dependencies: new Map(),+      entryPoints: ['/bundle-o'],+    };+  });+  describe('when allowOptionalDependencies config is true', () => {+    beforeEach(() => {+      localOptions.allowOptionalDependencies = true;+    });+    it('will ignore only the failed optional dependency', async () => {+      const result = await initialTraverseDependencies(+        localGraph,+        localOptions,+      );++      const dependencies = result.added;++      // only optional-b is actually missing,
      // Only optional-b is actually missing,
connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 describe('reorderGraph', () => {     ]);   }); });++describe('optional dependency', () => {+  let localGraph;+  let localOptions;+  const getAllDependencies = () => {+    const all = new Set();+    mockedDependencyTree.forEach(deps => {+      deps.forEach(r => all.add(r.name));+    });+    return all;+  };+  const assertResults = (dependencies, expectedMissing) => {+    let count = 0;+    const allDependency = getAllDependencies();+    allDependency.forEach(m => {+      const data = dependencies.get(`/${m}`);+      if (expectedMissing.includes(m)) {+        expect(data).toBeUndefined();+      } else {+        expect(data).not.toBeUndefined();+      }+      count += 1;+    });+    expect(count).toBeGreaterThan(0);+    expect(count).toBe(allDependency.size);+  };++  beforeEach(() => {+    // create our own data set+    mockedDependencies = new Set();+    mockedDependencyTree = new Map();++    entryModule = Actions.createFile('/bundle-o');+    // entryModule = Actions.createFile('/regular-a');+    entryModule = Actions.createFile('/optional-c');+    // entryModule = Actions.createFile('/regular-e');++    Actions.addDependency('/bundle-o', '/regular-a');+    Actions.addDependency('/bundle-o', '/optional-b');+    Actions.addDependency('/bundle-o', '/optional-c');+    Actions.addDependency('/optional-c', '/optional-d');+    Actions.addDependency('/optional-c', '/regular-e');++    // remove optional-b

Remove this comment pls

connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 describe('reorderGraph', () => {     ]);   }); });++describe('optional dependency', () => {+  let localGraph;+  let localOptions;+  const getAllDependencies = () => {+    const all = new Set();+    mockedDependencyTree.forEach(deps => {+      deps.forEach(r => all.add(r.name));+    });+    return all;+  };+  const assertResults = (dependencies, expectedMissing) => {+    let count = 0;+    const allDependency = getAllDependencies();+    allDependency.forEach(m => {+      const data = dependencies.get(`/${m}`);+      if (expectedMissing.includes(m)) {+        expect(data).toBeUndefined();+      } else {+        expect(data).not.toBeUndefined();+      }+      count += 1;+    });+    expect(count).toBeGreaterThan(0);+    expect(count).toBe(allDependency.size);+  };++  beforeEach(() => {+    // create our own data set

Can you remove this comment?

connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 describe('reorderGraph', () => {     ]);   }); });++describe('optional dependency', () => {+  let localGraph;+  let localOptions;+  const getAllDependencies = () => {+    const all = new Set();+    mockedDependencyTree.forEach(deps => {+      deps.forEach(r => all.add(r.name));+    });+    return all;+  };+  const assertResults = (dependencies, expectedMissing) => {+    let count = 0;+    const allDependency = getAllDependencies();+    allDependency.forEach(m => {+      const data = dependencies.get(`/${m}`);+      if (expectedMissing.includes(m)) {+        expect(data).toBeUndefined();+      } else {+        expect(data).not.toBeUndefined();+      }+      count += 1;+    });+    expect(count).toBeGreaterThan(0);+    expect(count).toBe(allDependency.size);+  };++  beforeEach(() => {+    // create our own data set+    mockedDependencies = new Set();+    mockedDependencyTree = new Map();++    entryModule = Actions.createFile('/bundle-o');+    // entryModule = Actions.createFile('/regular-a');+    entryModule = Actions.createFile('/optional-c');+    // entryModule = Actions.createFile('/regular-e');

Can you clean up the three lines above that are unused?

connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 describe('reorderGraph', () => {     ]);   }); });++describe('optional dependency', () => {
describe('optional dependencies', () => {
connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 function resolveDependencies<T>(   dependencies: $ReadOnlyArray<TransformResultDependency>,   options: InternalOptions<T>, ): Map<string, Dependency> {-  return new Map(-    dependencies.map((result: TransformResultDependency) => {-      const relativePath = result.name;--      const dependency = {-        absolutePath: options.resolve(parentPath, result.name),-        data: result,-      };+  const {allowOptionalDependencies} = options;++  const _resolve = (parentPath: string, result: TransformResultDependency) => {+    const relativePath = result.name;+    try {+      return [+        relativePath,+        {+          absolutePath: options.resolve(parentPath, relativePath),+          data: result,+        },+      ];+    } catch (e) {+      // if this is an optional dependency, ignore the resolve error+      if (+        result.data.isOptional === true &&+        allowOptionalDependencies !== false &&+        !(+          Array.isArray(allowOptionalDependencies.exclude) &&+          allowOptionalDependencies.exclude.includes(relativePath)

Should we instead invert this and require users to explicitly include the optional dependencies they want to use? That way we ensure users will update a configuration every time they use an optional dependency and that they will never end up with a broken bundle that is missing a dependency accidentally.

connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 function resolveDependencies<T>(   dependencies: $ReadOnlyArray<TransformResultDependency>,   options: InternalOptions<T>, ): Map<string, Dependency> {-  return new Map(-    dependencies.map((result: TransformResultDependency) => {-      const relativePath = result.name;--      const dependency = {-        absolutePath: options.resolve(parentPath, result.name),-        data: result,-      };+  const {allowOptionalDependencies} = options;++  const _resolve = (parentPath: string, result: TransformResultDependency) => {+    const relativePath = result.name;+    try {+      return [+        relativePath,+        {+          absolutePath: options.resolve(parentPath, relativePath),+          data: result,+        },+      ];+    } catch (e) {+      // if this is an optional dependency, ignore the resolve error
      // If this is an optional dependency, ignore the resolution error.
connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 function resolveDependencies<T>(   dependencies: $ReadOnlyArray<TransformResultDependency>,   options: InternalOptions<T>, ): Map<string, Dependency> {-  return new Map(-    dependencies.map((result: TransformResultDependency) => {-      const relativePath = result.name;--      const dependency = {-        absolutePath: options.resolve(parentPath, result.name),-        data: result,-      };+  const {allowOptionalDependencies} = options;++  const _resolve = (parentPath: string, result: TransformResultDependency) => {+    const relativePath = result.name;+    try {+      return [+        relativePath,+        {+          absolutePath: options.resolve(parentPath, relativePath),+          data: result,+        },+      ];+    } catch (e) {+      // if this is an optional dependency, ignore the resolve error+      if (+        result.data.isOptional === true &&+        allowOptionalDependencies !== false &&+        !(+          Array.isArray(allowOptionalDependencies.exclude) &&+          allowOptionalDependencies.exclude.includes(relativePath)+        )+      ) {+        // should we output some warning? verbose mode?+        return undefined;+      }+      throw e;+    }+  }; -      return [relativePath, dependency];-    }),+  // const map = new Map(+  const resolved = dependencies.reduce(+    (list: Array<[string, Dependency]>, result: TransformResultDependency) => {+      const resolvedPath = _resolve(parentPath, result);
      const resolvedPath = resolve(parentPath, result);
connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 function resolveDependencies<T>(   dependencies: $ReadOnlyArray<TransformResultDependency>,   options: InternalOptions<T>, ): Map<string, Dependency> {-  return new Map(-    dependencies.map((result: TransformResultDependency) => {-      const relativePath = result.name;--      const dependency = {-        absolutePath: options.resolve(parentPath, result.name),-        data: result,-      };+  const {allowOptionalDependencies} = options;++  const _resolve = (parentPath: string, result: TransformResultDependency) => {
  const resolve = (parentPath: string, result: TransformResultDependency) => {
connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 function resolveDependencies<T>(   dependencies: $ReadOnlyArray<TransformResultDependency>,   options: InternalOptions<T>, ): Map<string, Dependency> {-  return new Map(-    dependencies.map((result: TransformResultDependency) => {-      const relativePath = result.name;--      const dependency = {-        absolutePath: options.resolve(parentPath, result.name),-        data: result,-      };+  const {allowOptionalDependencies} = options;++  const _resolve = (parentPath: string, result: TransformResultDependency) => {+    const relativePath = result.name;+    try {+      return [+        relativePath,+        {+          absolutePath: options.resolve(parentPath, relativePath),+          data: result,+        },+      ];+    } catch (e) {+      // if this is an optional dependency, ignore the resolve error+      if (+        result.data.isOptional === true &&+        allowOptionalDependencies !== false &&+        !(+          Array.isArray(allowOptionalDependencies.exclude) &&+          allowOptionalDependencies.exclude.includes(relativePath)+        )+      ) {+        // should we output some warning? verbose mode?+        return undefined;+      }+      throw e;+    }+  }; -      return [relativePath, dependency];-    }),+  // const map = new Map(

Remove this please

connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 it('collects imports', () => {   ]); }); +describe('optional dependency', () => {

Can you expand the test cases here to:

  • Verify that nested if statements and function bodies in a try-catch block do not count dependencies as optional.
  • Verify that the behavior of this extraction is the same as it is on master now with this option disabled.
connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 it('collects imports', () => {   ]); }); +describe('optional dependency', () => {
describe('optional dependencies', () => {
connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 it('collects imports', () => {   ]); }); +describe('optional dependency', () => {+  it('only capture require(xxx) within try block', () => {
  it('only captures require(...) within a try block', () => {
connectdotz

comment created time in 10 hours

Pull request review commentfacebook/metro

add optional dependency support

 function collectDependencies(   };    const visitor = {+    TryStatement(path: Path, state: State) {+      path.get('block').traverse({+        CallExpression(p) {+          const getOptionalDependency = (): string | null => {

Can you confirm this only evaluates one level deep in try-blocks and it will not work within nested-if statements or function bodies? I think this makes a lot of sense as it reduces complexity somewhat.

connectdotz

comment created time in 10 hours

PR closed facebook/react-native

Reviewers
Removed vulnerabilities from audit CLA Signed

<!-- 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. -->

Summary

<!-- Explain the motivation for making this change. What existing problem does the pull request solve? --> Description: A yarn audit shows 17776 vulnerabilities found - Packages audited: 929983

As mentioned in https://github.com/facebook/react-native/issues/28082 image

React Native version: 0.61

Changelog

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

[General] [Security]

Test Plan

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

  1. run yarn audit
  2. Observe 0 vulnerabilities Screen Shot 2020-02-26 at 7 28 34 PM
+1534 -2208

3 comments

1 changed file

maschad

pr closed time in 13 hours

pull request commentfacebook/react-native

Removed vulnerabilities from audit

It looks like we'll have to do this update from within Facebook's codebase first and sync it out to GitHub. Sorry for the inconvenience.

maschad

comment created time in 13 hours

pull request commentfacebook/react-native

Removed vulnerabilities from audit

We cannot use Yarn resolutions within React Native. We have to upgrade the dependencies that depend on lodash.

maschad

comment created time in a day

push eventcpojer/xdate

cpojer

commit sha 25692156c0685b701089bbba62a023612c0e8028

Remove unnecessary files from package

view details

push time in 4 days

fork cpojer/react-native-calendars

React Native Calendar Components 📆

fork in 4 days

fork cpojer/xdate

A Modern JavaScript Date Library

http://arshaw.com/xdate/

fork in 4 days

PR closed facebook/metro

Bump codecov from 2.3.1 to 3.6.5 CLA Signed dependencies

Bumps codecov from 2.3.1 to 3.6.5. <details> <summary>Release notes</summary>

Sourced from codecov's releases.

v3.6.4

Fix for Cirrus CI

v3.6.3

AWS Codebuild fixes + package updates

v3.6.2

command line args sanitised

v3.6.1

Fix for Semaphore

v3.6.0

AWS CodeBuild Semaphore v2

v3.3.0

Added pipe --pipe, -l

v3.1.0

Custom Yaml file Token from .codecov.yml

v3.0.4

Security fixes

v3.0.3

Fix for not git repos

V3.0.2

No release notes provided.

v3.0.1

Fixing security vulnerability

v3.0.0

Removed support for node 0.12 </details> <details> <summary>Commits</summary>

  • See full diff in compare view </details> <details> <summary>Maintainer changes</summary>

This version was pushed to npm by drazisil, a new releaser for codecov since your current version. </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>

+93 -187

1 comment

2 changed files

dependabot[bot]

pr closed time in 6 days

pull request commentfacebook/metro

Bump codecov from 2.3.1 to 3.6.5

No

dependabot[bot]

comment created time in 6 days

push eventfacebookincubator/redux-react-hook

cpojer

commit sha 3297c4cb3028b1340c17d6e295e29fcfb98117a2

Move `eslint` to a dev dependency.

view details

cpojer

commit sha 5533955ac1121be778f826ad101449abf8bf91a9

4.0.2

view details

Christoph Nakazawa

commit sha 8f192ba3f293ea15ac5e832861c6e4b1b12235a1

Merge pull request #81 from facebookincubator/fix-eslint Fix eslint

view details

push time in 7 days

PR merged facebookincubator/redux-react-hook

Fix eslint CLA Signed

This diff moves eslint to a dev dependency. Within FB, this package adds 25mb to node_modules because it pulls in a copy of eslint including rxjs.

+18 -207

0 comment

2 changed files

cpojer

pr closed time in 7 days

PR opened facebookincubator/redux-react-hook

Fix eslint

This diff moves eslint to a dev dependency. Within FB, this package adds 25mb to node_modules because it pulls in a copy of eslint including rxjs.

+18 -207

0 comment

2 changed files

pr created time in 7 days

push eventfacebookincubator/redux-react-hook

cpojer

commit sha 5533955ac1121be778f826ad101449abf8bf91a9

4.0.2

view details

push time in 7 days

create barnchfacebookincubator/redux-react-hook

branch : fix-eslint

created branch time in 7 days

push eventcpojer/react-native-gesture-handler

cpojer

commit sha 5b13060a802a5545d38f20a32a2aa15550bc77c1

Update package name

view details

push time in 7 days

push eventcpojer/react-native-heading

cpojer

commit sha a1d762cfe0c52e5b47c1dadd22428aeb8271661b

Remove build artifacts

view details

cpojer

commit sha bc71a7150dbd5e7289e8e51888c96b3d55d60378

Update package name.

view details

push time in 7 days

fork cpojer/react-native-heading

Get device heading information on iOS or Android

fork in 7 days

push eventcpojer/react-native-gesture-handler

Alex Fournier

commit sha 2d1a28000645000ebf5bdc7353797158ba50f2be

Add drawerLockMode to DrawerLayoutProperties (#620)

view details

Krzysztof Magiera

commit sha c033d98b55171744408fbfe50e5b8113ee56fdbc

Fix event registration for RN@master

view details

Christoph Nakazawa

commit sha e27fe8dc1795be845e9dd00d6c6682aa553fae4a

Remove ToolbarAndroid This is unused and removed from React Native.

view details

Oleg Lokhvitsky

commit sha 713e50f8323c4a64309d159f851ffa0a54142a22

Fix event registration for RN master Tested by applying the same changeset via a conditional breakpoint in a Chrome debugger. Redbox without change. Works with change.

view details

Oleg Lokhvitsky

commit sha f2e17dcb49a033d8e0b326ae388515b3a74ed6c9

Prevent crash

view details

push time in 7 days

push eventcpojer/jest

cpojer

commit sha 4d774c85e2cc4fba8eac1518372733a093b6e4fb

Remove `providesModuleNodeModules` from Jest.

view details

push time in 11 days

PR opened facebook/jest

Remove `providesModuleNodeModules` from Jest.

Summary

Same as https://github.com/facebook/jest/pull/8535 that was accidentally closed.

With the removal of haste from react-native, we finally do not need providesModuleNodeModules in either Jest or Metro any longer. This is the PR that removes this feature from Jest and a corresponding change will be merged to Metro soon.

This was one of my least favorite configuration options and the added complexity (see the whitelist in jest-haste-map) was annoying to deal with. No more!

Test plan

Ran the tests via yarn jest

+148 -252

0 comment

18 changed files

pr created time in 11 days

push eventcpojer/jest

cpojer

commit sha 76c5605588b0a35411e339a4ec55aa011c203d3b

Remove `providesModuleNodeModules` from Jest.

view details

push time in 11 days

push eventcpojer/jest

Christoph Nakazawa

commit sha e2ad3a5fec4d379575fe5044cce344f8f4dae0ce

[jest-haste-map] Remove `mapper` option. (#9581)

view details

cpojer

commit sha 41d3930cc01c6e7580962b8998ec5d4bb50ebd7f

Remove `providesModuleNodeModules` from Jest.

view details

Simen Bekkhus

commit sha 5d49dbd7752520ff84ba070c770cd510761cea98

upgrade react native

view details

push time in 11 days

push eventfacebook/jest

Christoph Nakazawa

commit sha e2ad3a5fec4d379575fe5044cce344f8f4dae0ce

[jest-haste-map] Remove `mapper` option. (#9581)

view details

push time in 11 days

PR merged facebook/jest

[jest-haste-map] Remove `mapper` option. cla signed

Summary

This option was added a while back to support some use-cases with Yarn PnP but it was neither documented nor is this how I would solve the problem of files not being materialized as this functionality has the potential to de-opt operations in Jest's haste map.

This PR removes the option.

Test plan

yolo

+3 -76

3 comments

6 changed files

cpojer

pr closed time in 11 days

push eventcpojer/jest

cpojer

commit sha 05dd38ba9fa1f598d1814c8513ea2a1d7d4e931f

[jest-haste-map] Remove `mapper` option.

view details

push time in 11 days

push eventcpojer/jest

cpojer

commit sha 550d6c1a2256382b749bd0dba5daef197387341c

[jest-haste-map] Remove `mapper` option.

view details

push time in 11 days

push eventcpojer/jest

cpojer

commit sha 1039c42ad2a9badfa3325fc6a98d569f4696eb1f

[jest-haste-map] Remove `mapper` option.

view details

push time in 11 days

PR opened facebook/jest

[jest-haste-map] Remove `mapper` option.

Summary

This option was added a while back to support some use-cases with Yarn PnP but it was neither documented nor is this how I would solve the problem of files not being materialized as this functionality has the potential to de-opt operations in Jest's haste map.

This PR removes the option.

Test plan

yolo

+44 -116

0 comment

6 changed files

pr created time in 11 days

push eventcpojer/jest

cpojer

commit sha 2ec0f04ec9759cb3acf038a84c0408ab25bd9ff1

[jest-haste-map] Remove `mapper` option.

view details

push time in 11 days

PR closed facebook/jest

Remove `providesModuleNodeModules` from Jest. cla signed

Summary

With the removal of haste from react-native, we finally do not need providesModuleNodeModules in either Jest or Metro any longer. This is the PR that removes this feature from Jest and a corresponding change will be merged to Metro soon.

This was one of my least favorite configuration options and the added complexity (see the whitelist in jest-haste-map) was annoying to deal with. No more!

Test plan

Ran the tests via yarn jest

+0 -0

15 comments

0 changed file

cpojer

pr closed time in 11 days

push eventcpojer/jest

Simen Bekkhus

commit sha 14e3992b82c8a05bf5856ecf88399f4ce62b3924

fix: do not default coverageProvider in yargs (#9562)

view details

Hieu Lam

commit sha 2793c67e36e245a2832fa2c39123e1ec507023a2

fix: `moduleNameMapper` should take precedence over Node core modules (#9563)

view details

Simen Bekkhus

commit sha 00e9e0972bf959e041b1dd249d907402a58c23b5

fix: notifications should be fire&forget rather than having a timeout (#9567)

view details

Luan Nguyen

commit sha 9bacc376ff8e0c431e46f9c21eab37a39e65b868

Ensure pattern of `replacePosixSep` is a string (#9546)

view details

Simen Bekkhus

commit sha 5f817428cae42c88aac1d751239d1d937501ef93

fix: verify `rootDir` and all `roots` are directories (#9569)

view details

태완

commit sha 4a559b7b760af896bb42a26586f6b2b57b475a3c

chore: replace `findDOMNode()` in examples/typescript (#9300)

view details

jfgreffier

commit sha f9cb36abbded0c3227cf3e212d5af888e738e87e

chore: add babel classProperties plugin to snapshot example (#9343)

view details

Tobias Hernstig

commit sha ccd00160a9cd38103d2f9f7d0cadfb9f5fbf1507

docs: add note for verbose option defaults (#9279)

view details

Andrew Stegmaier

commit sha f47ade4edb112261e14be459185e2396d9c8cbfc

Update documentation to clarify --watch behavior (#9276)

view details

Florent Vilmart

commit sha 9d1236b483b5a4687706e2fc0cb0732b84a2aa06

adds ability to pass custom reporter options (#9572)

view details

Lucas Azzola

commit sha 83aad6978ac1217fac3bcb77c42196a3a68a7879

Handle ERR_REQUIRE_ESM when reading configuration (#9573)

view details

doniyor2109

commit sha d4a10f7d41c4ccb4f6a02ee7fd25da972c3f0c34

fix: `toEqual` throws error when comparing readonly properties (#9575)

view details

Anton Alexandrenok

commit sha 63593a2d9a51eba11505fc6b9bc9de887b263f6c

fix(cli): .cjs & .mjs files support by "--config" option (#9578)

view details

push time in 11 days

pull request commentfacebook/react-native

Update README.md

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

vascofg

comment created time in 16 days

issue commentjasmine/jasmine

Cannot find module "watch"

I published 1.0.4 of this package which does not include test files. See https://github.com/cpojer/watch/commit/330f85e813b494b88fe7e0528b6ebfd5c1125459

Your initial command ran tests in node_modules, which is never a good idea – at the same time node_modules shouldn't publish test files. Sorry about that!

inf3rno

comment created time in 17 days

push eventcpojer/watch

cpojer

commit sha 330f85e813b494b88fe7e0528b6ebfd5c1125459

Update some stuff.

view details

push time in 17 days

issue commentfacebook/jest

Allow mocking `require.resolve`

I'm a bit hesitant of adding new APIs to Jest because you are running into a very limited use case that not many people are encountering. I think I would prefer simply making it so you can overwrite require.resolve, then you can do whatever you like with it.

nicolo-ribaudo

comment created time in 18 days

issue commentfacebook/jest

Allow mocking `require.resolve`

Thanks for trying it out and checking. That's a good observation that I missed. Now the question is: should require.resolve consider mocks and give a fake temporary file-path or should we allow mocking require.resolve?

nicolo-ribaudo

comment created time in 18 days

pull request commentfacebook/jest

Update queue workflow in Farm to improve performance and clearer

Can you clarify what the concrete performance difference is with your diff applied?

lamhieu-vk

comment created time in 18 days

pull request commentfacebook/jest

Update queue workflow in Farm to improve performance and clearer

Sorry I still don't understand your results. It seems like this is 3x slower in the average case (loadTest)?

lamhieu-vk

comment created time in 18 days

issue commentfacebook/jest

Allow mocking `require.resolve`

You should be able to create virtual mocks to ensure that require.resolve doesn't throw. If it throws, you know Babel did something unexpected.

You can also require the module after calling require.resolve and then verify that the mock module function was called etc.

nicolo-ribaudo

comment created time in 18 days

pull request commentfacebook/jest

Update queue workflow in Farm to improve performance and clearer

I do not understand the intention behind this PR. The top post and all comments imply that performance with this change will be worse. Performance of jest-worker is critical to Jest and many other tools, merging code that regresses it for readability purposes is not ok.

lamhieu-vk

comment created time in 18 days

issue commentfacebook/jest

Allow mocking `require.resolve`

I think virtual mocks should cover your use case. Let's try that first before adding more APIs to Jest. I do not think that mocking require.resolve is desirable, there are too many ways to shoot yourself in the foot :D

nicolo-ribaudo

comment created time in 18 days

pull request commentfacebook/jest

Fix roots on Windows

I think this could benefit from tests.

KuroyukihimeSenpaiSamaChan

comment created time in 18 days

startedswc-project/swc

started time in 21 days

issue closedfacebook/metro

Tree shaking while bundling

Is it possible anyhow to implement tree shaking during bundling.

Suppose I have a file say greetings.js:

export const sayHi = (name) => {return `Jarvis says hi to ${name}`};
export const sayBye = (name) => {return `Jarvis says bye to ${name}`};

Now if in my project I am only using sayHi then I want sayBye to be removed from the final bundle which is currently not the case. Is it possible anyhow to implement this (even if I had to do changes in the config file for the metro bundler).

closed time in 21 days

adnaan1703

issue commentfacebook/metro

Tree shaking while bundling

@rafeca and @mjesun have since left Facebook. We are not actively working on tree shaking at Facebook and are exploring other more promising ways to keep our app size small.

If you are using Metro for React Native, it is unlikely that tree shaking will have a major impact on your applications size or behavior. If you are looking for size improvements, consider compressing the JS bundle that you ship with your app. If you are looking for performance improvements, there are likely many other things (like shipping Hermes and bytecode) that will have a large impact.

I'll close this as wontfix now but we will accept contributions towards tree shaking – and I'm accepting your job applications if you wanna work on this kinda stuff at Facebook London :)

adnaan1703

comment created time in 21 days

pull request commentfacebook/react-native

[Internal] [Changed] - Bump CLI to ^4.0.0

I was in meetings all day but still managed to land it. Yay!

thymikee

comment created time in 22 days

issue commentreact-native-community/.github

Getting involved in the React Native Community

Invite for the npm org sent.

kelset

comment created time in 22 days

issue closedreact-native-community/discussions-and-proposals

no-cache, no-store

<!-- Hello there! Thanks for deciding to start a conversation about React Native and how it could evolve for the better!

If possible, please follow the structure shown below (you can also take inspiration from other open issues).

Given the nature of this repository, ideally only long-form discussions should be held here in the issue section. If you have a proposal, please add it via a Pull Request. -->

Introduction

<!-- Give a brief intro about the subject you want to discuss about -->

The Core of It

<!-- Here you should explain in details what you want to discuss about, providing all the necessary details for everyone to understand -->

Discussion points

<!-- If you can, summarize the 'hot points' that you want the discussion to focus on -->

closed time in 22 days

kh0kv

pull request commentfacebook/jest

[jest-haste-map] reduce the number of lstat calls in node crawler

Nice!!

wonnage

comment created time in 22 days

pull request commentfacebook/jest

[jest-haste-map] reduce the number of lstat calls in node crawler

Also, any chance you could share before and after benchmarks for this change?

wonnage

comment created time in 23 days

pull request commentfacebook/jest

[jest-haste-map] reduce the number of lstat calls in node crawler

Historically haste map performance in docker has been really bad. It’s quite possible that changing strategy may lead to significant wins.

wonnage

comment created time in 23 days

issue commentfacebook/jest

Build a high-performance version of `resolve`

Yeah that makes sense. The main intent of this issue was to build a really fast resolver, I don't care as much about the implementation details. Resolution is one of the hottest paths during a test run, so a 20% improvement for resolution may result in a 10-20% improvement in overall test runtime.

cpojer

comment created time in 23 days

Pull request review commentfacebook/metro

Set BABEL_ENV in output/bundle.js

 function buildBundle(   map: string,   ... }> {-  return packagerClient.build({-    ...Server.DEFAULT_BUNDLE_OPTIONS,-    ...requestOptions,-    bundleType: 'bundle',-  });+  const OLD_BABEL_ENV = process.env.BABEL_ENV;+  process.env.BABEL_ENV = requestOptions.dev+    ? 'development'+    : process.env.BABEL_ENV || 'production';+  return packagerClient+    .build({+      ...Server.DEFAULT_BUNDLE_OPTIONS,+      ...requestOptions,+      bundleType: 'bundle',+    })+    .then(

Could you change this to use finally instead? Then you don't need to worry about the return values etc.

(If CI still uses node 8, feel free to bump that to 10+)

jjd314

comment created time in 23 days

issue commentreact-native-community/discussions-and-proposals

Improve Metro support for out-of-tree platforms

Thanks for the summary. I kinda feel like we should figure out a way to make this work first-class or automatic inside of Metro so that this configuration is not needed.

kmelmon

comment created time in 23 days

push eventfacebook/jest

Victor Lin

commit sha c4ae594d1f09fe37542da0597ad979dacdf27345

[jest-haste-map] reduce the number of lstat calls in node crawl… (#9514) * reduce the number of lstat calls * update changelog * handle node < v10.10 * lint * link to PR from changelog * fix tests * add lstat tests * skip checks in lstat callback * Revert "skip checks in lstat callback" This reverts commit 758c76af58f9e9d41ab41f37d89f196b1140a4bc. Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>

view details

push time in 23 days

PR merged facebook/jest

Reviewers
[jest-haste-map] reduce the number of lstat calls in node crawler cla signed

Summary

fs.readdir has a withFileTypes option that will tell us if the file is a symlink or directory. Therefore, there's no need to make and wait for an lstat call before taking the appropriate actions for those file types (skip and recurse, respectively).

This drastically improves the initial crawl time when using the node watcher.

Test plan

Applied changes and ran it against my project. The activeCalls counter is a little tricky, but I'm fairly certain I've handled it correctly here since I'd expect an infinite loop if I got it wrong.

+150 -11

6 comments

3 changed files

wonnage

pr closed time in 23 days

pull request commentfacebook/jest

[jest-haste-map] reduce the number of lstat calls in node crawler

Looks good, although I'm curious about the actual speed gains.

Fwiw, if you rely on this speed up, I recommend installing watchmen (if you aren't on Windows).

wonnage

comment created time in 23 days

issue commentreact-native-community/discussions-and-proposals

Critical video by TechLead

Hey @brodybits,

we haven't updated the showcase in many years and are planning on doing so soon!

I can say the team and adoption at Facebook have both been growing at a healthy pace. There is no new information right now about Facebook's use of RN beyond my comment above.

brodybits

comment created time in 24 days

issue closedreact-native-community/discussions-and-proposals

Critical video by TechLead

https://www.youtube.com/watch?v=NxJCSI7a8wk

Unfortunately I really do not know how to respond to this video. It does link to some major issues from major companies such as Shopify, AirBnB, and Dropbox. Any ideas?

closed time in 25 days

brodybits

issue commentreact-native-community/discussions-and-proposals

Critical video by TechLead

This YouTube channel is focused on generating views to upsell interview training programs. I wouldn’t read too much into it beyond “React Native is excellent” generating fewer views than the title that was chosen.

The information about Facebook’s usage of React Native is factually incorrect. While Marketplace and Dating are some of the biggest products using RN, there are more than 750 screens in both Facebook for Android and iOS as well as several standalone apps primarily built using RN.

brodybits

comment created time in 25 days

push eventNaturalclar/react-native

Christoph Nakazawa

commit sha 89864673a0df7a73be8328d71c0ef18d424fcb25

Update index.js

view details

push time in 25 days

PR closed facebook/react-native-website

Remove extra prefix in template name

<!-- 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> -->

+1 -1

5 comments

1 changed file

itrelease

pr closed time in a month

pull request commentfacebook/react-native-website

Remove extra prefix in template name

Let's keep it as-is for now.

itrelease

comment created time in a month

pull request commentfacebook/react-native-website

Remove extra prefix in template name

Just tried the exact same command again and it doesn't work.

itrelease

comment created time in a month

issue commentyarnpkg/berry

[Feature] Release yarn v2 under a different name

Yarn 1 will stay as the latest package on package managers like brew, with yarn set version to opt into Yarn 2 for a specific project rather than globally.

If we do this long term, then PnP will still not get significant adoption. PnP has been an opt-in for Yarn 1 for the past 18 months and we've seen that people do not opt-in to stricter guarantees. An opt-in to Berry and PnP is effectively the same except the opportunity cost is higher for a marginal benefit to use additional features. If we only do this short term as the announcement indicates, then the concerns above are valid and people are justifiably worried about being forced to migrate. This is a real concern that can't be brushed off with "don't use it". Many people here would love to just not use it, and they want guarantees that they won't be forced to today or in the future, or be able to use a drop-in replacement by running a single upgrade command.

There is so much FUD being spread in this thread.

Many of the people in this issue like @brentvatne and @janicduplessis have been involved since the very beginning of Yarn. The React Native community embraced Yarn on day one because of the huge install time wins. I have been involved with Yarn since before it was open sourced, funded the work on PnP at Facebook, monitored its deployment, helped fix problems and eventually removed it. I have seen the Berry codebase evolve from a prototype almost three years ago to what is in this repo today.

What we all presented above was entirely facts based from our heavy involvement with Yarn and early adoption of PnP. I do not believe you can claim that we are spreading misinformation or invoking fear to disadvantage this project. We are here because we care about the future of this community.

brentvatne

comment created time in a month

PR closed facebook/react-native-website

clarify that <Text> backing component is UIView

<!-- 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> -->

+9 -7

3 comments

1 changed file

vonovak

pr closed time in a month

PR closed facebook/react-native-website

Update slider.md

When I read the deprecated message in this document, I tried to use [react-native-community/react-native-slider](https://github.com/react-native-community/react-native-slider, but is not corresponded to Expo.

This doc has not the message. So I wasted a lot of time.

<!-- 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> -->

+1 -0

2 comments

1 changed file

sudokzt

pr closed time in a month

pull request commentfacebook/react-native-website

Update slider.md

Thank you for submitting a PR. I'm worried that this actually makes the docs harder to understand. I'll take a note and will think about changing this later.

sudokzt

comment created time in a month

PR closed facebook/react-native-website

Added testID property

<!-- 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> -->

+10 -0

2 comments

1 changed file

mateosilguero

pr closed time in a month

pull request commentfacebook/react-native-website

Added testID property

Thank you for sending this PR! I checked the docs for TextInput and it says that it inherits all the props from View, which already lists testID. See https://github.com/facebook/react-native-website/blob/master/docs/textinput.md#props

mateosilguero

comment created time in a month

push eventfacebook/react-native-website

Jayson Martinez

commit sha 0327631b75b95df152c0337c12f9911caa52ddae

Update debugging.md

view details

Christoph Nakazawa

commit sha aace5d5b9010eaabea3251d8ce541c84017696f8

Update debugging.md (#1561) Update debugging.md

view details

push time in a month

PR merged facebook/react-native-website

Update debugging.md

<!-- 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> -->

Add npx when using react-native command

+2 -2

1 comment

1 changed file

Jheysoon

pr closed time in a month

push eventfacebook/react-native-website

Brendan Murray

commit sha ba1b6b8e77eef1ea1754f85a15020ab9fc3de3b0

Update view.md Updating props to remove 'clickable' and add 'focusable '

view details

Christoph Nakazawa

commit sha 8a20fcfa80956288dafb6530d93f4e0fe729e6bf

Update view.md (#1564) Update view.md

view details

push time in a month

PR merged facebook/react-native-website

Update view.md

While updating our application from react-native@0.60.5 to 0.61.5, I got a code review comment from @joshniche about a snapshot I updated, where a View's props changed.

We've seen default props change in previous migrations, but neither of us noticed anything in the changelog about this one so we did some digging.

This PR updates the View component's documentation to be consistent with changes from https://github.com/facebook/react-native/pull/25274.

Note: I got the language directly from: https://github.com/facebook/react-native/blob/v0.61.5/Libraries/Components/View/ViewPropTypes.js#L314

+2 -2

0 comment

1 changed file

BrendanJMurray

pr closed time in a month

push eventfacebook/react-native-website

Kiliman

commit sha 0622d3fcafcbfb2e9f6d5c462be44b174164f243

Update TextInput example with hooks Convert class to function and use `useState` hook

view details

Christoph Nakazawa

commit sha c185f65727c1447832705c688dd8abbcfdc1e99c

Fix

view details

Christoph Nakazawa

commit sha dbd095f788c9b274cd2128ceac4144a0971a7adf

Update TextInput example with hooks (#1568) Update TextInput example with hooks

view details

push time in a month

PR merged facebook/react-native-website

Update TextInput example with hooks

Convert class to function and use useState hook

<!-- 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> -->

+16 -22

0 comment

1 changed file

kiliman

pr closed time in a month

push eventkiliman/react-native-website

Christoph Nakazawa

commit sha c185f65727c1447832705c688dd8abbcfdc1e99c

Fix

view details

push time in a month

pull request commentfacebook/react-native-website

clarify that <Text> backing component is UIView

Hey @vonovak,

could you go into detail of how this information will benefit a new learner? It's not wrong, it just may not be the right time to introduce people to this concept. What do you think?

vonovak

comment created time in a month

push eventfacebook/react-native-website

Dan Abramov

commit sha 53cad518380e2afc3dcf6070636c53437f80b49e

Tweak the state setting explanation

view details

Dan Abramov

commit sha e39e14d67f9e8cf920a2da69d13f2e8a56df2f3b

Update intro-react.md

view details

Dan Abramov

commit sha d9770af0f619380d4bf5e65d22ea3ce477c84296

Update intro-react.md

view details

Christoph Nakazawa

commit sha 77ad7d4e861b2cacc959494c3ba7d2c98f9c0f2c

Tweak state explanation (#1570) Tweak state explanation

view details

push time in a month

PR merged facebook/react-native-website

Reviewers
Tweak state explanation Partner p: Facebook

Not insisting on this wording in particular, but I think we need to make this a bit more precise.

In particular, you probably meant useState rather than setState.

+1 -1

1 comment

1 changed file

gaearon

pr closed time in a month

issue commentyarnpkg/berry

[Feature] Release yarn v2 under a different name

@FezVrasta thank you for highlighting that. I do not mean to take any credit for the proposals listed above and apologize for missing your comment earlier (this is a long thread).

brentvatne

comment created time in a month

issue commentyarnpkg/berry

[Feature] Release yarn v2 under a different name

Today I had a video call with @arcanis in which we discussed options to reduce tension about the Yarn 2 announcement and identify a path forward.

First, I want to say that Berry is technically an awesome piece of software and it’s been great to see it be built by a small team of dedicated people mostly in their spare time over the course of the past year. As npm, Yarn, pnpm and others have shown, building a fast, reliable and easy-to-use package manager for JavaScript is hard work and requires dedication.

Hundreds of people have voiced their strong concerns about the currently proposed strategy through comments, tweets, and reactions on this issue. I think the reason the Yarn 2 announcement caused such a strong reaction has little to do with some of the new features people discussed and memed about. These are good features that should be built into Yarn. I don’t think this has anything to do with whether the code in this repo should be called Yarn or Berry.

The reason why many people – especially maintainers of popular projects – are concerned is because there is no easy migration path from Yarn 1 with node_modules to Yarn 2 with PnP. In Yarn 1, there was no migration needed. It was successful because it solved a concrete need that users had at the time by running a single command.

In Yarn 2, a migration is necessary because PnP is enabled by default. The announcement post doesn’t make a big deal about PnP, but it is the single most fundamental difference about how Yarn 2 works compared to all other package managers. Instead of creating a node_modules folder, PnP takes over module resolution. Instead of accessing real files directly, PnP provides access to modules from within compressed zip files. This can be a huge benefit for large projects with slow install times! However, this was released as part of Yarn 18 months ago, and has not gained significant adoption in part because it’s been hard to make it work in existing complex setups.

Even experienced developers will have to spend a lot of time trying to upgrade to PnP. If library authors have issues upgrading, they’ll either stop trying or move to another tool out of fear they may end up on an unsupported package manager. Additionally, PnP breaks non-Node-based tools because they can't rely on a filesystem convention. Another problem is that it's usually not enough to change your own build setup to upgrade. PnP requires all the transitive build dependencies to also be compatible. Since most popular tools don't run PnP compatibility checks in their test suites, a setup like this can break any day with any transitive patch release.

With this in mind, the most successful path forward is to keep all of the benefits of Berry without the breaking changes of Yarn 2 and PnP. To do that, I propose replacing Yarn 1 with Berry but keep PnP disabled. To support a smooth migration to what will eventually be Yarn 2, a strict mode can be added to Yarn by default that will give actionable error messages explaining how to make every packages PnP compatible. After sufficient time has passed, Yarn could be shipped with PnP enabled by default.

From my experience, big rewrites together with major functionality changes have a low success rate because the cost of switching is high and users end up with unexpected results. By replacing Yarn with a new codebase that functionally behaves the same as the previous version it will allow a smooth migration path, just like when Yarn was first released. I have no doubt that it will alleviate all concerns raised in this issue and it will unlock all the benefits of the fantastic new codebase in this repo to make Yarn successful for years to come.

To summarize, here are all the possible ways forward that I can see, including proposals for version numbers:

  1. The above proposal: Yarn 1.30: Release Berry as a minor update to Yarn, matching all existing behavior including node_modules by default. It will offer a strict mode that will help the ecosystem move to PnP compatibility. After assessing that the ecosystem is ready (via an RFC), Yarn 2 will ship with PnP by default.
  2. Proposal by @brentvatne: Berry: Release Berry as a separate package manager. Work on Yarn 1 and add a strict mode to eventually migrate everyone from Yarn to Berry, then replace Yarn with Berry.
  3. Proposal by Yarn’s maintainers: Yarn 2.0: Release Berry as a major upgrade with PnP by default.

To resolve confusion for people accessing the website, I recommend reverting the website changes until one of the proposals is implemented. Concretely, this means reverting yarnpkg.com back to Yarn 1 and use next.yarnpkg.com (or other domains) for the new codebase.

In our video call, @arcanis concluded that intents to continue with the originally proposed plan to release Yarn 2.0 with PnP by default. Through our conversation I gained clarity to summarize the possibilities above. I do hope that this summary is useful to the current maintainers of Yarn and that it may help them pick a good strategy that will allow people to easily upgrade to Yarn 2. With this, I’m going to conclude my involvement on this topic. Good luck!

brentvatne

comment created time in a month

PR closed facebook/react-native

move benchmark from xplat/third-party to third-party CLA Signed Partner fb-exported p: Facebook

Reviewed By: pixelb

Differential Revision: D16869800

+1 -1

5 comments

1 changed file

igorsugak

pr closed time in a month

pull request commentfacebook/react-native

move benchmark from xplat/third-party to third-party

I'll close this PR because I don't think we'll need it. Once it lands, the change syncs out to GitHub.

igorsugak

comment created time in a month

more