Skip to content

Commit e9ca500

Browse files
authored
Merge pull request #188 from noritaka1166/use-spread
2 parents 5a4c230 + 60634b7 commit e9ca500

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

bin/common/parse-cli-args.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ function createPackageConfig () {
5858
* @returns {void}
5959
*/
6060
function addGroup (groups, initialValues) {
61-
groups.push(Object.assign(
62-
{ parallel: false, patterns: [] },
63-
initialValues || {}
64-
))
61+
groups.push({
62+
parallel: false,
63+
patterns: [],
64+
...(initialValues || {})
65+
})
6566
}
6667

6768
/**

lib/run-tasks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export default function runTasks (tasks, options) {
139139
}
140140

141141
const originalOutputStream = options.stdout
142-
const optionsClone = Object.assign({}, options)
142+
const optionsClone = { ...options }
143143
const writer = new MemoryStream(null, {
144144
readable: false,
145145
})

test-workspace/tasks/echo.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function flow () {
1616

1717
head()
1818
setTimeout(() => {
19-
flow.apply(null, rest)
19+
flow(...rest)
2020
}, 33)
2121
}
2222

0 commit comments

Comments
 (0)