feat!: new template variable {{versionName}} and change of the behaviour of {{version}} - #1612
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}}
aklinker1
left a comment
There was a problem hiding this comment.
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 79.48% 79.26% -0.22%
==========================================
Files 132 131 -1
Lines 3982 3970 -12
Branches 908 905 -3
==========================================
- Hits 3165 3147 -18
- Misses 728 731 +3
- Partials 89 92 +3 ☔ View full report in Codecov by Harness. 🚀 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 |
…` option (wxt-dev#2142) Co-authored-by: nickbar01234 <nickbar01234gmail.com> Co-authored-by: Aaron <aaronklinker1@gmail.com>
…#2150) Co-authored-by: Aaron <aaronklinker1@gmail.com>
Co-authored-by: Smit <sm17p@users.noreply.github.com>
…xt-dev#1808) Co-authored-by: Aaron <aaronklinker1@gmail.com>
Co-authored-by: Florian Metz <me@timeraa.dev> Co-authored-by: Aaron <aaronklinker1@gmail.com>
…-dev#1623) Co-authored-by: Aaron <aaronklinker1@gmail.com>
Co-authored-by: Patryk Kuniczak <p.kuniczak@gmail.com>
|
@aklinker1 It's possible to be merged into |
I had to review previous conversations, but this PR is correct. Merging. |
|
Looks like I've got some checks failing on the |
# Conflicts: # .github/workflows/auto-label.yml # .github/workflows/vhs.yml # MAINTAINERS.md # docs/.vitepress/config.ts # docs/assets/init-demo.gif # docs/guide/essentials/wxt-modules.md # docs/guide/resources/upgrading.md # packages/analytics/CHANGELOG.md # packages/analytics/modules/analytics/client.ts # packages/analytics/modules/analytics/types.ts # packages/analytics/package.json # packages/auto-icons/package.json # packages/auto-icons/src/__test__/index.test.ts # packages/i18n/CHANGELOG.md # packages/i18n/package.json # packages/is-background/package.json # packages/is-background/src/index.ts # packages/wxt/e2e/tests/modules.test.ts # packages/wxt/e2e/tests/runners.test.ts # packages/wxt/e2e/tests/typescript-project.test.ts # packages/wxt/e2e/utils.ts # packages/wxt/package.json # packages/wxt/src/browser.ts # packages/wxt/src/core/builders/vite/index.ts # packages/wxt/src/core/builders/vite/plugins/removeEntrypointMainFunction.ts # packages/wxt/src/core/create-server.ts # packages/wxt/src/core/generate-wxt-dir.ts # packages/wxt/src/core/resolve-config.ts # packages/wxt/src/core/utils/building/find-entrypoints.ts # packages/wxt/src/core/utils/testing/fake-objects.ts # packages/wxt/src/types.ts # pnpm-lock.yaml # templates/react/package.json # templates/solid/package.json # templates/svelte/package.json # templates/vanilla/package.json # templates/vue/package.json
|
Sorry for the delay on this, I put it off until right before the next version will be released. Merging once checks pass. |
|
Thanks for helping make WXT better! |
…viour of `{{version}}` (#1612)
Co-authored-by: Aaron <aaronklinker1@gmail.com>
…viour of `{{version}}` (#1612)
Co-authored-by: Aaron <aaronklinker1@gmail.com>
BREAKING CHANGE: change the behaviour of the template variable
{{version}}for artifactTemplate and sourcesTemplate to usemanifest.versionand add the new template variable{{versionName}}which usesmanifest.version_nameor, if not available,manifest.versionand 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_nameor 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.jsonto1.0.0-beta.1wxt.config.ts, runwxt zipandwxt zip -b firefox{{name}}-{{version}}-{{browser}}.zipand{{name}}-{{version}}-sources.zip:wxt.config.ts:wxt zipandwxt zip -b firefoxand the resulting zip files should have the following names:wxt.config.tsto:wxt zipandwxt zip -b firefoxand the resulting zip files should have the following names:Related Issue
N/A
This breaking change was discussed in PR #1604