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

v2.0.10

Published

Set of semantic-release plugins for publishing a Firefox extension release

Downloads

32

Readme

semantic-release-firefox

npm version build status codecov dependencies peerDependencies code style: prettier semantic-release

A semantic-release plugin for you to be able to easily publish Firefox Extensions using it's automated release. Will update the version in the manifest, create a .xpi, zip your sources and submit everything for review, including semantic release notes.

Since Mozilla does not expose an API to do fully automated extension releases, runs a headless Chrome through Puppeteer to upload the files through the web form.

Plugins

verifyConditions

Verify the presence of the authentication (set via environment variables).

prepare

Write the correct version to the manifest.json and creates a xpi file of the whole dist folder.

  • xpiPath: Required, the filename of the xpi file.
  • distFolder: Required, the folder that will be zipped.
  • manifestPath: Optional, the path of the manifest inside the dist folder. Defaults to ${distFolder}/manifest.json.
  • sourcesGlob: Optional, a glob pattern of source files that will be zipped and submitted for review. Defaults to all files in the cwd (**)
  • sourcesGlobOptions: Optional, glob options passed to node-glob. Defaults to ignore node_modules, distFolder, xpiPath and sourcesArchivePath. You can use this for example if
    • you need to include dotfiles (set { dot: true })
    • if you need to include certain private packages from node_modules (set ignore: 'node_modules/!(privatepkg|privatepkg2)/**'). Make sure to still exclude sourcesArchivePath or the plugin may get stuck in an infinite loop trying to add the archive to itself!
  • sourcesArchivePath: Optional, the file path for the zip with the source files that will be created. Defaults to ./sources.zip. Set this to null to not create a sources archive.

publish

Uploads the generated xpi file, a zip of the sources and submits it together with release notes.

  • xpiPath: Required, the filename of the xpi file.
  • addOnSlug: Required, The URL slug of the extension, as in https://addons.mozilla.org/en-US/firefox/addon/SLUG/
  • sourcesArchivePath: Optional, the file path for the zip with the source code that will be uploaded. Defaults to ./sources.zip. Set this to null to not upload a sources archive.
  • notesToReviewer: Optional, notes to the reviewer that will be submitted for every version. For example, you could link to the source code on GitHub.

Configuration

Mozilla Add-On hub authentication

The following environment variables have to be made available in your CI environment: FIREFOX_EMAIL, FIREFOX_PASSWORD and FIREFOX_TOTP_TOKEN. It is recommended to create a bot account for them.

The account must have 2FA set up, with the 2FA secret saved in FIREFOX_TOTP_TOKEN. Click on "Can't scan code?" when being shown the setup QR code to reveal the TOTP secret in plain text.

Make sure the account accepted the terms & agreements by visiting the submit page once (otherwise the release will fail).

Release configs

Use semantic-release-chrome as part of verifyConditions, prepare and publish.

A basic config file example is available below:

{
  "verifyConditions": ["semantic-release-firefox", "@semantic-release/github"],
  "prepare": [
    {
      "path": "semantic-release-firefox",
      "xpiPath": "my-extension.xpi",
      "distFolder": "dist"
    }
  ],
  "publish": [
    {
      "path": "semantic-release-firefox",
      "xpiPath": "my-extension.xpi",
      "addOnSlug": "my-extension"
    },
    {
      "path": "@semantic-release/github",
      "assets": [
        {
          "path": "my-extension.xpi"
        }
      ]
    }
  ]
}

Development

Tests for the publish plugin are running against a mock AMO server written with Express. Run them with npm test.