react-native-macos/scripts
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
..
__tests__ Reorganise and document release script entry points (#42774) 2024-02-01 06:02:17 -08:00
build Adjust output package.json formatting in scripts (#43133) 2024-02-23 02:44:10 -08:00
circleci Remove dead android scripts (#42612) 2024-01-23 03:03:08 -08:00
debugger-frontend Create shared consts module for scripts 2024-02-16 03:21:25 -08:00
e2e Fix E2E template install in CI jobs (#43323) 2024-03-05 06:18:37 -08:00
monorepo Refactor remaining forEachPackage call sites (#43112) 2024-02-20 09:55:46 -08:00
release-testing Fix release testing script (#43130) 2024-02-21 07:51:10 -08:00
releases Relocate and export updatePackageJson script util 2024-03-04 02:54:44 -08:00
releases-ci Update hermes-parser and related packages in fbsource to 0.20.0 2024-02-29 14:19:29 -08:00
releases-local Refactor remaining forEachPackage call sites (#43112) 2024-02-20 09:55:46 -08:00
utils Relocate and export updatePackageJson script util 2024-03-04 02:54:44 -08:00
.tests.env Test against XCode 14.3 and 15 (#41798) 2023-12-05 15:35:05 -08:00
android-e2e-test.js Enable lint/sort-imports everywhere (#41334) 2023-11-06 12:59:38 -08:00
consts.js Create shared consts module for scripts 2024-02-16 03:21:25 -08:00
lint-java.js Enable lint/sort-imports everywhere (#41334) 2023-11-06 12:59:38 -08:00
npm-utils.js Update hermes-parser and related packages in fbsource to 0.20.0 2024-02-29 14:19:29 -08:00
objc-test.sh Remove deprecated Snapshot tests (#39720) 2023-10-03 04:33:53 -07:00
process-podspecs.sh Update copyright headers from Facebook to Meta 2021-12-30 15:11:21 -08:00
run-ci-javascript-tests.js Implement new feature flag system (re-land) (#42678) 2024-01-26 09:55:27 -08:00
scm-utils.js Enable Flow on misc release scripts (#42736) 2024-01-31 03:36:02 -08:00
sync-css-layout.sh | RN Monorepo | Migrate to package (#36434) 2023-03-17 05:03:25 -07:00
update_podfile_lock.sh Update Gemfile to require Cocoapods 1.12.0 (#36321) 2023-02-28 07:14:02 -08:00
validate-ios-test-env.sh bump Node references from 12/14 to 14/16 (#32980) 2022-01-28 05:07:18 -08:00