diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a4a2b55..be612634 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [6.2.1](https://github.com/nodejs/node-core-utils/compare/v6.2.0...v6.2.1) (2026-03-20) + + +### Bug Fixes + +* **git-node:** pass `argv` to `LandingSession` constructor ([#1039](https://github.com/nodejs/node-core-utils/issues/1039)) ([8224122](https://github.com/nodejs/node-core-utils/commit/82241222c4b03f4d19b558664a4f7b3a5ad685f6)) +* **ncu-config:** allow overriding global encrypted keys with local ones ([#1030](https://github.com/nodejs/node-core-utils/issues/1030)) ([f2f4194](https://github.com/nodejs/node-core-utils/commit/f2f4194b2bc00e4c8a734df74fbf354e80d64bca)) + ## [6.2.0](https://github.com/nodejs/node-core-utils/compare/v6.1.1...v6.2.0) (2026-03-18) diff --git a/components/git/land.js b/components/git/land.js index f2fa5b69..48cf99f8 100644 --- a/components/git/land.js +++ b/components/git/land.js @@ -168,7 +168,7 @@ async function main(state, argv, cli, dir) { github: true }); const req = new Request(credentials); - let session = new LandingSession(cli, req, dir); + let session = new LandingSession(cli, req, dir, argv); if (state !== AMEND && state !== CONTINUE && diff --git a/lib/config.js b/lib/config.js index 3c91217d..b80422ef 100644 --- a/lib/config.js +++ b/lib/config.js @@ -25,9 +25,21 @@ export function getMergedConfig(dir, home, additional) { const globalConfig = getConfig(GLOBAL_CONFIG, home); const projectConfig = getConfig(PROJECT_CONFIG, dir); const localConfig = getConfig(LOCAL_CONFIG, dir); - mergedConfig = Object.assign(globalConfig, projectConfig, localConfig, additional); + + // Using property descriptors to avoid calling any setter if e.g. a + // localConfig value overrides a globalConfig key. + mergedConfig = Object.create(null, { + ...Object.getOwnPropertyDescriptors(globalConfig), + ...Object.getOwnPropertyDescriptors(projectConfig), + ...Object.getOwnPropertyDescriptors(localConfig), + }); } - return mergedConfig; + return additional + ? Object.create(null, { + ...Object.getOwnPropertyDescriptors(mergedConfig), + ...Object.getOwnPropertyDescriptors(additional), + }) + : mergedConfig; }; export function clearCachedConfig() { mergedConfig = null; diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 6ec1fd42..6aac4980 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1,12 +1,12 @@ { "name": "@node-core/utils", - "version": "6.2.0", + "version": "6.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@node-core/utils", - "version": "6.2.0", + "version": "6.2.1", "license": "MIT", "dependencies": { "@inquirer/prompts": "^7.4.1", diff --git a/package.json b/package.json index a3366e8c..7120617a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@node-core/utils", - "version": "6.2.0", + "version": "6.2.1", "description": "Utilities for Node.js core collaborators", "type": "module", "engines": {