@depup/systeminformation 5.33.1-depup.0 → 5.33.6-depup.0

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.
package/README.md CHANGED
@@ -13,8 +13,8 @@ npm install @depup/systeminformation
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [systeminformation](https://www.npmjs.com/package/systeminformation) @ 5.33.1 |
17
- | Processed | 2026-07-26 |
16
+ | Original | [systeminformation](https://www.npmjs.com/package/systeminformation) @ 5.33.6 |
17
+ | Processed | 2026-08-30 |
18
18
  | Smoke test | passed |
19
19
  | Deps updated | 0 |
20
20
 
package/changes.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "bumped": {},
3
- "timestamp": "2026-07-26T00:59:22.841Z",
3
+ "timestamp": "2026-08-30T00:59:35.001Z",
4
4
  "totalUpdated": 0
5
5
  }
package/lib/audio.js CHANGED
@@ -102,6 +102,46 @@ function getLinuxAudioPci() {
102
102
  }
103
103
  }
104
104
 
105
+ // ARM boards (e.g. Raspberry Pi) have no PCI bus at all - ALSA lists the sound cards instead (#545)
106
+ function parseLinuxAudioAlsa(stdout) {
107
+ const result = [];
108
+ const parts = stdout.split('--pcm--');
109
+ const cards = parts[0] || '';
110
+ const pcms = parts[1] || '';
111
+ const lines = cards.split('\n');
112
+ lines.forEach((line, i) => {
113
+ // ' 1 [Device ]: USB-Audio - USB Audio Device'
114
+ const card = line.match(/^\s*(\d+)\s+\[(.+?)\s*\]:\s*(\S+)\s+-\s+(.*)$/);
115
+ if (card) {
116
+ const index = card[1];
117
+ const driver = card[3];
118
+ const name = card[4].trim();
119
+ // second line holds the long name, which is prefixed with the manufacturer on USB devices
120
+ const longName = (lines[i + 1] || '').trim();
121
+ const manufacturer = longName.indexOf(name) > 0 ? longName.substring(0, longName.indexOf(name)).trim() : '';
122
+ const devices = pcms.split('\n').filter((pcm) => pcm.indexOf('/card' + index + '/pcm') >= 0);
123
+ const out = devices.some((pcm) => pcm.trim().endsWith('p'));
124
+ const isIn = devices.some((pcm) => pcm.trim().endsWith('c'));
125
+ const usb = (driver + ' ' + longName).toLowerCase().indexOf('usb') >= 0;
126
+ const hdmi = (card[2] + ' ' + name).toLowerCase().indexOf('hdmi') >= 0;
127
+ result.push({
128
+ id: 'hw:' + index,
129
+ name,
130
+ manufacturer,
131
+ revision: null,
132
+ driver,
133
+ default: null,
134
+ channel: usb ? 'USB' : hdmi ? 'HDMI' : 'Onboard',
135
+ type: parseAudioType(name, isIn, out),
136
+ in: devices.length ? isIn : null,
137
+ out: devices.length ? out : null,
138
+ status: 'online'
139
+ });
140
+ }
141
+ });
142
+ return result;
143
+ }
144
+
105
145
  function parseWinAudioStatus(n) {
106
146
  const num = parseInt(n, 10);
107
147
  let status = n;
@@ -222,10 +262,23 @@ function audio(callback) {
222
262
  }
223
263
  });
224
264
  }
225
- if (callback) {
226
- callback(result);
265
+ if (!result.length) {
266
+ const cmdAlsa = 'cat /proc/asound/cards 2>/dev/null; echo "--pcm--"; ls -d /proc/asound/card*/pcm* 2>/dev/null';
267
+ exec(cmdAlsa, util.execOptsLinux, (error, stdout) => {
268
+ if (!error) {
269
+ parseLinuxAudioAlsa(stdout.toString()).forEach((item) => result.push(item));
270
+ }
271
+ if (callback) {
272
+ callback(result);
273
+ }
274
+ resolve(result);
275
+ });
276
+ } else {
277
+ if (callback) {
278
+ callback(result);
279
+ }
280
+ resolve(result);
227
281
  }
228
- resolve(result);
229
282
  });
230
283
  }
231
284
  if (_darwin) {
package/lib/filesystem.js CHANGED
@@ -1729,12 +1729,29 @@ function diskLayout(callback) {
1729
1729
  util.noop();
1730
1730
  }
1731
1731
  }
1732
+ function hasControlCharacters(str) {
1733
+ return /\p{Cc}/u.test(str);
1734
+ }
1732
1735
  util.promiseAll(workload).then((data) => {
1733
1736
  let devices = data.results[0].toString().split(/\n\s*\n/);
1734
1737
  devices.forEach((device) => {
1735
1738
  const lines = device.split('\r\n');
1736
1739
  const size = util.getValue(lines, 'Size', ':').trim();
1737
1740
  const status = util.getValue(lines, 'Status', ':').trim().toLowerCase();
1741
+ let serialNum = util.getValue(lines, 'SerialNumber', ':').trim();
1742
+ if (hasControlCharacters(serialNum)) {
1743
+ const instanceId = util.getValue(lines, 'PNPDeviceId', ':').trim().split('\\')[2];
1744
+ if (instanceId) {
1745
+ const parts = instanceId.split('&');
1746
+ // instanceId can contain device serial number or be generated by PnP manager
1747
+ // in first case it will be "<serial number>&0"
1748
+ // in second case it will be opaque generated value that looks like this: "5&<8-symbol hex code>&0&000000"
1749
+ // https://learn.microsoft.com/en-us/windows-hardware/drivers/install/instance-ids
1750
+ if (parts.length == 2 && parts[1] === '0') {
1751
+ serialNum = parts[0]
1752
+ }
1753
+ }
1754
+ }
1738
1755
  if (size) {
1739
1756
  result.push({
1740
1757
  device: util.getValue(lines, 'DeviceId', ':'), // changed from PNPDeviceId to DeviceID (be be able to match devices)
@@ -1750,7 +1767,7 @@ function diskLayout(callback) {
1750
1767
  tracksPerCylinder: parseInt(util.getValue(lines, 'TracksPerCylinder', ':'), 10),
1751
1768
  sectorsPerTrack: parseInt(util.getValue(lines, 'SectorsPerTrack', ':'), 10),
1752
1769
  firmwareRevision: util.getValue(lines, 'FirmwareRevision', ':').trim(),
1753
- serialNum: util.getValue(lines, 'SerialNumber', ':').trim(),
1770
+ serialNum,
1754
1771
  interfaceType: util.getValue(lines, 'InterfaceType', ':').trim(),
1755
1772
  smartStatus: status === 'ok' ? 'Ok' : status === 'degraded' ? 'Degraded' : status === 'pred fail' ? 'Predicted Failure' : 'Unknown',
1756
1773
  temperature: null
package/lib/osinfo.js CHANGED
@@ -336,6 +336,7 @@ function osInfo(callback) {
336
336
  result.codename = result.release.startsWith('14.') ? 'Sonoma' : result.codename;
337
337
  result.codename = result.release.startsWith('15.') ? 'Sequoia' : result.codename;
338
338
  result.codename = result.release.startsWith('26.') ? 'Tahoe' : result.codename;
339
+ result.codename = result.release.startsWith('27.') ? 'Golden Gate' : result.codename;
339
340
  result.uefi = true;
340
341
  result.codepage = util.getCodepage();
341
342
  if (callback) {
package/lib/util.js CHANGED
@@ -202,7 +202,14 @@ function parseTime(t, pmDesignator) {
202
202
  parts[1] += parts[2];
203
203
  }
204
204
  const p1 = (parts[1] || '').toLowerCase();
205
- let isPM = p1.indexOf('pm') > -1 || p1.indexOf('p.m.') > -1 || p1.indexOf('p. m.') > -1 || p1.indexOf('n') > -1 || p1.indexOf('ch') > -1 || p1.indexOf('ös') > -1 || (pmDesignator && p1.indexOf(pmDesignator) > -1);
205
+ let isPM =
206
+ p1.indexOf('pm') > -1 ||
207
+ p1.indexOf('p.m.') > -1 ||
208
+ p1.indexOf('p. m.') > -1 ||
209
+ p1.indexOf('n') > -1 ||
210
+ p1.indexOf('ch') > -1 ||
211
+ p1.indexOf('ös') > -1 ||
212
+ (pmDesignator && p1.indexOf(pmDesignator) > -1);
206
213
  hour = parseInt(parts[0], 10);
207
214
  min = parseInt(parts[1], 10);
208
215
  hour = isPM && hour < 12 ? hour + 12 : hour;
@@ -405,9 +412,12 @@ function powerShellStart() {
405
412
  _psPersistent = true;
406
413
  _psChild.stdout.on('data', (data) => {
407
414
  _psResult = _psResult + data.toString('utf8');
408
- if (data.indexOf(_psCmdSeperator) >= 0) {
409
- powerShellProceedResults(_psResult);
410
- _psResult = '';
415
+ let sepIndex = _psResult.indexOf(_psCmdSeperator);
416
+ while (sepIndex >= 0) {
417
+ const end = sepIndex + _psCmdSeperator.length;
418
+ powerShellProceedResults(_psResult.slice(0, end));
419
+ _psResult = _psResult.slice(end);
420
+ sepIndex = _psResult.indexOf(_psCmdSeperator);
411
421
  }
412
422
  });
413
423
  _psChild.stderr.on('data', () => {
@@ -1427,6 +1437,8 @@ function semverCompare(v1, v2) {
1427
1437
  return res;
1428
1438
  }
1429
1439
 
1440
+ // Mac model name and serial number / model identifier
1441
+
1430
1442
  function getAppleModel(key) {
1431
1443
  const appleModelIds = [
1432
1444
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depup/systeminformation",
3
- "version": "5.33.1-depup.0",
3
+ "version": "5.33.6-depup.0",
4
4
  "description": "Advanced, lightweight system and OS information library (with updated dependencies)",
5
5
  "license": "MIT",
6
6
  "author": "Sebastian Hildebrandt <hildebrandt@plus-innovations.com> (https://plus-innovations.com)",
@@ -111,8 +111,8 @@
111
111
  "changes": {},
112
112
  "depsUpdated": 0,
113
113
  "originalPackage": "systeminformation",
114
- "originalVersion": "5.33.1",
115
- "processedAt": "2026-07-26T00:59:23.435Z",
114
+ "originalVersion": "5.33.6",
115
+ "processedAt": "2026-08-30T00:59:35.725Z",
116
116
  "smokeTest": "passed"
117
117
  }
118
118
  }