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

lab-transform-typescript

v3.0.1

Published

transform TypeScript for the lab testing framework

Downloads

8,054

Readme

Lab Transform for TypeScript

lab-transform-typescript transforms TypeScript for use with lab, permitting npm test without having to transpile first in a pretest script.

NPM Version

Usage:

  • npm install --save-dev lab-transform-typescript
  • lab --sourcemaps --transform node_modules/lab-transform-typescript

If you'd like typings support for lab and code, also:

  • typings install --save --global github:garthk/lab-transform-typescript/typings-local/lab.d.ts
  • typings install --save --global github:garthk/lab-transform-typescript/typings-local/code.d.ts

The typings for code are thorough. The typings for lab are pretty thin. I'd much appreciate feedback on and pull requests for improvements on either.

Issues:

  • #1 aka hapijs/lab#614: lab --coverage output shows the transpiled JavaScript, not the source TypeScript.

Caveats:

Which version of typescript you get depends on how you installed it:

  • If you installed with npm install as above, you'll get the typescript from your project's node_modules
  • If you used npm link to take a reference to lab-transform-typescript while fixing a bug in it, you'll get the typescript from lab-transform-typescript/node_modules

Environment Variables:

Set DEBUG=* or DEBUG=lab-transform-typescript to see a version report and configuration loading details on stderr.

Set TSCONFIG to override TypeScript's default search for tsconfig.json, as if you'd set -p on the tsc command line.

Change Log:

  • 3.0.0: switched to TypeScript's configuration loader and parser (set TSCONFIG envar to override location)
  • 2.0.0: moved typescript from dependencies to devDependencies for testing and peerDependencies for production use
  • 1.0.1: added more typings for lab
  • 1.0.0: initial release