diff --git a/CHANGELOG.md b/CHANGELOG.md index d9737e4..d61cf18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -90,6 +90,7 @@ For major (breaking) changes - **version 4, 3 and 2** - see end of page. | Version | Date | Comment | | ------- | ---------- | --------------------------------------------------------------------------------------------------- | +| 5.26.2 | 2025-05-23 | `memLayout()` manufacturers reference updated | | 5.26.1 | 2025-05-22 | `inetChecksite()` fix timeout | | 5.26.0 | 2025-05-21 | `getStatic()` added audio, usb, bluetooth, printer | | 5.25.11 | 2025-01-11 | `docs` updated | diff --git a/docs/history.html b/docs/history.html index 7b60e93..3612512 100644 --- a/docs/history.html +++ b/docs/history.html @@ -57,6 +57,11 @@ + + 5.26.2 + 2024-05-23 + memLayout() manufacturer reference updated + 5.26.1 2024-05-22 diff --git a/docs/index.html b/docs/index.html index 9392952..a612104 100644 --- a/docs/index.html +++ b/docs/index.html @@ -170,7 +170,7 @@
systeminformation
 
- 3
New Version: 5.26.1
+ 3
New Version: 5.26.2
diff --git a/lib/memory.js b/lib/memory.js index f7eb84d..183913a 100644 --- a/lib/memory.js +++ b/lib/memory.js @@ -29,41 +29,26 @@ const _openbsd = (_platform === 'openbsd'); const _netbsd = (_platform === 'netbsd'); const _sunos = (_platform === 'sunos'); -const OSX_RAM_manufacturers = { - '0x014F': 'Transcend Information', - '0x2C00': 'Micron Technology Inc.', - '0x802C': 'Micron Technology Inc.', - '0x80AD': 'Hynix Semiconductor Inc.', - '0x80CE': 'Samsung Electronics Inc.', - '0xAD00': 'Hynix Semiconductor Inc.', - '0xCE00': 'Samsung Electronics Inc.', - '0x02FE': 'Elpida', - '0x5105': 'Qimonda AG i. In.', - '0x8551': 'Qimonda AG i. In.', - '0x859B': 'Crucial', - '0x04CD': 'G-Skill' -}; - -const LINUX_RAM_manufacturers = { - '017A': 'Apacer', +const RAM_manufacturers = { + '00CE': 'Samsung Electronics Inc', + '014F': 'Transcend Information', + '017A': 'Apacer Technology Inc', '0198': 'HyperX', '029E': 'Corsair', + '02FE': 'Elpida', '04CB': 'A-DATA', - '04CD': 'G-Skill', + '04CD': 'G-Skill International Enterprise', '059B': 'Crucial', - '00CE': 'Samsung', '1315': 'Crucial', - '014F': 'Transcend Information', '2C00': 'Micron Technology Inc.', + '5105': 'Qimonda AG i. In.', '802C': 'Micron Technology Inc.', '80AD': 'Hynix Semiconductor Inc.', '80CE': 'Samsung Electronics Inc.', + '8551': 'Qimonda AG i. In.', + '859B': 'Crucial', 'AD00': 'Hynix Semiconductor Inc.', 'CE00': 'Samsung Electronics Inc.', - '02FE': 'Elpida', - '5105': 'Qimonda AG i. In.', - '8551': 'Qimonda AG i. In.', - '859B': 'Crucial' }; // _______________________________________________________________________________________ @@ -315,17 +300,10 @@ exports.mem = mem; function memLayout(callback) { - function getManufacturerDarwin(manId) { - if ({}.hasOwnProperty.call(OSX_RAM_manufacturers, manId)) { - return (OSX_RAM_manufacturers[manId]); - } - return manId; - } - - function getManufacturerLinux(manId) { + function getManufacturer(manId) { const manIdSearch = manId.replace('0x', '').toUpperCase(); - if (manIdSearch.length === 4 && {}.hasOwnProperty.call(LINUX_RAM_manufacturers, manIdSearch)) { - return (LINUX_RAM_manufacturers[manIdSearch]); + if (manIdSearch.length === 4 && {}.hasOwnProperty.call(RAM_manufacturers, manIdSearch)) { + return (RAM_manufacturers[manIdSearch]); } return manId; } @@ -358,7 +336,7 @@ function memLayout(callback) { ecc: dataWidth && totalWidth ? totalWidth > dataWidth : false, clockSpeed: (util.getValue(lines, 'Configured Clock Speed:') ? parseInt(util.getValue(lines, 'Configured Clock Speed:'), 10) : (util.getValue(lines, 'Speed:') ? parseInt(util.getValue(lines, 'Speed:'), 10) : null)), formFactor: util.getValue(lines, 'Form Factor:'), - manufacturer: getManufacturerLinux(util.getValue(lines, 'Manufacturer:')), + manufacturer: getManufacturer(util.getValue(lines, 'Manufacturer:')), partNum: util.getValue(lines, 'Part Number:'), serialNum: util.getValue(lines, 'Serial Number:'), voltageConfigured: parseFloat(util.getValue(lines, 'Configured Voltage:')) || null, @@ -470,7 +448,7 @@ function memLayout(callback) { ecc: eccStatus ? eccStatus === 'enabled' : null, clockSpeed: parseInt(util.getValue(lines, ' Speed:'), 10), formFactor: '', - manufacturer: getManufacturerDarwin(util.getValue(lines, ' Manufacturer:')), + manufacturer: getManufacturer(util.getValue(lines, ' Manufacturer:')), partNum: util.getValue(lines, ' Part Number:'), serialNum: util.getValue(lines, ' Serial Number:'), voltageConfigured: null, @@ -508,7 +486,7 @@ function memLayout(callback) { ecc: false, clockSpeed: null, formFactor: 'SOC', - manufacturer: getManufacturerDarwin(manufacturerId), + manufacturer: getManufacturer(manufacturerId), partNum: '', serialNum: '', voltageConfigured: null, @@ -551,7 +529,7 @@ function memLayout(callback) { ecc: dataWidth && totalWidth ? totalWidth > dataWidth : false, clockSpeed: parseInt(util.getValue(lines, 'ConfiguredClockSpeed', ':'), 10) || parseInt(util.getValue(lines, 'Speed', ':'), 10) || 0, formFactor: FormFactors[parseInt(util.getValue(lines, 'FormFactor', ':'), 10) || 0], - manufacturer: util.getValue(lines, 'Manufacturer', ':'), + manufacturer: getManufacturer(util.getValue(lines, 'Manufacturer', ':')), partNum: util.getValue(lines, 'PartNumber', ':'), serialNum: util.getValue(lines, 'SerialNumber', ':'), voltageConfigured: (parseInt(util.getValue(lines, 'ConfiguredVoltage', ':'), 10) || 0) / 1000.0,