From 4501eb3b12c34d1cfab471d3a0a86099323a9c3a Mon Sep 17 00:00:00 2001 From: Jonny Gerig Meyer Date: Fri, 22 Nov 2024 12:00:43 -0500 Subject: [PATCH] review --- package-lock.json | 60 ++++++++++++++++++++++++++++++++++------ package.json | 4 +-- src/@types/css-tree.d.ts | 2 ++ vite.config.ts | 9 +++++- 4 files changed, 64 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index ffd48ac..552c06f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,8 +12,7 @@ "@floating-ui/dom": "^1.6.12", "@types/css-tree": "^2.3.8", "css-tree": "^3.0.0", - "nanoid": "^5.0.8", - "rollup-plugin-bundle-stats": "^4.17.0" + "nanoid": "^5.0.8" }, "devDependencies": { "@playwright/test": "1.43.1", @@ -37,6 +36,7 @@ "node-fetch": "^2.6.7", "npm-run-all": "^4.1.5", "prettier": "^3.3.3", + "rollup-plugin-bundle-stats": "^4.17.0", "selenium-webdriver": "^4.26.0", "stylelint": "^16.10.0", "stylelint-config-standard": "^36.0.1", @@ -411,6 +411,7 @@ "version": "4.17.0", "resolved": "https://registry.npmjs.org/@bundle-stats/cli-utils/-/cli-utils-4.17.0.tgz", "integrity": "sha512-JIQBOda71sEyDOfJ0/YIIatwVnEB8UsbyFmHbTZXMqVhPU7ddnRzmYmPgmnqPkhqss3tjArTHGS+HIL9Kvs7Cw==", + "dev": true, "dependencies": { "@bundle-stats/html-templates": "^4.17.0", "@bundle-stats/plugin-webpack-filter": "^4.17.0", @@ -427,12 +428,14 @@ "node_modules/@bundle-stats/html-templates": { "version": "4.17.0", "resolved": "https://registry.npmjs.org/@bundle-stats/html-templates/-/html-templates-4.17.0.tgz", - "integrity": "sha512-B9AYHV1hyioS8S5qpWmP7vEn1npBWJHV/tSEHRFQTJOpGZdn6L0jHyzvofRvopqirTff++UpVS3TelN+Elh/tQ==" + "integrity": "sha512-B9AYHV1hyioS8S5qpWmP7vEn1npBWJHV/tSEHRFQTJOpGZdn6L0jHyzvofRvopqirTff++UpVS3TelN+Elh/tQ==", + "dev": true }, "node_modules/@bundle-stats/plugin-webpack-filter": { "version": "4.17.0", "resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-filter/-/plugin-webpack-filter-4.17.0.tgz", "integrity": "sha512-sGC1c7oiRNKY19OLNB2Yha88Yt+UC7OJWlk8O6HBvN/OO8ACvZ6DuxRMNBXMyP0cDDAJlcY9v9rzy0bbnegzAw==", + "dev": true, "engines": { "node": ">= 14.0" }, @@ -444,6 +447,7 @@ "version": "4.17.0", "resolved": "https://registry.npmjs.org/@bundle-stats/plugin-webpack-validate/-/plugin-webpack-validate-4.17.0.tgz", "integrity": "sha512-dsCAIYiQ1ohRt7wyR5gfQCT3OKLjHxRZ3F/uL0gnBO56+xnvDzO/s+A5QO4EerlXIRIUBW8JWWuYAhe8ccdFjA==", + "dev": true, "dependencies": { "lodash": "4.17.21", "superstruct": "2.0.2" @@ -456,6 +460,7 @@ "version": "4.17.0", "resolved": "https://registry.npmjs.org/@bundle-stats/utils/-/utils-4.17.0.tgz", "integrity": "sha512-0/8/hebdV7QzPBZW7uyKClWpSsxVsQ/DfDwmNkmXSOq45eTeVNXozyvdYgwmLz0Ff9tVMyXu0Kb6iAVL6Hpt+g==", + "dev": true, "dependencies": { "@bundle-stats/plugin-webpack-filter": "^4.17.0", "@bundle-stats/plugin-webpack-validate": "^4.17.0", @@ -1369,6 +1374,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "android" @@ -1381,6 +1387,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "android" @@ -1393,6 +1400,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -1405,6 +1413,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "darwin" @@ -1417,6 +1426,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "linux" @@ -1429,6 +1439,7 @@ "cpu": [ "arm" ], + "dev": true, "optional": true, "os": [ "linux" @@ -1441,6 +1452,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -1453,6 +1465,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -1465,6 +1478,7 @@ "cpu": [ "ppc64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -1477,6 +1491,7 @@ "cpu": [ "riscv64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -1489,6 +1504,7 @@ "cpu": [ "s390x" ], + "dev": true, "optional": true, "os": [ "linux" @@ -1501,6 +1517,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -1513,6 +1530,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "linux" @@ -1525,6 +1543,7 @@ "cpu": [ "arm64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -1537,6 +1556,7 @@ "cpu": [ "ia32" ], + "dev": true, "optional": true, "os": [ "win32" @@ -1549,6 +1569,7 @@ "cpu": [ "x64" ], + "dev": true, "optional": true, "os": [ "win32" @@ -1598,7 +1619,8 @@ "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==" + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", + "dev": true }, "node_modules/@types/glob-to-regexp": { "version": "0.4.4", @@ -2461,7 +2483,8 @@ "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==" + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true }, "node_modules/concat-map": { "version": "0.0.1", @@ -2479,6 +2502,7 @@ "version": "3.39.0", "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.39.0.tgz", "integrity": "sha512-raM0ew0/jJUqkJ0E6e8UDtl+y/7ktFivgWvqw8dNSQeNWoSDLvQ1H/RN3aPXB9tBd4/FhyR4RDPGhsNIMsAn7g==", + "dev": true, "hasInstallScript": true, "peer": true, "funding": { @@ -3589,6 +3613,7 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, "dependencies": { "commondir": "^1.0.1", "make-dir": "^3.0.2", @@ -3605,6 +3630,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, "dependencies": { "semver": "^6.0.0" }, @@ -3619,6 +3645,7 @@ "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, "bin": { "semver": "bin/semver.js" } @@ -3713,6 +3740,7 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -4884,7 +4912,8 @@ "node_modules/lodash": { "version": "4.17.21", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true }, "node_modules/lodash.merge": { "version": "4.6.2", @@ -5524,6 +5553,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, "engines": { "node": ">=6" } @@ -5581,6 +5611,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, "engines": { "node": ">=8" } @@ -5710,6 +5741,7 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, "dependencies": { "find-up": "^4.0.0" }, @@ -5721,6 +5753,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" @@ -5733,6 +5766,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, "dependencies": { "p-locate": "^4.1.0" }, @@ -5744,6 +5778,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, "dependencies": { "p-try": "^2.0.0" }, @@ -5758,6 +5793,7 @@ "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, "dependencies": { "p-limit": "^2.2.0" }, @@ -6108,6 +6144,7 @@ "version": "4.24.0", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", "integrity": "sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==", + "dev": true, "dependencies": { "@types/estree": "1.0.6" }, @@ -6142,6 +6179,7 @@ "version": "4.17.0", "resolved": "https://registry.npmjs.org/rollup-plugin-bundle-stats/-/rollup-plugin-bundle-stats-4.17.0.tgz", "integrity": "sha512-qib0al0arhVlF1/nXynKNXbE5uUWuGr0GNzs+Dpub8Wu2bEvb3m5WaMpotXrK8d4pYoBpC8v38fXSqH0H+tapA==", + "dev": true, "dependencies": { "@bundle-stats/cli-utils": "^4.17.0", "rollup-plugin-webpack-stats": "0.4.1" @@ -6157,6 +6195,7 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/rollup-plugin-webpack-stats/-/rollup-plugin-webpack-stats-0.4.1.tgz", "integrity": "sha512-Zi7t0G7FtA55LNcU9B3s2gBo3PODbdo+288Cw2/4sA8+o9H/ahhWZ25UxADeHwriAzW808iDpPbB81C5jGLIbg==", + "dev": true, "engines": { "node": ">=14" }, @@ -6282,7 +6321,8 @@ "node_modules/serialize-query-params": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/serialize-query-params/-/serialize-query-params-2.0.2.tgz", - "integrity": "sha512-1chMo1dST4pFA9RDXAtF0Rbjaut4is7bzFbI1Z26IuMub68pNCILku85aYmeFhvnY//BXUPUhoRMjYcsT93J/Q==" + "integrity": "sha512-1chMo1dST4pFA9RDXAtF0Rbjaut4is7bzFbI1Z26IuMub68pNCILku85aYmeFhvnY//BXUPUhoRMjYcsT93J/Q==", + "dev": true }, "node_modules/set-function-length": { "version": "1.2.2", @@ -6482,6 +6522,7 @@ "version": "3.3.2", "resolved": "https://registry.npmjs.org/stream-chain/-/stream-chain-3.3.2.tgz", "integrity": "sha512-YvRznt2X9tLSQlQXkYxp9FGcp6uUwBG9VAyjgo53Ov+Ctk36R49xB6NUia37T7owHyi3UtvI6achAj4ufBSaNg==", + "dev": true, "funding": { "url": "https://github.com/sponsors/uhop" } @@ -6499,6 +6540,7 @@ "version": "1.9.1", "resolved": "https://registry.npmjs.org/stream-json/-/stream-json-1.9.1.tgz", "integrity": "sha512-uWkjJ+2Nt/LO9Z/JyKZbMusL8Dkh97uUBTv3AJQ74y07lVahLY4eEFsPsE97pxYBwr8nnjMAIch5eqI0gPShyw==", + "dev": true, "dependencies": { "stream-chain": "^2.2.5" } @@ -6506,7 +6548,8 @@ "node_modules/stream-json/node_modules/stream-chain": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/stream-chain/-/stream-chain-2.2.5.tgz", - "integrity": "sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA==" + "integrity": "sha512-1TJmBx6aSWqZ4tx7aTpBDXK0/e2hhcNSTV8+CbFJtDjbb+I1mZ8lHit0Grw9GRT+6JbIrrDd8esncgBi8aBXGA==", + "dev": true }, "node_modules/string_decoder": { "version": "1.1.1", @@ -6821,6 +6864,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-2.0.2.tgz", "integrity": "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A==", + "dev": true, "engines": { "node": ">=14.0.0" } diff --git a/package.json b/package.json index 0e2fe36..b480ef8 100644 --- a/package.json +++ b/package.json @@ -81,8 +81,7 @@ "@floating-ui/dom": "^1.6.12", "@types/css-tree": "^2.3.8", "css-tree": "^3.0.0", - "nanoid": "^5.0.8", - "rollup-plugin-bundle-stats": "^4.17.0" + "nanoid": "^5.0.8" }, "devDependencies": { "@playwright/test": "1.43.1", @@ -106,6 +105,7 @@ "node-fetch": "^2.6.7", "npm-run-all": "^4.1.5", "prettier": "^3.3.3", + "rollup-plugin-bundle-stats": "^4.17.0", "selenium-webdriver": "^4.26.0", "stylelint": "^16.10.0", "stylelint-config-standard": "^36.0.1", diff --git a/src/@types/css-tree.d.ts b/src/@types/css-tree.d.ts index c3a8bde..d37b212 100644 --- a/src/@types/css-tree.d.ts +++ b/src/@types/css-tree.d.ts @@ -3,6 +3,7 @@ declare module 'css-tree/walker' { export default walk; } + declare module 'css-tree/utils' { export { clone, List } from 'css-tree'; } @@ -12,6 +13,7 @@ declare module 'css-tree/generator' { export default generate; } + declare module 'css-tree/parser' { import { parse } from 'css-tree'; diff --git a/vite.config.ts b/vite.config.ts index e08fad0..0961f58 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -40,9 +40,16 @@ export default defineConfig({ sourcemap: true, rollupOptions: { external: [/source-map-js/], + // This is not needed, but silences a Rollup warning + output: { + globals: { + 'source-map-js/lib/source-map-generator.js': + 'sourceMapGenerator_js', + }, + }, }, }, - plugins: [bundleStats()], + plugins: [bundleStats({ compare: false, silent: true })], /** * @see https://vitest.dev/config/#configuration */