From d5ef4079308264d6175731fd9d3ff1c2ae1e1200 Mon Sep 17 00:00:00 2001 From: Michal Piechowiak Date: Mon, 19 Aug 2024 16:12:21 +0200 Subject: [PATCH] fix: don't overwrite plugin origin if it exists (#5793) * fix: don't overwrite plugin origin if it exists * test: update snapshots (order of fields) --- .../build/tests/plugins/snapshots/tests.js.md | 2 +- .../tests/plugins/snapshots/tests.js.snap | Bin 6011 -> 5977 bytes packages/config/src/origin.js | 2 +- .../tests/validate/snapshots/tests.js.md | 6 +++--- .../tests/validate/snapshots/tests.js.snap | Bin 4232 -> 4202 bytes 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/build/tests/plugins/snapshots/tests.js.md b/packages/build/tests/plugins/snapshots/tests.js.md index f3550d1d77..44d5b5f2a9 100644 --- a/packages/build/tests/plugins/snapshots/tests.js.md +++ b/packages/build/tests/plugins/snapshots/tests.js.md @@ -2682,7 +2682,7 @@ Generated by [AVA](https://avajs.dev). -> inputs: { some_input: 'some string' }␊ -> netlifyConfig: {␊ functions: { '*': {} },␊ - plugins: [ { package: './plugin', origin: 'config', inputs: [Object] } ],␊ + plugins: [ { origin: 'config', package: './plugin', inputs: [Object] } ],␊ build: {␊ environment: {},␊ publish: 'packages/build/tests/plugins/fixtures/dynamic_plugin',␊ diff --git a/packages/build/tests/plugins/snapshots/tests.js.snap b/packages/build/tests/plugins/snapshots/tests.js.snap index a0e706ac7dfe3489119e32c9196ea8df24774e86..ac5cd227aba171122dd7107e2e11ac8a958c67de 100644 GIT binary patch literal 5977 zcmV-f7pCYzRzV0hb`i!(AQIH$-knCc!s=Izw)z!scbk1C6f64!%{#RHK;o{5h9U;!a zNA{Pfi$CIwf?(jgVV6)&I7L41F~R@z7mkAj`uw$@eB+hZUy=WQ>&`2`^V^@iW*uPR zlFk)84vFi)tpBWE|NKwZ`mn5r@F@;BVblWnG1c5?o+)nJZ`^C#lXpCEQI}f)4n7OJ zEf7J7Er0;~j1$3vtLKb~RxAXrTQ>#ff;S^kG&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O4I$yY&Rv?um}{pUqvZ~hXKbr! z!I{*WqFGI?%D-85gTCGTOO{=!44kr8w1%9UAVgkn3 zGq!l+`9tFL7>E4Gb=k^S_Ijt-T6#{e&ld7rU`fD^cxjmlArI&{4n4;=snqv40@*?& zvij^5J*E!==sG?$1yv6QndD)Z2J#*Q*RjC9TqmTNwMbL$!o%S!lUXJ4F!7lt>)+=6 z=J1I{=`*(Ly(~_&C6#J8EUsSU1{{c#6w&WOF0RUs%l3@S< diff --git a/packages/config/src/origin.js b/packages/config/src/origin.js index 4047af03fa..2ae2391061 100644 --- a/packages/config/src/origin.js +++ b/packages/config/src/origin.js @@ -26,7 +26,7 @@ const addBuildPublishOrigin = function ({ config, config: { build = {} }, origin } const addConfigPluginOrigin = function ({ config, config: { plugins }, origin }) { - return Array.isArray(plugins) ? { ...config, plugins: plugins.map((plugin) => ({ ...plugin, origin })) } : config + return Array.isArray(plugins) ? { ...config, plugins: plugins.map((plugin) => ({ origin, ...plugin })) } : config } const addHeadersOrigin = function ({ config, config: { headers }, origin }) { diff --git a/packages/config/tests/validate/snapshots/tests.js.md b/packages/config/tests/validate/snapshots/tests.js.md index 7e3c9871a0..84f821678e 100644 --- a/packages/config/tests/validate/snapshots/tests.js.md +++ b/packages/config/tests/validate/snapshots/tests.js.md @@ -71,8 +71,8 @@ Generated by [AVA](https://avajs.dev). Invalid syntax␊ ␊ [[plugins]]␊ - test = true␊ origin = "config"␊ + test = true␊ ␊ [plugins.inputs]␊ ␊ @@ -97,8 +97,8 @@ Generated by [AVA](https://avajs.dev). Invalid syntax␊ ␊ [[plugins]]␊ - id = "test"␊ origin = "config"␊ + id = "test"␊ ␊ [plugins.inputs]␊ ␊ @@ -123,9 +123,9 @@ Generated by [AVA](https://avajs.dev). Invalid syntax␊ ␊ [[plugins]]␊ + origin = "config"␊ package = "./plugin.js"␊ enabled = true␊ - origin = "config"␊ ␊ [plugins.inputs]␊ ␊ diff --git a/packages/config/tests/validate/snapshots/tests.js.snap b/packages/config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