chore(repo): support npm 9 in local-registry (#13994)

This commit is contained in:
Jason Jean 2022-12-22 16:48:59 -05:00 committed by GitHub
parent e50c8ccc41
commit 677cb98a79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,14 +5,14 @@ COMMAND=$1
if [[ $COMMAND == "enable" ]]; then if [[ $COMMAND == "enable" ]]; then
echo "Setting registry to local registry" echo "Setting registry to local registry"
echo "To Disable: yarn local-registry disable" echo "To Disable: yarn local-registry disable"
npm config set registry http://localhost:4873/ npm config set registry http://localhost:4873/ --location user
yarn config set registry http://localhost:4873/ yarn config set registry http://localhost:4873/
fi fi
if [[ $COMMAND == "disable" ]]; then if [[ $COMMAND == "disable" ]]; then
npm config delete registry npm config delete registry --location user
yarn config delete registry yarn config delete registry
CURRENT_NPM_REGISTRY=$(npm config get registry) CURRENT_NPM_REGISTRY=$(npm config get registry --location user)
CURRENT_YARN_REGISTRY=$(yarn config get registry) CURRENT_YARN_REGISTRY=$(yarn config get registry)
echo "Reverting registries" echo "Reverting registries"