Skip to content

Commit c36bc1f

Browse files
authored
fix: transformer directives (#2378)
* fix: transformer directives * fix: audit issues * fix: types
1 parent 9661432 commit c36bc1f

File tree

10 files changed

+339
-445
lines changed

10 files changed

+339
-445
lines changed

.changeset/great-turtles-invent.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@shopware/cms-base-layer": patch
3+
---
4+
5+
Add UnoCSS directive transformation for CMS block styles so layered Nuxt apps do not emit CSS minification warnings from raw `@apply` directives during production builds.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"braces": "^3.0.3",
6565
"debug": "^4.3.5",
6666
"devalue": "^5.6.4",
67+
"defu": "^6.1.5",
6768
"diff": "^8.0.3",
6869
"cookie": "^0.7.0",
6970
"cross-spawn": "^7.0.5",
@@ -73,8 +74,8 @@
7374
"form-data": "^4.0.4",
7475
"glob@10": "^10.5.0",
7576
"js-yaml": "^4.1.1",
76-
"lodash": "^4.17.23",
77-
"lodash-es": "^4.17.23",
77+
"lodash": "^4.18.0",
78+
"lodash-es": "^4.18.0",
7879
"markdown-it": "^14.1.1",
7980
"micromatch": "^4.0.8",
8081
"mdast-util-to-hast": "^13.2.1",
@@ -91,6 +92,7 @@
9192
"sharp": "^0.33.4",
9293
"undici": "^6.24.0",
9394
"vite@6": "^6.4.1",
95+
"webpack": "^5.105.4",
9496
"ws": "^8.18.0",
9597
"yaml@2": "^2.8.3",
9698
"zod@3": "^3.23.8",
@@ -116,6 +118,7 @@
116118
"srvx": "^0.11.13",
117119
"brace-expansion@4": "^5.0.5",
118120
"brace-expansion@5": "^5.0.5",
121+
"nanotar": "^0.3.0",
119122
"yaml@1": "^1.10.3",
120123
"smol-toml": "^1.6.1"
121124
},

packages/api-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
"vitest": "4.0.18"
7070
},
7171
"dependencies": {
72-
"defu": "6.1.4",
72+
"defu": "6.1.5",
7373
"hookable": "5.5.3",
7474
"ofetch": "1.5.1"
7575
}

packages/cms-base-layer/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"@tresjs/nuxt": "^5.1.6",
4747
"@unocss/nuxt": "66.6.0",
4848
"@unocss/runtime": "66.6.0",
49+
"@unocss/transformer-directives": "66.6.0",
4950
"@vuelidate/core": "2.0.3",
5051
"@vuelidate/validators": "2.0.4",
5152
"@vueuse/core": "14.1.0",

packages/cms-base-layer/uno.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import transformerDirectives from "@unocss/transformer-directives";
12
import {
23
defineConfig,
34
presetAttributify,
@@ -91,4 +92,5 @@ export default defineConfig({
9192
presetAttributify(),
9293
presetTypography(),
9394
],
95+
transformers: [transformerDirectives()],
9496
});

packages/composables/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"@shopware/helpers": "workspace:*",
6262
"@shopware/api-client": "workspace:*",
6363
"@vueuse/core": "14.1.0",
64-
"defu": "6.1.4",
64+
"defu": "6.1.5",
6565
"scule": "1.3.0"
6666
},
6767
"devDependencies": {

packages/nuxt-module/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"@shopware/composables": "workspace:*",
3838
"@shopware/helpers": "workspace:*",
3939
"@shopware/api-client": "workspace:*",
40-
"defu": "6.1.4",
40+
"defu": "6.1.5",
4141
"h3": "1.15.9",
4242
"js-cookie": "3.0.5"
4343
},

pnpm-lock.yaml

Lines changed: 317 additions & 438 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

templates/vue-demo-store/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"@vuelidate/core": "2.0.3",
2626
"@vuelidate/validators": "2.0.4",
2727
"@vueuse/nuxt": "14.1.0",
28-
"defu": "6.1.4",
28+
"defu": "6.1.5",
2929
"requrl": "3.0.2",
3030
"sitemap": "8.0.0",
3131
"vue": "3.5.27"

templates/vue-starter-template/app/components/form/SalutationSelect.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ const {
1717
1818
const nuxtApp = useNuxtApp();
1919
const { apiClient } = useShopwareContext();
20-
const { defaultCSRCacheLifetime } = useAppConfig();
20+
const appConfig = useAppConfig();
21+
const defaultCSRCacheLifetime =
22+
typeof appConfig.defaultCSRCacheLifetime === "number"
23+
? appConfig.defaultCSRCacheLifetime
24+
: 86_400_000;
2125
2226
const {
2327
data: salutationData,

0 commit comments

Comments
 (0)