feat!: new template variable {{versionName}} and change of the behaviour of {{version}} (#1612)
Co-authored-by: Aaron <aaronklinker1@gmail.com>
This commit is contained in:
@@ -64,6 +64,14 @@ In v0.20, how automatic startup is enabled/disabled has changed:
|
||||
rm ~/web-ext.config.ts
|
||||
```
|
||||
|
||||
### `{{version}}` Template Variable Changes
|
||||
|
||||
The `{{version}}` template var in `artifactTemplate` and `sourcesTemplate` used to equal `manifest.version_name ?? manifest.version`. It now equals `{{manifest.version}}`.
|
||||
|
||||
If you have a custom template for one of these options, replace `{{version}}` with `{{versionName}}` to maintain the same behavior.
|
||||
|
||||
If you don't customize `artifactTemplate` or `sourcesTemplate`, this does not effect you.
|
||||
|
||||
## Shadow root UIs no longer include a full HTML document
|
||||
|
||||
`@webext-core/isolated-element` was upgraded to v2. This release changes the internal structure of the shadow DOM, simplifying it from a full `<html>` document to just a `div`:
|
||||
|
||||
@@ -40,8 +40,9 @@ export async function zip(config?: InlineConfig): Promise<string[]> {
|
||||
template
|
||||
.replaceAll('{{name}}', projectName)
|
||||
.replaceAll('{{browser}}', wxt.config.browser)
|
||||
.replaceAll('{{version}}', output.manifest.version)
|
||||
.replaceAll(
|
||||
'{{version}}',
|
||||
'{{versionName}}',
|
||||
output.manifest.version_name ?? output.manifest.version,
|
||||
)
|
||||
.replaceAll('{{packageVersion}}', packageJson?.version)
|
||||
|
||||
@@ -192,8 +192,10 @@ export interface InlineConfig {
|
||||
*
|
||||
* - <span v-pre>`{{name}}`</span> - The project's name converted to
|
||||
* kebab-case
|
||||
* - <span v-pre>`{{version}}`</span> - The version_name or version from the
|
||||
* manifest
|
||||
* - <span v-pre>`{{version}}`</span> - The version from the manifest
|
||||
* - <span v-pre>`{{versionName}}`</span> - The `version_name` from the
|
||||
* manifest or, if not set (i.e. if built for Firefox), the `version` from
|
||||
* the manifest
|
||||
* - <span v-pre>`{{packageVersion}}`</span> - The version from the
|
||||
* package.json
|
||||
* - <span v-pre>`{{browser}}`</span> - The target browser from the
|
||||
@@ -223,8 +225,10 @@ export interface InlineConfig {
|
||||
*
|
||||
* - <span v-pre>`{{name}}`</span> - The project's name converted to
|
||||
* kebab-case
|
||||
* - <span v-pre>`{{version}}`</span> - The version_name or version from the
|
||||
* manifest
|
||||
* - <span v-pre>`{{version}}`</span> - The version from the manifest
|
||||
* - <span v-pre>`{{versionName}}`</span> - The `version_name` from the
|
||||
* manifest or, if not set (i.e. if built for Firefox), the `version` from
|
||||
* the manifest
|
||||
* - <span v-pre>`{{packageVersion}}`</span> - The version from the
|
||||
* package.json
|
||||
* - <span v-pre>`{{browser}}`</span> - The target browser from the
|
||||
|
||||
Reference in New Issue
Block a user