@shopbite-de/storefront 1.23.0 → 1.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -25,7 +25,7 @@ jobs:
|
|
|
25
25
|
|
|
26
26
|
- uses: pnpm/action-setup@v5
|
|
27
27
|
with:
|
|
28
|
-
version: 10.
|
|
28
|
+
version: 10.34.4
|
|
29
29
|
|
|
30
30
|
- uses: actions/setup-node@v6
|
|
31
31
|
with:
|
|
@@ -49,7 +49,7 @@ jobs:
|
|
|
49
49
|
run: pnpm run build
|
|
50
50
|
|
|
51
51
|
- name: Save workspace to cache
|
|
52
|
-
uses: actions/cache/save@
|
|
52
|
+
uses: actions/cache/save@v6
|
|
53
53
|
with:
|
|
54
54
|
path: |
|
|
55
55
|
~/.local/share/pnpm/store
|
|
@@ -69,14 +69,14 @@ jobs:
|
|
|
69
69
|
|
|
70
70
|
- uses: pnpm/action-setup@v5
|
|
71
71
|
with:
|
|
72
|
-
version: 10.
|
|
72
|
+
version: 10.34.4
|
|
73
73
|
|
|
74
74
|
- uses: actions/setup-node@v6
|
|
75
75
|
with:
|
|
76
76
|
node-version: '24'
|
|
77
77
|
|
|
78
78
|
- name: Restore workspace from cache
|
|
79
|
-
uses: actions/cache/restore@
|
|
79
|
+
uses: actions/cache/restore@v6
|
|
80
80
|
with:
|
|
81
81
|
path: |
|
|
82
82
|
~/.local/share/pnpm/store
|
|
@@ -102,14 +102,14 @@ jobs:
|
|
|
102
102
|
|
|
103
103
|
- uses: pnpm/action-setup@v5
|
|
104
104
|
with:
|
|
105
|
-
version: 10.
|
|
105
|
+
version: 10.34.4
|
|
106
106
|
|
|
107
107
|
- uses: actions/setup-node@v6
|
|
108
108
|
with:
|
|
109
109
|
node-version: '24'
|
|
110
110
|
|
|
111
111
|
- name: Restore workspace from cache
|
|
112
|
-
uses: actions/cache/restore@
|
|
112
|
+
uses: actions/cache/restore@v6
|
|
113
113
|
with:
|
|
114
114
|
path: |
|
|
115
115
|
~/.local/share/pnpm/store
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Issue #259 — Matomo stopped tracking after v1.23.0
|
|
2
|
+
|
|
3
|
+
Date: 2026-07-05 · Branch: `fix/259-matomo-runtime-config`
|
|
4
|
+
|
|
5
|
+
## Symptom
|
|
6
|
+
|
|
7
|
+
Since release v1.23.0 no Matomo events arrive. Browser console:
|
|
8
|
+
|
|
9
|
+
> Loading failed for the `<script>` with source
|
|
10
|
+
> "https://cdn.matomo.cloud/undefined/matomo.js".
|
|
11
|
+
|
|
12
|
+
## Root cause: upstream regression in `@nuxt/scripts` 0.13.2 → 0.13.4
|
|
13
|
+
|
|
14
|
+
v1.23.0 was the first release since April and bumped `@nuxt/scripts`
|
|
15
|
+
0.13.2 → 0.13.4. That bump changed how `useRegistryScript` merges the
|
|
16
|
+
build-time registry options with `runtimeConfig.public.scripts.*`:
|
|
17
|
+
|
|
18
|
+
- **0.13.2:** `Object.assign(_userOptions, scriptConfig)` — runtime config
|
|
19
|
+
**wins** over build-time options.
|
|
20
|
+
- **0.13.4:** `defu(_userOptions, scriptConfig)` — build-time options win
|
|
21
|
+
for every **defined** value, and `""` is a defined value.
|
|
22
|
+
|
|
23
|
+
Our `nuxt.config.ts` configured the registry with placeholder values
|
|
24
|
+
(`matomoUrl: "", siteId: ""`), expecting the real values to arrive at
|
|
25
|
+
runtime via `NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_*` env vars. The module
|
|
26
|
+
inlines the registry options verbatim into the generated `scripts:init`
|
|
27
|
+
plugin, so production ran
|
|
28
|
+
`useScriptMatomoAnalytics({matomoUrl:"",siteId:""})` — and with `defu`
|
|
29
|
+
those empty strings now shadow the runtime config. Empty `matomoUrl` makes
|
|
30
|
+
the registry fall back to the Matomo-cloud CDN URL with an undefined
|
|
31
|
+
`cloudId` → `https://cdn.matomo.cloud/undefined/matomo.js`.
|
|
32
|
+
|
|
33
|
+
Confirmed on production: the SSR payload contains the **correct** runtime
|
|
34
|
+
config (`matomoUrl:"https://analytics.veliu.net/"`), while the preload
|
|
35
|
+
link and script src use the undefined cloud URL — proving the values were
|
|
36
|
+
present but ignored.
|
|
37
|
+
|
|
38
|
+
Still present in `@nuxt/scripts` 1.3.0 (latest), so upgrading would not
|
|
39
|
+
have fixed it.
|
|
40
|
+
|
|
41
|
+
## Fix
|
|
42
|
+
|
|
43
|
+
Never put placeholder values in `scripts.registry` — they get baked into
|
|
44
|
+
the build and (since 0.13.4) beat the runtime config:
|
|
45
|
+
|
|
46
|
+
- `scripts.registry.matomoAnalytics: true` — enables the script, inlines
|
|
47
|
+
`{}` so runtime config wins again.
|
|
48
|
+
- The keys live in `runtimeConfig.public.scripts.matomoAnalytics`
|
|
49
|
+
explicitly, so Nuxt's env override
|
|
50
|
+
(`NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_MATOMO_URL` / `_SITE_ID`) still
|
|
51
|
+
has keys to land on. The module `defu`s its registry config into
|
|
52
|
+
`runtimeConfig.public.scripts`, and our explicit object wins over
|
|
53
|
+
`true`.
|
|
54
|
+
|
|
55
|
+
No deployment/env changes needed; the existing env vars are correct.
|
|
56
|
+
|
|
57
|
+
## Verification
|
|
58
|
+
|
|
59
|
+
Production build run locally with the env vars set: rendered HTML contains
|
|
60
|
+
`https://analytics.veliu.net/matomo.js` in the preload link and script
|
|
61
|
+
src; the `undefined` cloud URL is gone.
|
|
62
|
+
|
|
63
|
+
## Notes
|
|
64
|
+
|
|
65
|
+
- The same failure mode applies to any future registry script: use
|
|
66
|
+
`true`/real values in `scripts.registry`, never `""` placeholders.
|
|
67
|
+
- Upstream issue candidate: `defu` in `useRegistryScript` silently
|
|
68
|
+
prefers inlined build-time options (even empty strings) over
|
|
69
|
+
`runtimeConfig.public.scripts.*` — arguably a regression vs 0.13.2.
|
package/nuxt.config.ts
CHANGED
|
@@ -72,6 +72,16 @@ export default defineNuxtConfig({
|
|
|
72
72
|
countryId: "",
|
|
73
73
|
},
|
|
74
74
|
storeUrl: "",
|
|
75
|
+
// Matomo config for the @nuxt/scripts registry. Declared here (not as
|
|
76
|
+
// registry options) so the values stay runtime-overridable via
|
|
77
|
+
// NUXT_PUBLIC_SCRIPTS_MATOMO_ANALYTICS_* env vars: registry options are
|
|
78
|
+
// inlined into the build and would shadow the runtime config (#259).
|
|
79
|
+
scripts: {
|
|
80
|
+
matomoAnalytics: {
|
|
81
|
+
matomoUrl: "",
|
|
82
|
+
siteId: "",
|
|
83
|
+
},
|
|
84
|
+
},
|
|
75
85
|
},
|
|
76
86
|
},
|
|
77
87
|
|
|
@@ -231,10 +241,10 @@ export default defineNuxtConfig({
|
|
|
231
241
|
$production: {
|
|
232
242
|
scripts: {
|
|
233
243
|
registry: {
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
244
|
+
// `true` enables the script without inlining option values into the
|
|
245
|
+
// build; the actual config comes from runtimeConfig.public.scripts
|
|
246
|
+
// above (env-overridable at runtime, see #259).
|
|
247
|
+
matomoAnalytics: true,
|
|
238
248
|
},
|
|
239
249
|
},
|
|
240
250
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shopbite-de/storefront",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.1",
|
|
4
4
|
"main": "nuxt.config.ts",
|
|
5
5
|
"description": "Shopware storefront for food delivery shops",
|
|
6
6
|
"keywords": [
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@typescript-eslint/eslint-plugin": "^8.62.1",
|
|
56
56
|
"@typescript-eslint/parser": "^8.62.1",
|
|
57
57
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
58
|
-
"@vitest/ui": "4.1.
|
|
58
|
+
"@vitest/ui": "4.1.9",
|
|
59
59
|
"@vue/compiler-dom": "^3.5.39",
|
|
60
60
|
"@vue/server-renderer": "^3.5.39",
|
|
61
61
|
"@vue/test-utils": "^2.4.11",
|