Skip to content

feat: get react-native package name from package.json in codegen script#46604

Closed
okwasniewski wants to merge 1 commit into
facebook:mainfrom
okwasniewski:feat/codegen-package-name
Closed

feat: get react-native package name from package.json in codegen script#46604
okwasniewski wants to merge 1 commit into
facebook:mainfrom
okwasniewski:feat/codegen-package-name

Conversation

@okwasniewski
Copy link
Copy Markdown
Contributor

Summary:

This PR fixes the retrieval of react native package name to retrieve it from package.json.

This fixes the annoying message in codegen that poped up when installing pods:

[Codegen] Found react-native-macos
[Codegen] CodegenConfig Deprecated Setup for react-native-macos.
    The configuration file still contains the codegen in the libraries array.
    If possible, replace it with a single object.
  
BEFORE:
    {
      // ...
      "codegenConfig": {
        "libraries": [
          {
            "name": "libName1",
            "type": "all|components|modules",
            "jsSrcsRoot": "libName1/js"
          },
          {
            "name": "libName2",
            "type": "all|components|modules",
            "jsSrcsRoot": "libName2/src"
          }
        ]
      }
    }

    AFTER:
    {
      "codegenConfig": {
        "name": "libraries",
        "type": "all",
        "jsSrcsRoot": "."
      }
    }

Changelog:

[GENERAL] [CHANGED] - get react-native package name from package.json in codegen script

Test Plan:

Install pods

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Callstack Partner: Callstack Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. labels Sep 23, 2024
@okwasniewski okwasniewski force-pushed the feat/codegen-package-name branch from 7d5c5a2 to ef541f6 Compare September 24, 2024 07:59
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@arushikesarwani94 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Sep 25, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

@arushikesarwani94 merged this pull request in 65575e8.

@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @okwasniewski in 65575e8

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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. p: Callstack Partner: Callstack Partner Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants