🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis
Socket
Book a DemoInstallSign in
Socket

@guardian/braze-components

Package Overview
Dependencies
Maintainers
46
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@guardian/braze-components

React components to render messages from Braze

Source
npmnpm
Version
0.0.20-0
Version published
Weekly downloads
1.6K
26.35%
Maintainers
46
Weekly downloads
 
Created
Source

Braze Components

A library of React components for displaying Braze messages on DCR and frontend.

Development

Local Setup

$ bin/setup

Storybook

We use Storybook when building components. Run Storybook with:

$ yarn storybook

Point a project to your local version of @guardian/braze-components

Use yarn link to develop against a locally checked out version of this library:

In your local checkout of @guardian/braze-components:

$ yarn link

And then in the project consuming the client (e.g. DCR/frontend):

$ yarn link "@guardian/braze-components"

To revert back to using the published version of the package:

$ yarn unlink "@guardian/braze-components"
$ yarn install --force

NOTE:

  • Ensure you build this library before adding it locally to your project, by running yarn build. You can also use yarn watch to build automatically when the source code is changed.

  • The external project (e.g. DCR/frontend) may not be set up to watch changes from linked modules. Removing: ignored: /node_modules/, from watchOptions in frontend will enable make watch (in frontend) to also track changes to braze-components.

Publishing to NPM

You'll need to be part of the @guardian NPM org. Ask someone to add you if you're not already.

$ yarn release

This will:

  • Build the package
  • Interactively ask for a new version number (and create a commit for the version change in package.json)
  • Publish the new release to NPM
  • Push new commits/tags to GitHub

FAQs

Package last updated on 12 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts