From 7b70d479a8a164487d1e4bb04f116d603d201559 Mon Sep 17 00:00:00 2001 From: Miguel Peixe Date: Wed, 26 Jan 2022 11:59:47 -0300 Subject: [PATCH 1/3] fix: add filename to pbjsGlobals module append --- plugins/pbjsGlobals.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/pbjsGlobals.js b/plugins/pbjsGlobals.js index 73912d8126e..dfc29d95292 100644 --- a/plugins/pbjsGlobals.js +++ b/plugins/pbjsGlobals.js @@ -39,7 +39,7 @@ module.exports = function(api, options) { const modName = getModuleName(state.filename); if (modName != null) { // append "registration" of module file to $$PREBID_GLOBAL$$.installedModules - path.node.body.push(...api.parse(`window.${pbGlobal}.installedModules.push('${modName}');`).program.body); + path.node.body.push(...api.parse(`window.${pbGlobal}.installedModules.push('${modName}');`,{filename:modName}).program.body); } }, StringLiteral(path) { From bd02c6ccc2ad99b17f821208f36dcbe93f19fef6 Mon Sep 17 00:00:00 2001 From: Miguel Peixe Date: Wed, 26 Jan 2022 12:10:54 -0300 Subject: [PATCH 2/3] lint --- plugins/pbjsGlobals.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/pbjsGlobals.js b/plugins/pbjsGlobals.js index dfc29d95292..6aa9ff57794 100644 --- a/plugins/pbjsGlobals.js +++ b/plugins/pbjsGlobals.js @@ -39,7 +39,7 @@ module.exports = function(api, options) { const modName = getModuleName(state.filename); if (modName != null) { // append "registration" of module file to $$PREBID_GLOBAL$$.installedModules - path.node.body.push(...api.parse(`window.${pbGlobal}.installedModules.push('${modName}');`,{filename:modName}).program.body); + path.node.body.push(...api.parse(`window.${pbGlobal}.installedModules.push('${modName}');`, {filename: modName}).program.body); } }, StringLiteral(path) { From ab779edc95032fb36940aeb2eac03ad1dc95bc11 Mon Sep 17 00:00:00 2001 From: Miguel Peixe Date: Tue, 1 Feb 2022 11:45:39 -0300 Subject: [PATCH 3/3] update filename --- plugins/pbjsGlobals.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/pbjsGlobals.js b/plugins/pbjsGlobals.js index 6aa9ff57794..79dafd1e8b2 100644 --- a/plugins/pbjsGlobals.js +++ b/plugins/pbjsGlobals.js @@ -39,7 +39,7 @@ module.exports = function(api, options) { const modName = getModuleName(state.filename); if (modName != null) { // append "registration" of module file to $$PREBID_GLOBAL$$.installedModules - path.node.body.push(...api.parse(`window.${pbGlobal}.installedModules.push('${modName}');`, {filename: modName}).program.body); + path.node.body.push(...api.parse(`window.${pbGlobal}.installedModules.push('${modName}');`, {filename: state.filename}).program.body); } }, StringLiteral(path) {