Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

Commit

Permalink
Remove loadash and use Set to get unique values
Browse files Browse the repository at this point in the history
  • Loading branch information
utkarsh-dixit committed Aug 30, 2019
1 parent a9d241a commit 6dace96
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/shipit-cli/src/Shipit.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import LineWrapper from 'stream-line-wrapper'
import Orchestrator from 'orchestrator'
import chalk from 'chalk'
import prettyTime from 'pretty-hrtime'
import _ from 'lodash'

/**
* An ExecResult returned when a command is executed with success.
Expand Down Expand Up @@ -255,7 +254,7 @@ class Shipit extends Orchestrator {
if(typeof copyOptions.rsync === 'string') {
copyOptions.rsync = [copyOptions.rsync]
}
copyOptions = {...copyOptions, rsync: _.uniq([...defaultOptions.rsync, ...copyOptions.rsync])}
copyOptions = {...copyOptions, rsync: [...new Set([...defaultOptions.rsync, ...copyOptions.rsync])]}

return this.pool.copy(src, dest, copyOptions)
}
Expand Down Expand Up @@ -285,7 +284,7 @@ class Shipit extends Orchestrator {
if(typeof copyOptions.rsync === 'string') {
copyOptions.rsync = [copyOptions.rsync]
}
copyOptions = {...copyOptions, rsync: _.uniq([...defaultOptions.rsync, ...copyOptions.rsync])}
copyOptions = {...copyOptions, rsync: [...new Set([...defaultOptions.rsync, ...copyOptions.rsync])]}

return this.pool.copyToRemote(src, dest, copyOptions)
}
Expand Down Expand Up @@ -314,7 +313,7 @@ class Shipit extends Orchestrator {
if(typeof copyOptions.rsync === 'string') {
copyOptions.rsync = [copyOptions.rsync]
}
copyOptions = {...copyOptions, rsync: _.uniq([...defaultOptions.rsync, ...copyOptions.rsync])}
copyOptions = {...copyOptions, rsync: [...new Set([...defaultOptions.rsync, ...copyOptions.rsync])]}

return this.pool.copyFromRemote(src, dest, copyOptions)
}
Expand Down

0 comments on commit 6dace96

Please sign in to comment.