diff --git a/.changeset/serious-spies-serve.md b/.changeset/serious-spies-serve.md new file mode 100644 index 0000000..f93146f --- /dev/null +++ b/.changeset/serious-spies-serve.md @@ -0,0 +1,5 @@ +--- +'cmdk-sv': patch +--- + +fix: Removes self-closing non-void elements to fix Svelte 5 warnings diff --git a/.prettierrc b/.prettierrc index a77fdde..9573023 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,6 +4,5 @@ "trailingComma": "none", "printWidth": 100, "plugins": ["prettier-plugin-svelte"], - "pluginSearchDirs": ["."], "overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }] } diff --git a/package.json b/package.json index e5b8418..a9a1b81 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "prepublishOnly": "npm run package", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", - "lint": "prettier --plugin-search-dir . --check . && eslint .", - "format": "prettier --plugin-search-dir . --write .", + "lint": "prettier --check . && eslint .", + "format": "prettier --write .", "test": "vitest", "release": "changeset publish", "changeset": "changeset" @@ -48,8 +48,8 @@ "postcss": "^8.4.31", "postcss-load-config": "^4.0.1", "postcss-preset-env": "^9.2.0", - "prettier": "^2.8.0", - "prettier-plugin-svelte": "^2.10.1", + "prettier": "^3.3.3", + "prettier-plugin-svelte": "^3.2.5", "prism-svelte": "^0.5.0", "prismjs": "^1.29.0", "publint": "^0.1.9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5bfbe0b..f8e6180 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -68,11 +68,11 @@ devDependencies: specifier: ^9.2.0 version: 9.2.0(postcss@8.4.31) prettier: - specifier: ^2.8.0 - version: 2.8.0 + specifier: ^3.3.3 + version: 3.3.3 prettier-plugin-svelte: - specifier: ^2.10.1 - version: 2.10.1(prettier@2.8.0)(svelte@4.2.2) + specifier: ^3.2.5 + version: 3.2.5(prettier@3.3.3)(svelte@4.2.2) prism-svelte: specifier: ^0.5.0 version: 0.5.0 @@ -163,7 +163,7 @@ packages: fs-extra: 7.0.1 lodash.startcase: 4.4.0 outdent: 0.5.0 - prettier: 2.8.0 + prettier: 2.8.8 resolve-from: 5.0.0 semver: 7.5.4 dev: true @@ -340,7 +340,7 @@ packages: '@changesets/types': 5.2.1 fs-extra: 7.0.1 human-id: 1.0.2 - prettier: 2.8.0 + prettier: 2.8.8 dev: true /@csstools/cascade-layer-name-parser@1.0.5(@csstools/css-parser-algorithms@2.3.2)(@csstools/css-tokenizer@2.2.1): @@ -4279,22 +4279,28 @@ packages: engines: {node: '>= 0.8.0'} dev: true - /prettier-plugin-svelte@2.10.1(prettier@2.8.0)(svelte@4.2.2): - resolution: {integrity: sha512-Wlq7Z5v2ueCubWo0TZzKc9XHcm7TDxqcuzRuGd0gcENfzfT4JZ9yDlCbEgxWgiPmLHkBjfOtpAWkcT28MCDpUQ==} + /prettier-plugin-svelte@3.2.5(prettier@3.3.3)(svelte@4.2.2): + resolution: {integrity: sha512-vP/M/Goc8z4iVIvrwXwbrYVjJgA0Hf8PO1G4LBh/ocSt6vUP6sLvyu9F3ABEGr+dbKyxZjEKLkeFsWy/yYl0HQ==} peerDependencies: - prettier: ^1.16.4 || ^2.0.0 - svelte: ^3.2.0 || ^4.0.0-next.0 + prettier: ^3.0.0 + svelte: ^3.2.0 || ^4.0.0-next.0 || ^5.0.0-next.0 dependencies: - prettier: 2.8.0 + prettier: 3.3.3 svelte: 4.2.2 dev: true - /prettier@2.8.0: - resolution: {integrity: sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==} + /prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} hasBin: true dev: true + /prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + engines: {node: '>=14'} + hasBin: true + dev: true + /pretty-format@29.7.0: resolution: {integrity: sha512-Pdlw/oPxN+aXdmM9R00JVC9WVFoCLTKJvDVLgmJ+qAffBMxsV85l/Lu7sNx4zSzPyoL2euImuEwHhOXdEgNFZQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} diff --git a/src/app.html b/src/app.html index 553bf3d..a617eb7 100644 --- a/src/app.html +++ b/src/app.html @@ -1,4 +1,4 @@ - + diff --git a/src/docs/components/cmdk/framer/framer-cmdk.svelte b/src/docs/components/cmdk/framer/framer-cmdk.svelte index b1f6078..5d49bdb 100644 --- a/src/docs/components/cmdk/framer/framer-cmdk.svelte +++ b/src/docs/components/cmdk/framer/framer-cmdk.svelte @@ -100,10 +100,10 @@ Avatar of Rauno {:else if value === 'Slider'}
-
+
{:else if value === 'Container'} -
+
{/if}
diff --git a/src/docs/components/cmdk/raycast/raycast-cmdk.svelte b/src/docs/components/cmdk/raycast/raycast-cmdk.svelte index b1f54fa..1024ffc 100644 --- a/src/docs/components/cmdk/raycast/raycast-cmdk.svelte +++ b/src/docs/components/cmdk/raycast/raycast-cmdk.svelte @@ -21,7 +21,7 @@
-
+

diff --git a/src/docs/components/code-block.svelte b/src/docs/components/code-block.svelte index c11b47f..22ca8c9 100644 --- a/src/docs/components/code-block.svelte +++ b/src/docs/components/code-block.svelte @@ -36,8 +36,8 @@
-
-
+
+
 			
 		
-		
+
{@html rawCodeString}
diff --git a/src/docs/components/theme-switcher.svelte b/src/docs/components/theme-switcher.svelte index 236be9a..9976081 100644 --- a/src/docs/components/theme-switcher.svelte +++ b/src/docs/components/theme-switcher.svelte @@ -93,7 +93,7 @@ {key} {#if isActive} -
+
{/if} {/each} diff --git a/src/lib/cmdk/components/CommandSeparator.svelte b/src/lib/cmdk/components/CommandSeparator.svelte index 74b3619..77e6401 100644 --- a/src/lib/cmdk/components/CommandSeparator.svelte +++ b/src/lib/cmdk/components/CommandSeparator.svelte @@ -21,6 +21,6 @@ {#if asChild} {:else} -
+
{/if} {/if} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 35f964f..78778c7 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -48,7 +48,7 @@
-
+