@npmcli/config 8.3.0 → 8.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +4 -7
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -557,7 +557,7 @@ class Config {
557
557
  const k = envReplace(key, this.env)
558
558
  const v = this.parseField(value, k)
559
559
  if (where !== 'default') {
560
- this.#checkDeprecated(k, where, obj, [key, value])
560
+ this.#checkDeprecated(k)
561
561
  if (this.definitions[key]?.exclusive) {
562
562
  for (const exclusive of this.definitions[key].exclusive) {
563
563
  if (!this.isDefault(exclusive)) {
@@ -571,7 +571,7 @@ class Config {
571
571
  }
572
572
  }
573
573
 
574
- #checkDeprecated (key, where, obj, kv) {
574
+ #checkDeprecated (key) {
575
575
  // XXX(npm9+) make this throw an error
576
576
  if (this.deprecated[key]) {
577
577
  log.warn('config', key, this.deprecated[key])
@@ -739,7 +739,7 @@ class Config {
739
739
  const iniData = ini.stringify(conf.raw).trim() + '\n'
740
740
  if (!iniData.trim()) {
741
741
  // ignore the unlink error (eg, if file doesn't exist)
742
- await unlink(conf.source).catch(er => {})
742
+ await unlink(conf.source).catch(() => {})
743
743
  return
744
744
  }
745
745
  const dir = dirname(conf.source)
@@ -774,12 +774,9 @@ class Config {
774
774
  this.delete(`${nerfed}:keyfile`, level)
775
775
  }
776
776
 
777
- setCredentialsByURI (uri, { token, username, password, email, certfile, keyfile }) {
777
+ setCredentialsByURI (uri, { token, username, password, certfile, keyfile }) {
778
778
  const nerfed = nerfDart(uri)
779
779
 
780
- // email is either provided, a top level key, or nothing
781
- email = email || this.get('email', 'user')
782
-
783
780
  // field that hasn't been used as documented for a LONG time,
784
781
  // and as of npm 7.10.0, isn't used at all. We just always
785
782
  // send auth if we have it, only to the URIs under the nerf dart.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/config",
3
- "version": "8.3.0",
3
+ "version": "8.3.1",
4
4
  "files": [
5
5
  "bin/",
6
6
  "lib/"
@@ -9,7 +9,7 @@
9
9
  "description": "Configuration management for the npm cli",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "https://github.com/npm/cli.git",
12
+ "url": "git+https://github.com/npm/cli.git",
13
13
  "directory": "workspaces/config"
14
14
  },
15
15
  "author": "GitHub Inc.",