npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

crs-codemod

v1.0.3

Published

A set of codemods for chakra-react-select

Downloads

16

Readme

Chakra React Select Codemods

A collection (only one for now) of Codemod transformations to help you upgrade your codebase when a Chakra React Select feature is deprecated.

Codemods are transformations that run on your codebase programmatically. This allows for a large amount of changes to be applied without having to manually go through every file.

These codemods are based on the codemods offered by Next.js, and are written using jscodeshift.

Usage

In your terminal, navigate (cd) into your project's folder, then run:

npx crs-codemod@latest <transform> <path>

Replacing <transform> and <path> with appropriate values.

  • transform - name of transform
  • path - files or directory to transform
  • --dry Do a dry-run, no code will be edited
  • --print Prints the changed output for comparison

Codemod Options

Version 5 (v5)

npx crs-codemod@latest v5 .
# or
npx crs-codemod@latest v5 ./src

This codemod runs on all versions of the Select component (Select, AsyncSelect, AsyncCreatableSelect, CreatableSelect), and performs the following modifications to your every instance of them:

  • Removes the useBasicStyles prop.
    • These styles are now the defaults, so this prop was removed in v5.0.0.
  • Renames the prop selectedOptionColor to selectedOptionColorScheme.
    • This prop was renamed in v4.6.0 to reduce confusion about what values can be passed to it. It has been fully removed in v5.0.0.
  • Renames the prop colorScheme to tagColorScheme.
    • This prop's name was changed as it didn't represent specifically what it was for originally.
  • Removes the hasStickyGroupHeaders prop
    • This prop was deprecated in v4.6.0 as well due to it not working properly with keyboard navigation, and being outside the scope of the intentions for this project. It has also been fully removed in v5.0.0.

This codemod will only work for props that are added directly to a Select instance. If you have a shared props object, you will have to make these changes manually.