-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[TEST] Test the new node 22 VM #14984
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
e4512f9
Test the new node 22 VM
jonthysell d133fa3
Merge branch 'main' into node22-vmtest
iamAbhi-916 d0ae8a7
set npm audit to false for verdaccio
iamAbhi-916 3c77dd6
Merge branch 'node22-vmtest' of https://github.com/microsoft/react-na…
iamAbhi-916 a95cb03
disable npm audit
iamAbhi-916 719fedb
replace npm commands with yarn to solve connection issue npm 10.5.1
iamAbhi-916 ac88951
Change files
iamAbhi-916 960ed0a
Merge branch 'main' into node22-vmtest
iamAbhi-916 c8293c7
Merge branch 'main' into node22-vmtest
iamAbhi-916 6a90e01
update add user for verdaccio
iamAbhi-916 6af7393
minor fixes to creatorrnw script
iamAbhi-916 439331b
revert RNCLI_TEMPLATE in createrrnw script
iamAbhi-916 d97719b
update createrrnw script
iamAbhi-916 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
7 changes: 7 additions & 0 deletions
7
change/react-native-windows-e56d2184-0c03-4314-b0f0-cd1c1fa9fbe0.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "prerelease", | ||
"comment": "replace npm commands with yarn to solve connection issue npm 10.5.1", | ||
"packageName": "react-native-windows", | ||
"email": "[email protected]", | ||
"dependentChangeType": "patch" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,16 +71,16 @@ if not "%part%"=="" ( | |
:loopend | ||
|
||
if %USE_VERDACCIO% equ 1 ( | ||
@echo creaternwapp.cmd: Setting npm to use verdaccio at http://localhost:4873 | ||
call npm config set registry http://localhost:4873 | ||
@echo creaternwapp.cmd: Setting yarn to use verdaccio at http://localhost:4873 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed all npm commands and replaced with yarn equivalent as workaround for npm 10.5.1 has a bug with Verdaccio that causes ECONNREFUSED errors particular to node version >= 21 ( we updated to 22) . |
||
call yarn config set registry http://localhost:4873 | ||
) | ||
|
||
if %LINK_RNW% equ 1 ( | ||
@echo creaternwapp.cmd Determining versions from local RNW repo at %RNW_ROOT% | ||
for /f "delims=" %%a in ('npm show "%RNW_ROOT%\vnext" devDependencies.react') do @set R_VERSION=%%a | ||
for /f "delims=" %%a in ('npm show "%RNW_ROOT%\vnext" devDependencies.react-native') do @set RN_VERSION=%%a | ||
for /f "delims=" %%a in ('npm show "%RNW_ROOT%\vnext" version') do @set RNW_VERSION=%%a | ||
for /f "delims=" %%a in ('npm show "%RNW_ROOT%\vnext" dependencies.@react-native-community/cli') do @set RNCLI_VERSION=%%a | ||
for /f "delims=" %%a in ('yarn info "%RNW_ROOT%\vnext" devDependencies.react --json ^| powershell -Command "$input | ConvertFrom-Json | Select-Object -ExpandProperty data | Select-Object -ExpandProperty devDependencies | Select-Object -ExpandProperty react"') do @set R_VERSION=%%a | ||
for /f "delims=" %%a in ('yarn info "%RNW_ROOT%\vnext" devDependencies.react-native --json ^| powershell -Command "$input | ConvertFrom-Json | Select-Object -ExpandProperty data | Select-Object -ExpandProperty devDependencies | Select-Object -ExpandProperty 'react-native'"') do @set RN_VERSION=%%a | ||
for /f "delims=" %%a in ('yarn info "%RNW_ROOT%\vnext" version --json ^| powershell -Command "$input | ConvertFrom-Json | Select-Object -ExpandProperty data"') do @set RNW_VERSION=%%a | ||
for /f "delims=" %%a in ('yarn info "%RNW_ROOT%\vnext" dependencies.@react-native-community/cli --json ^| powershell -Command "$input | ConvertFrom-Json | Select-Object -ExpandProperty data | Select-Object -ExpandProperty dependencies | Select-Object -ExpandProperty '@react-native-community/cli'"') do @set RNCLI_VERSION=%%a | ||
) | ||
|
||
if "%RNW_VERSION%"=="" ( | ||
|
@@ -90,31 +90,31 @@ if "%RNW_VERSION%"=="" ( | |
|
||
if "%RN_VERSION%"=="" ( | ||
@echo creaternwapp.cmd Determining react-native version from react-native-windows dependency | ||
for /f "delims=" %%a in ('npm show react-native-windows@%RNW_VERSION% devDependencies.react-native') do @set RN_VERSION=%%a | ||
for /f "delims=" %%a in ('yarn info react-native-windows@%RNW_VERSION% devDependencies.react-native --json ^| powershell -Command "$input | ConvertFrom-Json | Select-Object -ExpandProperty data | Select-Object -ExpandProperty devDependencies | Select-Object -ExpandProperty 'react-native'"') do @set RN_VERSION=%%a | ||
) | ||
|
||
if "%RNCLI_VERSION%"=="" ( | ||
@echo creaternwapp.cmd Determining @react-native-community/cli version from react-native-windows dependency | ||
for /f "delims=" %%a in ('npm show react-native-windows@%RNW_VERSION% dependencies.@react-native-community/cli') do @set RNCLI_VERSION=%%a | ||
for /f "delims=" %%a in ('yarn info react-native-windows@%RNW_VERSION% dependencies.@react-native-community/cli --json ^| powershell -Command "$input | ConvertFrom-Json | Select-Object -ExpandProperty data | Select-Object -ExpandProperty dependencies | Select-Object -ExpandProperty '@react-native-community/cli'"') do @set RNCLI_VERSION=%%a | ||
) | ||
|
||
if "%R_VERSION%"=="" ( | ||
@echo creaternwapp.cmd Determining react version from react-native-windows dependency | ||
for /f "delims=" %%a in ('npm show react-native-windows@%RNW_VERSION% devDependencies.react') do @set R_VERSION=%%a | ||
for /f "delims=" %%a in ('yarn info react-native-windows@%RNW_VERSION% devDependencies.react --json ^| powershell -Command "$input | ConvertFrom-Json | Select-Object -ExpandProperty data | Select-Object -ExpandProperty devDependencies | Select-Object -ExpandProperty react"') do @set R_VERSION=%%a | ||
) | ||
|
||
@echo creaternwapp.cmd Determining concrete versions for react@%R_VERSION%, react-native@%RN_VERSION%, @react-native-community/cli@%RNCLI_VERSION%, and react-native-windows@%RNW_VERSION% | ||
for /f "delims=" %%a in ('npm show react-native-windows@%RNW_VERSION% version') do @set RNW_VERSION=%%a | ||
for /f "delims=" %%a in ('npm show react-native@%RN_VERSION% version') do @set RN_VERSION=%%a | ||
for /f "delims=" %%a in ('npm show @react-native-community/cli@%RNCLI_VERSION% version') do @set RNCLI_VERSION=%%a | ||
for /f "delims=" %%a in ('npm show react@%R_VERSION% version') do @set R_VERSION=%%a | ||
for /f "delims=" %%a in ('yarn info react-native-windows@%RNW_VERSION% version --json ^| powershell -Command "$input | ConvertFrom-Json | Select-Object -ExpandProperty data"') do @set RNW_VERSION=%%a | ||
for /f "delims=" %%a in ('yarn info react-native@%RN_VERSION% version --json ^| powershell -Command "$input | ConvertFrom-Json | Select-Object -ExpandProperty data"') do @set RN_VERSION=%%a | ||
for /f "delims=" %%a in ('yarn info @react-native-community/cli@%RNCLI_VERSION% version --json ^| powershell -Command "$input | ConvertFrom-Json | Select-Object -ExpandProperty data"') do @set RNCLI_VERSION=%%a | ||
for /f "delims=" %%a in ('yarn info react@%R_VERSION% version --json ^| powershell -Command "$input | ConvertFrom-Json | Select-Object -ExpandProperty data"') do @set R_VERSION=%%a | ||
|
||
@echo creaternwapp.cmd Creating RNW app "%APP_NAME%" with react@%R_VERSION%, react-native@%RN_VERSION%, and react-native-windows@%RNW_VERSION% | ||
|
||
set RNCLI_TEMPLATE= | ||
if not "x%RN_VERSION:nightly=%"=="x%RN_VERSION%" ( | ||
@echo creaternwapp.cmd Override @react-native-community/template version | ||
set RNCLI_TEMPLATE=--template "@react-native-community/template@^%RN_VERSION:~0,4%.0-" | ||
set RNCLI_TEMPLATE=--template "@react-native-community/template@%RN_VERSION:~0,4%.0-" | ||
) | ||
|
||
@echo creaternwapp.cmd: Creating base RN app project with: npx --yes @react-native-community/cli@latest init %APP_NAME% --version %RN_VERSION% %RNCLI_TEMPLATE% --verbose --skip-install --install-pods false --skip-git-init true | ||
|
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
child.stdin.write waits for prompts that never properly complete , for node 22 and verdaccio and its not itermittent in nature hence added non-interactive approach using
npm config set
commands to set authentication