mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* chore: test ESM version against Node.js 24 * update Node.js 24 runtime integration test snapshot * fix node 12 LTS snapshots * Update node.cjs Co-authored-by: Nicolò Ribaudo <[email protected]> * bump verdaccio to 6.1.2 * pin node to 22 * Revert "pin node to 22" This reverts commit 7f203513fd56dc941e9f6e2d296a5e21b06d8ba2. * remove unused openssl workaround * print npm logs on error * pin create-react-app node to 22 --------- Co-authored-by: Nicolò Ribaudo <[email protected]>
35 lines
1.1 KiB
Bash
Executable File
35 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Copied from https://github.com/facebook/create-react-app/blob/053f9774d3f592c17741d2a86de66a7ca58f90c0/tasks/local-registry.sh
|
|
|
|
custom_registry_url=http://localhost:4873
|
|
default_verdaccio_package=verdaccio@~6.1.2
|
|
|
|
function startLocalRegistry {
|
|
# Start local registry
|
|
tmp_registry_log=`mktemp`
|
|
echo "Registry output file: $tmp_registry_log"
|
|
(cd && nohup npx $default_verdaccio_package -c $1 &>$tmp_registry_log &)
|
|
# Wait for Verdaccio to boot
|
|
grep -q "http address" <(tail -f $tmp_registry_log)
|
|
|
|
# Set registry to local registry
|
|
export NPM_CONFIG_REGISTRY="$custom_registry_url"
|
|
export YARN_NPM_PUBLISH_REGISTRY="$custom_registry_url"
|
|
export YARN_NPM_REGISTRY_SERVER="$custom_registry_url"
|
|
export YARN_NPM_AUTH_IDENT="username:password"
|
|
export YARN_UNSAFE_HTTP_WHITELIST="localhost"
|
|
}
|
|
|
|
function loginLocalRegistry {
|
|
export YARN_NPM_AUTH_IDENT="username:password"
|
|
}
|
|
|
|
function stopLocalRegistry {
|
|
# Restore the original NPM and Yarn registry URLs and stop Verdaccio
|
|
fuser -k 4873/tcp
|
|
unset NPM_CONFIG_REGISTRY
|
|
unset YARN_NPM_PUBLISH_REGISTRY
|
|
unset YARN_NPM_REGISTRY_SERVER
|
|
}
|