Commit 679311a
fix: Do not generate React Native build targets by default (#3943)
* fix: Do not generate React Native build targets by default
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>
* chore: Regenerate test fixtures without react-native targets
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>
* chore: Regenerate all test fixtures without react-native targets
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>
* feat: remove react-native from HLC generator by default
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>
* chore: remove react-native from smoke and typespec test fixtures
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>
* chore: regenerate TypeSpec test fixtures with proper emitter
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>
* fix: wire generateReactNativeTarget option through TypeSpec emitter
The TypeSpec emitter checked option.generateReactNativeTarget but never
wired it from emitter options. Add the option to EmitterOptions interface,
RLCOptionsSchema, and extractRLCOptions so TypeSpec users can opt in via
tspconfig.yaml.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Deyaa Eldeen <deyaaeldeen@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jialin Huang <jialinhuang@microsoft.com>
Co-authored-by: JialinHuang803 <139532647+JialinHuang803@users.noreply.github.com>1 parent cae57c5 commit 679311a
244 files changed
Lines changed: 344 additions & 1571 deletions
File tree
- packages
- autorest.typescript
- src
- generators/static
- restLevelClient
- utils
- test
- integration/generated
- additionalProperties
- appconfigurationexport
- appconfiguration
- arrayConstraints
- attestation
- azureParameterGrouping
- azureReport
- azureSpecialProperties
- bodyArray
- bodyBooleanQuirks
- bodyBoolean
- bodyByte
- bodyComplexWithTracing
- bodyComplex
- bodyDateTimeRfc1123
- bodyDateTime
- bodyDate
- bodyDictionary
- bodyDuration
- bodyFile
- bodyFormData
- bodyInteger
- bodyNumber
- bodyString
- bodyTime
- constantParam
- corecompattest
- customUrlMoreOptions
- customUrlPaging
- customUrl
- datafactory
- datalakestorage
- datasearch
- deviceprovisioningservice
- domainservices
- extensibleEnums
- headerprefix
- header
- healthcareapis
- httpInfrastructure
- iotspaces
- licenseHeader
- lroParametrizedEndpoints
- lro
- mapperrequired
- mediaTypesV3Lro
- mediaTypesV3
- mediaTypesWithTracing
- mediaTypes
- modelFlattening
- multipleInheritance
- nameChecker
- noLicenseHeader
- noMappers
- noOperation
- nonStringEnum
- objectType
- odataDiscriminator
- operationgroupclash
- optionalnull
- pagingNoIterators
- paging
- patterntest
- petstore
- readmeFileChecker
- regexConstraint
- report
- requiredOptional
- resources
- sealedchoice
- storageblob
- subscriptionIdApiVersion
- textanalytics
- url2
- urlMulti
- url
- useragentcorev1
- useragentcorev2
- uuid
- validation
- xmlservice
- xmsErrorResponses
- rlcIntegration/generated
- azureReport
- dpgCustomization
- config
- httpInfrastructureRest
- config
- multipleUrlParameters
- config
- report
- securityAADRest
- config
- securityKeyRest
- config
- smoke/generated
- agrifood-data-plane
- anomaly-detector-mv-rest
- anomaly-detector-rest
- arm-package-deploymentscripts-2019-10-preview
- arm-package-features-2015-12
- arm-package-links-2016-09
- arm-package-locks-2016-09
- arm-package-managedapplications-2018-06
- arm-package-policy-2019-09
- arm-package-resources-2019-08
- arm-package-subscriptions-2019-06
- compute-resource-manager
- cosmos-db-resource-manager
- graphrbac-data-plane
- keyvault-resource-manager
- monitor-data-plane
- msi-resource-manager
- network-resource-manager
- networkcloud-resource-manager
- purview-administration-rest
- sql-resource-manager
- storage-resource-manager
- web-resource-manager
- rlc-common
- src
- metadata
- packageJson
- test/integration
- typespec-test/test
- NetworkAnalytics.Management/generated/typespec-ts/sdk/test/arm-test
- ai/generated/typespec-ts
- anomalyDetector/generated/typespec-ts
- authoring/generated/typespec-ts
- batch_modular/generated/typespec-ts
- chatApi_modular/generated/typespec-ts
- compute/generated/typespec-ts
- confidentialLedger/generated/typespec-ts
- contentsafety_modular/generated/typespec-ts
- contoso/generated/typespec-ts
- customWrapper/generated/typespec-ts
- eventgrid_modular/generated/typespec-ts
- faceai/generated/typespec-ts
- healthInsights_radiologyinsights/generated/typespec-ts
- healthInsights_trialmatcher/generated/typespec-ts
- hierarchy_generic/generated/typespec-ts
- loadTest/generated/typespec-ts
- loadtesting_modular/generated/typespec-ts
- nestedClient/generated/typespec-ts
- openai_generic/generated/typespec-ts
- openai_modular/generated/typespec-ts
- openai_non_branded/generated/typespec-ts
- openai/generated/typespec-ts
- overloads_modular/generated/typespec-ts
- parametrizedHost/generated/typespec-ts
- schemaRegistry/generated/typespec-ts
- spread/generated/typespec-ts
- todo_non_branded/generated/typespec-ts
- translator/generated/typespec-ts
- widget_dpg/generated/typespec-ts
- typespec-ts/src
- transform
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
47 | 51 | | |
48 | 52 | | |
49 | 53 | | |
| |||
Lines changed: 50 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
12 | 31 | | |
13 | 32 | | |
14 | 33 | | |
| |||
62 | 81 | | |
63 | 82 | | |
64 | 83 | | |
65 | | - | |
| 84 | + | |
| 85 | + | |
66 | 86 | | |
67 | 87 | | |
68 | 88 | | |
| |||
163 | 183 | | |
164 | 184 | | |
165 | 185 | | |
166 | | - | |
167 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
168 | 190 | | |
169 | 191 | | |
170 | 192 | | |
171 | 193 | | |
172 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
173 | 215 | | |
174 | 216 | | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 217 | + | |
193 | 218 | | |
194 | 219 | | |
195 | 220 | | |
| |||
210 | 235 | | |
211 | 236 | | |
212 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
213 | 241 | | |
214 | 242 | | |
215 | 243 | | |
216 | 244 | | |
217 | 245 | | |
218 | 246 | | |
219 | | - | |
| 247 | + | |
220 | 248 | | |
221 | 249 | | |
222 | 250 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
142 | 144 | | |
143 | 145 | | |
144 | 146 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
86 | 98 | | |
87 | 99 | | |
88 | 100 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | 75 | | |
77 | 76 | | |
78 | 77 | | |
79 | | - | |
| 78 | + | |
80 | 79 | | |
81 | 80 | | |
82 | 81 | | |
Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 66 | | |
72 | 67 | | |
73 | 68 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
| |||
Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | 65 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 66 | | |
72 | 67 | | |
73 | 68 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
| |||
Lines changed: 0 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | 64 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | 65 | | |
71 | 66 | | |
72 | 67 | | |
| |||
0 commit comments