close
Skip to content

Commit 7ac5563

Browse files
author
Matt Willer
authored
Remove unnecessary dependency (#141)
1 parent 47b78f1 commit 7ac5563

5 files changed

Lines changed: 10 additions & 11 deletions

File tree

‎package-lock.json‎

Lines changed: 0 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
"inquirer": "^6.2.0",
3939
"js-yaml": "^3.12.0",
4040
"lodash": "^4.17.11",
41-
"object-path": "^0.11.4",
4241
"ora": "^3.0.0",
4342
"p-event": "^2.3.1"
4443
},

‎src/box-command.js‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const csv = require('csv');
1212
const csvParse = util.promisify(csv.parse);
1313
const csvStringify = util.promisify(csv.stringify);
1414
const dateTime = require('date-fns');
15-
const objectPath = require('object-path');
1615
const BoxSDK = require('box-node-sdk');
1716
const BoxCLIError = require('./cli-error');
1817
const CLITokenCache = require('./token-cache');
@@ -868,7 +867,7 @@ class BoxCommand extends Command {
868867
let row = [];
869868
if (typeof (object) === 'object') {
870869
for (let keyPath of keyPaths) {
871-
let value = objectPath.get(object, keyPath);
870+
let value = _.get(object, keyPath);
872871
if (Array.isArray(value)) {
873872
row.push('Array');
874873
} else if (value === null || value === undefined) {

‎test/commands/files.test.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,10 @@ describe('Files', () => {
10561056
{
10571057
op: 'add',
10581058
path: '/arr',
1059-
value: [ 'foo', 'bar' ],
1059+
value: [
1060+
'foo',
1061+
'bar'
1062+
],
10601063
}
10611064
])
10621065
.reply(200, addMetadataFixture)

‎test/commands/folders.test.js‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,10 @@ describe('Folders', () => {
859859
{
860860
op: 'add',
861861
path: '/arr',
862-
value: [ 'foo', 'bar' ],
862+
value: [
863+
'foo',
864+
'bar'
865+
],
863866
}
864867
])
865868
.reply(200, addMetadataFixture)
@@ -879,7 +882,7 @@ describe('Folders', () => {
879882
assert.equal(ctx.stdout, addMetadataFixture);
880883
});
881884

882-
885+
883886
});
884887

885888
leche.withData([

0 commit comments

Comments
 (0)