Skip to content

feat!: add {{modeSuffix}} to zip templates and update defaults #1623

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Tensai75
Copy link
Contributor

@Tensai75 Tensai75 commented Apr 27, 2025

BREAKING CHANGE: use {{packageVersion}} as default in artifactTemplate and sourcesTemplate & add template variable {{modeSuffix}} to artifactTemplate and sourcesTemplate and use it as default

Overview

This PR is a continuation of PR #1604, #1605 and #1612 and the associated discussion and introduces a breaking change to the default templates for artifactTemplate and sourcesTemplate:

  1. it replaces {{version}} with {{packageVersion}} (introduced with PR feat: add {{packageVersion}} as template variable #1604) in the artifactTemplate and sourcesTemplate
  2. adds {{modeSuffix}} as a new template variable for artifactTemplate and sourcesTemplate
  3. adds {{modeSuffix}} to the end of artifactTemplate and sourcesTemplate
sourcesTemplate: '{{name}}-{{packageVersion}}-sources{{modeSuffix}}.zip'
artifactTemplate: '{{name}}-{{packageVersion}}-{{browser}}{{modeSuffix}}.zip'

Manual Testing

  1. set the version in package.json to 1.0.0-beta.1
  2. remove any custom artifactTemplate and sourcesTemplate in wxt.config.ts
  3. run wxt zip -m development & wxt zip -m development -b firefox
  4. the resulting zip file should be named like:
    extensionname-1.0.0-beta.1-chrome-dev.zip
    extensionname-1.0.0-beta.1-firefox-dev.zip
    extensionname-1.0.0-beta.1-sources-dev.zip
    

Related Issue

This PR closes #1618

BREAKING CHANGE: use `{{packageVersion}}` as default in artifactTemplate and sourcesTemplate
BREAKING CHANGE: add template variable `{{modeSuffix}}` to artifactTemplate and sourcesTemplate and use it as default.
Copy link

netlify bot commented Apr 27, 2025

Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 2e29f9b
🔍 Latest deploy log https://app.netlify.com/sites/creative-fairy-df92c4/deploys/680df57d89074a0008b46176
😎 Deploy Preview https://deploy-preview-1623--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add modeSuffix to default sources template
1 participant