From a4ea7c5314ec78f010c3887ebae0d565d79b6ed1 Mon Sep 17 00:00:00 2001 From: Jonas Hermsmeier Date: Thu, 2 Aug 2018 15:24:42 +0200 Subject: [PATCH 1/2] feat(diskutil): Populate devicePath on Mac OS This exposes the device tree path under the `.devicePath` property Change-type: minor Signed-off-by: Jonas Hermsmeier --- lib/diskutil.js | 2 +- tests/diskutil.spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/diskutil.js b/lib/diskutil.js index 09c47b2b..27a4bb83 100644 --- a/lib/diskutil.js +++ b/lib/diskutil.js @@ -56,7 +56,7 @@ const transform = (disk) => { busType: disk.BusProtocol || 'UNKNOWN', busVersion: null, device: disk.DeviceNode, - devicePath: null, + devicePath: disk.DeviceTreePath || null, raw: disk.DeviceNode && disk.DeviceNode.replace('/disk', '/rdisk'), description: disk.IORegistryEntryName || disk.MediaName, error: null, diff --git a/tests/diskutil.spec.js b/tests/diskutil.spec.js index 366cdd34..4122f77c 100644 --- a/tests/diskutil.spec.js +++ b/tests/diskutil.spec.js @@ -44,7 +44,7 @@ describe('Drivelist', function() { busType: 'PCI-Express', busVersion: null, device: '/dev/disk1', - devicePath: null, + devicePath: 'IODeviceTree:/PCI0@0/RP17@1B/SSD0@0/IONVMeController', raw: '/dev/rdisk1', description: 'Macintosh HD', error: null, @@ -98,7 +98,7 @@ describe('Drivelist', function() { busType: 'USB', busVersion: null, device: '/dev/disk3', - devicePath: null, + devicePath: 'IODeviceTree:/PCI0@0/XHC1@14', raw: '/dev/rdisk3', description: 'APPLE SD Card Reader Media', error: null, From c75a0fa9770f7200080c238642579c6727f477c0 Mon Sep 17 00:00:00 2001 From: "resin-io-modules-versionbot[bot]" Date: Thu, 2 Aug 2018 19:16:56 +0000 Subject: [PATCH 2/2] v6.4.0 --- CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ae57138..c5ceb623 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY! This project adheres to [Semantic Versioning](http://semver.org/). +## v6.4.0 - 2018-08-02 + +* Feat(diskutil): Populate devicePath on Mac OS #297 [Jonas Hermsmeier] + ## v6.3.2 - 2018-08-02 * Fix(diskutil): Also probe Ejectable to determine removabililty #298 [Jonas Hermsmeier] diff --git a/package.json b/package.json index a4bed2e8..23eee178 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "drivelist", - "version": "6.3.2", + "version": "6.4.0", "description": "List all connected drives in your computer, in all major operating systems", "main": "lib/drivelist.js", "homepage": "https://github.com/resin-io-modules/drivelist",