GabeDuarteM / semantic-release-chrome

Set of semantic-release plugins for publishing a Chrome extension release
https://www.npmjs.com/package/semantic-release-chrome
MIT License
43 stars 16 forks source link

allowPrelease feature (issue #111) #112

Open nate-pratt opened 7 months ago

nate-pratt commented 7 months ago

Pull Request

Related issue

https://github.com/GabeDuarteM/semantic-release-chrome/issues/111 - Allow publishing of pre-release version

Description

A new feature that allows the publishing of pre-release versions is introduced in this PR.

Why

When utilizing the semantic-release package's pre-release functionality, the semantic-release-chrome's chrome web api call throws a version format error.

This is prevents the plugin from publishing a new chrome extension version to a staging extension while maintaining the pre-release functionality on my develop branch.

How

Adds an optional boolean allowPrerelease field to the PluginConfig interface. When allowPrerelease is specified and set to true, the semantic version number is parsed from the given version string instead of using the raw string. For example, if 1.0.0-develop.1 is the given pre-release version, then 1.0.0 will be parsed and used for the chrome web store publishing purposes.

Screenshots

How has this been tested

Type of change

Checklist