diff --git a/.vscode/launch.json b/.vscode/launch.json index 4f3e1d7..8923fc8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -13,8 +13,10 @@ "/**", "off/node_modules/**" ], - "program": "${workspaceRoot}/node_modules/vitest/vitest.mjs", + "program": "${workspaceRoot}/vite-test/node_modules/vitest/vitest.mjs", "args": [ + "-r", + "${relativeFileDirname}", "run", "${relativeFile}" ], diff --git a/docs/pnpm-lock.yaml b/docs/pnpm-lock.yaml index dd0acb3..715327f 100644 --- a/docs/pnpm-lock.yaml +++ b/docs/pnpm-lock.yaml @@ -155,16 +155,16 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/parser@7.23.9: - resolution: {integrity: sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==} + /@babel/parser@7.24.0: + resolution: {integrity: sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.23.9 + '@babel/types': 7.24.0 dev: true - /@babel/types@7.23.9: - resolution: {integrity: sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==} + /@babel/types@7.24.0: + resolution: {integrity: sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.23.4 @@ -563,7 +563,7 @@ packages: resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} dev: true - /@vitejs/plugin-vue@5.0.4(vite@5.1.4)(vue@3.4.20): + /@vitejs/plugin-vue@5.0.4(vite@5.1.4)(vue@3.4.21): resolution: {integrity: sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: @@ -571,56 +571,56 @@ packages: vue: ^3.2.25 dependencies: vite: 5.1.4 - vue: 3.4.20 + vue: 3.4.21 dev: true - /@vue/compiler-core@3.4.20: - resolution: {integrity: sha512-l7M+xUuL8hrGtRLkrf+62d9zucAdgqNBTbJ/NufCOIuJQhauhfyAKH9ra/qUctCXcULwmclGAVpvmxjbBO30qg==} + /@vue/compiler-core@3.4.21: + resolution: {integrity: sha512-MjXawxZf2SbZszLPYxaFCjxfibYrzr3eYbKxwpLR9EQN+oaziSu3qKVbwBERj1IFIB8OLUewxB5m/BFzi613og==} dependencies: - '@babel/parser': 7.23.9 - '@vue/shared': 3.4.20 + '@babel/parser': 7.24.0 + '@vue/shared': 3.4.21 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.0.2 dev: true - /@vue/compiler-dom@3.4.20: - resolution: {integrity: sha512-/cSBGL79HFBYgDnqCNKErOav3bPde3n0sJwJM2Z09rXlkiowV/2SG1tgDAiWS1CatS4Cvo0o74e1vNeCK1R3RA==} + /@vue/compiler-dom@3.4.21: + resolution: {integrity: sha512-IZC6FKowtT1sl0CR5DpXSiEB5ayw75oT2bma1BEhV7RRR1+cfwLrxc2Z8Zq/RGFzJ8w5r9QtCOvTjQgdn0IKmA==} dependencies: - '@vue/compiler-core': 3.4.20 - '@vue/shared': 3.4.20 + '@vue/compiler-core': 3.4.21 + '@vue/shared': 3.4.21 dev: true - /@vue/compiler-sfc@3.4.20: - resolution: {integrity: sha512-nPuTZz0yxTPzjyYe+9nQQsFYImcz/57UX8N3jyhl5oIUUs2jqqAMaULsAlJwve3qNYfjQzq0bwy3pqJrN9ecZw==} + /@vue/compiler-sfc@3.4.21: + resolution: {integrity: sha512-me7epoTxYlY+2CUM7hy9PCDdpMPfIwrOvAXud2Upk10g4YLv9UBW7kL798TvMeDhPthkZ0CONNrK2GoeI1ODiQ==} dependencies: - '@babel/parser': 7.23.9 - '@vue/compiler-core': 3.4.20 - '@vue/compiler-dom': 3.4.20 - '@vue/compiler-ssr': 3.4.20 - '@vue/shared': 3.4.20 + '@babel/parser': 7.24.0 + '@vue/compiler-core': 3.4.21 + '@vue/compiler-dom': 3.4.21 + '@vue/compiler-ssr': 3.4.21 + '@vue/shared': 3.4.21 estree-walker: 2.0.2 magic-string: 0.30.7 postcss: 8.4.35 source-map-js: 1.0.2 dev: true - /@vue/compiler-ssr@3.4.20: - resolution: {integrity: sha512-b3gFQPiHLvI12C56otzBPpQhZ5kgkJ5RMv/zpLjLC2BIFwX5GktDqYQ7xg0Q2grP6uFI8al3beVKvAVxFtXmIg==} + /@vue/compiler-ssr@3.4.21: + resolution: {integrity: sha512-M5+9nI2lPpAsgXOGQobnIueVqc9sisBFexh5yMIMRAPYLa7+5wEJs8iqOZc1WAa9WQbx9GR2twgznU8LTIiZ4Q==} dependencies: - '@vue/compiler-dom': 3.4.20 - '@vue/shared': 3.4.20 + '@vue/compiler-dom': 3.4.21 + '@vue/shared': 3.4.21 dev: true - /@vue/devtools-api@7.0.15(vue@3.4.20): + /@vue/devtools-api@7.0.15(vue@3.4.21): resolution: {integrity: sha512-kgEYWosDyWpS1vFSuJNNWUnHkP+VkL3Y+9mw+rf7ex41SwbYL/WdC3KXqAtjiSrEs7r/FrHmUTh0BkINJPFkbA==} dependencies: - '@vue/devtools-kit': 7.0.15(vue@3.4.20) + '@vue/devtools-kit': 7.0.15(vue@3.4.21) transitivePeerDependencies: - vue dev: true - /@vue/devtools-kit@7.0.15(vue@3.4.20): + /@vue/devtools-kit@7.0.15(vue@3.4.21): resolution: {integrity: sha512-dT7OeCe1LUCIhHIb/yRR6Hn+XHh73r1o78onqCrxEKHdoZwBItiIeVnmJZPEUDFstIxfs+tJL231mySk3laTow==} peerDependencies: vue: ^3.0.0 @@ -630,7 +630,7 @@ packages: mitt: 3.0.1 perfect-debounce: 1.0.0 speakingurl: 14.0.1 - vue: 3.4.20 + vue: 3.4.21 dev: true /@vue/devtools-shared@7.0.15: @@ -639,55 +639,55 @@ packages: rfdc: 1.3.1 dev: true - /@vue/reactivity@3.4.20: - resolution: {integrity: sha512-P5LJcxUkG6inlHr6MHVA4AVFAmRYJQ7ONGWJILNjMjoYuEXFhYviSCb9BEMyszSG/1kWCZbtWQlKSLasFRpThw==} + /@vue/reactivity@3.4.21: + resolution: {integrity: sha512-UhenImdc0L0/4ahGCyEzc/pZNwVgcglGy9HVzJ1Bq2Mm9qXOpP8RyNTjookw/gOCUlXSEtuZ2fUg5nrHcoqJcw==} dependencies: - '@vue/shared': 3.4.20 + '@vue/shared': 3.4.21 dev: true - /@vue/runtime-core@3.4.20: - resolution: {integrity: sha512-MPvsQpGAxoBqLHjqopt4YPtUYBpq0K6oAWDTwIR1CTNZ3y9O/J2ZVh+i2JpxKNYwANJBiZ20O99NE20uisB7xw==} + /@vue/runtime-core@3.4.21: + resolution: {integrity: sha512-pQthsuYzE1XcGZznTKn73G0s14eCJcjaLvp3/DKeYWoFacD9glJoqlNBxt3W2c5S40t6CCcpPf+jG01N3ULyrA==} dependencies: - '@vue/reactivity': 3.4.20 - '@vue/shared': 3.4.20 + '@vue/reactivity': 3.4.21 + '@vue/shared': 3.4.21 dev: true - /@vue/runtime-dom@3.4.20: - resolution: {integrity: sha512-OkbPVP69H+8m74543zMAAx/LIkajxufYyow41gc0s5iF0uplT5uTQ4llDYu1GeJZEI8wjL5ueiPQruk4qwOMmA==} + /@vue/runtime-dom@3.4.21: + resolution: {integrity: sha512-gvf+C9cFpevsQxbkRBS1NpU8CqxKw0ebqMvLwcGQrNpx6gqRDodqKqA+A2VZZpQ9RpK2f9yfg8VbW/EpdFUOJw==} dependencies: - '@vue/runtime-core': 3.4.20 - '@vue/shared': 3.4.20 + '@vue/runtime-core': 3.4.21 + '@vue/shared': 3.4.21 csstype: 3.1.3 dev: true - /@vue/server-renderer@3.4.20(vue@3.4.20): - resolution: {integrity: sha512-w3VH2GuwxQHA6pJo/HCV22OfVC8Mw4oeHQM+vKeqtRK0OPE1Wilnh+P/SDVGGxPjJsGmyfphi0dbw8UKZQJH9w==} + /@vue/server-renderer@3.4.21(vue@3.4.21): + resolution: {integrity: sha512-aV1gXyKSN6Rz+6kZ6kr5+Ll14YzmIbeuWe7ryJl5muJ4uwSwY/aStXTixx76TwkZFJLm1aAlA/HSWEJ4EyiMkg==} peerDependencies: - vue: 3.4.20 + vue: 3.4.21 dependencies: - '@vue/compiler-ssr': 3.4.20 - '@vue/shared': 3.4.20 - vue: 3.4.20 + '@vue/compiler-ssr': 3.4.21 + '@vue/shared': 3.4.21 + vue: 3.4.21 dev: true - /@vue/shared@3.4.20: - resolution: {integrity: sha512-KTEngal0aiUvNJ6I1Chk5Ew5XqChsFsxP4GKAYXWb99zKJWjNU72p2FWEOmZWHxHcqtniOJsgnpd3zizdpfEag==} + /@vue/shared@3.4.21: + resolution: {integrity: sha512-PuJe7vDIi6VYSinuEbUIQgMIRZGgM8e4R+G+/dQTk0X1NEdvgvvgv7m+rfmDH1gZzyA1OjjoWskvHlfRNfQf3g==} dev: true - /@vueuse/core@10.8.0(vue@3.4.20): - resolution: {integrity: sha512-G9Ok9fjx10TkNIPn8V1dJmK1NcdJCtYmDRyYiTMUyJ1p0Tywc1zmOoCQ2xhHYyz8ULBU4KjIJQ9n+Lrty74iVw==} + /@vueuse/core@10.9.0(vue@3.4.21): + resolution: {integrity: sha512-/1vjTol8SXnx6xewDEKfS0Ra//ncg4Hb0DaZiwKf7drgfMsKFExQ+FnnENcN6efPen+1kIzhLQoGSy0eDUVOMg==} dependencies: '@types/web-bluetooth': 0.0.20 - '@vueuse/metadata': 10.8.0 - '@vueuse/shared': 10.8.0(vue@3.4.20) - vue-demi: 0.14.7(vue@3.4.20) + '@vueuse/metadata': 10.9.0 + '@vueuse/shared': 10.9.0(vue@3.4.21) + vue-demi: 0.14.7(vue@3.4.21) transitivePeerDependencies: - '@vue/composition-api' - vue dev: true - /@vueuse/integrations@10.8.0(focus-trap@7.5.4)(vue@3.4.20): - resolution: {integrity: sha512-sw3P/7cXOfNLQfERp7P0IJ2ODjLE2C3BGXpBQJQkS309c1jbJak9yu4EnY70WaZjkj53aeWSFU6BbHrUxXJ7SA==} + /@vueuse/integrations@10.9.0(focus-trap@7.5.4)(vue@3.4.21): + resolution: {integrity: sha512-acK+A01AYdWSvL4BZmCoJAcyHJ6EqhmkQEXbQLwev1MY7NBnS+hcEMx/BzVoR9zKI+UqEPMD9u6PsyAuiTRT4Q==} peerDependencies: async-validator: '*' axios: '*' @@ -727,23 +727,23 @@ packages: universal-cookie: optional: true dependencies: - '@vueuse/core': 10.8.0(vue@3.4.20) - '@vueuse/shared': 10.8.0(vue@3.4.20) + '@vueuse/core': 10.9.0(vue@3.4.21) + '@vueuse/shared': 10.9.0(vue@3.4.21) focus-trap: 7.5.4 - vue-demi: 0.14.7(vue@3.4.20) + vue-demi: 0.14.7(vue@3.4.21) transitivePeerDependencies: - '@vue/composition-api' - vue dev: true - /@vueuse/metadata@10.8.0: - resolution: {integrity: sha512-Nim/Vle5OgXcXhAvGOgkJQXB1Yb+Kq/fMbLuv3YYDYbiQrwr39ljuD4k9fPeq4yUyokYRo2RaNQmbbIMWB/9+w==} + /@vueuse/metadata@10.9.0: + resolution: {integrity: sha512-iddNbg3yZM0X7qFY2sAotomgdHK7YJ6sKUvQqbvwnf7TmaVPxS4EJydcNsVejNdS8iWCtDk+fYXr7E32nyTnGA==} dev: true - /@vueuse/shared@10.8.0(vue@3.4.20): - resolution: {integrity: sha512-dUdy6zwHhULGxmr9YUg8e+EnB39gcM4Fe2oKBSrh3cOsV30JcMPtsyuspgFCUo5xxFNaeMf/W2yyKfST7Bg8oQ==} + /@vueuse/shared@10.9.0(vue@3.4.21): + resolution: {integrity: sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==} dependencies: - vue-demi: 0.14.7(vue@3.4.20) + vue-demi: 0.14.7(vue@3.4.21) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -984,16 +984,16 @@ packages: '@shikijs/core': 1.1.7 '@shikijs/transformers': 1.1.7 '@types/markdown-it': 13.0.7 - '@vitejs/plugin-vue': 5.0.4(vite@5.1.4)(vue@3.4.20) - '@vue/devtools-api': 7.0.15(vue@3.4.20) - '@vueuse/core': 10.8.0(vue@3.4.20) - '@vueuse/integrations': 10.8.0(focus-trap@7.5.4)(vue@3.4.20) + '@vitejs/plugin-vue': 5.0.4(vite@5.1.4)(vue@3.4.21) + '@vue/devtools-api': 7.0.15(vue@3.4.21) + '@vueuse/core': 10.9.0(vue@3.4.21) + '@vueuse/integrations': 10.9.0(focus-trap@7.5.4)(vue@3.4.21) focus-trap: 7.5.4 mark.js: 8.11.1 minisearch: 6.3.0 shiki: 1.1.7 vite: 5.1.4 - vue: 3.4.20 + vue: 3.4.21 transitivePeerDependencies: - '@algolia/client-search' - '@types/node' @@ -1022,7 +1022,7 @@ packages: - universal-cookie dev: true - /vue-demi@0.14.7(vue@3.4.20): + /vue-demi@0.14.7(vue@3.4.21): resolution: {integrity: sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==} engines: {node: '>=12'} hasBin: true @@ -1034,20 +1034,20 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.4.20 + vue: 3.4.21 dev: true - /vue@3.4.20: - resolution: {integrity: sha512-xF4zDKXp67NjgORFX/HOuaiaKYjgxkaToK0KWglFQEYlCw9AqgBlj1yu5xa6YaRek47w2IGiuvpvrGg/XuQFCw==} + /vue@3.4.21: + resolution: {integrity: sha512-5hjyV/jLEIKD/jYl4cavMcnzKwjMKohureP8ejn3hhEjwhWIhWeuzL2kJAjzl/WyVsgPY56Sy4Z40C3lVshxXA==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@vue/compiler-dom': 3.4.20 - '@vue/compiler-sfc': 3.4.20 - '@vue/runtime-dom': 3.4.20 - '@vue/server-renderer': 3.4.20(vue@3.4.20) - '@vue/shared': 3.4.20 + '@vue/compiler-dom': 3.4.21 + '@vue/compiler-sfc': 3.4.21 + '@vue/runtime-dom': 3.4.21 + '@vue/server-renderer': 3.4.21(vue@3.4.21) + '@vue/shared': 3.4.21 dev: true diff --git a/packages/runtime/pnpm-lock.yaml b/packages/runtime/pnpm-lock.yaml index 50a06b4..85d6868 100644 --- a/packages/runtime/pnpm-lock.yaml +++ b/packages/runtime/pnpm-lock.yaml @@ -51,8 +51,8 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/runtime@7.23.9: - resolution: {integrity: sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==} + /@babel/runtime@7.24.0: + resolution: {integrity: sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.1 @@ -414,7 +414,7 @@ packages: engines: {node: '>=14'} dependencies: '@babel/code-frame': 7.23.5 - '@babel/runtime': 7.23.9 + '@babel/runtime': 7.24.0 '@types/aria-query': 5.0.4 aria-query: 5.1.3 chalk: 4.1.2 @@ -698,7 +698,7 @@ packages: is-regex: 1.1.4 is-shared-array-buffer: 1.0.3 isarray: 2.0.5 - object-is: 1.1.5 + object-is: 1.1.6 object-keys: 1.1.1 object.assign: 4.1.5 regexp.prototype.flags: 1.5.2 @@ -1267,8 +1267,8 @@ packages: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} dev: true - /object-is@1.1.5: - resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} + /object-is@1.1.6: + resolution: {integrity: sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.7 diff --git a/sandbox/package.json b/sandbox/package.json index c06f977..77a1ac2 100644 --- a/sandbox/package.json +++ b/sandbox/package.json @@ -16,7 +16,7 @@ "dependencies": { "azoth": "workspace:^", "jsonic": "workspace:^", - "npm": "^10.4.0", + "npm": "^10.5.0", "page": "^1.11.6" }, "devDependencies": { diff --git a/sandbox/pnpm-lock.yaml b/sandbox/pnpm-lock.yaml index 7827889..4b7fd51 100644 --- a/sandbox/pnpm-lock.yaml +++ b/sandbox/pnpm-lock.yaml @@ -4,52 +4,30 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -importers: - - .: - dependencies: - azoth: - specifier: workspace:^ - version: link:../packages/azoth - jsonic: - specifier: workspace:^ - version: link:../packages/jsonic - npm: - specifier: ^10.4.0 - version: 10.4.0 - page: - specifier: ^1.11.6 - version: 1.11.6 - devDependencies: - vite: - specifier: ^5.1.4 - version: 5.1.4 - vite-plugin-inspect: - specifier: ^0.8.3 - version: 0.8.3(vite@5.1.4) - vitest: - specifier: ^1.3.1 - version: 1.3.1 - - ..: {} - - ../docs: {} - - ../packages/azoth: {} - - ../packages/channels: {} - - ../packages/compiler: {} - - ../packages/jsonic: {} - - ../packages/runtime: {} - - ../packages/vite-plugin: {} - - ../test-utils: {} - - ../vite-test: {} +dependencies: + azoth: + specifier: workspace:^ + version: link:../packages/azoth + jsonic: + specifier: workspace:^ + version: link:../packages/jsonic + npm: + specifier: ^10.5.0 + version: 10.5.0 + page: + specifier: ^1.11.6 + version: 1.11.6 + +devDependencies: + vite: + specifier: ^5.1.4 + version: 5.1.4 + vite-plugin-inspect: + specifier: ^0.8.3 + version: 0.8.3(vite@5.1.4) + vitest: + specifier: ^1.3.1 + version: 1.3.1 packages: @@ -752,8 +730,8 @@ packages: path-key: 4.0.0 dev: true - /npm@10.4.0: - resolution: {integrity: sha512-RS7Mx0OVfXlOcQLRePuDIYdFCVBPCNapWHplDK+mh7GDdP/Tvor4ocuybRRPSvfcRb2vjRJt1fHCqw3cr8qACQ==} + /npm@10.5.0: + resolution: {integrity: sha512-Ejxwvfh9YnWVU2yA5FzoYLTW52vxHCz+MHrOFg9Cc8IFgF/6f5AGPAvb5WTay5DIUP1NIfN3VBZ0cLlGO0Ys+A==} engines: {node: ^18.17.0 || >=20.5.0} hasBin: true dev: false diff --git a/vite-test/expected-out/index-ChYuNxMM.js b/vite-test/expected-out/index-BEqarAL3.js similarity index 95% rename from vite-test/expected-out/index-ChYuNxMM.js rename to vite-test/expected-out/index-BEqarAL3.js index 636b051..80b4354 100644 --- a/vite-test/expected-out/index-ChYuNxMM.js +++ b/vite-test/expected-out/index-BEqarAL3.js @@ -188,39 +188,39 @@ async function fetchEmojis() { return emojis; } -const List = fetchEmojis().then((emojis) => EmojiList({ +const List = fetchEmojis().then(emojis => EmojiList({ emojis })); const App = (() => { const [__root, __targets] = t14720b3874(true); - const __target0 = __targets[0]; + const __target0 =__targets[0]; const __child0 = __target0.childNodes[3]; compose(__child0, List); return __root; })(); document.body.append(App); -function EmojiList({ emojis }) { +function EmojiList({emojis}) { const __root = ta51edaabfe()[0]; const __child0 = __root.childNodes[1]; compose(__child0, emojis.map(Emoji)); return __root; } -function Emoji({ name, unicode, htmlCode }) { +function Emoji({name, unicode, htmlCode}) { const __root = t880311674b()[0]; const __child0 = __root.childNodes[1]; const __child1 = __root.childNodes[3]; const __child2 = __root.childNodes[5]; compose(__child0, InnerHtml({ - html: htmlCode.join("") + html: htmlCode.join('') })); compose(__child1, name); compose(__child2, unicode); return __root; } -function InnerHtml({ html, className = "" }) { +function InnerHtml({html, className = ''}) { const rawEmoji = (() => { const __root = tdfc9870d38()[0]; - __root.className = className ?? ""; + __root.className = (className ?? ''); return __root; })(); rawEmoji.firstChild.innerHTML = html; diff --git a/vite-test/expected-out/index.html b/vite-test/expected-out/index.html index fa2403f..9e03a75 100644 --- a/vite-test/expected-out/index.html +++ b/vite-test/expected-out/index.html @@ -6,7 +6,7 @@ vite-plugin-azoth - + diff --git a/vite-test/out/index-ChYuNxMM.js b/vite-test/out/index-BEqarAL3.js similarity index 95% rename from vite-test/out/index-ChYuNxMM.js rename to vite-test/out/index-BEqarAL3.js index 636b051..80b4354 100644 --- a/vite-test/out/index-ChYuNxMM.js +++ b/vite-test/out/index-BEqarAL3.js @@ -188,39 +188,39 @@ async function fetchEmojis() { return emojis; } -const List = fetchEmojis().then((emojis) => EmojiList({ +const List = fetchEmojis().then(emojis => EmojiList({ emojis })); const App = (() => { const [__root, __targets] = t14720b3874(true); - const __target0 = __targets[0]; + const __target0 =__targets[0]; const __child0 = __target0.childNodes[3]; compose(__child0, List); return __root; })(); document.body.append(App); -function EmojiList({ emojis }) { +function EmojiList({emojis}) { const __root = ta51edaabfe()[0]; const __child0 = __root.childNodes[1]; compose(__child0, emojis.map(Emoji)); return __root; } -function Emoji({ name, unicode, htmlCode }) { +function Emoji({name, unicode, htmlCode}) { const __root = t880311674b()[0]; const __child0 = __root.childNodes[1]; const __child1 = __root.childNodes[3]; const __child2 = __root.childNodes[5]; compose(__child0, InnerHtml({ - html: htmlCode.join("") + html: htmlCode.join('') })); compose(__child1, name); compose(__child2, unicode); return __root; } -function InnerHtml({ html, className = "" }) { +function InnerHtml({html, className = ''}) { const rawEmoji = (() => { const __root = tdfc9870d38()[0]; - __root.className = className ?? ""; + __root.className = (className ?? ''); return __root; })(); rawEmoji.firstChild.innerHTML = html; diff --git a/vite-test/out/index.html b/vite-test/out/index.html index fa2403f..9e03a75 100644 --- a/vite-test/out/index.html +++ b/vite-test/out/index.html @@ -6,7 +6,7 @@ vite-plugin-azoth - + diff --git a/vite-test/package.json b/vite-test/package.json index 2d2fd24..97f191c 100644 --- a/vite-test/package.json +++ b/vite-test/package.json @@ -21,9 +21,9 @@ }, "type": "module", "scripts": { - "test:onhold": "pnpm run test:build && vitest -w false ", - "test:build": "vite build -c ./test/vite.config.js", - "test:update": "rm -rf ./test/expected-out && cp -R ./test/out ./test/expected-out", + "test": "pnpm run test:build && vitest -w false ", + "test:build": "vite build", + "test:update": "rm -rf ./expected-out && cp -R ./out ./expected-out", "build": "vite build" }, "files": [ @@ -38,16 +38,10 @@ } }, "devDependencies": { - "@azoth-web/runtime": "workspace:*", "vite": "^5.1.4", "vitest": "^1.3.1" }, - "peerDependencies": { - "vite": "^5.0.12" - }, "dependencies": { - "@azoth-web/compiler": "workspace:*", - "@rollup/pluginutils": "^5.1.0", - "source-map": "^0.7.4" + "azoth": "workspace:*" } } \ No newline at end of file diff --git a/vite-test/plugin.test.js b/vite-test/plugin.test.js index f74b944..b7ecf14 100644 --- a/vite-test/plugin.test.js +++ b/vite-test/plugin.test.js @@ -12,8 +12,8 @@ test('plugin output produces same snapshot', async ({ expect }) => { // it programmatically. Likely need to work out directory permission. // When that's done, switch to dir-compare - const expectedJS = resolve(__dirname, './expected-out/index-ChYuNxMM.js'); - const actualJS = await readFile(resolve(__dirname, './out/index-ChYuNxMM.js'), 'utf8'); + const expectedJS = resolve(__dirname, './expected-out/index-BEqarAL3.js'); + const actualJS = await readFile(resolve(__dirname, './out/index-BEqarAL3.js'), 'utf8'); expect(actualJS).toMatchFileSnapshot(expectedJS); const expectedCSS = resolve(__dirname, './expected-out/index-DDapMaSx.css'); diff --git a/vite-test/pnpm-lock.yaml b/vite-test/pnpm-lock.yaml index f468e7b..8552968 100644 --- a/vite-test/pnpm-lock.yaml +++ b/vite-test/pnpm-lock.yaml @@ -5,20 +5,11 @@ settings: excludeLinksFromLockfile: false dependencies: - '@azoth-web/compiler': + azoth: specifier: workspace:* - version: link:../packages/compiler - '@rollup/pluginutils': - specifier: ^5.1.0 - version: 5.1.0 - source-map: - specifier: ^0.7.4 - version: 0.7.4 + version: link:../packages/azoth devDependencies: - '@azoth-web/runtime': - specifier: workspace:* - version: link:../packages/runtime vite: specifier: ^5.1.4 version: 5.1.4 @@ -246,20 +237,6 @@ packages: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true - /@rollup/pluginutils@5.1.0: - resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - dependencies: - '@types/estree': 1.0.5 - estree-walker: 2.0.2 - picomatch: 2.3.1 - dev: false - /@rollup/rollup-android-arm-eabi@4.12.0: resolution: {integrity: sha512-+ac02NL/2TCKRrJu2wffk1kZ+RyqxVUlbjSagNgPm94frxtr+XDL12E5Ll1enWskLrtrZ2r8L3wED1orIibV/w==} cpu: [arm] @@ -370,6 +347,7 @@ packages: /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + dev: true /@vitest/expect@1.3.1: resolution: {integrity: sha512-xofQFwIzfdmLLlHa6ag0dPV8YsnKOCP1KdAeVVh34vSjN2dcUiXYCD9htu/9eM7t8Xln4v03U9HLxLpPlsXdZw==} @@ -518,10 +496,6 @@ packages: '@esbuild/win32-x64': 0.19.12 dev: true - /estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - dev: false - /estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} dependencies: @@ -674,11 +648,6 @@ packages: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} dev: true - /picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} - engines: {node: '>=8.6'} - dev: false - /pkg-types@1.0.3: resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} dependencies: @@ -758,11 +727,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /source-map@0.7.4: - resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} - engines: {node: '>= 8'} - dev: false - /stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} dev: true diff --git a/vite-test/vite.config.js b/vite-test/vite.config.js index 0b14957..fc44053 100644 --- a/vite-test/vite.config.js +++ b/vite-test/vite.config.js @@ -1,11 +1,13 @@ import { defineConfig } from 'vite'; -import azothPlugin from '../index.js'; +import azothPlugin from 'azoth/vite-plugin'; export default defineConfig({ - root: './test', plugins: [ azothPlugin(), ], + esbuild: { + exclude: '**/*.jsx', + }, build: { target: 'esnext', minify: false, diff --git a/vite.config.js b/vite.config.js index 66e6caa..09f1e8e 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,18 +1,19 @@ import { defineConfig } from 'vite'; import inspect from 'vite-plugin-inspect'; +import azothPlugin from './packages/vite-plugin/index.js' export default defineConfig({ test: { // includeSource: ['src/**/*.{js,ts}'], // update: true, - // timeout: 30_000, + timeout: 30_000, environment: 'happy-dom', - browser: { - headless: false, - }, }, plugins: [ + azothPlugin(), inspect() ], + esbuild: { + exclude: '**/*.jsx', + } }); -