Skip to content

Commit

Permalink
No longer set the npm always-auth option
Browse files Browse the repository at this point in the history
  • Loading branch information
n4bb12 committed Jan 22, 2023
1 parent 20c97f3 commit ced2148
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
3 changes: 2 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@

### Compatibility

- Verdaccio 5.0 - 5.18
- Verdaccio 5.0 - 5.19
- Node 16
- npm 7+
- Browsers: See [browserslist](../.browserslistrc)

## Installing the Plugin
Expand Down
1 change: 0 additions & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ Open the "Configuration" dialog and click "Copy to clipboard":
- Run the copied commands on your terminal:

```bash
npm config set //localhost:4873/:always-auth true
npm config set //localhost:4873/:_authToken "SECRET_TOKEN"
```

Expand Down
1 change: 0 additions & 1 deletion src/client/plugin/usage-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ export function getUsageInfo() {
const authToken = localStorage.getItem("npm")
return [
`npm config set ${configBase}:_authToken "${authToken}"`,
`npm config set ${configBase}:always-auth true`,
].join("\n")
}
1 change: 0 additions & 1 deletion src/npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export function getNpmSaveCommands(registry: string, token: string) {
const baseUrl = url.host + url.pathname

return [
`npm config set //${baseUrl}:always-auth true`,
`npm config set //${baseUrl}:_authToken "${token}"`,
]
}
Expand Down
2 changes: 0 additions & 2 deletions test/npm.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,13 @@ describe("npm", () => {
const commands1 = getNpmSaveCommands(testRegistryUrl, testNpmToken)
expect(commands1).toMatchInlineSnapshot(`
[
"npm config set //localhost:4873/:always-auth true",
"npm config set //localhost:4873/:_authToken \\"test-npm-token\\"",
]
`)

const commands2 = getNpmSaveCommands(testRegistryUrl + "/", testNpmToken)
expect(commands2).toMatchInlineSnapshot(`
[
"npm config set //localhost:4873/:always-auth true",
"npm config set //localhost:4873/:_authToken \\"test-npm-token\\"",
]
`)
Expand Down

0 comments on commit ced2148

Please sign in to comment.