diff --git a/packages/ui-templates/lib/render.ts b/packages/ui-templates/lib/render.ts index 13ebacf790..267d95a017 100644 --- a/packages/ui-templates/lib/render.ts +++ b/packages/ui-templates/lib/render.ts @@ -3,8 +3,7 @@ import { readFileSync, rmdirSync, unlinkSync, writeFileSync } from 'node:fs' import { copyFile } from 'node:fs/promises' import { basename, dirname, join } from 'pathe' import type { Plugin } from 'vite' -// @ts-expect-error https://github.com/GoogleChromeLabs/critters/pull/151 -import Critters from 'critters' +import Beasties from 'beasties' import { genObjectFromRawEntries } from 'knitwork' import htmlnano from 'htmlnano' import { glob } from 'tinyglobby' @@ -25,7 +24,7 @@ export const RenderPlugin = () => { }, enforce: 'post', async writeBundle () { - const critters = new Critters({ path: outputDir }) + const critters = new Beasties({ path: outputDir }) const htmlFiles = await glob(['templates/**/*.html'], { cwd: outputDir, absolute: true, diff --git a/packages/ui-templates/package.json b/packages/ui-templates/package.json index d1d72754f0..ea394c5d5a 100644 --- a/packages/ui-templates/package.json +++ b/packages/ui-templates/package.json @@ -19,7 +19,7 @@ }, "devDependencies": { "@unocss/reset": "0.63.6", - "critters": "0.0.25", + "beasties": "0.1.0", "html-validate": "8.24.2", "htmlnano": "2.1.1", "jiti": "2.4.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe9cbefb68..251e75968b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -789,9 +789,9 @@ importers: '@unocss/reset': specifier: 0.63.6 version: 0.63.6 - critters: - specifier: 0.0.25 - version: 0.0.25 + beasties: + specifier: 0.1.0 + version: 0.1.0 html-validate: specifier: 8.24.2 version: 8.24.2(vitest@2.1.4(@types/node@22.8.7)(happy-dom@15.8.0)(sass@1.78.0)(terser@5.32.0)) @@ -2894,27 +2894,18 @@ packages: '@unhead/dom@1.11.11': resolution: {integrity: sha512-4YwziCH5CmjvUzSGdZ4Klj6BqhLSTNZooA9kt47yDxj4Qw9uHqVnXwWWupYsVdIYPNsw1tR2AkHveg82y1Fn3A==} - '@unhead/dom@1.11.9': - resolution: {integrity: sha512-AOoCt05sLbkmp7ipCAs2JQdV0auLc5lCkLbCZj19kuPmWcFOoHNByQAG/AFKuSvi297OYp8abKGCStIgyz2x4A==} - '@unhead/schema@1.11.10': resolution: {integrity: sha512-lXh7cm5XtFaw3gc+ZVXTSfIHXiBpAywbjtEiOsz5TR4GxOjj2rtfOAl4C3Difk1yupP6L2otYmOZdn/i8EXSJg==} '@unhead/schema@1.11.11': resolution: {integrity: sha512-xSGsWHPBYcMV/ckQeImbrVu6ddeRnrdDCgXUKv3xIjGBY+ob/96V80lGX8FKWh8GwdFSwhblISObKlDAt5K9ZQ==} - '@unhead/schema@1.11.9': - resolution: {integrity: sha512-0V37bxG4sQuiLw3M5DMD+b99ndOOngecMlekQ122TDvBb24W8rWwkHhXvAu5eFg6bQXPdQF1A0U0PuRMcCj/ZA==} - '@unhead/shared@1.11.10': resolution: {integrity: sha512-YQgZcOyo1id7drUeDPGn0R83pirvIcV+Car3/m7ZfCLL1Syab6uXmRckVRd69yVbUL4eirIm9IzzmvzM/OuGuw==} '@unhead/shared@1.11.11': resolution: {integrity: sha512-RfdvUskPn90ipO+PmR98jKZ8Lsx1uuzscOenO5xcrMrtWGhlLWaEBIrbvFOvX5PZ/u8/VNMJChTXGDUjEtHmlg==} - '@unhead/shared@1.11.9': - resolution: {integrity: sha512-Df6Td9d87NM5EWf4ylAN98zwf50DwfMg3xoy6ofz3Qg1jSXewEIMD1w1C0/Q6KdpLo01TuoQ0RfpSyVtxt7oEA==} - '@unhead/ssr@1.11.10': resolution: {integrity: sha512-tj5zeJtCbSktNNqsdL+6h6OIY7dYO+2HSiC1VbofGYsoG7nDNXMypkrW/cTMqZVr5/gWhKaUgFQALjm28CflYg==} @@ -2923,11 +2914,6 @@ packages: peerDependencies: vue: 3.5.12 - '@unhead/vue@1.11.9': - resolution: {integrity: sha512-vdl3H1bwJNindhRplMun7zhtNFggP8QqpPwc1e7kd2a0ORp776+QpFXKdYHFSlX+eAMmDVv8LQ+VL0N++pXxNg==} - peerDependencies: - vue: 3.5.12 - '@unocss/astro@0.62.4': resolution: {integrity: sha512-98KfkbrNhBLx2+uYxMiGsldIeIZ6/PbL4yaGRHeHoiHd7p4HmIyCF+auYe4Psntx3Yr8kU+XSIAhGDYebvTidQ==} peerDependencies: @@ -3574,6 +3560,9 @@ packages: base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + beasties@0.1.0: + resolution: {integrity: sha512-+Ssscd2gVG24qRNC+E2g88D+xsQW4xwakWtKAiGEQ3Pw54/FGdyo9RrfxhGhEv6ilFVbB7r3Lgx+QnAxnSpECw==} + big.js@5.2.2: resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} @@ -3891,10 +3880,6 @@ packages: create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - critters@0.0.25: - resolution: {integrity: sha512-ROF/tjJyyRdM8/6W0VqoN5Ql05xAGnkf5b7f3sTEl1bI5jTQQf8O918RD/V9tEb9pRY/TKcvJekDbJtniHyPtQ==} - deprecated: Ownership of Critters has moved to the Nuxt team, who will be maintaining the project going forward. If you'd like to keep using Critters, please switch to the actively-maintained fork at https://github.com/danielroe/beasties - croner@8.1.1: resolution: {integrity: sha512-1VdUuRnQP4drdFkS8NKvDR1NBgevm8TOuflcaZEKsxw42CxonjW/2vkj1AKlinJb4ZLwBcuWF9GiPr7FQc6AQA==} engines: {node: '>=18.0'} @@ -4910,8 +4895,8 @@ packages: htmlparser2@7.2.0: resolution: {integrity: sha512-H7MImA4MS6cw7nbyURtLPO1Tms7C5H602LRETv95z1MxO/7CP7rDVROehUYeYBUYEON94NXXDEPmZuq+hX4sog==} - htmlparser2@8.0.2: - resolution: {integrity: sha512-GYdjWKDkbRLkZ5geuHs5NY1puJ+PXwP7+fHPRz06Eirsb9ugf6d8kkXav6ADhcODhFFPMIXyxkxSuMf3D6NCFA==} + htmlparser2@9.1.0: + resolution: {integrity: sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==} http-errors@2.0.0: resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} @@ -6075,6 +6060,9 @@ packages: picocolors@1.1.0: resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -7224,9 +7212,6 @@ packages: unhead@1.11.10: resolution: {integrity: sha512-hypXrAI47wE3wIhkze0RMPGAWcoo45Q1+XzdqLD/OnTCzjFXQrpuE4zBy8JRexyrqp+Ud2+nFTUNf/mjfFSymw==} - unhead@1.11.9: - resolution: {integrity: sha512-EwEGMjbXVVn2O5vNfXUHiAjHWFHngPjkAx0yVZZsrTgqzs7+A/YvJ90TLvBna874+HCKZWtufo7QAI7luU2CgA==} - unicode-emoji-modifier-base@1.0.0: resolution: {integrity: sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==} engines: {node: '>=4'} @@ -8768,7 +8753,7 @@ snapshots: '@types/google.maps': 3.58.1 '@types/vimeo__player': 2.18.3 '@types/youtube': 0.1.0 - '@unhead/vue': 1.11.9(vue@3.5.12(typescript@5.6.3)) + '@unhead/vue': 1.11.10(vue@3.5.12(typescript@5.6.3)) '@vueuse/core': 11.1.0(vue@3.5.12(typescript@5.6.3)) consola: 3.2.3 defu: 6.1.4 @@ -9632,11 +9617,6 @@ snapshots: '@unhead/schema': 1.11.11 '@unhead/shared': 1.11.11 - '@unhead/dom@1.11.9': - dependencies: - '@unhead/schema': 1.11.9 - '@unhead/shared': 1.11.9 - '@unhead/schema@1.11.10': dependencies: hookable: 5.5.3 @@ -9647,11 +9627,6 @@ snapshots: hookable: 5.5.3 zhead: 2.2.4 - '@unhead/schema@1.11.9': - dependencies: - hookable: 5.5.3 - zhead: 2.2.4 - '@unhead/shared@1.11.10': dependencies: '@unhead/schema': 1.11.10 @@ -9660,10 +9635,6 @@ snapshots: dependencies: '@unhead/schema': 1.11.11 - '@unhead/shared@1.11.9': - dependencies: - '@unhead/schema': 1.11.9 - '@unhead/ssr@1.11.10': dependencies: '@unhead/schema': 1.11.10 @@ -9678,15 +9649,6 @@ snapshots: unhead: 1.11.10 vue: 3.5.12(typescript@5.6.3) - '@unhead/vue@1.11.9(vue@3.5.12(typescript@5.6.3))': - dependencies: - '@unhead/schema': 1.11.9 - '@unhead/shared': 1.11.9 - defu: 6.1.4 - hookable: 5.5.3 - unhead: 1.11.9 - vue: 3.5.12(typescript@5.6.3) - '@unocss/astro@0.62.4(rollup@4.24.3)(vite@5.4.10(@types/node@22.8.7)(sass@1.78.0)(terser@5.32.0))': dependencies: '@unocss/core': 0.62.4 @@ -10643,6 +10605,17 @@ snapshots: base64-js@1.5.1: {} + beasties@0.1.0: + dependencies: + css-select: 5.1.0 + css-what: 6.1.0 + dom-serializer: 2.0.0 + domhandler: 5.0.3 + htmlparser2: 9.1.0 + picocolors: 1.1.1 + postcss: 8.4.47 + postcss-media-query-parser: 0.2.3 + big.js@5.2.2: {} binary-extensions@2.3.0: {} @@ -10964,16 +10937,6 @@ snapshots: create-require@1.1.1: {} - critters@0.0.25: - dependencies: - chalk: 4.1.2 - css-select: 5.1.0 - dom-serializer: 2.0.0 - domhandler: 5.0.3 - htmlparser2: 8.0.2 - postcss: 8.4.47 - postcss-media-query-parser: 0.2.3 - croner@8.1.1: {} cronstrue@2.50.0: {} @@ -12177,7 +12140,7 @@ snapshots: domutils: 2.8.0 entities: 3.0.1 - htmlparser2@8.0.2: + htmlparser2@9.1.0: dependencies: domelementtype: 2.3.0 domhandler: 5.0.3 @@ -13684,6 +13647,8 @@ snapshots: picocolors@1.1.0: {} + picocolors@1.1.1: {} + picomatch@2.3.1: {} picomatch@4.0.2: {} @@ -14945,13 +14910,6 @@ snapshots: '@unhead/shared': 1.11.10 hookable: 5.5.3 - unhead@1.11.9: - dependencies: - '@unhead/dom': 1.11.9 - '@unhead/schema': 1.11.9 - '@unhead/shared': 1.11.9 - hookable: 5.5.3 - unicode-emoji-modifier-base@1.0.0: {} unicorn-magic@0.1.0: {}