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

browserslist-new-relic

v2.0.0

Published

Generate a custom usage data file for Browserslist from your New Relic Browser data.

Downloads

32

Readme

browserslist-new-relic

A CLI tool that generates a custom usage data file for Browserslist from your New Relic Browser data.

npm package total downloads node version license open issues Tests

How to use

Before you can run the command you'll need to prepare the following information:

  • New Relic Browser application ID
  • New Relic account ID
  • New Relic Insights query API key

Check out the Options section for specific details.

In the root of your project run

npx browserslist-new-relic --appId <application id> --accountId <account id> --apiKey <api key>

Now that you've successfully run the command you'll have generated browserslist-stats.json in your project's root directory. This file contains your custom usage data from New Relic. In your browserslist config you can now do things like:

> 0.5% in my stats

or

> 0.5% in my stats, > 1% in US

Options

--version    Show version number                                     [boolean]
--accountId  New Relic account ID                          [string] [required]
--apiKey     New Relic Insights query API key              [string] [required]
--appId      New Relic Browser application ID              [string] [required]
--debug      Turn on debugging output               [boolean] [default: false]
--duration   Days of browser usage to fetch              [number] [default: 7]
--help       Show help                                               [boolean]

--accountId

The New Relic account ID that you want to retrieve data for. For information on where to find your account ID, check the New Relic docs.

  • Default: None
  • Environment Variable: BROWSERSLIST_NEW_RELIC_ACCOUNT_ID
  • Required: Yes

--apiKey

A New Relic Insights query API key. For information on creating a query API key, check the New Relic docs.

  • Default: None
  • Environment Variable: BROWSERSLIST_NEW_RELIC_API_KEY
  • Required: Yes

--appId

The New Relic Browser application ID that you want to retrieve data for. For more information on where to find your application ID, check the New Relic docs.

  • Default: None
  • Environment Variable: BROWSERSLIST_NEW_RELIC_APP_ID
  • Required: Yes

--debug

Turns on output used for debugging issues.

  • Default: false
  • Environment Variable: None
  • Required: No

--duration

The number of days of browser usage data to fetch.

  • Default: 7
  • Environment Variable: None
  • Required: No

--help

Outputs information about the options.

  • Default: None
  • Environment Variable: None
  • Required: No

--version

Outputs some helpful information about the command.

  • Default: None
  • Environment Variable: None
  • Required: No

Example Usage

With all required options

browserslist-new-relic --appId 48927374561 --accountId 45182429 --apiKey Hus4-hsSDFjls802dsSfjI82-PZhsqotm2H86

With all required options as environment variables

browserslist-new-relic

With duration of 2 days

browserslist-new-relic --duration 2 --appId 48927374561 --accountId 45182429 --apiKey Hus4-hsSDFjls802dsSfjI82-PZhsqotm2H86

With debugging output

browserslist-new-relic --debug --appId 48927374561 --accountId 45182429 --apiKey Hus4-hsSDFjls802dsSfjI82-PZhsqotm2H86

Issues

Please report any issues on GitHub.