diff --git a/package-lock.json b/package-lock.json index b5c62f65e..3eefc5113 100644 --- a/package-lock.json +++ b/package-lock.json @@ -303,9 +303,9 @@ } }, "node_modules/@algolia/client-common": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.8.1.tgz", - "integrity": "sha512-MLX/gipPFEhJPCExsxXf9tnt+kLfWCe9JWRp1adcoVySkhzPxpIeSiWaQaOqyy0TYIgIpdeVx/emlBT9Ni8GFw==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-5.9.1.tgz", + "integrity": "sha512-YWPGDyISFNbPFVswI16c4rgt2CeTgFk82e543FSyw/3H5eNKa0YPb876GguEb50NualXCF7DCuVhcp6XMTpaSg==", "dev": true, "license": "MIT", "peer": true, @@ -337,17 +337,17 @@ } }, "node_modules/@algolia/client-search": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.8.1.tgz", - "integrity": "sha512-zy3P4fI28GfzKihUw5+L76pEedQxyLDiMsdDYEWghIz8yAnELDatPNEThyWuUk8fD0PeVoCi1M4tr1iz00fOtQ==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.9.1.tgz", + "integrity": "sha512-JDK8kv1ZR2uwEbUVOZ6GA2AQyHI1+T5noupyTsu7SY2M6W3wPwQO3oUou6Xq+fWJmXGUB8TUj4Yv3ioYoTjQVg==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@algolia/client-common": "5.8.1", - "@algolia/requester-browser-xhr": "5.8.1", - "@algolia/requester-fetch": "5.8.1", - "@algolia/requester-node-http": "5.8.1" + "@algolia/client-common": "5.9.1", + "@algolia/requester-browser-xhr": "5.9.1", + "@algolia/requester-fetch": "5.9.1", + "@algolia/requester-node-http": "5.9.1" }, "engines": { "node": ">= 14.0.0" @@ -434,14 +434,14 @@ } }, "node_modules/@algolia/requester-browser-xhr": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.8.1.tgz", - "integrity": "sha512-x0iULVrx5PocaYBqH+G6jyEsEHf7m5FDiZW7CP8AaJdzdCzoUyx7YH6e6TSCNlkFEjwmn8uj05coN8uljCHXTg==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-5.9.1.tgz", + "integrity": "sha512-EevzJJ2AXu+U2w14XgK9GnJn9Y4q5GNnoAUWS0aErCCb7XhYiM7xa1eJnVq+FoOwRuZj8RmS4GEV7t3CQI3TqA==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@algolia/client-common": "5.8.1" + "@algolia/client-common": "5.9.1" }, "engines": { "node": ">= 14.0.0" @@ -455,28 +455,28 @@ "license": "MIT" }, "node_modules/@algolia/requester-fetch": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.8.1.tgz", - "integrity": "sha512-SRWGrNsKSLNYIDNlVKVkf4wxsm6h57xI+0b8JPm0wUe0ly0jymAgQU2yW2GDzNuXyiPiS7U1oWwaVGs71IT5Pw==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-fetch/-/requester-fetch-5.9.1.tgz", + "integrity": "sha512-gBSi8QotBfOu3BbF25PB2uVbCNfrjVDGyvfeIQ6DukUldjEE8ruusNJnVMHoR00rO1C8G86/USHkbmXx73vf7Q==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@algolia/client-common": "5.8.1" + "@algolia/client-common": "5.9.1" }, "engines": { "node": ">= 14.0.0" } }, "node_modules/@algolia/requester-node-http": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.8.1.tgz", - "integrity": "sha512-pYylr2gBsV68E88bltaVoJHIc3YNIllVmA12d+jefAcutR9ytQM7iP6dXbCYuRqF4CHF32YvZuwvqNI3J4kowA==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-5.9.1.tgz", + "integrity": "sha512-ImECpAR0A0q+9UfTprA099JJ6VZ+GjUoOC+m5rbyJieA4rUbt/A6QHkqeUq/2fObeezOzLn4DZDAXW93YHM+oQ==", "dev": true, "license": "MIT", "peer": true, "dependencies": { - "@algolia/client-common": "5.8.1" + "@algolia/client-common": "5.9.1" }, "engines": { "node": ">= 14.0.0" @@ -3218,9 +3218,9 @@ } }, "node_modules/acorn": { - "version": "8.12.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", - "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", + "version": "8.13.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.13.0.tgz", + "integrity": "sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==", "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -3781,14 +3781,13 @@ } }, "node_modules/bare-stream": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.0.tgz", - "integrity": "sha512-pVRWciewGUeCyKEuRxwv06M079r+fRjAQjBEK2P6OYGrO43O+Z0LrPZZEjlc4mB6C2RpZ9AxJ1s7NLEtOHO6eA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.1.tgz", + "integrity": "sha512-Vm8kAeOcfzHPTH8sq0tHBnUqYrkXdroaBVVylqFT4cF5wnMfKEIxxy2jIGu2zKVNl9P8MAP9XBWwXJ9N2+jfEw==", "dev": true, "license": "Apache-2.0", "optional": true, "dependencies": { - "b4a": "^1.6.6", "streamx": "^2.20.0" } }, @@ -3998,9 +3997,9 @@ } }, "node_modules/bun-types": { - "version": "1.1.30", - "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.1.30.tgz", - "integrity": "sha512-mGh7NLisOXskBU62DxLS+/nwmLlCYHYAkCzdo4DZ9+fzrpP41hAdOqaN4DO6tQfenHb4pYb0/shw29k4/6I2yQ==", + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/bun-types/-/bun-types-1.1.31.tgz", + "integrity": "sha512-SPk7OnejMg4TbUXlZbuCh8COC4Ace74gjzBK6Q7VNtqToqIEs8ucv7/U/2zo1LSkPiKuo2RFoOBjQT/IzH36EA==", "dev": true, "license": "MIT", "dependencies": { @@ -4102,9 +4101,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001668", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001668.tgz", - "integrity": "sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==", + "version": "1.0.30001669", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001669.tgz", + "integrity": "sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==", "devOptional": true, "funding": [ { @@ -5189,9 +5188,9 @@ } }, "node_modules/devtools-protocol": { - "version": "0.0.1342118", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1342118.tgz", - "integrity": "sha512-75fMas7PkYNDTmDyb6PRJCH7ILmHLp+BhrZGeMsa4bCh40DTxgCz2NRy5UDzII4C5KuD0oBMZ9vXKhEl6UD/3w==", + "version": "0.0.1354347", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1354347.tgz", + "integrity": "sha512-BlmkSqV0V84E2WnEnoPnwyix57rQxAM5SKJjf4TbYOCGLAWtz8CDH8RIaGOjPgPCXo2Mce3kxSY497OySidY3Q==", "dev": true, "license": "BSD-3-Clause" }, @@ -5324,9 +5323,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.36", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.36.tgz", - "integrity": "sha512-HYTX8tKge/VNp6FGO+f/uVDmUkq+cEfcxYhKf15Akc4M5yxt5YmorwlAitKWjWhWQnKcDRBAQKXkhqqXMqcrjw==", + "version": "1.5.41", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.41.tgz", + "integrity": "sha512-dfdv/2xNjX0P8Vzme4cfzHqnPm5xsZXwsolTYr0eyW18IUmNyG08vL+fttvinTfhKfIKdRoqkDIC9e9iWQCNYQ==", "devOptional": true, "license": "ISC" }, @@ -5611,6 +5610,38 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/esast-util-from-estree": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/esast-util-from-estree/-/esast-util-from-estree-2.0.0.tgz", + "integrity": "sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "devlop": "^1.0.0", + "estree-util-visit": "^2.0.0", + "unist-util-position-from-estree": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/esast-util-from-js": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/esast-util-from-js/-/esast-util-from-js-2.0.1.tgz", + "integrity": "sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==", + "license": "MIT", + "dependencies": { + "@types/estree-jsx": "^1.0.0", + "acorn": "^8.0.0", + "esast-util-from-estree": "^2.0.0", + "vfile-message": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/esbuild": { "version": "0.24.0", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.0.tgz", @@ -6987,9 +7018,9 @@ } }, "node_modules/execa": { - "version": "9.4.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-9.4.0.tgz", - "integrity": "sha512-yKHlle2YGxZE842MERVIplWwNH5VYmqqcPFgtnlU//K8gxuFFXu0pwd/CrfXTumFpeEiufsP7+opT/bPJa1yVw==", + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-9.4.1.tgz", + "integrity": "sha512-5eo/BRqZm3GYce+1jqX/tJ7duA2AnE39i88fuedNFUV8XxGxUpF3aWkBRfbUcjV49gCkvS/pzc0YrCPhaIewdg==", "dev": true, "license": "MIT", "dependencies": { @@ -12712,9 +12743,9 @@ "license": "MIT" }, "node_modules/picocolors": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", - "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "license": "ISC" }, "node_modules/picomatch": { @@ -13619,9 +13650,9 @@ } }, "node_modules/puppeteer": { - "version": "23.5.3", - "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.5.3.tgz", - "integrity": "sha512-FghmfBsr/UUpe48OiCg1gV3W4vVfQJKjQehbF07SjnQvEpWcvPTah1nykfGWdOQQ1ydJPIXcajzWN7fliCU3zw==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/puppeteer/-/puppeteer-23.6.0.tgz", + "integrity": "sha512-l+Fgo8SVFSd51STtq2crz8t1Y3VXowsuR4zfR64qDOn6oggz7YIZauWiNR4IJjczQ6nvFs3S4cgng55/nesxTQ==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", @@ -13629,8 +13660,8 @@ "@puppeteer/browsers": "2.4.0", "chromium-bidi": "0.8.0", "cosmiconfig": "^9.0.0", - "devtools-protocol": "0.0.1342118", - "puppeteer-core": "23.5.3", + "devtools-protocol": "0.0.1354347", + "puppeteer-core": "23.6.0", "typed-query-selector": "^2.12.0" }, "bin": { @@ -13641,16 +13672,16 @@ } }, "node_modules/puppeteer-core": { - "version": "23.5.3", - "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.5.3.tgz", - "integrity": "sha512-V58MZD/B3CwkYsqSEQlHKbavMJptF04fzhMdUpiCRCmUVhwZNwSGEPhaiZ1f8I3ABQUirg3VNhXVB6Z1ubHXtQ==", + "version": "23.6.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-23.6.0.tgz", + "integrity": "sha512-se1bhgUpR9C529SgHGr/eyT92mYyQPAhA2S9pGtGrVG2xob9qE6Pbp7TlqiSPlnnY1lINqhn6/67EwkdzOmKqQ==", "dev": true, "license": "Apache-2.0", "dependencies": { "@puppeteer/browsers": "2.4.0", "chromium-bidi": "0.8.0", "debug": "^4.3.7", - "devtools-protocol": "0.0.1342118", + "devtools-protocol": "0.0.1354347", "typed-query-selector": "^2.12.0", "ws": "^8.18.0" }, @@ -13734,14 +13765,17 @@ } }, "node_modules/react-error-boundary": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-4.0.13.tgz", - "integrity": "sha512-b6PwbdSv8XeOSYvjt8LpgpKrZ0yGdtZokYwkwV2wlcZbxgopHX/hgPl5VgpnoVOWd868n1hktM8Qm4b+02MiLQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/react-error-boundary/-/react-error-boundary-4.1.1.tgz", + "integrity": "sha512-EOAEsbVm2EQD8zPS4m24SiaR/506RPC3CjMcjJ5JWKECsctyLsDTKxB26Hvl7jcz7KweSOkBYAcY/hmMpMn2jA==", "dev": true, "license": "MIT", "dependencies": { "@babel/runtime": "^7.12.5" }, + "engines": { + "pnpm": "=9" + }, "peerDependencies": { "react": ">=16.13.1" } @@ -14176,6 +14210,70 @@ "node": ">=8.10.0" } }, + "node_modules/recma-build-jsx": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-build-jsx/-/recma-build-jsx-1.0.0.tgz", + "integrity": "sha512-8GtdyqaBcDfva+GUKDr3nev3VpKAhup1+RvkMvUxURHpW7QyIvk9F5wz7Vzo06CEMSilw6uArgRqhpiUcWp8ew==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-util-build-jsx": "^3.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/recma-jsx": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-jsx/-/recma-jsx-1.0.0.tgz", + "integrity": "sha512-5vwkv65qWwYxg+Atz95acp8DMu1JDSqdGkA2Of1j6rCreyFUE/gp15fC8MnGEuG1W68UKjM6x6+YTWIh7hZM/Q==", + "license": "MIT", + "dependencies": { + "acorn-jsx": "^5.0.0", + "estree-util-to-js": "^2.0.0", + "recma-parse": "^1.0.0", + "recma-stringify": "^1.0.0", + "unified": "^11.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/recma-parse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-parse/-/recma-parse-1.0.0.tgz", + "integrity": "sha512-OYLsIGBB5Y5wjnSnQW6t3Xg7q3fQ7FWbw/vcXtORTnyaSFscOtABg+7Pnz6YZ6c27fG1/aN8CjfwoUEUIdwqWQ==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "esast-util-from-js": "^2.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/recma-stringify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/recma-stringify/-/recma-stringify-1.0.0.tgz", + "integrity": "sha512-cjwII1MdIIVloKvC9ErQ+OgAtwHBmcZ0Bg4ciz78FtbT8In39aAYbaA7zvxQ61xVMSPE8WxhLwLbhif4Js2C+g==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-util-to-js": "^2.0.0", + "unified": "^11.0.0", + "vfile": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/reflect.getprototypeof": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz", @@ -14744,6 +14842,21 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/rehype-recma": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/rehype-recma/-/rehype-recma-1.0.0.tgz", + "integrity": "sha512-lqA4rGUf1JmacCNWWZx0Wv1dHqMwxzsDWYMTowuplHF3xH0N/MmrZ/G3BDZnzAkRmxDadujCjaKM2hqYdCBOGw==", + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "@types/hast": "^3.0.0", + "hast-util-to-estree": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/rehype-remove-comments": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/rehype-remove-comments/-/rehype-remove-comments-6.1.1.tgz", @@ -18015,9 +18128,9 @@ } }, "node_modules/terser": { - "version": "5.34.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz", - "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==", + "version": "5.36.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.36.0.tgz", + "integrity": "sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==", "devOptional": true, "license": "BSD-2-Clause", "dependencies": { @@ -18117,14 +18230,11 @@ } }, "node_modules/text-decoder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.0.tgz", - "integrity": "sha512-n1yg1mOj9DNpk3NeZOx7T6jchTbyJS3i3cucbNN6FcdPriMZx7NsgrGpWWdWZZGxD7ES1XB+3uoqHMgOKaN+fg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/text-decoder/-/text-decoder-1.2.1.tgz", + "integrity": "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==", "dev": true, - "license": "Apache-2.0", - "dependencies": { - "b4a": "^1.6.4" - } + "license": "Apache-2.0" }, "node_modules/text-table": { "version": "0.2.0", @@ -18271,9 +18381,9 @@ } }, "node_modules/tslib": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", - "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", + "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", "dev": true, "license": "0BSD" }, @@ -18335,29 +18445,29 @@ } }, "node_modules/type-coverage": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/type-coverage/-/type-coverage-2.29.1.tgz", - "integrity": "sha512-hsS1UYDrSltiSqMHJQn5wRFJiAeSA1PItMgeszxBkBjZEbtCzzmAU9dQswR1k8z0/ewj2/SbYEldYRurxgmxhA==", + "version": "2.29.7", + "resolved": "https://registry.npmjs.org/type-coverage/-/type-coverage-2.29.7.tgz", + "integrity": "sha512-E67Chw7SxFe++uotisxt/xzB1UxxvLztzzQqVyUZ/jKujsejVqvoO5vn25oMvqJydqYrASBVBCQCy082E2qQYQ==", "dev": true, "license": "MIT", "dependencies": { "chalk": "4.1.2", "minimist": "1", - "type-coverage-core": "^2.29.1" + "type-coverage-core": "^2.29.7" }, "bin": { "type-coverage": "bin/type-coverage" } }, "node_modules/type-coverage-core": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/type-coverage-core/-/type-coverage-core-2.29.1.tgz", - "integrity": "sha512-lonikLRWnejbW9qsjoUsqXxQ3c4D0LPHaY2fsN5YD78sHAL27AaIoWYOjtitSqmv5UCS+3tv4qYjnj56vUH5eQ==", + "version": "2.29.7", + "resolved": "https://registry.npmjs.org/type-coverage-core/-/type-coverage-core-2.29.7.tgz", + "integrity": "sha512-bt+bnXekw3p5NnqiZpNupOOxfUKGw2Z/YJedfGHkxpeyGLK7DZ59a6Wds8eq1oKjJc5Wulp2xL207z8FjFO14Q==", "dev": true, "license": "MIT", "dependencies": { "fast-glob": "3", - "minimatch": "6 || 7 || 8 || 9", + "minimatch": "6 || 7 || 8 || 9 || 10", "normalize-path": "3", "tslib": "1 || 2", "tsutils": "3" @@ -18377,16 +18487,16 @@ } }, "node_modules/type-coverage-core/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", "dev": true, "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=16 || 14 >=14.17" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -20598,14 +20708,15 @@ "@types/mdx": "^2.0.0", "collapse-white-space": "^2.0.0", "devlop": "^1.0.0", - "estree-util-build-jsx": "^3.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-util-scope": "^1.0.0", - "estree-util-to-js": "^2.0.0", "estree-walker": "^3.0.0", - "hast-util-to-estree": "^3.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "markdown-extensions": "^2.0.0", + "recma-build-jsx": "^1.0.0", + "recma-jsx": "^1.0.0", + "recma-stringify": "^1.0.0", + "rehype-recma": "^1.0.0", "remark-mdx": "^3.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", diff --git a/packages/mdx/lib/core.js b/packages/mdx/lib/core.js index 9af260d5b..ecb3cb835 100644 --- a/packages/mdx/lib/core.js +++ b/packages/mdx/lib/core.js @@ -1,11 +1,10 @@ /** * @import {Program} from 'estree-jsx' - * @import {ElementAttributeNameCase, StylePropertyNameCase} from 'hast-util-to-estree' * @import {Root} from 'mdast' + * @import {Options as RehypeRecmaOptions} from 'rehype-recma' * @import {Options as RemarkRehypeOptions} from 'remark-rehype' * @import {SourceMapGenerator} from 'source-map' * @import {PluggableList, Processor} from 'unified' - * @import {Node} from 'unist' */ /** @@ -24,7 +23,7 @@ * when using the webpack loader (`@mdx-js/loader`) or the Rollup integration * (`@mdx-js/rollup`) through Vite, this is automatically inferred from how * you configure those tools. - * @property {ElementAttributeNameCase | null | undefined} [elementAttributeNameCase='react'] + * @property {RehypeRecmaOptions['elementAttributeNameCase']} [elementAttributeNameCase='react'] * Casing to use for attribute names (default: `'react'`); * HTML casing is for example `class`, `stroke-linecap`, `xml:lang`; * React casing is for example `className`, `strokeLinecap`, `xmlLang`; @@ -112,7 +111,7 @@ * nodes (see `nodeTypes`) are passed through; * In particular, you might want to pass configuration for footnotes if your * content is not in English. - * @property {StylePropertyNameCase | null | undefined} [stylePropertyNameCase='dom'] + * @property {RehypeRecmaOptions['stylePropertyNameCase']} [stylePropertyNameCase='dom'] * Casing to use for property names in `style` objects (default: `'dom'`); * CSS casing is for example `background-color` and `-webkit-line-clamp`; * DOM casing is for example `backgroundColor` and `WebkitLineClamp`; @@ -125,15 +124,17 @@ */ import {unreachable} from 'devlop' +import recmaBuildJsx from 'recma-build-jsx' +import recmaJsx from 'recma-jsx' +import recmaStringify from 'recma-stringify' +import rehypeRecma from 'rehype-recma' import remarkMdx from 'remark-mdx' import remarkParse from 'remark-parse' import remarkRehype from 'remark-rehype' import {unified} from 'unified' +import {recmaBuildJsxTransform} from './plugin/recma-build-jsx-transform.js' import {recmaDocument} from './plugin/recma-document.js' -import {recmaJsxBuild} from './plugin/recma-jsx-build.js' import {recmaJsxRewrite} from './plugin/recma-jsx-rewrite.js' -import {recmaStringify} from './plugin/recma-stringify.js' -import {rehypeRecma} from './plugin/rehype-recma.js' import {rehypeRemoveRaw} from './plugin/rehype-remove-raw.js' import {remarkMarkAndUnravel} from './plugin/remark-mark-and-unravel.js' import {nodeTypes} from './node-types.js' @@ -225,12 +226,13 @@ export function createProcessor(options) { .use(recmaJsxRewrite, settings) if (!settings.jsx) { - pipeline.use(recmaJsxBuild, settings) + pipeline.use(recmaBuildJsx, settings).use(recmaBuildJsxTransform, settings) } - // @ts-expect-error: `Program` is close enough to a `Node`, - // but type inference has trouble with it and bridges. - pipeline.use(recmaStringify, settings).use(settings.recmaPlugins || []) + pipeline + .use(recmaJsx) + .use(recmaStringify, settings) + .use(settings.recmaPlugins || []) // @ts-expect-error: TS doesn’t get the plugins we added with if-statements. return pipeline diff --git a/packages/mdx/lib/plugin/recma-jsx-build.js b/packages/mdx/lib/plugin/recma-build-jsx-transform.js similarity index 77% rename from packages/mdx/lib/plugin/recma-jsx-build.js rename to packages/mdx/lib/plugin/recma-build-jsx-transform.js index 8e94ce323..614283577 100644 --- a/packages/mdx/lib/plugin/recma-jsx-build.js +++ b/packages/mdx/lib/plugin/recma-build-jsx-transform.js @@ -1,48 +1,37 @@ /** * @import {Program} from 'estree-jsx' - * @import {Options as BuildJsxOptions} from 'estree-util-build-jsx' - * @import {VFile} from 'vfile' */ /** - * @typedef ExtraOptions - * Configuration for internal plugin `recma-jsx-build`. + * @typedef Options + * Configuration for internal plugin `recma-build-jsx-transform`. * @property {'function-body' | 'program' | null | undefined} [outputFormat='program'] * Whether to keep the import of the automatic runtime or get it from * `arguments[0]` instead (default: `'program'`). - * - * @typedef {BuildJsxOptions & ExtraOptions} Options - * Options. */ -import {buildJsx} from 'estree-util-build-jsx' import {specifiersToDeclarations} from '../util/estree-util-specifiers-to-declarations.js' import {toIdOrMemberExpression} from '../util/estree-util-to-id-or-member-expression.js' /** - * A plugin to build JSX into function calls. - * `estree-util-build-jsx` does all the work for us! + * Plugin to change the tree after compiling JSX away. * * @param {Readonly | null | undefined} [options] * Configuration (optional). * @returns * Transform. */ -export function recmaJsxBuild(options) { +export function recmaBuildJsxTransform(options) { /* c8 ignore next -- always given in `@mdx-js/mdx` */ - const {development, outputFormat} = options || {} + const {outputFormat} = options || {} /** * @param {Program} tree * Tree. - * @param {VFile} file - * File. * @returns {undefined} * Nothing. */ - return function (tree, file) { - buildJsx(tree, {development, filePath: file.history[0]}) - + return function (tree) { // Remove the pragma comment that we injected ourselves as it is no longer // needed. if (tree.comments) { diff --git a/packages/mdx/lib/plugin/recma-stringify.js b/packages/mdx/lib/plugin/recma-stringify.js deleted file mode 100644 index d520d66f2..000000000 --- a/packages/mdx/lib/plugin/recma-stringify.js +++ /dev/null @@ -1,44 +0,0 @@ -/** - * @import {Program} from 'estree-jsx' - * @import {Processor} from 'unified' - * @import {VFile} from 'vfile' - * @import {ProcessorOptions} from '../core.js' - */ - -import {jsx, toJs} from 'estree-util-to-js' - -/** - * Serialize an esast (estree) program to JavaScript. - * - * @this {Processor} - * Processor. - * @param {Readonly} options - * Configuration. - */ -export function recmaStringify(options) { - const {SourceMapGenerator} = options - - this.compiler = compiler - - /** - * @param {Program} tree - * Tree. - * @param {VFile} file - * File. - * @returns {string} - * JavaScript. - */ - function compiler(tree, file) { - const result = SourceMapGenerator - ? toJs(tree, { - SourceMapGenerator, - filePath: file.path || 'unknown.mdx', - handlers: jsx - }) - : toJs(tree, {handlers: jsx}) - - file.map = result.map - - return result.value - } -} diff --git a/packages/mdx/lib/plugin/rehype-recma.js b/packages/mdx/lib/plugin/rehype-recma.js deleted file mode 100644 index e52a40284..000000000 --- a/packages/mdx/lib/plugin/rehype-recma.js +++ /dev/null @@ -1,28 +0,0 @@ -/** - * @import {Program} from 'estree-jsx' - * @import {Root} from 'hast' - * @import {ProcessorOptions} from '../core.js' - */ - -import {toEstree} from 'hast-util-to-estree' - -/** - * A plugin to transform an HTML (hast) tree to a JS (estree). - * `hast-util-to-estree` does all the work for us! - * - * @param {Readonly} options - * Configuration (optional). - * @returns - * Transform. - */ -export function rehypeRecma(options) { - /** - * @param {Root} tree - * Tree (hast). - * @returns {Program} - * Program (esast). - */ - return function (tree) { - return toEstree(tree, options) - } -} diff --git a/packages/mdx/package.json b/packages/mdx/package.json index 7153cf7b3..94ee43839 100644 --- a/packages/mdx/package.json +++ b/packages/mdx/package.json @@ -49,14 +49,15 @@ "@types/mdx": "^2.0.0", "collapse-white-space": "^2.0.0", "devlop": "^1.0.0", - "estree-util-build-jsx": "^3.0.0", "estree-util-is-identifier-name": "^3.0.0", "estree-util-scope": "^1.0.0", - "estree-util-to-js": "^2.0.0", "estree-walker": "^3.0.0", - "hast-util-to-estree": "^3.0.0", "hast-util-to-jsx-runtime": "^2.0.0", "markdown-extensions": "^2.0.0", + "recma-build-jsx": "^1.0.0", + "recma-jsx": "^1.0.0", + "recma-stringify": "^1.0.0", + "rehype-recma": "^1.0.0", "remark-mdx": "^3.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.0.0", diff --git a/packages/mdx/readme.md b/packages/mdx/readme.md index 1c5e27c59..a9a6d085f 100644 --- a/packages/mdx/readme.md +++ b/packages/mdx/readme.md @@ -1134,7 +1134,7 @@ probably. Then we go to JavaScript: [esast][] (JS; an AST which is compatible with estree but looks a bit more like other unist ASTs). This transformation is done by -[`syntax-tree/hast-util-to-estree`][hast-util-to-estree]. +[`rehype-recma`][rehype-recma]. This is a new ecosystem that does not have utilities or plugins yet. But it’s where `@mdx-js/mdx` does its thing: where it adds imports/exports, where it compiles JSX away into `_jsx()` calls, and where it does the other cool @@ -1239,7 +1239,7 @@ abide by its terms. [hast]: https://github.com/syntax-tree/hast -[hast-util-to-estree]: https://github.com/syntax-tree/hast-util-to-estree +[rehype-recma]: https://github.com/mdx-js/recma/tree/main/packages/rehype-recma [rehype-highlight]: https://github.com/rehypejs/rehype-highlight diff --git a/packages/mdx/test/compile.js b/packages/mdx/test/compile.js index 3a54dec4e..ef2ae7003 100644 --- a/packages/mdx/test/compile.js +++ b/packages/mdx/test/compile.js @@ -1067,7 +1067,7 @@ test('@mdx-js/mdx: compile', async function (t) { const exception = /** @type {Error} */ (error) const match = /at Component \(([^)]+)\)/.exec(String(exception.stack)) const actual = match?.[1].split(/\\|\//g).join('/') || '' - return (base.pathname + 'unknown.mdx:2:3').endsWith(actual) + return (base.pathname + 'unknown.js:2:3').endsWith(actual) } )