Skip to content
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

react-native-git-upgrade should use name from app.json instead of package.json #20991

Closed
3 tasks done
mike-marcacci opened this issue Sep 5, 2018 · 1 comment
Closed
3 tasks done
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@mike-marcacci
Copy link
Contributor

Environment

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz
      Memory: 82.54 MB / 16.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 10.9.0 - /usr/local/n/versions/node/10.9.0/bin/node
      Yarn: 1.9.4 - /usr/local/bin/yarn
      npm: 6.4.0 - /usr/local/n/versions/node/10.9.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 11.4, macOS 10.13, tvOS 11.4, watchOS 4.3
    IDEs:
      Xcode: 9.4.1/9F2000 - /usr/bin/xcodebuild
    npmPackages:
      react: ^16.4.1 => 16.4.2
      react-native: ^0.56.0 => 0.56.0
    npmGlobalPackages:
      react-native-git-upgrade: 0.2.7

Description

Right now, react-native-git-upgrade gets the app name from package.json instead of app.json. This can be problematic, as NPM allows package names which don't work as iOS/Android package names, or which break the directory structure assumed by react native (for example, the package name @my-namespace/my-app).

If an app.json file exists (such as when the folder structure is generated by react-native-cli), its name field should be used instead.

@mikemorris
Copy link

Hit this issue when upgrading, can confirm that @ scoped package names are problematic when upgrading (I worked around by temporarily removing the scope, then restoring after upgrade).

@facebook facebook locked as resolved and limited conversation to collaborators Dec 12, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Dec 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants