Граф коммитов

5 Коммитов

Автор SHA1 Сообщение Дата
Alex Hunt 42cab1488c Fix E2E template install in CI jobs (#43323)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43323

This fixes a seemingly pre-existent misconfiguration within our `test_ios_template` E2E test setup in CircleCI.

**Background**

We call `npx react-native-community/cli init` with the `--skip-install` flag, as part of the bootstrapping logic in `scripts/e2e/init-template-e2e.js`. This is necessary because we later want to explicitly call `npm install` with a custom `--registry` for our locally mirrored packages (via Verdaccio).

For some reason, we were observing unexpected differences when this was run under CircleCI:

1. Runs `yarn init`
2. Runs a `yarn add` (unknown pkg)

 {F1464781818}

https://app.circleci.com/pipelines/github/facebook/react-native/42725/workflows/f648468b-e916-4501-887d-ad293aa6fccf/jobs/1398950

This is causing a Yarn-based install ahead of where we want — ignoring the `--skip-install` flag.

*I'm still unsure on the exact LOC cause in CLI* (but most likely, it's around the Yarn v3 move).

**Impact of this fix**

- The above meant that, when we were bootstrapping `test_ios_template` previously, packages weren't being read from Verdaccio, but **instead from npm** — using the `"0.74.0"` versions from the *previous branch cut* .
- After D54006327, this behaviour became breaking 💀 — since for the 0.74 -> 0.75 cut, we no longer physically published `"0.75.0-main"` (new format) packages to npm.

**This change**

I'm passing `--pm npm` to `npx react-native-community/cli init` to skip around any Yarn behaviour. This appears to have removed the erroneous `yarn` invocations .

Changelog: [Internal]

bypass-github-export-checks

Reviewed By: cortinico, cipolleschi

Differential Revision: D54536848

fbshipit-source-id: 473b11924955f5787c82a6c81d4527d77b810aa5
2024-03-05 06:18:37 -08:00
Alex Hunt 8c51cbec94 Fix release testing script (#43130)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43130

Various fixes/tweaks to the `test-e2e-local` script, impacted by recent changes, found during the release process:

- Fix typo in variable name for `circleciToken` arg.
- Relocate erroneously positioned `process.exit` call (a force exit around Verdaccio, which we will remove in future).
- Add notice on exit around Verdaccio server not being killed successfully (to do in T179377112).
- Switch from Yarn to npm for test project installation — Yarn 3 is not respecting `npmRegistryServer`, see https://github.com/yarnpkg/yarn/issues/2508.

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D53951606

fbshipit-source-id: f6e29ef6c9ab33ebf60124757576fcb54219f339
2024-02-21 07:51:10 -08:00
Alex Hunt d6bf51cad9 Refactor remaining forEachPackage call sites (#43112)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43112

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D53942028

fbshipit-source-id: 335bff3c3a31026bae7140fac1d1a6aae23a0f1e
2024-02-20 09:55:46 -08:00
Alex Hunt 80ec096e7c Create shared consts module for scripts
Summary:
Tidy up, removes risk of breakage when relocating inner modules.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D53813025

fbshipit-source-id: 43dc4a57191363546d6858cff311e260d416192f
2024-02-16 03:21:25 -08:00
Alex Hunt fb446598f9 Rename E2E template init script, relocate Verdaccio config + storage (#43001)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/43001

More understandable name: ~"React Native init, for E2E testing". Also relocates Verdaccio config and storage location under `scripts/e2e/` (resolving TODO comment).

The intent is for the `scripts/e2e/` dir to also group the existing E2E testing-related scripts — although I will stop here for the current release-related work.

Changelog: [Internal]

Reviewed By: lunaleaps

Differential Revision: D53609332

fbshipit-source-id: fb2f6502a18c4a4ac2368b46af1e3ee42edbadd6
2024-02-15 14:51:48 -08:00