fix: Do not generate React Native build targets by default#3943
Open
deyaaeldeen wants to merge 6 commits intomainfrom
Open
fix: Do not generate React Native build targets by default#3943deyaaeldeen wants to merge 6 commits intomainfrom
deyaaeldeen wants to merge 6 commits intomainfrom
Conversation
Previously, the SDK generator always included React Native build targets (warp target, tsconfig reference, package.json exports/imports) for all generated packages. This caused CI failures in the azure-sdk-for-js monorepo because most packages don't need RN support and the RN build infrastructure isn't fully set up. This change: - Adds a new `generateReactNativeTarget` option (default: false) - Updates buildWarpConfig to conditionally include the react-native target - Updates buildTsConfig to conditionally include tsconfig.src.react-native.json - Updates package.json generation to conditionally include: - `react-native` top-level field - `react-native` condition in exports - `react-native` in imports subpath patterns - `react-native` in tshy esmDialects (for non-monorepo packages) - Updates tests to verify the new default behavior Packages that need React Native support can opt-in by setting `generateReactNativeTarget: true` in the emitter options. Fixes: Azure/azure-sdk-for-js#37XXX Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Updates test fixtures to reflect the new default behavior where react-native build targets are not generated unless explicitly enabled. - Updated RLC integration tests (removed react-native tsconfig references) - Updated smoke tests (removed react-native from package.json) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Regenerated HLC integration tests, RLC integration tests, and version-tolerance tests with the new codegen that excludes react-native targets by default. Note: Smoke tests could not be regenerated locally due to environment limitations but were manually updated in the previous commit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add generateReactNativeTarget option to AutorestOptions interface and update packageFileGenerator.ts to conditionally include react-native targets based on this option (defaults to false). Regenerated all HLC test fixtures to remove react-native from package.json. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Manual update since regeneration scripts cannot run locally. These match the expected output from the generators with generateReactNativeTarget: false (default). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Previous manual update missed react-native entries in sub-exports. Proper regeneration removes all react-native from all export paths. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Addresses #3942
Previously, the SDK generator always included React Native build targets for all generated packages. This caused CI failures in the azure-sdk-for-js monorepo because most packages don't need RN support and the RN build infrastructure isn't fully set up.
Changes
Adds a new
generateReactNativeTargetoption (default: false) that controls whether to include:react-nativewarp target inwarp.config.ymlconfig/tsconfig.src.react-native.jsonreference in root tsconfigreact-nativetop-level field inpackage.jsonreact-nativecondition inpackage.jsonexportsreact-nativeinpackage.jsonimports subpath patternsreact-nativein tshy esmDialects (for non-monorepo packages)How to opt-in
Packages that need React Native support can set
generateReactNativeTarget: truein emitter options.Testing