CARVIEW |
Select Language
HTTP/2 200
date: Thu, 24 Jul 2025 05:31:26 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/microsoft/react-native-windows.git
etag: W/"3467eaa787cf09c68588ba285e706a06"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=rLG0Pw5LClfpWqexcLUuZ66GFomcTMA1faoYG7r%2BZsu9sshG8dsTApay6yG%2BDtxFziG7rqYS8ULMPkaNZwp5sxJtr0P9kkdXvG8Pi70ZdKQFwWlf8xNlgwk0Llh0wpM3LGX0kMGgIGk4wc%2BQEt4bIm2ms%2F5GyytWkLPa%2BVg0f9nLBc2YU8SaZycuXZmUOTsAlLoRoedLCwmKxTRaAu%2F1GUxjvAe2iozQWl2grX0pr58585IMzaFtzc%2FvgD94xEY7I3LWt8FreInQHkH1YQXRXQ%3D%3D--uZvfLrfvuydS348y--mbmwuGe1Bz0Yh50almmgRw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.564687653.1753335085; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 05:31:25 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Fri, 24 Jul 2026 05:31:25 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 8EC2:394F4C:13CB95A:18021AF:6881C52D
[0.76] Update RNW CLI to preserve and re-use `init-windows` arguments… · microsoft/react-native-windows@5e26d6e · GitHub
Copy file name to clipboard
Copy file name to clipboard
Copy file name to clipboardExpand all lines: packages/@react-native-windows/cli/src/commands/autolinkWindows/autolinkWindows.ts
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit 5e26d6e
authored
[0.76] Update RNW CLI to preserve and re-use
This PR backports #13988 to 0.76.
## Description
This PR updates the RNW CLI to preserve and re-use the arguments passed to `init-windows` when the project was created.
### Type of Change
- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- This change requires a documentation update
### Why
The RNW CLI should be smart enough to change its command's behaviors based on the template used by the project.
Closes #13927
Closes #13926
Closes #13937
Closes #13174
### What
As per #13927:
1. The `init-windows` command will now stamp the `template`, `name`, and `namespace` arguments to the project's `package.json` file as follows:
```json
{
"react-native-windows": {
"init-windows": {
"name": "testcli",
"namespace": "testcli",
"template": "cpp-app",
},
},
}
```
2. The `config` command (and therefore all other CLI commands) will now contain the contents of this new `react-native-windows` section in a new `rnwConfig` property.
Then, as per #13937:
1. The `init-windows` command will now use the previously saved arguments if they're available (and not otherwise overwritten by passed-in arguments)
2. If the template arg is missing (as it will be for all previously created projects) the `config` command will try to determine which template was used and inject it
Additionally, as per #13926:
1. The `autolink-windows` command will now use the template information to use the correct files when autolinking
Bonus, as per #13174:
1. The `autolink-windows` command will now include both the CPP and H file (the H file wasn't being regenerated before)
## Screenshots
N/A
## Testing
Verified new projects contain the new information.
## Changelog
Should this change be included in the release notes: _yes_
Update RNW CLI to preserve and re-use `init-windows` argumentsinit-windows
arguments (#14060)1 parent 316973a commit 5e26d6eCopy full SHA for 5e26d6e
File tree
Expand file treeCollapse file tree
13 files changed
+268
-104
lines changedFilter options
- change
- packages/@react-native-windows/cli/src
- commands
- autolinkWindows
- config
- initWindows
- generator-windows
- vnext/templates
- cpp-app
- windows/MyApp
- old
Expand file treeCollapse file tree
13 files changed
+268
-104
lines changedchange/@react-native-windows-cli-81be9160-074e-40a4-b881-d7d49297c141.json
Copy file name to clipboard+7Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + |
change/react-native-windows-d5e4537f-e62d-4609-9e85-235f3a819701.json
Copy file name to clipboard+7Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + |
packages/@react-native-windows/cli/src/commands/autolinkWindows/autolinkWindows.ts
Copy file name to clipboardExpand all lines: packages/@react-native-windows/cli/src/commands/autolinkWindows/autolinkWindows.ts+76-36Lines changed: 76 additions & 36 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
119 | 119 |
| |
120 | 120 |
| |
121 | 121 |
| |
122 |
| - | |
123 |
| - | |
124 |
| - | |
125 |
| - | |
126 |
| - | |
| 122 | + | |
| 123 | + | |
127 | 124 |
| |
128 | 125 |
| |
129 |
| - | |
130 |
| - | |
131 |
| - | |
132 |
| - | |
133 |
| - | |
| 126 | + | |
| 127 | + | |
134 | 128 |
| |
135 | 129 |
| |
136 | 130 |
| |
| |||
284 | 278 |
| |
285 | 279 |
| |
286 | 280 |
| |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
287 | 309 |
| |
288 | 310 |
| |
289 |
| - | |
290 | 311 |
| |
291 | 312 |
| |
292 | 313 |
| |
293 | 314 |
| |
294 | 315 |
| |
| 316 | + | |
295 | 317 |
| |
296 |
| - | |
| 318 | + | |
| 319 | + | |
297 | 320 |
| |
298 |
| - | |
299 |
| - | |
300 |
| - | |
| 321 | + | |
301 | 322 |
| |
302 | 323 |
| |
303 | 324 |
| |
| 325 | + | |
304 | 326 |
| |
305 | 327 |
| |
306 | 328 |
| |
| |||
313 | 335 |
| |
314 | 336 |
| |
315 | 337 |
| |
316 |
| - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
317 | 354 |
| |
318 | 355 |
| |
319 | 356 |
| |
| |||
340 | 377 |
| |
341 | 378 |
| |
342 | 379 |
| |
343 |
| - | |
| 380 | + | |
344 | 381 |
| |
345 | 382 |
| |
346 | 383 |
| |
347 | 384 |
| |
348 |
| - | |
| 385 | + | |
349 | 386 |
| |
350 |
| - | |
351 | 387 |
| |
352 | 388 |
| |
353 | 389 |
| |
354 | 390 |
| |
355 | 391 |
| |
356 | 392 |
| |
357 | 393 |
| |
358 |
| - | |
359 |
| - | |
360 |
| - | |
361 |
| - | |
362 |
| - | |
363 |
| - | |
| 394 | + | |
364 | 395 |
| |
365 | 396 |
| |
366 | 397 |
| |
| |||
375 | 406 |
| |
376 | 407 |
| |
377 | 408 |
| |
378 |
| - | |
| 409 | + | |
379 | 410 |
| |
380 | 411 |
| |
381 | 412 |
| |
| |||
505 | 536 |
| |
506 | 537 |
| |
507 | 538 |
| |
508 |
| - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
509 | 543 |
| |
510 | 544 |
| |
511 | 545 |
| |
| |||
534 | 568 |
| |
535 | 569 |
| |
536 | 570 |
| |
537 |
| - | |
| 571 | + | |
538 | 572 |
| |
539 |
| - | |
540 |
| - | |
541 | 573 |
| |
542 | 574 |
| |
543 | 575 |
| |
| |||
553 | 585 |
| |
554 | 586 |
| |
555 | 587 |
| |
556 |
| - | |
| 588 | + | |
557 | 589 |
| |
558 | 590 |
| |
559 |
| - | |
| 591 | + | |
560 | 592 |
| |
561 | 593 |
| |
562 | 594 |
| |
563 | 595 |
| |
564 | 596 |
| |
565 | 597 |
| |
566 |
| - | |
| 598 | + | |
567 | 599 |
| |
568 |
| - | |
569 |
| - | |
570 | 600 |
| |
571 | 601 |
| |
572 | 602 |
| |
| |||
582 | 612 |
| |
583 | 613 |
| |
584 | 614 |
| |
585 |
| - | |
| 615 | + | |
586 | 616 |
| |
587 | 617 |
| |
588 | 618 |
| |
| |||
863 | 893 |
| |
864 | 894 |
| |
865 | 895 |
| |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
866 | 906 |
| |
867 | 907 |
| |
868 | 908 |
| |
|
You can’t perform that action at this time.
0 commit comments