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

@cob/dashboard-info

v3.11.0

Published

``` git clone @cob/dashboard-info cd dashboard-info npm i ```

Downloads

1,729

Readme

Initial Setup

git clone @cob/dashboard-info
cd dashboard-info
npm i

Testing

You can check the status of the existing tests by running:

npm run test

or

npm run test <TestFileName>

However these test are supposed to be running continuously throughout the development process. For this first make sure you have jest cli installed:

npm install jest --global

then run jest in watch mode and check for error during the normal development process. The -o flag means 'only test changed files'.

node --experimental-vm-modules node_modules/.bin/jest —-watch -o

Test cenario baseline

For the tests to run as planned there should be the following instances

  • In Test Person definition:
    • "DefinitionCount Test_*": 0 (zero)
    • "Instances_Test_*": 0 (zero)
  • In Country Series definition:
    • "Arab World": 20
    • "United": 60

Troubleshooting tests

Some of the reasons tests can fail, without just cause, are the following:

  • incorrect base info (check above what is expected)
  • more than 1 jest process running. Check ps -ef | grep jest to make sure there is no unknow jest running in the background
  • no connectivity to https://learning.cultofbits.com

Usefull strategies to analise a specific failling test :

  • run jest --watch -o inside a javascipt debug console (in VCode for example). Breakpoints and debugging will work.
  • change the test to test.only(...) to make sure it is not a conflict with other tests in the same test file
  • try jest --watch -o --runInBand if you think there may be conflicting behavior between test files
  • when tests are not running every db*.json files should be stable (ie, not changing). If they are changing it means some jest is running or a test didn't stop adequately. In this case stop all jest processes and restart jest.

Notice that:

  • There should be only one jest process running
    • if more than two developers are running the DB instances might be overlapped
    • if more than two process running all db*.json cache info will be unreliable

Versioning and publish

  1. increment the version

npm version [<newversion> | major | minor | patch

  1. git push

  2. npm publish