From 0bd09b7466881452258f6a2365e3ba120ddf129d Mon Sep 17 00:00:00 2001 From: Jacob Andersson Date: Tue, 17 Oct 2023 00:41:22 +0200 Subject: [PATCH] fix: support non-scoped frames --- package.json | 11 +- playground/app.vue | 85 +- playground/components/TAnchor.vue | 16 + playground/components/TFormButton.vue | 16 + playground/nuxt.config.ts | 7 + playground/package.json | 2 +- playground/tsconfig.json | 7 +- pnpm-lock.yaml | 3301 +++++++++++++------------ src/index.ts | 77 +- test/module.spec.ts | 210 +- tsconfig.json | 4 +- 11 files changed, 2011 insertions(+), 1725 deletions(-) create mode 100644 playground/components/TAnchor.vue create mode 100644 playground/components/TFormButton.vue diff --git a/package.json b/package.json index 6cfdc1b..6a79286 100644 --- a/package.json +++ b/package.json @@ -29,15 +29,16 @@ "dist" ], "scripts": { - "dev": "unbuild && pnpm --filter playground run dev", + "dev": "DEV=true pnpm --filter playground run dev", "build": "unbuild", "test": "vitest" }, "devDependencies": { "@hotwired/turbo": "latest", - "@nuxt/test-utils": "^3.5.3", - "playwright": "^1.35.1", - "unbuild": "^1.2.1", - "vitest": "^0.32.2" + "@nuxt/test-utils": "^3.7.4", + "@playwright/test": "^1.39.0", + "playwright": "^1.39.0", + "unbuild": "^2.0.0", + "vitest": "^0.33.0" } } \ No newline at end of file diff --git a/playground/app.vue b/playground/app.vue index 07e33f4..3c6df69 100644 --- a/playground/app.vue +++ b/playground/app.vue @@ -7,9 +7,12 @@ if (process.client) Turbo.start() // Enable module -const enabled = ref(false) +const enabled = ref(true) watch(enabled, value => value ? enable() : disable()) +if (process.client && enabled.value) + enable() + if (process.client) // @ts-ignore window.$module = { enable, disable } @@ -26,50 +29,55 @@ const valueForm = useState('v3', randomHash)