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

@ifixit/toolbox

v1.1.1

Published

A library of reusable React components for iFixit

Downloads

117

Readme

Toolbox

A library of reusable React components for iFixit.

npm Build Status Code Coverage

https://ifixit.design

Installation

npm install @ifixit/toolbox

Development Setup

# Clone the repo
git clone https://github.com/iFixit/toolbox.git
cd toolbox

# Install the dependencies
npm install

# Start the styleguide dev server
npm start

Code Style

Toolbox adheres to the Airbnb Javascript Style Guide. Code style and quality are enforced by ESLint and Prettier. You can format your code with the lint:fix script:

npm run lint:fix

Commit Message Format

Toolbox adheres to the Conventional Commits Specification for commit messages. Running npm run cm instead of git commit will guide you through the commit process.

Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:

<type>(<scope>): <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>

The header is mandatory and the scope of the header is optional.

Type

Must be one of the following:

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing or correcting existing tests
  • chore: Changes to the build process or auxiliary tools and libraries such as documentation generation
  • build: Changes that affect the build system or external dependencies
  • ci: Change to our CI configuration file and scripts

Scope

The scope could be anything specifying place of the commit change. For example Icon, Tab, SearchInput, etc...

Remember that scope is entirely optional. Only include a scope if the commit message doesn't stand on it's own outside the context of a pull request.

Subject

The subject contains succinct description of the change:

  • Use the imperative, present tense: "Change" not "Changed" nor "Changes"
  • Use sentence case: "Some message" not "some message" nor "Some Message"
  • Do not include a dot (.) at the end

Body

Just as in the subject, use the imperative, present tense: "Change" not "Changed" nor "Changes". The body should include the motivation for the change and contrast this with previous behavior.

Footer

The footer should contain any information about Breaking Changes and is also the place to reference GitHub issues that this commit closes.

Breaking Changes should start with the word BREAKING CHANGE: with a space or two newlines. The rest of the commit message is then used for this.

Examples

Here are examples of the release types that will be generated based on a commit messages:

| Commit message | Release type | |--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------| | fix(pencil): Stop graphite breaking when too much pressure applied | Patch Release | | feat(pencil): Add 'graphiteWidth' option | ~~Minor~~ Feature Release | | perf(pencil): Remove graphiteWidth optionBREAKING CHANGE: The graphiteWidth option has been removed.The default graphite width of 10mm is always used for performance reasons. | ~~Major~~ Breaking Release |

Why?

semantic-release uses commit messages to determine the type of changes in the codebase since the last release. Using these formalized conventions for commit messages allows semantic-release to automatically determine the next semantic version number, generate a changelog and publish to npm automatically.

Testing

Toolbox uses Jest for testing. Learn more about testing React with Jest here: Jest – Testing React Apps

How do I run the tests?

To run the test suite, use one of the following npm scripts:

# Run the test suite
npm test

# Run the test suite in watch mode (recommended during development)
npm run test:watch

# Update Jest snapshots
npm run test:update

# Run the test suite and generate a code coverage report
npm run test:coverage

Where should I place new tests?

Place *.test.jsx files in the same directory as the corresponding component. Example:

src/
  Icon/
    Icon.jsx
    Icon.test.jsx
    ...

Deploying

We use NPM to publish Toolbox with semantic versioning. A publish happens automatically each time a commit is pushed to Master (does not work on an amended commit).