Skip to content

Commit

Permalink
Remove tasks merging
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Feb 13, 2022
1 parent c6ed2c2 commit 3b18382
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
9 changes: 0 additions & 9 deletions src/config/merge/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import isPlainObj from 'is-plain-obj'

import { removeEmptyValues } from './empty.js'
import { isTasks, mergeTasks } from './tasks.js'

// Merge two configuration objects. Used to merge:
// - shared `config`
Expand All @@ -27,17 +26,9 @@ const mergeObjects = function (objectA, objectB, keys) {

// Arrays do not merge, they override instead.
const mergeValues = function (valueA, valueB, keys) {
const customMerge = CUSTOM_MERGES.find(({ condition }) => condition(keys))

if (customMerge !== undefined) {
return customMerge.applyFunc(valueA, valueB)
}

if (isPlainObj(valueA) && isPlainObj(valueB)) {
return mergeObjects(valueA, valueB, keys)
}

return valueB
}

const CUSTOM_MERGES = [{ condition: isTasks, applyFunc: mergeTasks }]
30 changes: 0 additions & 30 deletions src/config/merge/tasks.js

This file was deleted.

0 comments on commit 3b18382

Please sign in to comment.