Skip to content

Commit b519cbe

Browse files
authored
Release 3.0.0 (#25)
Update README and plugin version to 3.0.0.
1 parent 2498bb9 commit b519cbe

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ To use the module:
4747

4848
```
4949
registry=https://LOCATION-npm.pkg.dev/PROJECT_ID/REPOSITORY_ID/
50-
//LOCATION-npm.pkg.dev/PROJECT_ID/REPOSITORY_ID/:_authToken=""
5150
//LOCATION-npm.pkg.dev/PROJECT_ID/REPOSITORY_ID/:always-auth=true
5251
```
5352
@@ -63,17 +62,22 @@ To use the module:
6362
6463
1. Run the module outside of the directory containing the target npmrc file
6564
66-
`$ npx google-artifactregistry-auth [path/to/.npmrc]`
65+
`$ npx google-artifactregistry-auth --repo-config=[./.npmrc] --credential-config=[~/.npmrc]`
6766
6867
2. Include the command in the scripts in package.json
6968
7069
```
7170
"scripts": {
72-
"artifactregistry-login": "npx google-artifactregistry-auth [path/to/.npmrc]",
71+
"artifactregistry-login": "npx google-artifactregistry-auth --repo-config=[./.npmrc] --credential-config=[~/.npmrc]",
7372
}
7473
```
74+
75+
Where:
76+
- `--repo-config` is the `.npmrc` file with your repository settings. If you don't specify this flag,
77+
the default location is the current directory.
78+
- `--credential-config` is the path to the `.npmrc` file where you want to write the access token. The default is your user `.npmrc` file.
7579
76-
Run the script
80+
And then run the script
7781
7882
`$ npm run artifactregistry-login`
7983
@@ -86,14 +90,10 @@ To use the module:
8690
8791
```
8892
"scripts": {
89-
"artifactregistry-login": "./node_modules/.bin/artifactregistry-auth [path/to/.npmrc]",
93+
"artifactregistry-login": "./node_modules/.bin/artifactregistry-auth --repo-config=[./.npmrc] --credential-config=[~/.npmrc]",
9094
}
9195
```
9296
93-
Where **[path/to/.npmrc]** is the optional argument you can provide to
94-
the script. If no path is provided, .npmrc file at current directory is
95-
used.
96-
9797
Run the script
9898
9999
`$ npm run artifactregistry-login`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "google-artifactregistry-auth",
3-
"version": "2.1.1",
3+
"version": "3.0.0",
44
"description": "google-artifactregistry-auth is an npm module that allows you to configure npm to interact with npm repositories stored in Artifact Registry.",
55
"main": "./src/main.js",
66
"repository": "GoogleCloudPlatform/artifact-registry-npm-tools",

0 commit comments

Comments
 (0)