From 3c74c42fbf611edd0d30509d1e76f7246f7b2c0a Mon Sep 17 00:00:00 2001 From: Wil Wilsman Date: Wed, 3 Feb 2021 18:47:42 -0600 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20Bundle=20babel=20helpers=20r?= =?UTF-8?q?ather=20than=20inline=20them?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/dom/karma.conf.js | 2 +- packages/dom/rollup.config.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/dom/karma.conf.js b/packages/dom/karma.conf.js index 4631df839..e7b373c76 100644 --- a/packages/dom/karma.conf.js +++ b/packages/dom/karma.conf.js @@ -45,7 +45,7 @@ module.exports = config => { require('@rollup/plugin-node-resolve').default(), require('@rollup/plugin-commonjs')(), require('@rollup/plugin-babel').default({ - babelHelpers: 'inline' + babelHelpers: 'bundled' }) ], output: { diff --git a/packages/dom/rollup.config.js b/packages/dom/rollup.config.js index 29203aeb2..1c969ae75 100644 --- a/packages/dom/rollup.config.js +++ b/packages/dom/rollup.config.js @@ -12,7 +12,7 @@ export default { }, plugins: [ resolve(), - babel({ babelHelpers: 'inline' }) + babel({ babelHelpers: 'bundled' }) ], onwarn: message => { if (/circular dependency/i.test(message)) return; From 29a39ff1c85f06685684e5fd8117c46c52118c1c Mon Sep 17 00:00:00 2001 From: Wil Wilsman Date: Wed, 3 Feb 2021 18:48:02 -0600 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=90=9B=20Work=20around=20incorrect=20?= =?UTF-8?q?globalThis?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/dom/src/index.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/dom/src/index.js b/packages/dom/src/index.js index bcea99f93..36effcfca 100644 --- a/packages/dom/src/index.js +++ b/packages/dom/src/index.js @@ -1 +1,11 @@ -export { default, default as serialize } from './serialize-dom'; +import serialize from './serialize-dom'; + +/* istanbul ignore next */ +// works around instances where the context has an incorrect global scope +// https://github.com/mozilla/geckodriver/issues/1798 +if (globalThis !== window) { + window.PercyDOM = { serialize }; +} + +export { serialize }; +export default serialize;