@npmcli/config 6.1.1 → 6.1.3

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 +3 -2
  2. package/package.json +6 -6
package/lib/index.js CHANGED
@@ -482,8 +482,9 @@ class Config {
482
482
  if (problem.action === 'delete') {
483
483
  this.delete(problem.key, problem.where)
484
484
  } else if (problem.action === 'rename') {
485
- const old = this.get(problem.from, problem.where)
486
- this.set(problem.to, old, problem.where)
485
+ const raw = this.data.get(problem.where).raw?.[problem.from]
486
+ const calculated = this.get(problem.from, problem.where)
487
+ this.set(problem.to, raw || calculated, problem.where)
487
488
  this.delete(problem.from, problem.where)
488
489
  }
489
490
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npmcli/config",
3
- "version": "6.1.1",
3
+ "version": "6.1.3",
4
4
  "files": [
5
5
  "bin/",
6
6
  "lib/"
@@ -33,15 +33,15 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@npmcli/eslint-config": "^4.0.0",
36
- "@npmcli/template-oss": "4.11.0",
37
- "tap": "^16.3.2"
36
+ "@npmcli/template-oss": "4.11.4",
37
+ "tap": "^16.3.4"
38
38
  },
39
39
  "dependencies": {
40
- "@npmcli/map-workspaces": "^3.0.0",
40
+ "@npmcli/map-workspaces": "^3.0.2",
41
41
  "ini": "^3.0.0",
42
42
  "nopt": "^7.0.0",
43
43
  "proc-log": "^3.0.0",
44
- "read-package-json-fast": "^3.0.0",
44
+ "read-package-json-fast": "^3.0.2",
45
45
  "semver": "^7.3.5",
46
46
  "walk-up-path": "^1.0.0"
47
47
  },
@@ -50,6 +50,6 @@
50
50
  },
51
51
  "templateOSS": {
52
52
  "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
53
- "version": "4.11.0"
53
+ "version": "4.11.4"
54
54
  }
55
55
  }