From b8e2c2f21a966f4707f67fd857e93e5f50814ba7 Mon Sep 17 00:00:00 2001 From: Damien Simonin Feugas Date: Mon, 25 Nov 2024 12:24:06 +0100 Subject: [PATCH] fix: next/jest does not support import.meta (#91) --- apps/remix/package.json | 3 -- packages/web/package.json | 2 +- packages/web/src/astro/index.astro | 14 +++++ packages/web/src/generic.ts | 14 ++--- packages/web/src/nextjs/index.tsx | 11 +++- packages/web/src/nextjs/utils.test.ts | 30 +++++++++++ packages/web/src/nextjs/utils.ts | 11 ++++ packages/web/src/react/index.tsx | 5 +- packages/web/src/react/utils.test.ts | 30 +++++++++++ packages/web/src/react/utils.ts | 10 ++++ packages/web/src/remix/index.tsx | 5 +- packages/web/src/remix/utils.test.ts | 24 +++++++++ packages/web/src/remix/utils.ts | 13 +++++ packages/web/src/sveltekit/index.ts | 2 + packages/web/src/sveltekit/utils.test.ts | 24 +++++++++ packages/web/src/sveltekit/utils.ts | 12 +++++ packages/web/src/utils.test.ts | 67 +++--------------------- packages/web/src/utils.ts | 50 ++---------------- packages/web/src/vue/create-component.ts | 7 ++- packages/web/src/vue/utils.test.ts | 24 +++++++++ packages/web/src/vue/utils.ts | 12 +++++ 21 files changed, 246 insertions(+), 124 deletions(-) create mode 100644 packages/web/src/nextjs/utils.test.ts create mode 100644 packages/web/src/react/utils.test.ts create mode 100644 packages/web/src/react/utils.ts create mode 100644 packages/web/src/remix/utils.test.ts create mode 100644 packages/web/src/sveltekit/utils.test.ts create mode 100644 packages/web/src/sveltekit/utils.ts create mode 100644 packages/web/src/vue/utils.test.ts create mode 100644 packages/web/src/vue/utils.ts diff --git a/apps/remix/package.json b/apps/remix/package.json index 9163372..9623973 100644 --- a/apps/remix/package.json +++ b/apps/remix/package.json @@ -28,8 +28,5 @@ "typescript": "^5.1.6", "vite": "^5.1.0", "vite-tsconfig-paths": "^4.2.1" - }, - "engines": { - "node": ">=20.0.0" } } diff --git a/packages/web/package.json b/packages/web/package.json index 0ffd30d..467b91d 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,6 +1,6 @@ { "name": "@vercel/speed-insights", - "version": "1.2.0-canary.3", + "version": "1.2.0-canary.4", "description": "Speed Insights is a tool for measuring web performance and providing suggestions for improvement.", "keywords": [ "speed-insights", diff --git a/packages/web/src/astro/index.astro b/packages/web/src/astro/index.astro index a50f5b1..4a6a895 100644 --- a/packages/web/src/astro/index.astro +++ b/packages/web/src/astro/index.astro @@ -15,6 +15,19 @@ const paramsStr = JSON.stringify(Astro.params);