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

@streetsidesoftware/github-action-toolkit

v1.0.0

Published

A small replacement for @actions/core in the code of a GitHub Action, with no dependencies.

Readme

@streetsidesoftware/github-action-toolkit

A small replacement for @actions/core in the code of a GitHub Action, with no dependencies.

An action ships with its dependencies bundled in. With @actions/core, that means an HTTP client and a command runner too, about 700 kB, or 400 kB minified, whether the action uses them or not.

This package talks to the runner directly, so an action's bundle holds little more than its own code. It covers the basics, such as reading inputs, setting outputs, adding to the job summary and failing the step.

For what it doesn't cover, use @actions/core.

Install

npm install @streetsidesoftware/github-action-toolkit

Usage

An action that counts the files in a directory declares one input and one output in its action.yaml:

inputs:
  directory:
    description: The directory to look in.
    default: .
outputs:
  count:
    description: The number of files found.
runs:
  using: node24
  main: dist/index.js

Its code reads the input, sets the output, and reports what it did:

import { readdir } from 'node:fs/promises';

import { appendJobSummary, getInput, setFailed, setOutput } from '@streetsidesoftware/github-action-toolkit';

try {
  const directory = getInput('directory');
  const files = await readdir(directory);

  setOutput('count', files.length);
  appendJobSummary(`Found ${files.length} files in \`${directory}\`.\n`);
} catch (error) {
  setFailed(String(error));
}

getInput(name)

Read one of the action's inputs. The value comes back without the whitespace around it. An input without a value gives ''.

Every input is a string. A workflow that sets dry-run: true gives 'true':

const dryRun = getInput('dry-run') === 'true';

setOutput(name, value)

Set one of the action's outputs, for later steps to read from steps.<step id>.outputs.<name>.

Every output is a string too, so a number or boolean is stored as its text, such as '3' or 'true'. A string can span several lines.

appendJobSummary(markdown)

Add Markdown to the end of the job summary, which shows on the workflow run's page.

The Markdown goes in as given, right after what the summary already holds, so end it with a newline:

appendJobSummary('## Updated\n\n');
appendJobSummary('- actions/checkout\n');

setFailed(message)

Report an error to the runner and make the step fail. The message shows as an error in the step's log and on the workflow run's page.

The process keeps running. Its exit code is set to 1, so the step fails when the process ends.

Outside a workflow run

The functions talk to the GitHub Actions runner through environment variables and files. To run an action's code in a test or on your own machine, set what it uses:

| Function | Uses | | ------------------ | ------------------------------------------------------------------------------------------------ | | getInput | INPUT_<NAME>: the input's value. The name is in upper case, with each space as _. | | setOutput | GITHUB_OUTPUT: the path of a file the outputs are added to. Without it, the call throws. | | appendJobSummary | GITHUB_STEP_SUMMARY: the path of a file the Markdown is added to. Without it, the call throws. | | setFailed | Standard output, where it prints an ::error:: line, and process.exitCode. |

Coming from @actions/core

Three of the functions have the names they have in @actions/core, with these differences:

  • getInput takes no options. It always trims the value, and never throws for an input without one.
  • setOutput takes a string, number or boolean. Convert any other value to a string first, such as with JSON.stringify.
  • setFailed takes a string. Convert an Error first, such as with String(error).

In place of summary.addRaw(markdown) followed by summary.write(), call appendJobSummary(markdown).

Requirements