Bug 43430

Summary: Не отображается версия в выводе npm config get user-agent
Product: Sisyphus Reporter: Alexander Makeenkov <amakeenk>
Component: npmAssignee: Vitaly Lipatov <lav>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P5 CC: lav
Version: unstable   
Hardware: x86_64   
OS: Linux   

Description Alexander Makeenkov 2022-08-02 18:04:07 MSK
Версия пакета:
npm-8.11.0-alt1

Шаги воспроизведения:
$ npm config get user-agent

Получаемый результат:
npm/{npm-version} node/{node-version} {platform} {arch} workspaces/{workspaces} {ci}

Ошибка не воспроизводится в p10 (npm-6.14.16-alt1):
$ npm config get user-agent
npm/6.14.16 node/v14.19.1 linux x64
Comment 1 Alexander Makeenkov 2022-10-17 17:30:39 MSK
npm-8.15.0-alt1 - ошибка воспроизводится.
Comment 2 Vitaly Lipatov 2022-10-21 22:59:31 MSK
Проблему исправляет

--- /usr/lib/node_modules/npm/lib/utils/config/definitions.js~  2022-09-30 04:02:36.000000000 +0300
+++ /usr/lib/node_modules/npm/lib/utils/config/definitions.js   2022-10-20 12:34:19.604520442 +0300
@@ -2205,7 +2205,7 @@
 
     // We can't clobber the original or else subsequent flattening will fail
     // (i.e. when we change the underlying config values)
-    // obj[key] = flatOptions.userAgent
+    obj[key] = flatOptions.userAgent
 
     // user-agent is a unique kind of config item that gets set from a template
     // and ends up translated.  Because of this, the normal "should we set this
Comment 3 Repository Robot 2022-10-21 23:48:22 MSK
npm-8.19.2-alt2 -> sisyphus:

 Fri Oct 21 2022 Vitaly Lipatov <lav@altlinux.ru> 8.19.2-alt2
 - fix  npm config get user-agent output (ALT bug 43430)
Comment 4 Vitaly Lipatov 2024-03-01 17:26:10 MSK
$ npm config get user-agent
npm/{npm-version} node/{node-version} {platform} {arch} workspaces/{workspaces} {ci}

$ epmqf npm
 > npm is placed as /usr/bin/npm
 $ rpm -qf /usr/bin/npm
npm-10.2.4-alt1.noarch
 > /usr/bin/npm is link to ../lib/node_modules/npm/bin/npm-cli.js
 $ rpm -qf /usr/lib/node_modules/npm/bin/npm-cli.js
npm-10.2.4-alt1.noarch
Comment 5 Repository Robot 2024-03-02 01:30:38 MSK
node-20.11.1-alt2 -> sisyphus:

 Fri Mar 01 2024 Vitaly Lipatov <lav@altlinux.ru> 20.11.1-alt2
 - fix npm config get user-agent output again (ALT bug 43430)