-
-
Notifications
You must be signed in to change notification settings - Fork 440
Open
Labels
pending-triageSomeone (usually a maintainer) needs to look into this to see if it's a bugSomeone (usually a maintainer) needs to look into this to see if it's a bug
Description
Describe the bug
When a user runs npx wxt@latest init, it initializes a WXT project with a chosen pre-made template. The problem is, the WXT version is hardcoded in the template (currently 0.20.6). Even the auto upgrader script explicitly ignores upgrading the WXT version.
if (
name === 'wxt' ||
version.startsWith('workspace:') ||
IGNORED_PACKAGES.includes(name)
)
return;This is probably intentional, as highlighted in the CONTRIUBTING.md:
Note that templates are hardcoded to a specific version of `wxt` from NPM, they do not use the local version
However, it contradicts the latest directive in wxt@latest. When a user runs that command, they will expect to get the current latest WXT version, not an outdated one, let alone 7 months out of date.
I've proposed a PR #2019 that updates the WXT version in the templates to 0.20.13 (current latest), but that's just a temporary fix. A better approach would be to either
- stop hardcoding WXT in the templates and just use the latest version. One approach would be to apply special exclusion criteria for WXT in the auto-upgrade script to allow auto-upgrade for the templates, not internal packages.
- if auto-latest is truly unwanted, consider renaming
@latestdirective to something more accurate
Reproduction
Steps to reproduce
- Run
npx wxt@latest init - See package.json
- You get the exact WXT version currently hardcoded in the templates
System Info
System:
OS: Linux 6.6 Ubuntu 24.04.3 LTS 24.04.3 LTS (Noble Numbat)
CPU: (12) x64 AMD Ryzen 5 6600H with Radeon Graphics
Memory: 1.70 GB / 6.65 GB
Container: Yes
Shell: 5.2.21 - /bin/bash
Binaries:
Node: 22.20.0 - /home/invictus/.nvm/versions/node/v22.20.0/bin/node
npm: 10.9.3 - /home/invictus/.nvm/versions/node/v22.20.0/bin/npm
pnpm: 10.15.1 - /home/invictus/.nvm/versions/node/v22.20.0/bin/pnpm
bun: 1.3.1 - /home/invictus/.bun/bin/bunUsed Package Manager
bun
Validations
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
pending-triageSomeone (usually a maintainer) needs to look into this to see if it's a bugSomeone (usually a maintainer) needs to look into this to see if it's a bug