From 9102291e94666237b7909464dacea3b3341f8d53 Mon Sep 17 00:00:00 2001 From: Kevin Van Lierde Date: Tue, 30 May 2023 00:45:59 +0200 Subject: [PATCH] Explicitly specify array merge as concat --- src/index.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 92130cd..1a4ab3c 100644 --- a/src/index.js +++ b/src/index.js @@ -210,7 +210,14 @@ function initMetadata(options = {}) { current = current[k] } debug('Adding metadata from file "%s" at key "%s": %O', path, key, parsed) - Object.assign(metadata, merge(metadata, newMeta)) + Object.assign( + metadata, + merge(metadata, newMeta, { + arrayMerge(target, src) { + return target.concat(src) + } + }) + ) if (delete files[path]) { debug('Removed metadata file at "%s"', path) }