Compare commits

...

18 Commits

Author SHA1 Message Date
github-actions[bot] fefe601541 chore(release): @wxt-dev/storage v1.2.1
📼 VHS / Create VHS (push) Waiting to run
2025-10-11 17:41:03 +00:00
Aaron 7291c60413 ci: Support NPM OIDC publishing flow and add provenance (#1932) 2025-10-11 12:36:05 -05:00
Jaguar Zhou bb679102b1 fix: wxt normal logs are drowned by dotenv@17.0.0 ads (#1883) 2025-09-09 08:04:18 -05:00
Alexey Karetnikov 16027c8971 chore(templates): Fix typo vite -> wxt (#1885) 2025-09-09 08:02:40 -05:00
github-actions[bot] 84405a33e3 chore(release): wxt v0.20.11
📼 VHS / Create VHS (push) Waiting to run
2025-09-05 13:11:49 +00:00
Aaron bdf795c3f2 chore(deps): Upgrade project subdependencies (#1882) 2025-09-05 08:06:38 -05:00
Qijia Liu ab73084bb5 fix: input_components is supported by mv3 (#1881) 2025-09-05 07:58:09 -05:00
marcellino ornelas e9fb4c5414 fix: Split wxt/testing into separate modules to fix issues with jsdom and happy-dom (#1844)
Co-authored-by: Aaron <aaronklinker1@gmail.com>
2025-09-04 13:56:43 -05:00
github-actions[bot] bc54f525e4 chore(release): @wxt-dev/module-react v1.1.5
📼 VHS / Create VHS (push) Waiting to run
2025-09-04 14:06:52 +00:00
Aaron 9170159bc1 chore(deps): Support @vitejs/plugin-react@5 2025-09-04 09:01:01 -05:00
github-actions[bot] fa657a0366 chore(release): wxt v0.20.10
📼 VHS / Create VHS (push) Waiting to run
2025-09-04 00:03:50 +00:00
Aaron 24920ddd52 chore(deps): publish-browser-extension upgrade (#1880) 2025-09-03 18:59:39 -05:00
Aaron eb0b372113 chore(deps): Upgrade web-ext-run to support CDP (#1879) 2025-09-03 18:51:26 -05:00
Aaron 8f5f4f674e chore(deps): Upgrade non-breaking production dependencies (#1877) 2025-09-03 18:12:54 -05:00
Aaron 38c1dae9c7 ci: Fix fetch depth for notification workflow 2025-09-03 18:08:35 -05:00
Aaron f92bcd1d14 ci: Remove embed from discord notification 2025-09-03 18:07:10 -05:00
Aaron df09b86d23 ci: Fix notification workflow round 4 2025-09-03 18:05:04 -05:00
Aaron bd5cfa10ad ci: Fix notification workflow round 3 2025-09-03 18:00:57 -05:00
25 changed files with 1857 additions and 2854 deletions
+11 -12
View File
@@ -10,26 +10,25 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
with:
fetch-depth: 0
- name: List Commits
id: list-commits
run: |
SUMMARY="$(./scripts/list-unreleased-commits.sh)"
echo "summary<<EOF" >> $GITHUB_OUTPUT
echo "$SUMMARY" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
./scripts/list-unreleased-commits.sh > summary.txt
- name: Discord notification
uses: Ilshidur/action-discord@d2594079a10f1d6739ee50a2471f0ca57418b554
run: |
PAYLOAD=$(jq -n --arg content "${{ env.MESSAGE }}" '{"content": $content}')
curl -X POST \
-F "payload_json=${PAYLOAD}" \
-F "file1=@summary.txt" \
$DISCORD_WEBHOOK
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_UNRELEASED_COMMITS }}
with:
args: |
```
${{ steps.list-commits.outputs.summary }}
```
If a package needs released, please [run the workflow](https://github.com/wxt-dev/wxt/actions/workflows/release.yml).
MESSAGE: |
If a package needs released, please [run the workflow](<https://github.com/wxt-dev/wxt/actions/workflows/release.yml>).
Before running, consider:
- Are there any breaking changes? If so, prepare a list of breaking changes and update the changelog and release notes after the release.
+4 -4
View File
@@ -33,7 +33,8 @@ jobs:
name: Publish
runs-on: ubuntu-22.04
permissions:
contents: write
contents: write # Push version changes
id-token: write # OIDC for NPM publishing
needs:
- validate
steps:
@@ -61,9 +62,8 @@ jobs:
- name: Publish to NPM
working-directory: packages/${{ inputs.package }}
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
pnpm build
pnpm publish
sudo npm i -g npm@latest
npm publish
- name: Create GitHub release
run: pnpm tsx scripts/create-github-release.ts ${{ inputs.package }}
+4 -3
View File
@@ -12,7 +12,8 @@ jobs:
name: 'Sync with @types/chrome'
runs-on: ubuntu-latest
permissions:
contents: write
contents: write # Push version changes
id-token: write # OIDC for NPM publishing
steps:
- name: Checkout
uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0
@@ -42,5 +43,5 @@ jobs:
if: steps.commit.outputs.changes_detected == 'true'
working-directory: packages/browser
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
pnpm publish
sudo npm i -g npm@latest
npm publish
+2 -2
View File
@@ -9,7 +9,7 @@ WXT provides first class support for Vitest for unit testing:
```ts
// vitest.config.ts
import { defineConfig } from 'vitest/config';
import { WxtVitest } from 'wxt/testing';
import { WxtVitest } from 'wxt/testing/vitest-plugin';
export default defineConfig({
plugins: [WxtVitest()],
@@ -36,7 +36,7 @@ This example demonstrates that you don't have to mock `browser.storage` (used by
```ts
import { describe, it, expect } from 'vitest';
import { fakeBrowser } from 'wxt/testing';
import { fakeBrowser } from 'wxt/testing/fake-browser';
const accountStorage = storage.defineItem<Account>('local:account');
+1 -1
View File
@@ -47,7 +47,7 @@
"dependencies": {
"defu": "^6.1.4",
"fs-extra": "^11.3.1",
"sharp": "^0.34.1"
"sharp": "^0.34.3"
},
"devDependencies": {
"@aklinker1/check": "^2.1.0",
+12
View File
@@ -1,5 +1,17 @@
# Changelog
## v1.1.5
[compare changes](https://github.com/wxt-dev/wxt/compare/module-react-v1.1.4...module-react-v1.1.5)
### 🏡 Chore
- **deps:** Support @vitejs/plugin-react@5 ([9170159b](https://github.com/wxt-dev/wxt/commit/9170159b))
### ❤️ Contributors
- Aaron ([@aklinker1](https://github.com/aklinker1))
## v1.1.4
[compare changes](https://github.com/wxt-dev/wxt/compare/module-react-v1.1.3...module-react-v1.1.4)
+2 -2
View File
@@ -18,7 +18,7 @@
},
"license": "MIT",
"funding": "https://github.com/sponsors/wxt-dev",
"version": "1.1.4",
"version": "1.1.5",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.mjs",
@@ -48,7 +48,7 @@
"wxt": ">=0.19.16"
},
"dependencies": {
"@vitejs/plugin-react": "^4.4.1"
"@vitejs/plugin-react": "^4.4.1 || ^5.0.0"
},
"devDependencies": {
"@aklinker1/check": "^2.1.0",
+1 -1
View File
@@ -48,7 +48,7 @@
"wxt": ">=0.19.16"
},
"dependencies": {
"vite-plugin-solid": "^2.11.6"
"vite-plugin-solid": "^2.11.8"
},
"devDependencies": {
"@aklinker1/check": "^2.1.0",
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## v1.2.1
[compare changes](https://github.com/wxt-dev/wxt/compare/storage-v1.2.0...storage-v1.2.1)
## v1.2.0
[compare changes](https://github.com/wxt-dev/wxt/compare/storage-v1.1.1...storage-v1.2.0)
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@wxt-dev/storage",
"description": "Web extension storage API provided by WXT, supports all browsers.",
"version": "1.2.0",
"version": "1.2.1",
"type": "module",
"repository": {
"type": "git",
+33
View File
@@ -1,5 +1,38 @@
# Changelog
## v0.20.11
[compare changes](https://github.com/wxt-dev/wxt/compare/wxt-v0.20.10...wxt-v0.20.11)
### 🩹 Fixes
- Split `wxt/testing` into separate modules to fix issues with `jsdom` and `happy-dom` ([#1844](https://github.com/wxt-dev/wxt/pull/1844))
- `input_components` is supported by mv3 ([#1881](https://github.com/wxt-dev/wxt/pull/1881))
### 🏡 Chore
- **deps:** Upgrade project subdependencies ([#1882](https://github.com/wxt-dev/wxt/pull/1882))
### ❤️ Contributors
- Aaron ([@aklinker1](https://github.com/aklinker1))
- Qijia Liu <liumeo@pku.edu.cn>
- Marcellino Ornelas ([@marcellino-ornelas](https://github.com/marcellino-ornelas))
## v0.20.10
[compare changes](https://github.com/wxt-dev/wxt/compare/wxt-v0.20.9...wxt-v0.20.10)
### 🏡 Chore
- **deps:** Upgrade non-breaking production dependencies ([#1877](https://github.com/wxt-dev/wxt/pull/1877))
- **deps:** Upgrade web-ext-run to support CDP ([#1879](https://github.com/wxt-dev/wxt/pull/1879))
- **deps:** `publish-browser-extension` upgrade ([#1880](https://github.com/wxt-dev/wxt/pull/1880))
### ❤️ Contributors
- Aaron ([@aklinker1](https://github.com/aklinker1))
## v0.20.9
[compare changes](https://github.com/wxt-dev/wxt/compare/wxt-v0.20.8...wxt-v0.20.9)
@@ -345,7 +345,6 @@ describe('Output Directory Structure', () => {
.toMatchInlineSnapshot(`
".output/chrome-mv3/background.js
----------------------------------------
var _a, _b;
import { l as logHello, i as initPlugins } from "./chunks/_virtual_wxt-plugins-OjKtWpmY.js";
function defineBackground(arg) {
if (arg == null || typeof arg === "function") return { main: arg };
@@ -357,7 +356,7 @@ describe('Output Directory Structure', () => {
logHello("background");
}
});
((_b = (_a = globalThis.browser) == null ? void 0 : _a.runtime) == null ? void 0 : _b.id) ? globalThis.browser : globalThis.chrome;
globalThis.browser?.runtime?.id ? globalThis.browser : globalThis.chrome;
function print(method, ...args) {
return;
}
@@ -423,9 +422,8 @@ describe('Output Directory Structure', () => {
.toMatchInlineSnapshot(`
".output/chrome-mv3/background.js
----------------------------------------
var background = function() {
var background = (function() {
"use strict";
var _a, _b;
function defineBackground(arg) {
if (arg == null || typeof arg === "function") return { main: arg };
return arg;
@@ -440,7 +438,7 @@ describe('Output Directory Structure', () => {
});
function initPlugins() {
}
((_b = (_a = globalThis.browser) == null ? void 0 : _a.runtime) == null ? void 0 : _b.id) ? globalThis.browser : globalThis.chrome;
globalThis.browser?.runtime?.id ? globalThis.browser : globalThis.chrome;
function print(method, ...args) {
return;
}
@@ -465,7 +463,7 @@ describe('Output Directory Structure', () => {
}
const result$1 = result;
return result$1;
}();
})();
"
`);
});
+22 -14
View File
@@ -1,7 +1,7 @@
{
"name": "wxt",
"type": "module",
"version": "0.20.9",
"version": "0.20.11",
"description": "⚡ Next-gen Web Extension Framework",
"license": "MIT",
"scripts": {
@@ -24,43 +24,43 @@
"@wxt-dev/browser": "workspace:^",
"@wxt-dev/storage": "workspace:^1.0.0",
"async-mutex": "^0.5.0",
"c12": "^3.0.3",
"c12": "^3.2.0",
"cac": "^6.7.14",
"chokidar": "^4.0.3",
"ci-info": "^4.2.0",
"ci-info": "^4.3.0",
"consola": "^3.4.2",
"defu": "^6.1.4",
"dotenv": "^17.2.2",
"dotenv-expand": "^12.0.2",
"dotenv-expand": "^12.0.3",
"esbuild": "^0.25.0",
"fast-glob": "^3.3.3",
"filesize": "^10.1.6",
"filesize": "^11.0.2",
"fs-extra": "^11.3.1",
"get-port-please": "^3.1.2",
"get-port-please": "^3.2.0",
"giget": "^1.2.3 || ^2.0.0",
"hookable": "^5.5.3",
"import-meta-resolve": "^4.1.0",
"import-meta-resolve": "^4.2.0",
"is-wsl": "^3.1.0",
"json5": "^2.2.3",
"jszip": "^3.10.1",
"linkedom": "^0.18.10",
"linkedom": "^0.18.12",
"magicast": "^0.3.5",
"minimatch": "^10.0.1",
"minimatch": "^10.0.3",
"nano-spawn": "^1.0.2",
"normalize-path": "^3.0.0",
"nypm": "^0.6.0",
"nypm": "^0.6.1",
"ohash": "^2.0.11",
"open": "^10.1.2",
"open": "^10.2.0",
"ora": "^8.2.0",
"perfect-debounce": "^1.0.0",
"perfect-debounce": "^2.0.0",
"picocolors": "^1.1.1",
"prompts": "^2.4.2",
"publish-browser-extension": "^2.3.0 || ^3.0.0",
"publish-browser-extension": "^2.3.0 || ^3.0.2",
"scule": "^1.3.0",
"unimport": "^3.13.1 || ^4.0.0 || ^5.0.0",
"vite": "^5.4.19 || ^6.3.4 || ^7.0.0",
"vite-node": "^2.1.4 || ^3.1.2",
"web-ext-run": "^0.2.3"
"web-ext-run": "^0.2.4"
},
"devDependencies": {
"@aklinker1/check": "^2.1.0",
@@ -179,6 +179,14 @@
"types": "./dist/browser.d.ts",
"default": "./dist/browser.mjs"
},
"./testing/fake-browser": {
"types": "./dist/testing/fake-browser.d.ts",
"default": "./dist/testing/fake-browser.mjs"
},
"./testing/vitest-plugin": {
"types": "./dist/testing/wxt-vitest-plugin.d.ts",
"default": "./dist/testing/wxt-vitest-plugin.mjs"
},
"./testing": {
"types": "./dist/testing/index.d.ts",
"default": "./dist/testing/index.mjs"
@@ -43,7 +43,7 @@ export function extensionApiMock(config: ResolvedConfig): vite.PluginOption {
const setupTemplate = `
import { vi } from 'vitest';
import { fakeBrowser } from 'wxt/testing';
import { fakeBrowser } from 'wxt/testing/fake-browser';
vi.stubGlobal("chrome", fakeBrowser);
vi.stubGlobal("browser", fakeBrowser);
-1
View File
@@ -56,7 +56,6 @@ export function createWebExtRunner(): ExtensionRunner {
),
args: [
'--unsafely-disable-devtools-self-xss-warnings',
'--disable-features=DisableLoadExtensionCommandLineSwitch',
...(wxtUserConfig?.chromiumArgs ?? []),
],
}),
@@ -1351,7 +1351,6 @@ describe('Manifest Utils', () => {
event_rules: {},
file_browser_handlers: {},
file_system_provider_capabilities: {},
input_components: {},
nacl_modules: {},
natively_connectable: {},
offline_enabled: {},
+1
View File
@@ -8,6 +8,7 @@ import type { TargetBrowser } from '../../types';
export function loadEnv(mode: string, browser: TargetBrowser) {
return expand(
config({
quiet: true,
// Files on top override files below
path: [
`.env.${mode}.${browser}.local`,
-1
View File
@@ -716,7 +716,6 @@ const mv2OnlyKeys = [
'event_rules',
'file_browser_handlers',
'file_system_provider_capabilities',
'input_components',
'nacl_modules',
'natively_connectable',
'offline_enabled',
+10
View File
@@ -1 +1,11 @@
/**
* The fake browser is automatically used as a mock for the `wxt/browser` import
* when using `wxt/testing/vitest-plugin` with Vitest. It is also setup to
* reset all state before each test.
*
* This module is just a re-export of [@webext-core/fake-browser](https://webext-core.aklinker1.io/fake-browser/triggering-events).
*
* @module wxt/testing/fake-browser
*/
export { fakeBrowser, type FakeBrowser } from '@webext-core/fake-browser';
+4
View File
@@ -1,5 +1,9 @@
/**
* Utilities for unit testing WXT extensions.
*
* @deprecated Use `wxt/testing/*` instead to prevent issues with JSDOM or
* HappyDOM environments. Will be removed in the next major version of WXT.
*
* @module wxt/testing
*/
export * from './fake-browser';
@@ -1,3 +1,10 @@
/**
* Contains a Vitest plugin that configures your test environment to work with
* WXT projects.
*
* @module wxt/testing/vitest
*/
import type * as vite from 'vite';
import {
download,
@@ -16,7 +23,7 @@ import { registerWxt, wxt } from '../core/wxt';
* ```ts
* // vitest.config.ts
* import { defineConfig } from 'vitest/config';
* import { WxtVitest } from 'wxt/testing';
* import { WxtVitest } from 'wxt/testing/vitest-plugin';
*
* export default defineConfig({
* plugins: [WxtVitest()],
+2
View File
@@ -17,6 +17,8 @@
"src/utils/split-shadow-root-css.ts",
"src/utils/storage.ts",
"src/testing/index.ts",
"src/testing/fake-browser.ts",
"src/testing/wxt-vitest-plugin.ts",
"src/modules.ts"
]
}
+1727 -2800
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,12 +1,12 @@
import './style.css';
import typescriptLogo from '@/assets/typescript.svg';
import viteLogo from '/wxt.svg';
import wxtLogo from '/wxt.svg';
import { setupCounter } from '@/components/counter';
document.querySelector<HTMLDivElement>('#app')!.innerHTML = `
<div>
<a href="https://wxt.dev" target="_blank">
<img src="${viteLogo}" class="logo" alt="WXT logo" />
<img src="${wxtLogo}" class="logo" alt="WXT logo" />
</a>
<a href="https://www.typescriptlang.org/" target="_blank">
<img src="${typescriptLogo}" class="logo vanilla" alt="TypeScript logo" />
+1 -1
View File
@@ -15,7 +15,7 @@
"postinstall": "wxt prepare"
},
"dependencies": {
"vue": "^3.5.13"
"vue": "^3.5.21"
},
"devDependencies": {
"@wxt-dev/module-vue": "^1.0.2",