GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix ignored --projectRoot/watchFolders arguments by oblador · Pull Request #21165 · react/react-native

Conversation

@oblador

@oblador oblador commented Sep 18, 2018

Copy link
Copy Markdown
Contributor

Due to @Kureev's cleanup in c4a66a8 some arguments are no longer properly passed to metro, but just the default values. This broke the --projectRoot and --watchFolders arguments used by storybook to change the bundle entrypoint.

This PR simply fixes the regression by assigning these values from argv instead of reading config defaults.

Related: the undocumented REACT_NATIVE_APP_ROOT env var is broken, not sure for how long, but I can fix it as a part of this PR or make a new one.

Test Plan:

I created a new folder called newroot with a different index.js, started metro with react-native start --projectRoot newroot and got new content.

Release Notes:

[CLI] [BUGFIX] [local-cli/server/runServer.js] - Fix --projectRoot/watchFolders arguments ignored

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 18, 2018
analysis-bot
analysis-bot suggested changes Sep 18, 2018
View reviewed changes

@analysis-bot analysis-bot left a comment

Copy link
Copy Markdown

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.

eslint found some issues. You may run yarn prettier or npm run prettier to fix these.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread local-cli/server/runServer.js Outdated

@analysis-bot analysis-bot Sep 18, 2018

Copy link
Copy Markdown

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.

Cannot assign args.watchFolders to config.watchFolders because read-only array type [1] is incompatible with array type [2].

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@react-native-bot react-native-bot added ✅Release Notes labels Sep 18, 2018
@oblador
Fix ignored --projectRoot/watchFolders arguments
20f4e87
@oblador
oblador force-pushed the fix-metro-roots branch from 1bb2aef to 20f4e87 Compare September 18, 2018 09:49
@oblador oblador mentioned this pull request Sep 18, 2018
Bump react-native-vanilla example to 0.57 storybookjs/storybook#4196
Closed
@facebook-github-bot facebook-github-bot added the Import Started This pull request has been imported. This does not imply the PR has been approved. label Sep 18, 2018
facebook-github-bot
facebook-github-bot approved these changes Sep 18, 2018
View reviewed changes

@facebook-github-bot facebook-github-bot left a comment

Copy link
Copy Markdown
Contributor

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.

hramos is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@facebook-github-bot facebook-github-bot closed this in 9fca769 Sep 19, 2018
@react-native-bot

react-native-bot commented Sep 19, 2018

Copy link
Copy Markdown
Collaborator

@oblador merged commit 9fca769 into facebook:master.


Once this commit is added to a release, you will see the corresponding version tag below the description at 9fca769. If the commit has a single master tag, it is not yet part of a release.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@react react locked as resolved and limited conversation to collaborators Sep 19, 2018
@react-native-bot react-native-bot added the Merged This PR has been merged. label Sep 19, 2018
kelset pushed a commit that referenced this pull request Sep 21, 2018
@oblador @kelset
Fix ignored --projectRoot/watchFolders arguments (#21165)
fb109e9
Summary:
Due to Kureev's cleanup in c4a66a8 some arguments are no longer properly passed to metro, but just the default values. This broke the `--projectRoot` and `--watchFolders` arguments used by storybook to change the bundle entrypoint.

This PR simply fixes the regression by assigning these values from argv instead of reading config defaults.

Related: the undocumented `REACT_NATIVE_APP_ROOT` env var is broken, not sure for how long, but I can fix it as a part of this PR or make a new one.
Pull Request resolved: #21165

Differential Revision: D9929642

Pulled By: hramos

fbshipit-source-id: 00485a0429bd4301de03e5cb455e928878c4ba8f
grabbou pushed a commit to react-native-community/cli that referenced this pull request Sep 26, 2018
@oblador @facebook-github-bot
Fix ignored --projectRoot/watchFolders arguments (#21165)
b901385
Summary:
Due to Kureev's cleanup in react/react-native@c4a66a8 some arguments are no longer properly passed to metro, but just the default values. This broke the `--projectRoot` and `--watchFolders` arguments used by storybook to change the bundle entrypoint.

This PR simply fixes the regression by assigning these values from argv instead of reading config defaults.

Related: the undocumented `REACT_NATIVE_APP_ROOT` env var is broken, not sure for how long, but I can fix it as a part of this PR or make a new one.
Pull Request resolved: react/react-native#21165

Differential Revision: D9929642

Pulled By: hramos

fbshipit-source-id: 00485a0429bd4301de03e5cb455e928878c4ba8f
@hramos hramos removed Import Started This pull request has been imported. This does not imply the PR has been approved. labels Feb 6, 2019
t-nanava pushed a commit to microsoft/react-native-macos that referenced this pull request Jun 17, 2019
@oblador @facebook-github-bot
Fix ignored --projectRoot/watchFolders arguments (react#21165)
2444619
Summary:
Due to Kureev's cleanup in react@c4a66a8 some arguments are no longer properly passed to metro, but just the default values. This broke the `--projectRoot` and `--watchFolders` arguments used by storybook to change the bundle entrypoint.

This PR simply fixes the regression by assigning these values from argv instead of reading config defaults.

Related: the undocumented `REACT_NATIVE_APP_ROOT` env var is broken, not sure for how long, but I can fix it as a part of this PR or make a new one.
Pull Request resolved: react#21165

Differential Revision: D9929642

Pulled By: hramos

fbshipit-source-id: 00485a0429bd4301de03e5cb455e928878c4ba8f
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

2 more reviewers
@analysis-bot analysis-bot analysis-bot requested changes
@facebook-github-bot facebook-github-bot facebook-github-bot approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged This PR has been merged.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@oblador @react-native-bot @facebook-github-bot @analysis-bot @hramos
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.