Skip to content

Commit f0f606e

Browse files
committed
fix formatting
1 parent 70a0a59 commit f0f606e

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

e2e/npm_translate_lock_dynamic_auth/test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ cleanup() {
4141
trap cleanup EXIT
4242

4343
echo -e "${BLUE}Test 1: Fetch with valid token${NC}"
44-
cat > ~/.npmrc << EOF
44+
cat >~/.npmrc <<EOF
4545
_authToken=${ASPECT_NPM_AUTH_TOKEN}
4646
EOF
4747
touch ~/.npmrc.test
@@ -57,7 +57,7 @@ fi
5757
echo ""
5858

5959
echo -e "${BLUE}Test 2: Fetch with broken token (empty repository cache)${NC}"
60-
cat > ~/.npmrc << EOF
60+
cat >~/.npmrc <<EOF
6161
_authToken=BROKEN_TOKEN_SHOULD_CAUSE_401
6262
EOF
6363

@@ -80,7 +80,7 @@ fi
8080
echo ""
8181

8282
echo -e "${BLUE}Test 3: Fetch with restored valid token${NC}"
83-
cat > ~/.npmrc << EOF
83+
cat >~/.npmrc <<EOF
8484
_authToken=${ASPECT_NPM_AUTH_TOKEN}
8585
EOF
8686

npm/private/npm_import.bzl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,6 +1083,8 @@ def npm_import(
10831083
npm_auth_basic = "",
10841084
npm_auth_username = "",
10851085
npm_auth_password = "",
1086+
npmrc = None,
1087+
use_home_npmrc = None,
10861088
bins = {},
10871089
dev = False,
10881090
exclude_package_contents = [],
@@ -1321,6 +1323,10 @@ def npm_import(
13211323
13221324
npm_auth_password: Auth password to authenticate with npm. When using Basic authentication.
13231325
1326+
npmrc: Label to an .npmrc file for authentication. Supports environment variable expansion.
1327+
1328+
use_home_npmrc: Use ~/.npmrc for authentication.
1329+
13241330
extra_build_content: Additional content to append on the generated BUILD file at the root of
13251331
the created repository, either as a string or a list of lines similar to
13261332
<https://github.com/bazelbuild/bazel-skylib/blob/main/docs/write_file_doc.md>.
@@ -1389,6 +1395,8 @@ def npm_import(
13891395
npm_auth_basic = npm_auth_basic,
13901396
npm_auth_username = npm_auth_username,
13911397
npm_auth_password = npm_auth_password,
1398+
npmrc = npmrc,
1399+
use_home_npmrc = use_home_npmrc,
13921400
lifecycle_hooks = lifecycle_hooks,
13931401
extra_build_content = (
13941402
extra_build_content if type(extra_build_content) == "string" else "\n".join(extra_build_content)

0 commit comments

Comments
 (0)