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

@madeji/npm-package-test-1

v1.1.0

Published

A test for npm package

Downloads

28

Readme

npm-package-test-1

A test for npm package.

0. Create a git repository and a package

  1. git init or git clone xxx
  2. .gitignore: lib and node_modules
  3. npm init for package.json ("type": "module")
    • change name to @your-name-space/package-name (scoped package)
      • you need to run npm publish --access public (the first time)

1. tsconfig.json and source files

  1. npx tsc --init (tsconfig.json)
{
	"compilerOptions": {
		"declaration": true,
		"declarationDir": "lib/types",
		"target": "es2016",
		"moduleResolution": "node"
	},
	"include": ["src/**/*"],
	"exclude": ["node_modules", "lib"]
}
  1. src: ask.ts, answer.ts, index.ts

2. rollup settings

  1. npm i -D rollup @rollup/plugin-typescript rollup-plugin-delete
  2. rollup.config.js: input, output (file, format), plugins
  3. npm run build ("build": "rollup -c")

3. publish settings

  1. update package.json with exports (what others can use your package) (main for CommonJS entry point, module or browser for esm entry point, and types. exports replaces esm and types)
  2. set files for publish (npm publish --dry-run: see the files)
    • default output files: package.json, LICENSE, README.md

npm:

0.1 npm whoami

0.2 npm login

  1. npm publish --access public

4. @changesets/cli setup

  1. git switch -c changesets-install
  2. npm i -D @changesets/cli
  3. npx changeset init
  4. change "access": "restricted" to "access": "public" in .changeset/config.json

5. github workflows setup

  1. add new file .github/workflows/release.yml
  2. add scripts in package.json: "release-package": "npm run build && npx changeset publish" (for github actions to publish)

5.1 github tokens and secrets

  1. github -> settings -> Developer Settings -> Personal access tokens -> Tokens (classic) (check repo and workflow)
  2. a repo -> settings -> secrets and variables -> actions -> new repository secrets
  3. put the name of the secrets to release.yml

5.2 npm tokens

  1. npm -> access tokens -> name -> publish
  2. github step 2
  3. github step 3

6. publish with changesets

  1. a repo -> Settings -> Branches -> add classic branch protection rule -> name and Require a pull request before merging (not Require approvals)
  2. npx changeset (after changing our code, before committing)
  3. commit and push
  4. merge the PR created by committing
  5. merge the versioning PR created by changesets (Version Packages #n, with new version, updating changelog, deleting the changeset created by changesets; will run changesets again, and publish (through github actions), add a tag in github)

7. pre release

7.1 link

  • provider: npm link (npm run build before linking) (npm unlink -g)
  • consumer: npm link provider-package-name

(npm root -g)

7.2 pre release

  1. setup pre-release branch
    1. git switch -c pre-release
    2. npx changeset pre enter alpha
    3. release.yml: add pre-release the same level as main in branches
    4. add, commit and push
  2. do your job in another branch frome the pre-release branch
    1. coding
    2. npx changeset and commit and push
  3. merge
    1. Open a PR to the pre-release branch and merge to it
    2. automatically: changesets actions will opens a versioning PR in pre-release mode
    3. merge this versioning PR (will create a alpha package)
  4. merge to main
    1. switch to a new branch
    2. exit the pre-release mode and open a PR to merge to the main branch (npx changeset pre exit)
    3. add, commit and push
    4. merge the exit branch to main
    5. merge the PR of changesets to publish the new version