Skip to content

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

Closed
@mike-marcacci

Description

@mike-marcacci

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions