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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@probedjs/task-runner

v0.2.1

Published

A straightforward batch task runner with good looking logs.

Readme

Task Runner

A straightforward batch task runner with good looking logs.

N.B. This library does not use (liberator)[http://example.com], because it is a dependency of it.

Usage:

Creating and running a task:

import { run } from '@probedjs/task-runner';

const result = run("My Build", async () => {
    // Do the build here.

    return "all done!";
})

console.log(await result); // Will print "all done!"

Running Subtasks:

When run() is called from within a task, that creates a subtask.

import {run} from '@probedjs/task-runner';

await run("My Build", async () => {
    run("step 1", async ()=>{
        //...
    })

    run("step 2", async ()=>{
        //...
    })

    // No need to explicitely await the subtasks
})

Dependencies:

If a task depends on the results of another, simply await the results

import {run} from '@probedjs/task-runner';

await run("My Build", async () => {
    const dataProm = run("step 1", async ()=>{
        return { filename: "path/to/file" };
    })

    run("step 2", async () => {
        const data = await dataProm;

        // use data.
    })
})

Dynamic tasks:

Task lists do not have to be fixed. They can even depend on the result of some other task:

import {run} from '@probedjs/task-runner';

await run("My Build", async () => {
    const cacheProm = run("Load Cache", async ()=>{
        // return either a cache or undefined.
    })


    if(await cacheProm === undefined) {
        run("full build", async()=>{
            //...
        });
    }
})

Optional tasks:

Optional tasks do not fail their parent if they fail themselves:

import {run, runOptional} from '@probedjs/task-runner';
import { default as fs } from 'fs-extra';

await run("My Build", async () => {
    const cleanupDone = runOptional("Remove old build", ()=>fs.rm("path/to/dist"));

    run("Build", async () => {
        await cleanupDone;

        // Do the build
    });
})

Messages and status:

For the most part, status is handled automatically. However, you still can set the status of a task manually.

import { run, setMessage, setStatus } from '@probedjs/task-runner';

await run("My Build", async () => {
    setMessage("Hi There");
    setStatus('warn');
})