From f881eec8872f3897c35cc810274d4ec9dbea100a Mon Sep 17 00:00:00 2001 From: Alex Page Date: Wed, 3 Jan 2024 08:11:45 +1100 Subject: [PATCH] Remove scripts/profiler.js (#11381) ### WHY are these changes introduced? I am suggesting to remove the `scripts/profiler.js` as I have observed that it is: - No longer used on the coverage site - Adds puppeteer and chromium - Has data that is rarely used or referenced - It can be easily added back if necessary ### WHAT is this pull request doing? Removes the `scripts/profiler.js` and dependencies --- polaris-react/package.json | 1 - polaris-react/scripts/profiler.js | 18 ------------------ yarn.lock | 28 ---------------------------- 3 files changed, 47 deletions(-) delete mode 100644 polaris-react/scripts/profiler.js diff --git a/polaris-react/package.json b/polaris-react/package.json index 961822ff01e..52cc07ef434 100644 --- a/polaris-react/package.json +++ b/polaris-react/package.json @@ -100,7 +100,6 @@ "postcss-loader": "^4.2.0", "postcss-modules": "^4.2.2", "postcss-pxtorem": "^5.1.1", - "puppeteer": "^14.4.1", "react": "^18.2.0", "react-dom": "^18.2.0", "rimraf": "^3.0.0", diff --git a/polaris-react/scripts/profiler.js b/polaris-react/scripts/profiler.js deleted file mode 100644 index 610415d26b3..00000000000 --- a/polaris-react/scripts/profiler.js +++ /dev/null @@ -1,18 +0,0 @@ -const puppeteer = require('puppeteer'); - -const iframePath = - 'http://localhost:6006/iframe.html?args=&id=playground--kitchen-sink&viewMode=story&globals=profiler:false'; - -(async () => { - const browser = await puppeteer.launch(); - const page = await browser.newPage(); - await page.goto(iframePath, {waitUntil: 'networkidle2', timeout: 0}); - - const data = await page.evaluate( - () => document.getElementById('render-performance-profiler').innerHTML, - ); - - console.log(data); // eslint-disable-line no-console - await page.close(); - await browser.close(); -})(); diff --git a/yarn.lock b/yarn.lock index f8b658de989..3abbde54aa4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9414,11 +9414,6 @@ detect-port@^1.3.0: address "^1.0.1" debug "^2.6.0" -devtools-protocol@0.0.1001819: - version "0.0.1001819" - resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1001819.tgz#0a98f44cefdb02cc684f3d5e6bd898a1690231d9" - integrity sha512-G6OsIFnv/rDyxSqBa2lDLR6thp9oJioLsb2Gl+LbQlyoA9/OBAkrTU9jiCcQ8Pnh7z4d6slDiLaogR5hzgJLmQ== - devtools-protocol@0.0.981744: version "0.0.981744" resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.981744.tgz#9960da0370284577d46c28979a0b32651022bacf" @@ -18602,24 +18597,6 @@ puppeteer@^13.2.0: unbzip2-stream "1.4.3" ws "8.5.0" -puppeteer@^14.4.1: - version "14.4.1" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-14.4.1.tgz#6c7437a65f7ba98ef8ad7c2b0f1cf808e91617bb" - integrity sha512-+H0Gm84aXUvSLdSiDROtLlOofftClgw2TdceMvvCU9UvMryappoeS3+eOLfKvoy4sm8B8MWnYmPhWxVFudAOFQ== - dependencies: - cross-fetch "3.1.5" - debug "4.3.4" - devtools-protocol "0.0.1001819" - extract-zip "2.0.1" - https-proxy-agent "5.0.1" - pkg-dir "4.2.0" - progress "2.0.3" - proxy-from-env "1.1.0" - rimraf "3.0.2" - tar-fs "2.1.1" - unbzip2-stream "1.4.3" - ws "8.7.0" - qs@6.11.0, qs@^6.10.0, qs@^6.9.1: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" @@ -23142,11 +23119,6 @@ ws@8.5.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.5.0.tgz#bfb4be96600757fe5382de12c670dab984a1ed4f" integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== -ws@8.7.0: - version "8.7.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.7.0.tgz#eaf9d874b433aa00c0e0d8752532444875db3957" - integrity sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg== - ws@^6.1.0: version "6.2.2" resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.2.tgz#dd5cdbd57a9979916097652d78f1cc5faea0c32e"