Remove the globals dependency#18509
Conversation
This dependency got introduced in PR mozilla#10293, almost six years ago now, because `eslint-plugin-mozilla` didn't work without it but also didn't require it as a dependency itself. However, nowadays `eslint-plugin-mozilla` works just fine without it, and other dependencies that need it correctly require it themselves. This can be seen using `npm ls globals`: ``` $ npm ls globals pdf.js ├─┬ @babel/core@7.24.9 │ └─┬ @babel/traverse@7.25.0 │ └── globals@11.12.0 ├─┬ @babel/preset-env@7.25.0 │ └─┬ @babel/plugin-transform-classes@7.25.0 │ └── globals@11.12.0 ├─┬ eslint-plugin-unicorn@55.0.0 │ └── globals@15.8.0 deduped ├─┬ eslint@8.57.0 │ ├─┬ @eslint/eslintrc@2.1.4 │ │ └── globals@13.24.0 │ └── globals@13.24.0 └── globals@15.8.0 ``` Further proof that `eslint-plugin-mozilla` (no longer) uses `globals` is from a source code search in https://searchfox.org/mozilla-central/search?q=globals&path=&case=false®exp=false. The only results for `eslint-plugin-mozilla` refer to a file named `globals.js`, but the `globals` NPM package is not actually imported anywhere. Given this we should be able to safely get rid of this explicit dependency on our end now.
|
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/3f4dab4d73e28b7/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/3f4dab4d73e28b7/output.txt Total script time: 1.03 mins Published |
|
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.241.84.105:8877/f919cb2c5cdd2d3/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @timvandermeij received. Current queue size: 0 Live output at: http://54.193.163.58:8877/d24b77718738f78/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/f919cb2c5cdd2d3/output.txt Total script time: 30.00 mins
Image differences available at: http://54.241.84.105:8877/f919cb2c5cdd2d3/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/d24b77718738f78/output.txt Total script time: 44.94 mins
Image differences available at: http://54.193.163.58:8877/d24b77718738f78/reftest-analyzer.html#web=eq.log |
This dependency got introduced in PR #10293, almost six years ago now, because
eslint-plugin-mozilladidn't work without it but also didn't require it as a dependency itself.However, nowadays
eslint-plugin-mozillaworks just fine without it, and other dependencies that need it correctly require it themselves. This can be seen usingnpm ls globals:Further proof that
eslint-plugin-mozilla(no longer) usesglobalsis from a source code search inhttps://searchfox.org/mozilla-central/search?q=globals&path=&case=false®exp=false. The only results for
eslint-plugin-mozillarefer to a file namedglobals.js, but theglobalsNPM package is not actually imported anywhere.Given this we should be able to safely get rid of this explicit dependency on our end now.
Fixes a part of #18354.