Files
react-native/scripts/releases/use-hermes-prebuilt.js
T
Riccardo Cipolleschi f37513595f Rename use-hermes-nightly.js to use-hermes-prebuilt.js (#56750)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56750

Rename scripts/releases/use-hermes-nightly.js to scripts/releases/use-hermes-prebuilt.js.
The script fetches the latest prebuilt Hermes from the 'latest-v1' npm dist-tag, not a
true 'nightly' build. Update:
- Script name: use-hermes-nightly.js -> use-hermes-prebuilt.js
- Internal log message: 'nightly update' -> 'prebuilt update'
- Import: updateHermesVersionsToNightly -> updateHermesVersionsToPrebuilt
- CI step names: 'Set nightly Hermes versions' -> 'Set Hermes prebuilt version'
- Script path references in test-all.yml, test-ios-helloworld/action.yml,
  test-ios-rntester/action.yml

## Changelog:
[Internal] -

Reviewed By: cortinico

Differential Revision: D104649633

fbshipit-source-id: ea74dbdba5a7f31aa58e5f581249e384581e6620
2026-05-11 12:55:12 -07:00

33 lines
851 B
JavaScript

/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
*/
'use strict';
const {getReactNativePackage} = require('../shared/monorepoUtils');
const {updateHermesVersionsToPrebuilt} = require('./utils/hermes-utils');
async function main() {
const {packageJson} = await getReactNativePackage();
const hermesCompilerVersion = packageJson.dependencies?.['hermes-compiler'];
if (hermesCompilerVersion != null && hermesCompilerVersion !== '0.0.0') {
console.log(
`Skipping hermes prebuilt update: hermes-compiler is pinned to ${hermesCompilerVersion}`,
);
return;
}
await updateHermesVersionsToPrebuilt();
}
if (require.main === module) {
void main();
}