Skip to content

Conversation

@mezotv
Copy link
Member

@mezotv mezotv commented Apr 14, 2025

snyk-top-banner

Snyk has created this PR to upgrade cmdk from 1.0.0 to 1.1.1.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 8 versions ahead of your current version.

  • The recommended version was released a month ago.

Issues fixed by the recommended upgrade:

Issue Score Exploit Maturity
medium severity Information Exposure
SNYK-JS-NEXT-9634163
601 No Known Exploit
Release notes
Package name: cmdk
  • 1.1.1 - 2025-03-14

    What's Changed

    • Fix unintended double triggering of key bindings during IME composition by @ JaeSeoKim in #339

    New Contributors

    Full Changelog: v1.1.0...v1.1.1

  • 1.1.0 - 2025-03-14

    What's Changed

    • fix useCmdk return type by @ lsmurray in #329
    • fix: update the type of the defaultFilter by @ muZk in #338
    • [Accessibility] Use id instead of children by @ UltimateGG in #254
    • Use @ radix-ui/react-compose-refs to merge refs, save on bundle size
    • Use React built-in useSyncExternalStore and remove shim. Note that React 18 has always been a required peerDependency of cmdk

    New Contributors

    Full Changelog: v1.0.4...v1.1.0

  • 1.0.4 - 2024-11-04

    What's Changed

    • Fix use-sync-external-store import for greater compatibility by @ kachkaev in #328

    New Contributors

    Full Changelog: v1.0.3...v1.0.4

  • 1.0.3 - 2024-11-01
    • Fix use-sync-external-store shim for compatibility with Next.js 15 and React 19 RC
  • 1.0.3-beta.0 - 2024-11-01
  • 1.0.2 - 2024-10-31

    v1.0.2

  • 1.0.2-beta.0 - 2024-10-31
  • 1.0.1 - 2024-10-30

    What's Changed

    New Contributors

    Full Changelog: v1.0.0...v1.0.1

  • 1.0.0 - 2024-03-08

    This is a major version release as it contains breaking changes.

    Breaking Changes

    You will need to update your code to account for these changes before upgrading to cmdk@1.0.0.

    value is now case sensitive 3dae25d

    The value prop you pass to Command.Item and receive in onSelect is now case sensitive. But while the value is no longer lowercased, it is still trimmed.

    Command.List is now required (CommandList in shadcn) 54aa261

    Rendering the Command.List part (CommandList if using shadcn) is now mandatory. Otherwise, you should expect to see an error like this:

    TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    

    The fix:

    // Before
    <Command label="Command Menu">
    	<Command.Input />
    	<Command.Item />
    	{/* ... */}
    </Command>
    // After
    <Command label="Command Menu">
    <Command.Input />

    <span class="pl-c1">&lt;</span><span class="pl-v">Command</span><span class="pl-kos">.</span><span class="pl-c1">List</span><span class="pl-c1">&gt;</span>
    	<span class="pl-c1">&lt;</span><span class="pl-v">Command</span><span class="pl-kos">.</span><span class="pl-c1">Item</span> <span class="pl-kos">/&gt;</span>
    	<span class="pl-kos">{</span><span class="pl-c">/* ... */</span><span class="pl-kos">}</span>
    <span class="pl-kos">&lt;/</span><span class="pl-v">Command</span><span class="pl-kos">.</span><span class="pl-c1">List</span><span class="pl-c1">&gt;</span>
    

    </Command>

    Update [aria-disabled] and [aria-selected] CSS selectors c57e6b7

    The aria-disabled and aria-selected props will now be set to false, instead of being undefined. If you previously used CSS selectors based on attribute presence, you will now need to use the attribute value.

    / Before */
    [aria-disabled] {}
    :not([aria-disabled]) {}

    /* After */
    [aria-disabled="true"] {}
    [aria-disabled="false"] {}

    What's Changed

    • Added support for rendering Command.List in a portal in 54aa261
    • Fixed Command.Empty not appearing on first render in be4388e
    • Fixed ESM support via new exports field by @ SoYoung210 in #141
    • Added disablePointerSelection prop to Command to disable item selection via pointer, like Raycast by @ joaom00 in #116
    • Fix excessive re-renders when using forceMount by @ joaom00 in #143
    • Fixed to only scroll the selected item into view on first render and via keyboard by @ joaom00 in #135
    • Bumped @ radix-ui/react-dialog version by @ wmcheung in #194
    • Fixed item sort not working correctly by @ pengx17 in #182
    • Added keywords prop to the Command.Item component by @ itaikeren in #158
    • Added asChild prop to all component parts by @ joaom00 in #138
    • Fix suggestions list and loading progressbar labels by @ afercia in #204
    • Allow keyboard navigation even when text input is not focused by @ glocore in #61
    • Fix DOM error with quotes in the search query by @ yjl9903 in #223

    New Contributors

    Full Changelog: v0.2.1...v1.0.0

from cmdk GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.
  • Max score is 1000. Note that the real score may have changed since the PR was raised.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Snyk has created this PR to upgrade cmdk from 1.0.0 to 1.1.1.

See this package in npm:
cmdk

See this project in Snyk:
https://app.snyk.io/org/mezotv/project/47d9c227-4161-40ce-bab1-0d9f9386a417?utm_source=github&utm_medium=referral&page=upgrade-pr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants