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

semantic-release-firefox-add-on

v0.2.8

Published

A Semantic Release plugin to sign packages through the Firefox AddOn store

Downloads

1,001

Readme

semantic-release-firefox-add-on

CircleCI npm version codecov All Contributors

Overview

This package provides a set of semantic-release plugins for you to easily publish Firefox add ons automatically. Mozilla requires that even self-distributed packages are signed through the add on store. Given a built package, it will write the correct version number into manifest.json and upload the dist folder to the add on store. The package will be validated by Mozilla, and if valid, a signed distribution will be returned and downloaded into the artifacts folder.

Motivation

We were working on a dev tooling extension internally and wanted to release it through the Chrome web store and Mozilla Add On store. The semantic-release-chrome extension worked wonderfully, but we kept struggling to find a semantic-release plugin for FireFox that worked the way we wanted. After finding that web-ext had a Node api, we just built our own plugins using web-ext to accomplish the goal.

Installation

This module is distributed via npm which is bundled with node and should be installed as one of your project's devDependencies:

npm install --save-dev semantic-release-firefox-add-on

Mozilla Add On authentication

You will need to get two parameters from the Add On store: an API Key, and a Secret Key. For more information on how to get those parameters and how to set the environment variables which are required in order for this plugin to work properly, read this guide.

web-ext takes care of creation of the JWT, the only items needed are the API Key and Secret Key.

Usage

This package export the following plugins:

verifyConditions

Verify the following:

  • That environment variables are set for Add On store authentication
  • That an extensionId was specified in the configuration
  • That the source directory is built and that we can locate the manifest.json file within the source directory

Environment variables

  • FIREFOX_API_KEY: REQUIRED Mozilla add-on server api key used in webext sign command
  • FIREFOX_SECRET_KEY: REQUIRED Mozilla add-on server api secret used in webext signing

For more information on the source of these values, see Mozilla Add On authentication

verifyConditions parameters

  • extensionId: REQUIRED The extension id of the extension from the Mozilla Add On store. If this is not specified then a new extension will be created each time the release is run. In order to avoid issues arising due to this, the extension must be created in the Add On store first and the extension Id put into the semantic release configuration.

  • targetXpi: REQUIRED The filename of the XPI file to store in the artifacts directory.

  • sourceDir: The path of the source directory. Defaults to dist.

  • manifestPath: The location of the manifest file within the source directory. Defaults to manifest.json.

prepare

Writes the correct version to the manifest.json.

This plugin requires some parameters to be set, so be sure to check below and fill them accordingly.

prepare parameters

  • sourceDir: The path of the source directory. Defaults to dist.

  • manifestPath: The location of the manifest file within the source directory. Defaults to manifest.json.

publish

Creates an unsigned XPI file out of the source directory and uploads it to the Mozilla Add On, using the web-ext sign command. The output from the sign command will be passed through to the console. If the package is validated and signed, it will download the signed XPI file and store it in the artifacts directory under the specified file name. If the package is validated but not signed (including the case where manual review is required), it will store the unsigned XPI file in the artifacts directory.

publish parameters

  • extensionId: REQUIRED The extension id of the extension from the Mozilla Add On store.

  • targetXpi: REQUIRED The filename of the XPI file to store in the artifacts directory.

  • sourceDir: The path of the source directory. Defaults to dist.

  • channel: The release channel, options are unlisted or listed. An unlisted add on is not published to the store and is justed signed. Defaults to unlisted.

  • artifactsDir: The location to store the signed XPI file when it is returned from Mozilla. Defaults to ./artifacts.

Contribution

Follow the contributing guide.

Contributors

Add more contributors using all-contributors by adding comments in PRs:

@all-contributors please add <username> for <contribution type>