-
-
Notifications
You must be signed in to change notification settings - Fork 379
feat!: new template variable {{versionName}}
and change of the behaviour of {{version}}
#1612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: major
Are you sure you want to change the base?
Conversation
…viour of `{{version}}` BREAKING CHANGE: change the behaviour of the template variable `{{version}}` for artifactTemplate and sourcesTemplate to use `manifest.version` and add the new template variable `{{versionName}}` which uses `manifest.version_name` or, if not available, `manifest.version` and takes over the previous behaviour of `{{version}}`
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
{{versionName}}
and change of the …{{versionName}}
and change of the behaviour of {{version}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed the base to be merged into the next major
branch. Not sure when I'll do another major release.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## major #1612 +/- ##
==========================================
- Coverage 80.98% 80.88% -0.11%
==========================================
Files 131 131
Lines 6679 6680 +1
Branches 1094 1092 -2
==========================================
- Hits 5409 5403 -6
- Misses 1259 1266 +7
Partials 11 11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Wait, I still want the default behavior to be the same. So we should update the default templates to use |
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