Compare commits

...

7 Commits

Author SHA1 Message Date
github-actions[bot] 65fc0fadb3 chore(release): wxt v0.20.20
📼 VHS / Create VHS (push) Waiting to run
2026-03-17 13:21:45 +00:00
Aaron 64b686713b chore(deps): Add vite-node 6 support 2026-03-17 08:16:33 -05:00
Joseph Hu 9c6d3e37d4 docs: Add Extension Rank Checker to the list of extensions (#2193)
Co-authored-by: Aaron <aaronklinker1@gmail.com>
2026-03-17 08:00:23 -05:00
FJRG2007 ツ 37abe9db39 docs: Add Dymo extension ID to UsingWxtSection.vue (#2187)
Co-authored-by: Aaron <aaronklinker1@gmail.com>
2026-03-17 12:43:08 +00:00
Yue Yang 9ebef4a268 chore: remove useDefineForClassFields from svelte/tsconfig.json (#2190) 2026-03-17 07:37:38 -05:00
Hampus Tågerud e60f7c7e77 fix: unlisted script return values broken with Vite 8 sourcemaps (#2197) 2026-03-17 12:35:22 +00:00
aklinker1 36aadd0604 fix: Upgrade @wxt-dev/browser to latest @types/chrome version 2026-03-17 00:39:30 +00:00
14 changed files with 186 additions and 28 deletions
@@ -121,6 +121,8 @@ const chromeExtensionIds = [
'lapnciffpekdengooeolaienkeoilfeo', // All API Hub AI Relay & New API Manager - https://github.com/qixing-jk/all-api-hub
'bhgobenflkkhfcgkikejaaejenoddcmo', // Scrape Similar - Extract data from websites into spreadsheets - https://github.com/zizzfizzix/scrape-similar
'kinlknncggaihnhdcalijdmpbhbflalm', // isTrust - https://github.com/Internet-Society-Belgium/isTrust/
'ojpakgiekphppgkcdihbjpafobhnhlkp', // Dymo
'pmgehhllikbjmadpenhabejhpemplhmd', // Extension Rank Checker - Extension Ranker
];
const { data, err, isLoading } = useListExtensionDetails(chromeExtensionIds);
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@wxt-dev/browser",
"description": "Provides a cross-browser API for using extension APIs and types based on @types/chrome",
"version": "0.1.37",
"version": "0.1.38",
"type": "module",
"main": "src/index.mjs",
"types": "src/index.d.ts",
@@ -23,7 +23,7 @@
"src"
],
"devDependencies": {
"@types/chrome": "0.1.37",
"@types/chrome": "0.1.38",
"@types/node": "^20.0.0",
"nano-spawn": "^2.0.0",
"typescript": "^5.9.3",
+11 -8
View File
@@ -4076,14 +4076,17 @@ export namespace Browser {
id: string;
/**
* Implements the WebCrypto's SubtleCrypto interface. The cryptographic operations, including key generation, are hardware-backed.
* Only non-extractable keys can be generated. The supported key types are RSASSA-PKCS1-V1_5 and RSA-OAEP (on Chrome versions 134+) with `modulusLength` up to 2048 and ECDSA with `namedCurve` P-256. Each RSASSA-PKCS1-V1_5 and ECDSA key can be used for signing data at most once, unless the extension is allowlisted through the KeyPermissions policy, in which case the key can be used indefinitely. RSA-OAEP keys are supported since Chrome version 134 and can be used by extensions allowlisted through that same policy to unwrap other keys.
*
* Only non-extractable keys can be generated. The supported key types are RSASSA-PKCS1-V1_5 with `modulusLength` up to 2048 and ECDSA with `namedCurve` P-256. Each key can be used for signing data at most once, unless the extension is allowlisted by the KeyPermissions policy, in which case the key can be used indefinitely.
*
* Keys generated on a specific `Token` cannot be used with any other Tokens, nor can they be used with `window.crypto.subtle`. Equally, `Key` objects created with `window.crypto.subtle` cannot be used with this interface.
*/
subtleCrypto: SubtleCrypto;
/**
* Implements the WebCrypto's SubtleCrypto interface. The cryptographic operations, including key generation, are software-backed.
* Protection of the keys, and thus implementation of the non-extractable property, is done in software, so the keys are less protected than hardware-backed keys.
* Only non-extractable keys can be generated. The supported key types are RSASSA-PKCS1-V1_5 and RSA-OAEP (on Chrome versions 134+) with `modulusLength` up to 2048. Each RSASSA-PKCS1-V1_5 key can be used for signing data at most once, unless the extension is allowlisted through the KeyPermissions policy, in which case the key can be used indefinitely. RSA-OAEP keys are supported since Chrome version 134 and can be used by extensions allowlisted through that same policy to unwrap other keys.
* Implements the WebCrypto's SubtleCrypto interface. The cryptographic operations, including key generation, are software-backed. Protection of the keys, and thus implementation of the non-extractable property, is done in software, so the keys are less protected than hardware-backed keys.
*
* Only non-extractable keys can be generated. The only supported key type is RSASSA-PKCS1-V1_5 with `modulusLength` up to 2048. up to 2048. Each key can be used for signing data at most once, unless the extension is allowlisted through the KeyPermissions policy, in which case the key can be used indefinitely.
*
* Keys generated on a specific `Token` cannot be used with any other Tokens, nor can they be used with `window.crypto.subtle`. Equally, `Key` objects created with `window.crypto.subtle` cannot be used with this interface.
* @since Chrome 97
*/
@@ -9692,7 +9695,7 @@ export namespace Browser {
/** Sent after onSuspend to indicate that the app won't be unloaded after all. */
export const onSuspendCanceled: events.Event<() => void>;
/** Fired when a message is sent from either an extension process (by {@link runtime.sendMessage}) or a content script (by {@link tabs.sendMessage}). */
/** Fired when a message is sent from either {@link runtime.sendMessage} or {@link tabs.sendMessage}. */
export const onMessage: events.Event<
(message: any, sender: MessageSender, sendResponse: (response?: any) => void) => void
>;
@@ -11058,7 +11061,7 @@ export namespace Browser {
sessionId?: string | undefined;
/**
* The ID of the Split View that the tab belongs to.
* @since Chrome 145
* @since Chrome 140
*/
splitViewId?: number | undefined;
/**
@@ -11134,7 +11137,7 @@ export namespace Browser {
/**
* An ID that represents the absence of a split tab.
* @since Chrome 145
* @since Chrome 140
*/
export const SPLIT_VIEW_ID_NONE: -1;
@@ -11581,7 +11584,7 @@ export namespace Browser {
export function duplicate(tabId: number, callback: (tab?: Tab) => void): void;
/**
* Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The {@link runtime.onMessage} event is fired in each content script running in the specified tab for the current extension.
* Sends a single message to the content script(s) in the specified tab. The {@link runtime.onMessage} event is fired in each content script running in the specified tab for the current extension.
*
* Can return its result via Promise in Manifest V3 or later since Chrome 99.
*/
+24
View File
@@ -1,5 +1,29 @@
# Changelog
## v0.20.20
[compare changes](https://github.com/wxt-dev/wxt/compare/wxt-v0.20.19...wxt-v0.20.20)
### 🩹 Fixes
- Unlisted script return values broken with Vite 8 sourcemaps ([#2197](https://github.com/wxt-dev/wxt/pull/2197))
### 📖 Documentation
- Add Dymo extension ID to UsingWxtSection.vue ([#2187](https://github.com/wxt-dev/wxt/pull/2187))
- Add Extension Rank Checker to the list of extensions ([#2193](https://github.com/wxt-dev/wxt/pull/2193))
### 🏡 Chore
- **deps:** Add vite-node 6 support ([64b68671](https://github.com/wxt-dev/wxt/commit/64b68671))
### ❤️ Contributors
- Aaron ([@aklinker1](https://github.com/aklinker1))
- Joseph Hu ([@KiJO94GO](https://github.com/KiJO94GO))
- FJRG2007 ツ ([@FJRG2007](https://github.com/FJRG2007))
- Hampus Tågerud ([@hampustagerud](https://github.com/hampustagerud))
## v0.20.19
[compare changes](https://github.com/wxt-dev/wxt/compare/wxt-v0.20.18...wxt-v0.20.19)
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "wxt",
"type": "module",
"version": "0.20.19",
"version": "0.20.20",
"description": "⚡ Next-gen Web Extension Framework",
"license": "MIT",
"scripts": {
@@ -58,7 +58,7 @@
"tinyglobby": "^0.2.15",
"unimport": "^3.13.1 || ^4.0.0 || ^5.0.0 || ^6.0.0",
"vite": "^5.4.19 || ^6.3.4 || ^7.0.0 || ^8.0.0-0",
"vite-node": "^3.2.4 || ^5.0.0",
"vite-node": "^3.2.4 || ^5.0.0 || ^6.0.0",
"web-ext-run": "^0.2.4"
},
"peerDependencies": {
@@ -0,0 +1,119 @@
import { describe, expect, it } from 'vitest';
import { iifeFooter } from '../iifeFooter';
interface OutputChunk {
type: 'chunk';
code: string;
isEntry: boolean;
}
interface OutputAsset {
type: 'asset';
source: string;
}
type OutputBundle = Record<string, OutputChunk | OutputAsset>;
function dedent(code: string) {
const lines = code.trim().split('\n');
return lines.map((line) => line.trimStart()).join('\n');
}
function createBundle(code: string): OutputBundle {
return {
'entry.js': {
type: 'chunk',
code: dedent(code),
isEntry: true,
},
};
}
function getCode(bundle: OutputBundle): string {
const entry = bundle['entry.js'];
if (entry.type !== 'chunk') {
throw new Error('expected chunk');
}
return entry.code;
}
function runPlugin(name: string, bundle: OutputBundle) {
const plugin = iifeFooter(name);
// @ts-expect-error -- calling the hook directly
plugin.generateBundle(undefined, bundle);
}
describe('IIFE return value plugin', () => {
it('should append return value when no sourcemap comment', () => {
const bundle = createBundle(`
var foo = (function(){return 1})();
`);
runPlugin('foo', bundle);
expect(getCode(bundle)).toBe(
dedent(`
var foo = (function(){return 1})();
foo;
`),
);
});
it('should insert return value before sourcemap comment', () => {
const bundle = createBundle(`
var foo = (function(){return 1})();
//# ${'sourceMappingURL'}=foo.js.map
`);
runPlugin('foo', bundle);
expect(getCode(bundle)).toBe(
dedent(`
var foo = (function(){return 1})();
foo;
//# ${'sourceMappingURL'}=foo.js.map
`),
);
});
it('should insert return value before inline sourcemap', () => {
const bundle = createBundle(`
var foo = (function(){return 1})();
//# ${'sourceMappingURL'}=data:application/json;base64,abc123
`);
runPlugin('foo', bundle);
expect(getCode(bundle)).toBe(
dedent(`
var foo = (function(){return 1})();
foo;
//# ${'sourceMappingURL'}=data:application/json;base64,abc123
`),
);
});
it('should skip non-entry chunks', () => {
const bundle = createBundle('var x = 1;');
(bundle['entry.js'] as OutputChunk).isEntry = false;
runPlugin('x', bundle);
expect(getCode(bundle)).toBe('var x = 1;');
});
it('should skip assets', () => {
const bundle: OutputBundle = {
'style.css': {
type: 'asset',
source: 'body {}',
} satisfies OutputAsset,
};
runPlugin('style', bundle);
expect((bundle['style.css'] as OutputAsset).source).toBe('body {}');
});
});
@@ -13,7 +13,20 @@ export function iifeFooter(iifeReturnValueName: string): Plugin {
generateBundle(_, bundle) {
for (const chunk of Object.values(bundle)) {
if (chunk.type === 'chunk' && chunk.isEntry) {
chunk.code += `${iifeReturnValueName};`;
const code = chunk.code;
const marker = '\n//# sourceMappingURL=';
const returnValue = `${iifeReturnValueName};`;
const index = code.indexOf(marker);
if (index >= 0) {
chunk.code =
code.slice(0, index + 1) +
`${returnValue}\n` +
code.slice(index + 1);
} else {
chunk.code += `\n${returnValue}`;
}
}
}
},
+6 -6
View File
@@ -173,8 +173,8 @@ importers:
version: 1.2.16
devDependencies:
'@types/chrome':
specifier: 0.1.37
version: 0.1.37
specifier: 0.1.38
version: 0.1.38
'@types/node':
specifier: ^20.0.0
version: 20.19.32
@@ -541,7 +541,7 @@ importers:
specifier: ^5.4.19 || ^6.3.4 || ^7.0.0 || ^8.0.0-0
version: 7.3.1(@types/node@20.19.32)(jiti@2.6.1)(sass@1.97.3)(tsx@4.21.0)(yaml@2.8.2)
vite-node:
specifier: ^3.2.4 || ^5.0.0
specifier: ^3.2.4 || ^5.0.0 || ^6.0.0
version: 5.3.0(@types/node@20.19.32)(jiti@2.6.1)(sass@1.97.3)(tsx@4.21.0)(yaml@2.8.2)
web-ext-run:
specifier: ^0.2.4
@@ -2129,8 +2129,8 @@ packages:
'@types/chai@5.2.3':
resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==}
'@types/chrome@0.1.37':
resolution: {integrity: sha512-IJE4ceuDO7lrEuua7Pow47zwNcI8E6qqkowRP7aFPaZ0lrjxh6y836OPqqkIZeTX64FTogbw+4RNH0+QrweCTQ==}
'@types/chrome@0.1.38':
resolution: {integrity: sha512-5aK4m9wZqoWAoB98aElESLm/5pXpqJnFWMNoiCs/XdPsXR6wNdVkJFSdQ9Wr4PnTuUrxD0SuNuDHh3EG5QeBzA==}
'@types/debug@4.1.12':
resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==}
@@ -6237,7 +6237,7 @@ snapshots:
'@types/deep-eql': 4.0.2
assertion-error: 2.0.1
'@types/chrome@0.1.37':
'@types/chrome@0.1.38':
dependencies:
'@types/filesystem': 0.0.36
'@types/har-format': 1.2.16
+1 -1
View File
@@ -23,6 +23,6 @@
"@types/react-dom": "^19.2.3",
"@wxt-dev/module-react": "^1.1.5",
"typescript": "^5.9.3",
"wxt": "^0.20.19"
"wxt": "^0.20.20"
}
}
+1 -1
View File
@@ -20,6 +20,6 @@
"devDependencies": {
"@wxt-dev/module-solid": "^1.1.4",
"typescript": "^5.9.3",
"wxt": "^0.20.19"
"wxt": "^0.20.20"
}
}
+1 -1
View File
@@ -21,6 +21,6 @@
"svelte-check": "^4.4.4",
"tslib": "^2.8.1",
"typescript": "^5.9.3",
"wxt": "^0.20.19"
"wxt": "^0.20.20"
}
}
+1 -4
View File
@@ -1,6 +1,3 @@
{
"extends": "./.wxt/tsconfig.json",
"compilerOptions": {
"useDefineForClassFields": true
}
"extends": "./.wxt/tsconfig.json"
}
+1 -1
View File
@@ -16,6 +16,6 @@
},
"devDependencies": {
"typescript": "^5.9.3",
"wxt": "^0.20.19"
"wxt": "^0.20.20"
}
}
+1 -1
View File
@@ -21,6 +21,6 @@
"@wxt-dev/module-vue": "^1.0.3",
"typescript": "^5.9.3",
"vue-tsc": "^3.2.5",
"wxt": "^0.20.19"
"wxt": "^0.20.20"
}
}