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

@caldwell619/ts-migrate-helpers

v0.0.5

Published

Utility to help the ts-migrate tool better type your external dependencies by installing their @types

Downloads

11

Readme

TS Migration Helper

In order to properly use the tool ts-migrate, you need your types installed for your various libraries.

This tool is here to automate that for you.

Usage

npx @caldwell619/ts-migrate-helpers --path-to-project-root .

Options

| Option | Description | Required? | | ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------------: | | path-to-project-root or p | The path to the project root ( where the package json is). This will usually be . if ran from the main dir. DO NOT add package.json to the end of this path. This should resolve to a directory that has the targeted package.json at the first level | :white_check_mark: | | use-npm | If this is provided, npm will be used instead of yarn. Yarn is the default. | :x: |

What does it do?

ts-migrate is great, but if you do not have the corresponding type definitions, it will simply add a @ts-expect-error above your package import. This can be tedious to find / remove.

This tool will attempt to install types for every single one of your prod dependencies. That is to say, not the devDependencies.

If a type does not exist, the script will simply continue.

Stubbed Types

Many packages have included types in a later version, etc so they provide a stubbed type. Having these in your package.json is totally unnecessary, and causes bloat.

This script will keep track of which types are stubs, and delete them at the end.

Running "yarn --silent add -D @types/classnames"

classnames is a stubbed type. Adding to removal list

Removing 1 stubbed types