wxt 0.18.9 → 0.18.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-6XSIWUWF.js +57 -0
- package/dist/{chunk-UA35R5HN.js → chunk-XNTIBS6O.js} +295 -202
- package/dist/cli.js +350 -238
- package/dist/{execa-D7CMCKO2.js → execa-4UBDUBJZ.js} +566 -478
- package/dist/{execa-ATHZH2Y4.js → execa-QLUM2B3W.js} +566 -478
- package/dist/{index-B0efqfEK.d.ts → index-CER9SLWP.d.cts} +69 -13
- package/dist/{index-B0efqfEK.d.cts → index-CER9SLWP.d.ts} +69 -13
- package/dist/index.cjs +1134 -913
- package/dist/index.d.cts +14 -3
- package/dist/index.d.ts +14 -3
- package/dist/index.js +18 -12
- package/dist/modules.d.cts +1 -1
- package/dist/modules.d.ts +1 -1
- package/dist/modules.js +8 -49
- package/dist/testing.cjs +253 -122
- package/dist/testing.d.cts +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +18 -9
- package/dist/virtual/background-entrypoint.js +9 -1
- package/package.json +9 -9
package/dist/testing.js
CHANGED
|
@@ -3,10 +3,11 @@ import {
|
|
|
3
3
|
globals,
|
|
4
4
|
resolveConfig,
|
|
5
5
|
tsconfigPaths,
|
|
6
|
-
|
|
6
|
+
vitePlugin,
|
|
7
7
|
webextensionPolyfillMock
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XNTIBS6O.js";
|
|
9
9
|
import "./chunk-BERPNPEZ.js";
|
|
10
|
+
import "./chunk-6XSIWUWF.js";
|
|
10
11
|
import "./chunk-BM6QYGAW.js";
|
|
11
12
|
import "./chunk-QGM4M3NI.js";
|
|
12
13
|
|
|
@@ -14,14 +15,22 @@ import "./chunk-QGM4M3NI.js";
|
|
|
14
15
|
import { fakeBrowser } from "@webext-core/fake-browser";
|
|
15
16
|
|
|
16
17
|
// src/testing/wxt-vitest-plugin.ts
|
|
18
|
+
import { createUnimport } from "unimport";
|
|
17
19
|
function WxtVitest(inlineConfig) {
|
|
18
|
-
return resolveConfig(inlineConfig ?? {}, "serve").then((config) =>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
return resolveConfig(inlineConfig ?? {}, "serve").then(async (config) => {
|
|
21
|
+
const plugins = [
|
|
22
|
+
webextensionPolyfillMock(config),
|
|
23
|
+
globals(config),
|
|
24
|
+
download(config),
|
|
25
|
+
tsconfigPaths(config)
|
|
26
|
+
];
|
|
27
|
+
if (config.imports !== false) {
|
|
28
|
+
const unimport = createUnimport(config.imports);
|
|
29
|
+
await unimport.init();
|
|
30
|
+
plugins.push(vitePlugin(unimport));
|
|
31
|
+
}
|
|
32
|
+
return plugins;
|
|
33
|
+
});
|
|
25
34
|
}
|
|
26
35
|
export {
|
|
27
36
|
WxtVitest,
|
|
@@ -133,7 +133,15 @@ async function reloadTabsForContentScript(contentScript) {
|
|
|
133
133
|
if (!url) return false;
|
|
134
134
|
return !!matchPatterns.find((pattern) => pattern.includes(url));
|
|
135
135
|
});
|
|
136
|
-
await Promise.all(
|
|
136
|
+
await Promise.all(
|
|
137
|
+
matchingTabs.map(async (tab) => {
|
|
138
|
+
try {
|
|
139
|
+
await browser2.tabs.reload(tab.id);
|
|
140
|
+
} catch (err) {
|
|
141
|
+
logger.warn("Failed to reload tab:", err);
|
|
142
|
+
}
|
|
143
|
+
})
|
|
144
|
+
);
|
|
137
145
|
}
|
|
138
146
|
async function reloadContentScriptMv2(_payload) {
|
|
139
147
|
throw Error("TODO: reloadContentScriptMv2");
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.18.
|
|
4
|
+
"version": "0.18.11",
|
|
5
5
|
"description": "Next gen framework for developing web extensions",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -114,12 +114,12 @@
|
|
|
114
114
|
"jiti": "^1.21.6",
|
|
115
115
|
"json5": "^2.2.3",
|
|
116
116
|
"jszip": "^3.10.1",
|
|
117
|
-
"linkedom": "^0.18.
|
|
117
|
+
"linkedom": "^0.18.4",
|
|
118
118
|
"magicast": "^0.3.4",
|
|
119
|
-
"minimatch": "^9.0.
|
|
119
|
+
"minimatch": "^9.0.5",
|
|
120
120
|
"natural-compare": "^1.4.0",
|
|
121
121
|
"normalize-path": "^3.0.0",
|
|
122
|
-
"nypm": "^0.3.
|
|
122
|
+
"nypm": "^0.3.9",
|
|
123
123
|
"ohash": "^1.1.3",
|
|
124
124
|
"open": "^10.1.0",
|
|
125
125
|
"ora": "^7.0.1",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"prompts": "^2.4.2",
|
|
128
128
|
"publish-browser-extension": "^2.1.3",
|
|
129
129
|
"unimport": "^3.7.2",
|
|
130
|
-
"vite": "^5.3.
|
|
130
|
+
"vite": "^5.3.2",
|
|
131
131
|
"vite-node": "^1.6.0",
|
|
132
132
|
"web-ext-run": "^0.2.0",
|
|
133
133
|
"webextension-polyfill": "^0.10.0"
|
|
@@ -138,18 +138,18 @@
|
|
|
138
138
|
"@types/fs-extra": "^11.0.4",
|
|
139
139
|
"@types/lodash.merge": "^4.6.9",
|
|
140
140
|
"@types/natural-compare": "^1.4.3",
|
|
141
|
-
"@types/node": "^20.14.
|
|
141
|
+
"@types/node": "^20.14.9",
|
|
142
142
|
"@types/normalize-path": "^3.0.2",
|
|
143
143
|
"@types/prompts": "^2.4.9",
|
|
144
|
-
"execa": "^9.
|
|
144
|
+
"execa": "^9.3.0",
|
|
145
145
|
"extract-zip": "^2.0.1",
|
|
146
146
|
"happy-dom": "^13.10.1",
|
|
147
147
|
"lodash.merge": "^4.6.2",
|
|
148
148
|
"p-map": "^7.0.2",
|
|
149
149
|
"publint": "^0.2.8",
|
|
150
150
|
"tsup": "^8.1.0",
|
|
151
|
-
"tsx": "
|
|
152
|
-
"typescript": "^5.
|
|
151
|
+
"tsx": "4.15.7",
|
|
152
|
+
"typescript": "^5.5.2"
|
|
153
153
|
},
|
|
154
154
|
"scripts": {
|
|
155
155
|
"wxt": "tsx src/cli/index.ts",
|