-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add symlinks under node_modules as part of projectRoots #11810
Conversation
By analyzing the blame information on this pull request, we identified @grabbou and @aleclarson to be potential reviewers. |
@@ -22,6 +22,9 @@ const windows = require('./windows'); | |||
const wrapCommands = require('./wrapCommands'); | |||
const findPlugins = require('./findPlugins'); | |||
|
|||
const findSymlinksPaths = require('../util/findSymlinksPaths'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK it's ../server/findSymlinksPaths
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please double-check if your code works, @harshil07?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does work @Kureev . i moved the file to util as part of this PR given it was being used outside of "server" code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. Missed this line
@facebook-github-bot shipit |
@Kureev has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
args.projectRoots = roots.concat( | ||
findSymlinksPaths(NODE_MODULES, roots) | ||
); | ||
args.projectRoots.concat(args.root); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woah, how could I miss that
Summary: Support symlinks under `node_modules` for all local-cli commands. PR facebook/react-native#9009 only adds symlink support to the packager. But other cli commands like `react-native bundle` creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked. This change ensures all `local-cli` commands add symlinks to its project roots. Test plan (required) 1. Create a symlink in node_modules (for instance use npm/yarn link) 2. Run `react-native bundle`. Closes facebook/react-native#11810 Differential Revision: D4487741 fbshipit-source-id: 87fe44194134d086dca4eaca99ee5742d6eadb69
Support symlinks under
node_modules
for all local-cli commands. PR #9009 only adds symlink support to the packager.But other cli commands like
react-native bundle
creates its own instance of packager that doesn't have symlinks as part of its project roots, which results in the bundler breaking since it cannot find modules that you have symlinked.This change ensures all
local-cli
commands add symlinks to its project roots.Test plan (required)
react-native bundle
.