feat!: new template variable {{versionName}}
and change of the …
#1612
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
… behaviour of
{{version}}
BREAKING CHANGE: change the behaviour of the template variable
{{version}}
for artifactTemplate and sourcesTemplate to usemanifest.version
and add the new template variable{{versionName}}
which usesmanifest.version_name
or, if not available,manifest.version
and takes over the previous behaviour of{{version}}
Overview
This PR is a continuation of PR #1604 and the associated discussion and introduces a breaking change to the behaviour of the template variable
{{version}}
for artifactTemplate and sourcesTemplate. Currently{{version}}
uses the version_name from the manifest or, if not available, the version from the manifest. This is unituitive and it is therefore suggested to change the behaviour to only use the version from the manifest and introduce a new template variable{{versionsName}}
to take over the previous behaviour of{{version}}
:{{version}}
--> always usesmanifest.version
{{versionsName}}
--> usesmanifest. version_name
or fallback tomanifest.version
{{packageVersion}}
--> always uses the version from package.json (which is identical tomanifest.version_name
) [introduced with PR feat: add{{packageVersion}}
as template variable #1604]This gives the user more and consistent control over the version number used in the filename of generated zip files.
Manual Testing
package.json
to1.0.0-beta.1
wxt.config.ts
, runwxt zip
andwxt zip -b firefox
{{name}}-{{version}}-{{browser}}.zip
and{{name}}-{{version}}-sources.zip
:wxt.config.ts
:wxt zip
andwxt zip -b firefox
and the resulting zip files should have the following names:wxt.config.ts
to:wxt zip
andwxt zip -b firefox
and the resulting zip files should have the following names:Related Issue
N/A
This breaking change was discussed in PR #1604