From d86ab610f11d5cda5d273f32a6f2b4845c8cf9a0 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Fri, 19 Jul 2024 12:42:20 -0700 Subject: [PATCH 1/4] drastically improve asset resolution performance --- .changeset/modern-lizards-wink.md | 5 + examples/bare/package.json | 2 +- examples/basic/package.json | 2 +- examples/experiments/package.json | 2 +- examples/hackernews/package.json | 2 +- examples/notes/package.json | 2 +- examples/todomvc/package.json | 2 +- examples/with-auth/package.json | 2 +- examples/with-authjs/package.json | 2 +- examples/with-drizzle/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-prisma/package.json | 2 +- examples/with-solid-styled/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-trpc/package.json | 2 +- examples/with-unocss/package.json | 2 +- examples/with-vitest/package.json | 2 +- package.json | 2 +- packages/start/package.json | 2 +- pnpm-lock.yaml | 142 ++++++++++++------------ 20 files changed, 94 insertions(+), 89 deletions(-) create mode 100644 .changeset/modern-lizards-wink.md diff --git a/.changeset/modern-lizards-wink.md b/.changeset/modern-lizards-wink.md new file mode 100644 index 000000000..3a17e9502 --- /dev/null +++ b/.changeset/modern-lizards-wink.md @@ -0,0 +1,5 @@ +--- +"@solidjs/start": patch +--- + +drastically improve asset resolution performance diff --git a/examples/bare/package.json b/examples/bare/package.json index eeaf36519..81d226b5e 100644 --- a/examples/bare/package.json +++ b/examples/bare/package.json @@ -9,7 +9,7 @@ "dependencies": { "@solidjs/start": "^1.0.5", "solid-js": "^1.8.18", - "vinxi": "^0.4.0" + "vinxi": "^0.4.1" }, "engines": { "node": ">=18" diff --git a/examples/basic/package.json b/examples/basic/package.json index 2015ee8ad..f9d84ad4c 100644 --- a/examples/basic/package.json +++ b/examples/basic/package.json @@ -12,7 +12,7 @@ "@solidjs/router": "^0.14.1", "@solidjs/start": "^1.0.5", "solid-js": "^1.8.18", - "vinxi": "^0.4.0" + "vinxi": "^0.4.1" }, "engines": { "node": ">=18" diff --git a/examples/experiments/package.json b/examples/experiments/package.json index 5455d4130..0440acf41 100644 --- a/examples/experiments/package.json +++ b/examples/experiments/package.json @@ -11,7 +11,7 @@ "@solidjs/router": "^0.14.1", "@solidjs/start": "^1.0.5", "solid-js": "^1.8.18", - "vinxi": "^0.4.0" + "vinxi": "^0.4.1" }, "engines": { "node": ">=18" diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 6ab099e12..679e0182a 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -10,7 +10,7 @@ "@solidjs/router": "^0.14.1", "@solidjs/start": "^1.0.5", "solid-js": "^1.8.18", - "vinxi": "^0.4.0" + "vinxi": "^0.4.1" }, "engines": { "node": ">=18" diff --git a/examples/notes/package.json b/examples/notes/package.json index c8d3b7cad..f8b30ff12 100644 --- a/examples/notes/package.json +++ b/examples/notes/package.json @@ -13,7 +13,7 @@ "solid-js": "^1.8.18", "marked": "^12.0.1", "unstorage": "1.10.2", - "vinxi": "^0.4.0" + "vinxi": "^0.4.1" }, "engines": { "node": ">=18" diff --git a/examples/todomvc/package.json b/examples/todomvc/package.json index f5c6de19b..d6602317f 100644 --- a/examples/todomvc/package.json +++ b/examples/todomvc/package.json @@ -11,7 +11,7 @@ "@solidjs/start": "^1.0.5", "solid-js": "^1.8.18", "unstorage": "1.10.2", - "vinxi": "^0.4.0" + "vinxi": "^0.4.1" }, "engines": { "node": ">=18" diff --git a/examples/with-auth/package.json b/examples/with-auth/package.json index acd6559ec..5dc38b64f 100644 --- a/examples/with-auth/package.json +++ b/examples/with-auth/package.json @@ -14,7 +14,7 @@ "@solidjs/start": "^1.0.5", "solid-js": "^1.8.18", "unstorage": "1.10.2", - "vinxi": "^0.4.0" + "vinxi": "^0.4.1" }, "engines": { "node": ">=18" diff --git a/examples/with-authjs/package.json b/examples/with-authjs/package.json index f852e73b6..db06912c6 100644 --- a/examples/with-authjs/package.json +++ b/examples/with-authjs/package.json @@ -22,7 +22,7 @@ "@solidjs/router": "^0.14.1", "@solidjs/start": "^1.0.5", "solid-js": "^1.8.18", - "vinxi": "^0.4.0" + "vinxi": "^0.4.1" }, "engines": { "node": ">=18" diff --git a/examples/with-drizzle/package.json b/examples/with-drizzle/package.json index 800bed2c2..fb49c3fd8 100644 --- a/examples/with-drizzle/package.json +++ b/examples/with-drizzle/package.json @@ -17,7 +17,7 @@ "better-sqlite3": "^11.0.0", "drizzle-orm": "^0.31.2", "solid-js": "^1.8.18", - "vinxi": "^0.4.0" + "vinxi": "^0.4.1" }, "engines": { "node": ">=20" diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index cb47cbbe8..295e2bf9a 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -12,7 +12,7 @@ "@solidjs/start": "^1.0.5", "@vinxi/plugin-mdx": "^3.7.1", "solid-js": "^1.8.18", - "vinxi": "^0.4.0", + "vinxi": "^0.4.1", "solid-mdx": "^0.0.7" }, "engines": { diff --git a/examples/with-prisma/package.json b/examples/with-prisma/package.json index 5ae717179..4d0ef48ac 100644 --- a/examples/with-prisma/package.json +++ b/examples/with-prisma/package.json @@ -15,7 +15,7 @@ "@solidjs/start": "^1.0.5", "prisma": "^5.12.1", "solid-js": "^1.8.18", - "vinxi": "^0.4.0" + "vinxi": "^0.4.1" }, "engines": { "node": ">=18" diff --git a/examples/with-solid-styled/package.json b/examples/with-solid-styled/package.json index 9585ead52..53f8be0e2 100644 --- a/examples/with-solid-styled/package.json +++ b/examples/with-solid-styled/package.json @@ -12,7 +12,7 @@ "@solidjs/start": "^1.0.5", "solid-js": "^1.8.18", "solid-styled": "^0.11.1", - "vinxi": "^0.4.0", + "vinxi": "^0.4.1", "vite-plugin-solid-styled": "^0.11.1" }, "engines": { diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 81b73e15c..18fce5927 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -13,7 +13,7 @@ "postcss": "^8.4.38", "solid-js": "^1.8.18", "tailwindcss": "^3.4.3", - "vinxi": "^0.4.0" + "vinxi": "^0.4.1" }, "engines": { "node": ">=18" diff --git a/examples/with-trpc/package.json b/examples/with-trpc/package.json index 9b5d43ea8..6ec70dc62 100644 --- a/examples/with-trpc/package.json +++ b/examples/with-trpc/package.json @@ -15,7 +15,7 @@ "@typeschema/valibot": "^0.13.4", "solid-js": "^1.8.18", "valibot": "^0.29.0", - "vinxi": "^0.4.0" + "vinxi": "^0.4.1" }, "engines": { "node": ">=18" diff --git a/examples/with-unocss/package.json b/examples/with-unocss/package.json index c305ab870..dd96ff947 100644 --- a/examples/with-unocss/package.json +++ b/examples/with-unocss/package.json @@ -12,7 +12,7 @@ "@unocss/reset": "^0.59.2", "solid-js": "^1.8.18", "unocss": "^0.59.2", - "vinxi": "^0.4.0" + "vinxi": "^0.4.1" }, "engines": { "node": ">=18" diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index b357374d3..a12d27bad 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -20,7 +20,7 @@ "jsdom": "^24.0.0", "solid-js": "^1.8.18", "typescript": "^5.4.5", - "vinxi": "^0.4.0", + "vinxi": "^0.4.1", "vite": "^5.2.8", "vite-plugin-solid": "^2.10.2", "vitest": "^1.5.0" diff --git a/package.json b/package.json index 3a37d1080..5a01c385a 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "turbo": "^1.10.7", "typescript": "5.3.3", "valibot": "~0.29.0", - "vinxi": "^0.4.0", + "vinxi": "^0.4.1", "vite": "^5.1.1" }, "dependencies": { diff --git a/packages/start/package.json b/packages/start/package.json index 726bc46c1..7fdcce6fc 100644 --- a/packages/start/package.json +++ b/packages/start/package.json @@ -60,7 +60,7 @@ }, "devDependencies": { "solid-js": "^1.8.18", - "vinxi": "^0.4.0", + "vinxi": "^0.4.1", "typescript": "^5.4.2" }, "dependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eeb57519d..783470f3d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -106,8 +106,8 @@ importers: specifier: ~0.29.0 version: 0.29.0 vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) vite: specifier: ^5.1.1 version: 5.2.11(@types/node@20.14.8) @@ -115,14 +115,14 @@ importers: examples/bare: dependencies: '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start solid-js: specifier: ^1.8.18 version: 1.8.18 vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) examples/basic: dependencies: @@ -133,14 +133,14 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start solid-js: specifier: ^1.8.18 version: 1.8.18 vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) examples/experiments: dependencies: @@ -151,14 +151,14 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start solid-js: specifier: ^1.8.18 version: 1.8.18 vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) examples/hackernews: dependencies: @@ -166,14 +166,14 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start solid-js: specifier: ^1.8.18 version: 1.8.18 vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) examples/notes: dependencies: @@ -181,7 +181,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start date-fns: specifier: ^3.6.0 @@ -196,8 +196,8 @@ importers: specifier: 1.10.2 version: 1.10.2(ioredis@5.4.1) vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) examples/todomvc: dependencies: @@ -205,7 +205,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start solid-js: specifier: ^1.8.18 @@ -214,8 +214,8 @@ importers: specifier: 1.10.2 version: 1.10.2(ioredis@5.4.1) vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) examples/with-auth: dependencies: @@ -223,7 +223,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start solid-js: specifier: ^1.8.18 @@ -232,8 +232,8 @@ importers: specifier: 1.10.2 version: 1.10.2(ioredis@5.4.1) vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.12.12)(debug@4.3.4) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.12.12)(debug@4.3.4) devDependencies: '@types/node': specifier: ^20.12.7 @@ -249,7 +249,7 @@ importers: version: 7.24.4 '@solid-mediakit/auth': specifier: ^2.0.11 - version: 2.0.11(@auth/core@0.29.0)(@solidjs/meta@0.29.4)(@solidjs/router@0.14.1)(@solidjs/start@packages+start)(solid-js@1.8.18)(vinxi@0.4.0) + version: 2.0.11(@auth/core@0.29.0)(@solidjs/meta@0.29.4)(@solidjs/router@0.14.1)(@solidjs/start@packages+start)(solid-js@1.8.18)(vinxi@0.4.1) '@solidjs/meta': specifier: ^0.29.4 version: 0.29.4(solid-js@1.8.18) @@ -257,14 +257,14 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start solid-js: specifier: ^1.8.18 version: 1.8.18 vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.12.12)(debug@4.3.4) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.12.12)(debug@4.3.4) devDependencies: '@types/node': specifier: ^20.12.7 @@ -303,8 +303,8 @@ importers: specifier: ^1.8.18 version: 1.8.18 vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) devDependencies: '@types/better-sqlite3': specifier: ^7.6.10 @@ -325,7 +325,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start '@vinxi/plugin-mdx': specifier: ^3.7.1 @@ -337,8 +337,8 @@ importers: specifier: ^0.0.7 version: 0.0.7(solid-js@1.8.18)(vite@5.2.11) vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) examples/with-prisma: dependencies: @@ -349,7 +349,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start prisma: specifier: ^5.12.1 @@ -358,8 +358,8 @@ importers: specifier: ^1.8.18 version: 1.8.18 vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.12.12)(debug@4.3.4) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.12.12)(debug@4.3.4) devDependencies: '@types/node': specifier: ^20.12.7 @@ -374,7 +374,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start solid-js: specifier: ^1.8.18 @@ -383,8 +383,8 @@ importers: specifier: ^0.11.1 version: 0.11.1(solid-js@1.8.18) vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) vite-plugin-solid-styled: specifier: ^0.11.1 version: 0.11.1(solid-styled@0.11.1)(vite@5.2.11) @@ -395,7 +395,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start autoprefixer: specifier: ^10.4.19 @@ -410,8 +410,8 @@ importers: specifier: ^3.4.3 version: 3.4.3 vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) examples/with-trpc: dependencies: @@ -422,7 +422,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start '@trpc/client': specifier: ^10.45.2 @@ -440,8 +440,8 @@ importers: specifier: ^0.29.0 version: 0.29.0 vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) examples/with-unocss: dependencies: @@ -449,7 +449,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start '@unocss/reset': specifier: ^0.59.2 @@ -461,8 +461,8 @@ importers: specifier: ^0.59.2 version: 0.59.4(postcss@8.4.38)(vite@5.2.11) vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) examples/with-vitest: devDependencies: @@ -473,7 +473,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.4 + specifier: ^1.0.5 version: link:../../packages/start '@solidjs/testing-library': specifier: ^0.8.7 @@ -497,8 +497,8 @@ importers: specifier: ^5.4.5 version: 5.4.5 vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) vite: specifier: ^5.2.8 version: 5.2.11(@types/node@20.14.8) @@ -567,13 +567,13 @@ importers: dependencies: '@vinxi/plugin-directives': specifier: ^0.4.1 - version: 0.4.1(vinxi@0.4.0) + version: 0.4.1(vinxi@0.4.1) '@vinxi/server-components': specifier: ^0.4.1 - version: 0.4.1(vinxi@0.4.0) + version: 0.4.1(vinxi@0.4.1) '@vinxi/server-functions': specifier: ^0.4.1 - version: 0.4.1(vinxi@0.4.0) + version: 0.4.1(vinxi@0.4.1) defu: specifier: ^6.1.2 version: 6.1.4 @@ -618,8 +618,8 @@ importers: specifier: ^5.4.2 version: 5.4.5 vinxi: - specifier: ^0.4.0 - version: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) + specifier: ^0.4.1 + version: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2) packages: @@ -3146,7 +3146,7 @@ packages: resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} engines: {node: '>=18'} - /@solid-mediakit/auth@2.0.11(@auth/core@0.29.0)(@solidjs/meta@0.29.4)(@solidjs/router@0.14.1)(@solidjs/start@packages+start)(solid-js@1.8.18)(vinxi@0.4.0): + /@solid-mediakit/auth@2.0.11(@auth/core@0.29.0)(@solidjs/meta@0.29.4)(@solidjs/router@0.14.1)(@solidjs/start@packages+start)(solid-js@1.8.18)(vinxi@0.4.1): resolution: {integrity: sha512-oo5BKqsWLbpK++R97mf9z5xc56zIO70hJQeOBRIsEVrZRa07GQEwzLJdmYZpbDzoHInjBtCjLAEp//PkY2LiJA==} engines: {node: '>=16'} peerDependencies: @@ -3165,7 +3165,7 @@ packages: cookie: 0.6.0 set-cookie-parser: 2.6.0 solid-js: 1.8.18 - vinxi: 0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.12.12)(debug@4.3.4) + vinxi: 0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.12.12)(debug@4.3.4) transitivePeerDependencies: - supports-color dev: false @@ -3837,7 +3837,7 @@ packages: transitivePeerDependencies: - uWebSockets.js - /@vinxi/plugin-directives@0.4.1(vinxi@0.4.0): + /@vinxi/plugin-directives@0.4.1(vinxi@0.4.1): resolution: {integrity: sha512-NsHCDyqU00i4RKGBoNNcBuONEirg/XfGgPCLFK1CZw3AYBE19haFSgvuo21Bx+BFGcwdRU3BRtaBMvwjLrUCnw==} peerDependencies: vinxi: ^0.4.0 @@ -3851,7 +3851,7 @@ packages: magicast: 0.2.11 recast: 0.23.7 tslib: 2.6.2 - vinxi: 0.4.0(@opentelemetry/api@1.8.0)(debug@4.3.4) + vinxi: 0.4.1(@opentelemetry/api@1.8.0)(debug@4.3.4) dev: false /@vinxi/plugin-mdx@3.7.1(@mdx-js/mdx@2.3.0): @@ -3866,34 +3866,34 @@ packages: unified: 9.2.2 vfile: 5.3.7 - /@vinxi/server-components@0.4.1(vinxi@0.4.0): + /@vinxi/server-components@0.4.1(vinxi@0.4.1): resolution: {integrity: sha512-rMS+RCGr1tujO1xWgILMLpOWIyw2OwDO46EtkuhTfqaVgLLt/w7+hxzOnh4s3O9sXoKKuUswtj9/MpQQkFoMOQ==} peerDependencies: vinxi: ^0.4.0 dependencies: - '@vinxi/plugin-directives': 0.4.1(vinxi@0.4.0) + '@vinxi/plugin-directives': 0.4.1(vinxi@0.4.1) acorn: 8.11.3 acorn-loose: 8.4.0 acorn-typescript: 1.4.13(acorn@8.11.3) astring: 1.8.6 magicast: 0.2.11 recast: 0.23.7 - vinxi: 0.4.0(@opentelemetry/api@1.8.0)(debug@4.3.4) + vinxi: 0.4.1(@opentelemetry/api@1.8.0)(debug@4.3.4) dev: false - /@vinxi/server-functions@0.4.1(vinxi@0.4.0): + /@vinxi/server-functions@0.4.1(vinxi@0.4.1): resolution: {integrity: sha512-dj5v9V+DurXK8w/nBDgJof+UsK3bkcgk6K/xBUg+WVmn7sUrLTurDTGRkCaknC6tQCyadNzj4FWGGc+qlrWf9g==} peerDependencies: vinxi: ^0.4.0 dependencies: - '@vinxi/plugin-directives': 0.4.1(vinxi@0.4.0) + '@vinxi/plugin-directives': 0.4.1(vinxi@0.4.1) acorn: 8.11.3 acorn-loose: 8.4.0 acorn-typescript: 1.4.13(acorn@8.11.3) astring: 1.8.6 magicast: 0.2.11 recast: 0.23.7 - vinxi: 0.4.0(@opentelemetry/api@1.8.0)(debug@4.3.4) + vinxi: 0.4.1(@opentelemetry/api@1.8.0)(debug@4.3.4) dev: false /@vitest/expect@1.6.0: @@ -10381,8 +10381,8 @@ packages: unist-util-stringify-position: 3.0.3 vfile-message: 3.1.4 - /vinxi@0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.12.12)(debug@4.3.4): - resolution: {integrity: sha512-NobNjqYGmSABBsmbRo6zyZQfltfZKjPnCj+XLcf1vewBHwAzs5nS1KUWGtc4UeA18dVKtgNbqpUeSOckD0EoBQ==} + /vinxi@0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.12.12)(debug@4.3.4): + resolution: {integrity: sha512-WGEYqIuJ2/P3sBoSVKsGvp/UKpW4wVSaAFdA18gthyMCEExN6nVteoA+Rv1wQFLKXTVL9JRpeGJjcLzcRRgGCA==} hasBin: true dependencies: '@babel/core': 7.24.4 @@ -10451,8 +10451,8 @@ packages: - xml2js dev: false - /vinxi@0.4.0(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2): - resolution: {integrity: sha512-NobNjqYGmSABBsmbRo6zyZQfltfZKjPnCj+XLcf1vewBHwAzs5nS1KUWGtc4UeA18dVKtgNbqpUeSOckD0EoBQ==} + /vinxi@0.4.1(@opentelemetry/api@1.8.0)(@types/node@20.14.8)(better-sqlite3@11.0.0)(debug@4.3.4)(drizzle-orm@0.31.2): + resolution: {integrity: sha512-WGEYqIuJ2/P3sBoSVKsGvp/UKpW4wVSaAFdA18gthyMCEExN6nVteoA+Rv1wQFLKXTVL9JRpeGJjcLzcRRgGCA==} hasBin: true dependencies: '@babel/core': 7.24.4 @@ -10520,8 +10520,8 @@ packages: - uWebSockets.js - xml2js - /vinxi@0.4.0(@opentelemetry/api@1.8.0)(debug@4.3.4): - resolution: {integrity: sha512-NobNjqYGmSABBsmbRo6zyZQfltfZKjPnCj+XLcf1vewBHwAzs5nS1KUWGtc4UeA18dVKtgNbqpUeSOckD0EoBQ==} + /vinxi@0.4.1(@opentelemetry/api@1.8.0)(debug@4.3.4): + resolution: {integrity: sha512-WGEYqIuJ2/P3sBoSVKsGvp/UKpW4wVSaAFdA18gthyMCEExN6nVteoA+Rv1wQFLKXTVL9JRpeGJjcLzcRRgGCA==} hasBin: true dependencies: '@babel/core': 7.24.4 From 98d129ea5fffd257589527a4411b4cb199e07ca2 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Fri, 19 Jul 2024 13:34:38 -0700 Subject: [PATCH 2/4] small tweak --- packages/start/src/server/StartServer.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/start/src/server/StartServer.tsx b/packages/start/src/server/StartServer.tsx index d0db08bc2..cd3849fad 100644 --- a/packages/start/src/server/StartServer.tsx +++ b/packages/start/src/server/StartServer.tsx @@ -50,10 +50,11 @@ export function StartServer(props: { document: Component while (matches.length && (!matches[0].info || !matches[0].info.filesystem)) matches.shift(); const matched = matches.length && matchRoute(matches, context.routes); if (matched) { + const inputs = import.meta.env.MANIFEST[import.meta.env.START_ISLANDS ? "ssr" : "client"]! + .inputs for (let i = 0; i < matched.length; i++) { const segment = matched[i]; - const part = import.meta.env.MANIFEST[import.meta.env.START_ISLANDS ? "ssr" : "client"]! - .inputs[segment["$component"].src]!; + const part = inputs[segment["$component"].src]!; assetPromises.push(part.assets() as any); } } else if (import.meta.env.DEV) console.warn("No route matched for preloading js assets"); From 23b01da59b2e6a0e0139686605a7cbf8d723be97 Mon Sep 17 00:00:00 2001 From: Ryan Carniato Date: Fri, 19 Jul 2024 13:58:10 -0700 Subject: [PATCH 3/4] v1.0.6 --- .changeset/modern-lizards-wink.md | 5 ----- examples/bare/package.json | 2 +- examples/basic/package.json | 2 +- examples/experiments/package.json | 2 +- examples/hackernews/package.json | 2 +- examples/notes/package.json | 2 +- examples/todomvc/package.json | 2 +- examples/with-auth/package.json | 2 +- examples/with-authjs/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-prisma/package.json | 2 +- examples/with-solid-styled/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-trpc/package.json | 2 +- examples/with-unocss/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/start/CHANGELOG.md | 6 +++++ packages/start/package.json | 2 +- pnpm-lock.yaml | 30 ++++++++++++------------- 19 files changed, 37 insertions(+), 36 deletions(-) delete mode 100644 .changeset/modern-lizards-wink.md diff --git a/.changeset/modern-lizards-wink.md b/.changeset/modern-lizards-wink.md deleted file mode 100644 index 3a17e9502..000000000 --- a/.changeset/modern-lizards-wink.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@solidjs/start": patch ---- - -drastically improve asset resolution performance diff --git a/examples/bare/package.json b/examples/bare/package.json index 81d226b5e..43d1662ea 100644 --- a/examples/bare/package.json +++ b/examples/bare/package.json @@ -7,7 +7,7 @@ "start": "vinxi start" }, "dependencies": { - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "solid-js": "^1.8.18", "vinxi": "^0.4.1" }, diff --git a/examples/basic/package.json b/examples/basic/package.json index f9d84ad4c..93a1ba6da 100644 --- a/examples/basic/package.json +++ b/examples/basic/package.json @@ -10,7 +10,7 @@ "dependencies": { "@solidjs/meta": "^0.29.4", "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "solid-js": "^1.8.18", "vinxi": "^0.4.1" }, diff --git a/examples/experiments/package.json b/examples/experiments/package.json index 0440acf41..1e01b8165 100644 --- a/examples/experiments/package.json +++ b/examples/experiments/package.json @@ -9,7 +9,7 @@ "dependencies": { "@solidjs/meta": "^0.29.4", "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "solid-js": "^1.8.18", "vinxi": "^0.4.1" }, diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 679e0182a..0ccc32a22 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "solid-js": "^1.8.18", "vinxi": "^0.4.1" }, diff --git a/examples/notes/package.json b/examples/notes/package.json index f8b30ff12..d5725abd4 100644 --- a/examples/notes/package.json +++ b/examples/notes/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "date-fns": "^3.6.0", "solid-js": "^1.8.18", "marked": "^12.0.1", diff --git a/examples/todomvc/package.json b/examples/todomvc/package.json index d6602317f..377126335 100644 --- a/examples/todomvc/package.json +++ b/examples/todomvc/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "solid-js": "^1.8.18", "unstorage": "1.10.2", "vinxi": "^0.4.1" diff --git a/examples/with-auth/package.json b/examples/with-auth/package.json index 5dc38b64f..241251ea1 100644 --- a/examples/with-auth/package.json +++ b/examples/with-auth/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "solid-js": "^1.8.18", "unstorage": "1.10.2", "vinxi": "^0.4.1" diff --git a/examples/with-authjs/package.json b/examples/with-authjs/package.json index db06912c6..15eb7efbb 100644 --- a/examples/with-authjs/package.json +++ b/examples/with-authjs/package.json @@ -20,7 +20,7 @@ "@solid-mediakit/auth": "^2.0.11", "@solidjs/meta": "^0.29.4", "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "solid-js": "^1.8.18", "vinxi": "^0.4.1" }, diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 295e2bf9a..baa58fa07 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -9,7 +9,7 @@ "dependencies": { "@mdx-js/mdx": "^2.3.0", "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "@vinxi/plugin-mdx": "^3.7.1", "solid-js": "^1.8.18", "vinxi": "^0.4.1", diff --git a/examples/with-prisma/package.json b/examples/with-prisma/package.json index 4d0ef48ac..54d16ec58 100644 --- a/examples/with-prisma/package.json +++ b/examples/with-prisma/package.json @@ -12,7 +12,7 @@ "dependencies": { "@prisma/client": "^5.12.1", "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "prisma": "^5.12.1", "solid-js": "^1.8.18", "vinxi": "^0.4.1" diff --git a/examples/with-solid-styled/package.json b/examples/with-solid-styled/package.json index 53f8be0e2..81895ef79 100644 --- a/examples/with-solid-styled/package.json +++ b/examples/with-solid-styled/package.json @@ -9,7 +9,7 @@ "dependencies": { "@solidjs/meta": "^0.29.4", "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "solid-js": "^1.8.18", "solid-styled": "^0.11.1", "vinxi": "^0.4.1", diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 18fce5927..d8dbc53c2 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "autoprefixer": "^10.4.19", "postcss": "^8.4.38", "solid-js": "^1.8.18", diff --git a/examples/with-trpc/package.json b/examples/with-trpc/package.json index 6ec70dc62..60a670da1 100644 --- a/examples/with-trpc/package.json +++ b/examples/with-trpc/package.json @@ -9,7 +9,7 @@ "dependencies": { "@solidjs/meta": "^0.29.4", "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "@trpc/client": "^10.45.2", "@trpc/server": "^10.45.2", "@typeschema/valibot": "^0.13.4", diff --git a/examples/with-unocss/package.json b/examples/with-unocss/package.json index dd96ff947..b640f3e6b 100644 --- a/examples/with-unocss/package.json +++ b/examples/with-unocss/package.json @@ -8,7 +8,7 @@ }, "dependencies": { "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "@unocss/reset": "^0.59.2", "solid-js": "^1.8.18", "unocss": "^0.59.2", diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index a12d27bad..541834bc5 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "devDependencies": { "@solidjs/meta": "^0.29.4", "@solidjs/router": "^0.14.1", - "@solidjs/start": "^1.0.5", + "@solidjs/start": "^1.0.6", "@solidjs/testing-library": "^0.8.7", "@testing-library/jest-dom": "^6.4.2", "@testing-library/user-event": "^14.5.2", diff --git a/packages/start/CHANGELOG.md b/packages/start/CHANGELOG.md index e0a912ea2..2ebd60fa3 100644 --- a/packages/start/CHANGELOG.md +++ b/packages/start/CHANGELOG.md @@ -1,5 +1,11 @@ # @solidjs/start +## 1.0.6 + +### Patch Changes + +- d86ab61: drastically improve asset resolution performance + ## 1.0.5 ### Patch Changes diff --git a/packages/start/package.json b/packages/start/package.json index 7fdcce6fc..a74af4535 100644 --- a/packages/start/package.json +++ b/packages/start/package.json @@ -1,6 +1,6 @@ { "name": "@solidjs/start", - "version": "1.0.5", + "version": "1.0.6", "type": "module", "author": "Ryan Carniato", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 783470f3d..77ee29a5d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -115,7 +115,7 @@ importers: examples/bare: dependencies: '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start solid-js: specifier: ^1.8.18 @@ -133,7 +133,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start solid-js: specifier: ^1.8.18 @@ -151,7 +151,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start solid-js: specifier: ^1.8.18 @@ -166,7 +166,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start solid-js: specifier: ^1.8.18 @@ -181,7 +181,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start date-fns: specifier: ^3.6.0 @@ -205,7 +205,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start solid-js: specifier: ^1.8.18 @@ -223,7 +223,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start solid-js: specifier: ^1.8.18 @@ -257,7 +257,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start solid-js: specifier: ^1.8.18 @@ -325,7 +325,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start '@vinxi/plugin-mdx': specifier: ^3.7.1 @@ -349,7 +349,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start prisma: specifier: ^5.12.1 @@ -374,7 +374,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start solid-js: specifier: ^1.8.18 @@ -395,7 +395,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start autoprefixer: specifier: ^10.4.19 @@ -422,7 +422,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start '@trpc/client': specifier: ^10.45.2 @@ -449,7 +449,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start '@unocss/reset': specifier: ^0.59.2 @@ -473,7 +473,7 @@ importers: specifier: ^0.14.1 version: 0.14.1(solid-js@1.8.18) '@solidjs/start': - specifier: ^1.0.5 + specifier: ^1.0.6 version: link:../../packages/start '@solidjs/testing-library': specifier: ^0.8.7 From 65c8ac0844ffac42947773e6d529e307ac687513 Mon Sep 17 00:00:00 2001 From: Katja Lutz Date: Tue, 23 Jul 2024 17:38:36 +0200 Subject: [PATCH 4/4] fix: store fetchEvent in h3 context (#1586) --- .changeset/quiet-mirrors-judge.md | 5 +++++ packages/start/src/server/fetchEvent.ts | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changeset/quiet-mirrors-judge.md diff --git a/.changeset/quiet-mirrors-judge.md b/.changeset/quiet-mirrors-judge.md new file mode 100644 index 000000000..0c66999de --- /dev/null +++ b/.changeset/quiet-mirrors-judge.md @@ -0,0 +1,5 @@ +--- +"@solidjs/start": patch +--- + +Fixed fetchEvent flakyness by storing the event in h3 context. diff --git a/packages/start/src/server/fetchEvent.ts b/packages/start/src/server/fetchEvent.ts index b6869c436..a7d5a5633 100644 --- a/packages/start/src/server/fetchEvent.ts +++ b/packages/start/src/server/fetchEvent.ts @@ -13,7 +13,7 @@ import { } from "vinxi/http"; import type { FetchEvent, ResponseStub } from "./types"; -const fetchEventSymbol = Symbol("fetchEvent"); +const fetchEventContext = "solidFetchEvent"; export function createFetchEvent(event: H3Event): FetchEvent { return { @@ -32,12 +32,12 @@ export function cloneEvent(fetchEvent: T): T { } export function getFetchEvent(h3Event: H3Event): FetchEvent { - if (!(h3Event as any)[fetchEventSymbol]) { + if (!h3Event.context[fetchEventContext]) { const fetchEvent = createFetchEvent(h3Event); - (h3Event as any)[fetchEventSymbol] = fetchEvent; + h3Event.context[fetchEventContext] = fetchEvent; } - return (h3Event as any)[fetchEventSymbol]; + return h3Event.context[fetchEventContext]; } export function mergeResponseHeaders(h3Event: H3Event, headers: Headers) {