@node-core/utils 6.2.0 → 6.2.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.
@@ -168,7 +168,7 @@ async function main(state, argv, cli, dir) {
168
168
  github: true
169
169
  });
170
170
  const req = new Request(credentials);
171
- let session = new LandingSession(cli, req, dir);
171
+ let session = new LandingSession(cli, req, dir, argv);
172
172
 
173
173
  if (state !== AMEND &&
174
174
  state !== CONTINUE &&
package/lib/config.js CHANGED
@@ -25,9 +25,21 @@ export function getMergedConfig(dir, home, additional) {
25
25
  const globalConfig = getConfig(GLOBAL_CONFIG, home);
26
26
  const projectConfig = getConfig(PROJECT_CONFIG, dir);
27
27
  const localConfig = getConfig(LOCAL_CONFIG, dir);
28
- mergedConfig = Object.assign(globalConfig, projectConfig, localConfig, additional);
28
+
29
+ // Using property descriptors to avoid calling any setter if e.g. a
30
+ // localConfig value overrides a globalConfig key.
31
+ mergedConfig = Object.create(null, {
32
+ ...Object.getOwnPropertyDescriptors(globalConfig),
33
+ ...Object.getOwnPropertyDescriptors(projectConfig),
34
+ ...Object.getOwnPropertyDescriptors(localConfig),
35
+ });
29
36
  }
30
- return mergedConfig;
37
+ return additional
38
+ ? Object.create(null, {
39
+ ...Object.getOwnPropertyDescriptors(mergedConfig),
40
+ ...Object.getOwnPropertyDescriptors(additional),
41
+ })
42
+ : mergedConfig;
31
43
  };
32
44
  export function clearCachedConfig() {
33
45
  mergedConfig = null;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@node-core/utils",
3
- "version": "6.2.0",
3
+ "version": "6.2.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@node-core/utils",
9
- "version": "6.2.0",
9
+ "version": "6.2.1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@inquirer/prompts": "^7.4.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@node-core/utils",
3
- "version": "6.2.0",
3
+ "version": "6.2.1",
4
4
  "description": "Utilities for Node.js core collaborators",
5
5
  "type": "module",
6
6
  "engines": {