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

sasquatchtest

v0.0.3

Published

Note personalization components

Downloads

5

Readme

React components and Javascript utilities for the Lovepop personalize and send flow.

build release

Contributing

Before getting started, read the contributing guide to get up to speed on how to make changes.

Dependencies

There are a couple of important things to be aware of at this time.

NPM Version

Github Actions will use npm version 6 for node version 14. For consistency, best to use npm version 6 when making changes locally. Target it with the following command:

npm i -g npm@6

Force Resolutions

We recently encountered a dependencies issue introduced by a breaking changes in the latest @types/react version. Basically, a dependency of material-ui v4 (react-transition-group) is now using the latest version of @types/react, which conflicts with our dependency on the previous version of react-types. Despite the breaking changes, npm is not preventing the update in the background. You can find a description of the issue on SO here and a similar one on the material-ui github here.

The latest version of npm supports an overrides property for the package.json that works similarly to yarn's resolutions. However, we're currently using npm version 6 and need to rely on an external package to achieve the same behavior.

To fix this we used npm-force-resolutions to ensure that @react/types@17 is used in sasquatch consistently. In order to build the package at release time we had to commit the package-lock.json. Until we find a way to resolve the dependency issue for @types/react changes to the lockfile will need to be committed.

If this problem occurs again, then to update with npm-force-resolution follow the steps outlined here. DON'T commit the preinstall script after the install completes. Remove it from the pacakge.json. Otherwise, it will complain about a missing package-lock.json when installing on lovepop-storefront.

"scripts": {
  "preinstall": "npx npm-force-resolutions"
}

Installation

Sasquatch is available as an npm package.

// with npm
npm install @lovepop/sasquatch

// with yarn
yarn add @lovepop/sasquatch

Usage

Here is a quick example to get you started (to be updated as implemented):

import * as React from 'react';
import ReactDOM from 'react-dom';
import ProductPersonalizationFlow from '@lovepop/sasquatch';

function App() {
  return (
    <ProductPersonalizationFlow
      endpoint={'https://devapi.lovepopcards.com'}
      onError={console.error}
      product={{ title: 'Example Product', image: 'https://image.url' }}
    />
  );
}

ReactDOM.render(<App />, document.querySelector('#app'));

Documentation

Storybook documentation for main lives here. You need to login through Vercel. Preview links are generated for each commit, so docs for in-progress components or components only commited to the beta branch can be found that way.