Skip to content

Commit

Permalink
docs: change certfile to cafile (#7947)
Browse files Browse the repository at this point in the history
cafile is the correct config key

Closes: npm/documentation#1337
  • Loading branch information
wraithgar authored Dec 2, 2024
1 parent e362c6d commit 2af31dd
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 27 deletions.
2 changes: 1 addition & 1 deletion docs/lib/content/configuring-npm/npmrc.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ The full list is:
- `username`
- `_password`
- `email`
- `certfile` (path to certificate file)
- `cafile` (path to certificate authority file)
- `keyfile` (path to key file)

In order to scope these values, they must be prefixed by a URI fragment.
Expand Down
15 changes: 0 additions & 15 deletions tap-snapshots/test/lib/commands/audit.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -331,21 +331,6 @@ audited 2 packages in xxx
2 packages have verified registry signatures
`

exports[`test/lib/commands/audit.js TAP fallback audit > must match snapshot 1`] = `
# npm audit report
test-dep-a 1.0.0
Severity: high
Test advisory 100 - https://github.com/advisories/GHSA-100
fix available via \`npm audit fix\`
node_modules/test-dep-a
1 high severity vulnerability
To address all issues, run:
npm audit fix
`

exports[`test/lib/commands/audit.js TAP json audit > must match snapshot 1`] = `
{
"auditReportVersion": 2,
Expand Down
12 changes: 6 additions & 6 deletions tap-snapshots/test/lib/docs.js.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1877,9 +1877,9 @@ When set to \`dev\` or \`development\`, this is an alias for \`--include=dev\`.
* Default: null
* Type: null or String
* DEPRECATED: \`key\` and \`cert\` are no longer used for most registry
operations. Use registry scoped \`keyfile\` and \`certfile\` instead. Example:
operations. Use registry scoped \`keyfile\` and \`cafile\` instead. Example:
//other-registry.tld/:keyfile=/path/to/key.pem
//other-registry.tld/:certfile=/path/to/cert.crt
//other-registry.tld/:cafile=/path/to/cert.crt
A client certificate to pass when accessing the registry. Values should be
in PEM format (Windows calls it "Base-64 encoded X.509 (.CER)") with
Expand All @@ -1890,8 +1890,8 @@ cert="-----BEGIN CERTIFICATE-----\\nXXXX\\nXXXX\\n-----END CERTIFICATE-----"
\`\`\`
It is _not_ the path to a certificate file, though you can set a
registry-scoped "certfile" path like
"//other-registry.tld/:certfile=/path/to/cert.pem".
registry-scoped "cafile" path like
"//other-registry.tld/:cafile=/path/to/cert.pem".
Expand Down Expand Up @@ -1982,9 +1982,9 @@ Alias for \`--init-version\`
* Default: null
* Type: null or String
* DEPRECATED: \`key\` and \`cert\` are no longer used for most registry
operations. Use registry scoped \`keyfile\` and \`certfile\` instead. Example:
operations. Use registry scoped \`keyfile\` and \`cafile\` instead. Example:
//other-registry.tld/:keyfile=/path/to/key.pem
//other-registry.tld/:certfile=/path/to/cert.crt
//other-registry.tld/:cafile=/path/to/cert.crt
A client key to pass when accessing the registry. Values should be in PEM
format with newlines replaced by the string "\\n". For example:
Expand Down
10 changes: 5 additions & 5 deletions workspaces/config/lib/definitions/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,14 +397,14 @@ const definitions = {
\`\`\`
It is _not_ the path to a certificate file, though you can set a registry-scoped
"certfile" path like "//other-registry.tld/:certfile=/path/to/cert.pem".
"cafile" path like "//other-registry.tld/:cafile=/path/to/cert.pem".
`,
deprecated: `
\`key\` and \`cert\` are no longer used for most registry operations.
Use registry scoped \`keyfile\` and \`certfile\` instead.
Use registry scoped \`keyfile\` and \`cafile\` instead.
Example:
//other-registry.tld/:keyfile=/path/to/key.pem
//other-registry.tld/:certfile=/path/to/cert.crt
//other-registry.tld/:cafile=/path/to/cert.crt
`,
flatten,
}),
Expand Down Expand Up @@ -1077,10 +1077,10 @@ const definitions = {
`,
deprecated: `
\`key\` and \`cert\` are no longer used for most registry operations.
Use registry scoped \`keyfile\` and \`certfile\` instead.
Use registry scoped \`keyfile\` and \`cafile\` instead.
Example:
//other-registry.tld/:keyfile=/path/to/key.pem
//other-registry.tld/:certfile=/path/to/cert.crt
//other-registry.tld/:cafile=/path/to/cert.crt
`,
flatten,
}),
Expand Down

0 comments on commit 2af31dd

Please sign in to comment.