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

@patterninc/react-ui

v4.11.17

Published

React UI component library for use at [Pattern](https://pattern.com).

Downloads

7,190

Readme

React UI

React UI component library for use at Pattern.

Development

There are 2 ways to run this project:

  1. Run pnpm dev and set a frontend override in the application you are working with (Predict, Shelf, etc) in order to see your updates.
  2. Run pnpm storybook to see a local instance of our Library in Storybook.

When making updates, it is important to get changes approved by the UX team and front-end team leads. Please utilize Chromatic to demo your updates before getting your PRs raised. Chromatic command - npx chromatic --project-token=cb8f4bc760a6. This will allow you to get quick feedback on UI / UX before getting your code reviewed.

Adding/Updating Types

Typescript typechecking happens at build-time, so setting a frontend override won't help with typechecking. To ensure your types still work, you'll need to:

  • yalc publish in this repo

  • yalc link @patterninc/react-ui in the repo where the code will be tested (shelf/predict/marketshare/etc.)

After that, you can easily push out updates/changes from here (react-ui) to the other repos by doing:

  • yalc push --scripts

Note: you can either install yalc globally, or prefix all the previous commands with npx, e.g. npx yalc publish

Updating package.json version

Do either of the following:

  • Run npm version patch
  • Manually update the package.json version field by opening package.json and incrementing the last number

Removing yalc from Apps

Once you've tested the types, run

  • yalc remove @patterninc/react-ui

in the repo where this code was tested (Predict/Shelf/Marketshare/etc) to remove yalc changes

Workflow for Publishing NPM Versions and Bumping Related Repositories Versions

npm-publish.yml Github workflow automates the process of publishing a new version of a react-ui package to NPM and bumping the version in another repository. The workflow will run whenever a new commit is pushed to a master branch in react-ui Git repository. It automatically updates the versions of the following repositories.

  • predict
  • shelf-ui
  • marketshare-ui
  • toggle
  • admin
  • connect

The steps below describe how to bump the version of a newly added react repository.

Step 1: Add Github Actions Workflow to new repository.

Copy the workflow file from the admin repository and replace the repo name with the new repo name from the workflow file and push to master/main branch of repository

Step 2: Modify the npm-publish.yml Workflow to include the new repository version upgrade.

Inside the npm-publish.yml workflow, add a new job before "notify-slack-on-failure"

<new-repo-name>-upgrade-package:
  needs: [publish]
  runs-on: ubuntu-latest
  name: <new-repo-name>-upgrade-package
  if: needs.publish.outputs.publish_type != 'none'
  steps:
    - name: Execute <new-repo-name> GHA workflow to upgrade react-ui package with latest version
      uses: convictional/[email protected]
      with:
        owner: patterninc
        repo: <new-repo-name>
        github_token: ${{ secrets.GHA_RUNNER_TOKEN }}
        workflow_file_name: react-ui-package-upgrade.yml
        ref: main

We can enable react-ui version bumping for new repositories by making the changes listed above.