From fd12d28b46278b4f99751e5c125bae23fa124e7e Mon Sep 17 00:00:00 2001 From: QwertyCode Date: Mon, 18 May 2026 18:27:51 +0200 Subject: [PATCH] fix: add ufo dependency and update Flowtag component to use joinURL for script source --- package.json | 3 +++ pnpm-lock.yaml | 8 ++++++++ src/index.tsx | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 651a971..d5414f6 100644 --- a/package.json +++ b/package.json @@ -56,5 +56,8 @@ "semantic-release": "^25.0.3", "tsdown": "^0.22.0", "typescript": "^6.0.3" + }, + "dependencies": { + "ufo": "^1.6.4" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c6094f6..b4253b4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,6 +17,9 @@ importers: react-dom: specifier: '>=16.8.0' version: 19.2.3(react@19.2.3) + ufo: + specifier: ^1.6.4 + version: 1.6.4 devDependencies: '@biomejs/biome': specifier: 2.4.15 @@ -1813,6 +1816,9 @@ packages: engines: {node: '>=14.17'} hasBin: true + ufo@1.6.4: + resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} + uglify-js@3.19.3: resolution: {integrity: sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==} engines: {node: '>=0.8.0'} @@ -3487,6 +3493,8 @@ snapshots: typescript@6.0.3: {} + ufo@1.6.4: {} + uglify-js@3.19.3: optional: true diff --git a/src/index.tsx b/src/index.tsx index f4e1a08..3553e3e 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,6 +1,7 @@ import Script from "next/script"; import { useId } from "react"; import type { FlowtagConfigOptions } from "./types"; +import { joinURL } from "ufo"; interface FlowtagProps { trackerId: string; @@ -35,7 +36,7 @@ function Flowtag(props: FlowtagProps) { return (