diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 0ee5467499c..4950b345720 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -9,5 +9,5 @@ "yii2-adapter/**/*.scss": ["stylelint --fix --allow-empty-input -c ./yii2-adapter/.stylelintrc.json"], "!(yii2-adapter)/**/*.scss": ["stylelint --fix --allow-empty-input"], "!(yii2-adapter)/**/*.{html,json,css,scss}": "prettier --ignore-unknown --write", - "resources/js/**/*.{ts,vue}": ["eslint"] + "resources/js/**/*.{ts,vue}": ["eslint", "vue-tsc --noEmit"] } diff --git a/CHANGELOG.md b/CHANGELOG.md index ec42964373d..ff2206006a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ - Fixed a bug where Single sections had Max Authors settings. ([#19001](https://github.com/craftcms/cms/pull/19001)) - Fixed a bug where Channel and Structure sections didn’t have Max Authors settings. ([#19001](https://github.com/craftcms/cms/pull/19001)) - Fixed a bug where sections’ Min Authors settings were defaulting to `1` when blank. ([#19001](https://github.com/craftcms/cms/pull/19001)) +- Fixed a JavaScript error that could occur in the Control Panel when a custom element was registered more than once. +- Fixed a bug where Control Panel action menu items could trigger their action twice when clicked. +- Fixed a bug where legacy Control Panel JavaScript wasn’t loaded and initialized on all Control Panel pages. ## 6.0.0-alpha.5 - 2026-05-27 diff --git a/packages/craftcms-cp/package.json b/packages/craftcms-cp/package.json index 0b2e49d24aa..2b869da7015 100644 --- a/packages/craftcms-cp/package.json +++ b/packages/craftcms-cp/package.json @@ -21,8 +21,8 @@ "dev": "node ./scripts/build.js --develop", "prebuild": "npm run format", "build": "node ./scripts/build.js", - "format": "npx prettier --write .", - "check:format": "prettier --check .", + "format": "npx prettier --write ./src", + "check:format": "prettier --check ./src", "check:exports": "attw --pack .", "check:types": "tsc --noEmit", "storybook": "storybook dev -p 6006", diff --git a/packages/craftcms-legacy/cp/src/js/CP.js b/packages/craftcms-legacy/cp/src/js/CP.js index 3fee97996fe..7387335a166 100644 --- a/packages/craftcms-legacy/cp/src/js/CP.js +++ b/packages/craftcms-legacy/cp/src/js/CP.js @@ -1,4 +1,8 @@ -import {QueueService} from '@craftcms/cp'; +// Import from the deep service module rather than the package root. The root +// entry (`@craftcms/cp`) side-effect-registers WebAwesome components (e.g. +// `wa-icon`); pulling that into this separately-webpacked legacy bundle causes +// a duplicate custom-element registration when it loads alongside the Vite app. +import {QueueService} from '@craftcms/cp/services/Queue.ts.mjs'; /** global: Craft */ /** global: Garnish */ /** global: $ */ @@ -1322,7 +1326,7 @@ Craft.CP = Garnish.Base.extend( if (Array.isArray(alerts) && alerts.length) { this.$alerts = $('