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

tsbuildinfo

v0.0.3

Published

Tool to debug slow build times by looking for large type definitions that may have been erroneously imported.

Downloads

17,545

Readme

tsbuildinfo

Tool to debug slow build times by looking for large type definitions that may have been erroneously imported.

In some typescript projects AWS-SDK has been a very large source of typescript compile slowdowns. by switching form a base import to directly importing the s3 client the build times for one package went from 6 seconds down to 2 seconds.

// Bad
import * as AWS from 'aws-sdk';

// Good
import s3 from 'aws-sdk/clients/s3';

Usage

tsbuildinfo <Path to tsconfig.tsbuildinfo>

Example

Here is a repository that has a base import import * as AWS from 'aws-sdk'

tsbuildinfo ~/basemaps/packages/linzjs-s3fs/tsconfig.tsbuildinfo

Processing /home/blacha/workspace/basemaps/packages/linzjs-s3fs/tsconfig.tsbuildinfo

Largest Imported Modules: 
23.73 MB   aws-sdk
1.13 MB    typescript
684.81 KB  @types/node
81.97 KB   @types/sinon
71.46 KB   @types/aws-lambda

Import Paths:
         ./src/__tests__/file.s3.test.ts => aws-sdk
         ./src/file.s3.ts => aws-sdk
         ./src/index.ts => aws-sdk
         ./src/file.local.ts => @types/node
         ./src/file.s3.ts => @types/node
         ./src/file.ts => @types/node
         ./src/index.ts => @types/node
         ./src/__tests__/file.s3.test.ts => @types/sinon

After switching to import s3 from 'aws-sdk/clients/s3';

Processing /home/blacha/workspace/basemaps/packages/linzjs-s3fs/tsconfig.tsbuildinfo

Largest Imported Modules: 
1.13 MB    typescript
684.81 KB  @types/node
581.09 KB  aws-sdk
81.97 KB   @types/sinon
71.46 KB   @types/aws-lambda

Import Paths:
         ./src/file.local.ts => @types/node
         ./src/file.s3.ts => @types/node
         ./src/file.ts => @types/node
         ./src/index.ts => @types/node
         ./src/__tests__/file.s3.test.ts => aws-sdk
         ./src/file.s3.ts => aws-sdk
         ./src/index.ts => aws-sdk
         ./src/__tests__/file.s3.test.ts => @types/sinon