/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
.github/workflow-scripts/verifyReleaseOnNpm.js
30 строк
997 B
Riccardo Cipolleschi
Fix verifyReleaseOnNPM by dropping the v in the version (#49944)
11 мар 2025, 14:05
11 мар 2025, 14:05
10bbdb8
Код
Авторство
О чём код?
/** * 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. * * @format */ const {run, sleep, log} = require('./utils.js'); const {verifyPublishedPackage} = require('./verifyPublishedPackage.js'); const REACT_NATIVE_NPM_PKG = 'react-native'; const MAX_RETRIES = 3 * 6; // 18 attempts. Waiting between attempt: 10 s. Total time: 3 mins. /** * Will verify that @latest, @next and the @<version> have been published. * * NOTE: This will infinitely query each step until successful, make sure the * calling job has a timeout. */ module.exports.verifyReleaseOnNpm = async ( version, latest = false, retries = MAX_RETRIES, ) => { const tag = version.includes('-rc.') ? 'next' : latest ? 'latest' : null; if (version.startsWith('v')) { version = version.slice(1); } await verifyPublishedPackage(REACT_NATIVE_NPM_PKG, version, tag, retries); };