wxt 0.20.9 → 0.20.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.
@@ -35,7 +35,7 @@ export function extensionApiMock(config) {
35
35
  }
36
36
  const setupTemplate = `
37
37
  import { vi } from 'vitest';
38
- import { fakeBrowser } from 'wxt/testing';
38
+ import { fakeBrowser } from 'wxt/testing/fake-browser';
39
39
 
40
40
  vi.stubGlobal("chrome", fakeBrowser);
41
41
  vi.stubGlobal("browser", fakeBrowser);
@@ -40,7 +40,6 @@ export function createWebExtRunner() {
40
40
  ),
41
41
  args: [
42
42
  "--unsafely-disable-devtools-self-xss-warnings",
43
- "--disable-features=DisableLoadExtensionCommandLineSwitch",
44
43
  ...wxtUserConfig?.chromiumArgs ?? []
45
44
  ]
46
45
  }
@@ -501,7 +501,6 @@ const mv2OnlyKeys = [
501
501
  "event_rules",
502
502
  "file_browser_handlers",
503
503
  "file_system_provider_capabilities",
504
- "input_components",
505
504
  "nacl_modules",
506
505
  "natively_connectable",
507
506
  "offline_enabled",
@@ -1024,7 +1024,10 @@ export declare const fakeResolvedConfig: (overrides?: {
1024
1024
  injectImportsStringified?: {} | undefined;
1025
1025
  } | undefined)[] | undefined;
1026
1026
  virtualImports?: (string | undefined)[] | undefined;
1027
- dirs?: (string | undefined)[] | undefined;
1027
+ dirs?: (string | {
1028
+ glob?: string | undefined;
1029
+ types?: boolean | undefined;
1030
+ } | undefined)[] | undefined;
1028
1031
  dirsScanOptions?: {
1029
1032
  filePatterns?: (string | undefined)[] | undefined;
1030
1033
  fileFilter?: {} | undefined;
@@ -1439,6 +1442,7 @@ export declare const fakeResolvedConfig: (overrides?: {
1439
1442
  configFile?: string | undefined;
1440
1443
  } | undefined)[] | undefined;
1441
1444
  cwd?: string | undefined;
1445
+ _configFile?: string | undefined;
1442
1446
  source?: string | undefined;
1443
1447
  sourceOptions?: {
1444
1448
  [x: string]: any;
@@ -1948,7 +1952,10 @@ export declare const fakeResolvedConfig: (overrides?: {
1948
1952
  injectImportsStringified?: {} | undefined;
1949
1953
  } | undefined)[] | undefined;
1950
1954
  virtualImports?: (string | undefined)[] | undefined;
1951
- dirs?: (string | undefined)[] | undefined;
1955
+ dirs?: (string | {
1956
+ glob?: string | undefined;
1957
+ types?: boolean | undefined;
1958
+ } | undefined)[] | undefined;
1952
1959
  dirsScanOptions?: {
1953
1960
  filePatterns?: (string | undefined)[] | undefined;
1954
1961
  fileFilter?: {} | undefined;
@@ -2716,7 +2723,10 @@ export declare const fakeResolvedConfig: (overrides?: {
2716
2723
  injectImportsStringified?: {} | undefined;
2717
2724
  } | undefined)[] | undefined;
2718
2725
  virtualImports?: (string | undefined)[] | undefined;
2719
- dirs?: (string | undefined)[] | undefined;
2726
+ dirs?: (string | {
2727
+ glob?: string | undefined;
2728
+ types?: boolean | undefined;
2729
+ } | undefined)[] | undefined;
2720
2730
  dirsScanOptions?: {
2721
2731
  filePatterns?: (string | undefined)[] | undefined;
2722
2732
  fileFilter?: {} | undefined;
@@ -3073,6 +3083,7 @@ export declare const fakeResolvedConfig: (overrides?: {
3073
3083
  configFile?: string | undefined;
3074
3084
  } | undefined)[] | undefined;
3075
3085
  cwd?: string | undefined;
3086
+ _configFile?: string | undefined;
3076
3087
  source?: string | undefined;
3077
3088
  sourceOptions?: {
3078
3089
  [x: string]: any;
@@ -3511,7 +3522,10 @@ export declare const fakeResolvedConfig: (overrides?: {
3511
3522
  injectImportsStringified?: {} | undefined;
3512
3523
  } | undefined)[] | undefined;
3513
3524
  virtualImports?: (string | undefined)[] | undefined;
3514
- dirs?: (string | undefined)[] | undefined;
3525
+ dirs?: (string | {
3526
+ glob?: string | undefined;
3527
+ types?: boolean | undefined;
3528
+ } | undefined)[] | undefined;
3515
3529
  dirsScanOptions?: {
3516
3530
  filePatterns?: (string | undefined)[] | undefined;
3517
3531
  fileFilter?: {} | undefined;
@@ -4794,7 +4808,10 @@ export declare const fakeWxt: (overrides?: {
4794
4808
  injectImportsStringified?: {} | undefined;
4795
4809
  } | undefined)[] | undefined;
4796
4810
  virtualImports?: (string | undefined)[] | undefined;
4797
- dirs?: (string | undefined)[] | undefined;
4811
+ dirs?: (string | {
4812
+ glob?: string | undefined;
4813
+ types?: boolean | undefined;
4814
+ } | undefined)[] | undefined;
4798
4815
  dirsScanOptions?: {
4799
4816
  filePatterns?: (string | undefined)[] | undefined;
4800
4817
  fileFilter?: {} | undefined;
@@ -5209,6 +5226,7 @@ export declare const fakeWxt: (overrides?: {
5209
5226
  configFile?: string | undefined;
5210
5227
  } | undefined)[] | undefined;
5211
5228
  cwd?: string | undefined;
5229
+ _configFile?: string | undefined;
5212
5230
  source?: string | undefined;
5213
5231
  sourceOptions?: {
5214
5232
  [x: string]: any;
@@ -5718,7 +5736,10 @@ export declare const fakeWxt: (overrides?: {
5718
5736
  injectImportsStringified?: {} | undefined;
5719
5737
  } | undefined)[] | undefined;
5720
5738
  virtualImports?: (string | undefined)[] | undefined;
5721
- dirs?: (string | undefined)[] | undefined;
5739
+ dirs?: (string | {
5740
+ glob?: string | undefined;
5741
+ types?: boolean | undefined;
5742
+ } | undefined)[] | undefined;
5722
5743
  dirsScanOptions?: {
5723
5744
  filePatterns?: (string | undefined)[] | undefined;
5724
5745
  fileFilter?: {} | undefined;
@@ -6486,7 +6507,10 @@ export declare const fakeWxt: (overrides?: {
6486
6507
  injectImportsStringified?: {} | undefined;
6487
6508
  } | undefined)[] | undefined;
6488
6509
  virtualImports?: (string | undefined)[] | undefined;
6489
- dirs?: (string | undefined)[] | undefined;
6510
+ dirs?: (string | {
6511
+ glob?: string | undefined;
6512
+ types?: boolean | undefined;
6513
+ } | undefined)[] | undefined;
6490
6514
  dirsScanOptions?: {
6491
6515
  filePatterns?: (string | undefined)[] | undefined;
6492
6516
  fileFilter?: {} | undefined;
@@ -6843,6 +6867,7 @@ export declare const fakeWxt: (overrides?: {
6843
6867
  configFile?: string | undefined;
6844
6868
  } | undefined)[] | undefined;
6845
6869
  cwd?: string | undefined;
6870
+ _configFile?: string | undefined;
6846
6871
  source?: string | undefined;
6847
6872
  sourceOptions?: {
6848
6873
  [x: string]: any;
@@ -7281,7 +7306,10 @@ export declare const fakeWxt: (overrides?: {
7281
7306
  injectImportsStringified?: {} | undefined;
7282
7307
  } | undefined)[] | undefined;
7283
7308
  virtualImports?: (string | undefined)[] | undefined;
7284
- dirs?: (string | undefined)[] | undefined;
7309
+ dirs?: (string | {
7310
+ glob?: string | undefined;
7311
+ types?: boolean | undefined;
7312
+ } | undefined)[] | undefined;
7285
7313
  dirsScanOptions?: {
7286
7314
  filePatterns?: (string | undefined)[] | undefined;
7287
7315
  fileFilter?: {} | undefined;
@@ -1 +1,10 @@
1
+ /**
2
+ * The fake browser is automatically used as a mock for the `wxt/browser` import
3
+ * when using `wxt/testing/vitest-plugin` with Vitest. It is also setup to
4
+ * reset all state before each test.
5
+ *
6
+ * This module is just a re-export of [@webext-core/fake-browser](https://webext-core.aklinker1.io/fake-browser/triggering-events).
7
+ *
8
+ * @module wxt/testing/fake-browser
9
+ */
1
10
  export { fakeBrowser, type FakeBrowser } from '@webext-core/fake-browser';
@@ -1,5 +1,9 @@
1
1
  /**
2
2
  * Utilities for unit testing WXT extensions.
3
+ *
4
+ * @deprecated Use `wxt/testing/*` instead to prevent issues with JSDOM or
5
+ * HappyDOM environments. Will be removed in the next major version of WXT.
6
+ *
3
7
  * @module wxt/testing
4
8
  */
5
9
  export * from './fake-browser';
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Contains a Vitest plugin that configures your test environment to work with
3
+ * WXT projects.
4
+ *
5
+ * @module wxt/testing/vitest
6
+ */
1
7
  import type * as vite from 'vite';
2
8
  import { InlineConfig } from '../types';
3
9
  /**
@@ -6,7 +12,7 @@ import { InlineConfig } from '../types';
6
12
  * ```ts
7
13
  * // vitest.config.ts
8
14
  * import { defineConfig } from 'vitest/config';
9
- * import { WxtVitest } from 'wxt/testing';
15
+ * import { WxtVitest } from 'wxt/testing/vitest-plugin';
10
16
  *
11
17
  * export default defineConfig({
12
18
  * plugins: [WxtVitest()],
package/dist/version.mjs CHANGED
@@ -1 +1 @@
1
- export const version = "0.20.9";
1
+ export const version = "0.20.11";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wxt",
3
3
  "type": "module",
4
- "version": "0.20.9",
4
+ "version": "0.20.11",
5
5
  "description": "⚡ Next-gen Web Extension Framework",
6
6
  "license": "MIT",
7
7
  "dependencies": {
@@ -12,43 +12,43 @@
12
12
  "@webext-core/match-patterns": "^1.0.3",
13
13
  "@wxt-dev/storage": "^1.0.0",
14
14
  "async-mutex": "^0.5.0",
15
- "c12": "^3.0.3",
15
+ "c12": "^3.2.0",
16
16
  "cac": "^6.7.14",
17
17
  "chokidar": "^4.0.3",
18
- "ci-info": "^4.2.0",
18
+ "ci-info": "^4.3.0",
19
19
  "consola": "^3.4.2",
20
20
  "defu": "^6.1.4",
21
21
  "dotenv": "^17.2.2",
22
- "dotenv-expand": "^12.0.2",
22
+ "dotenv-expand": "^12.0.3",
23
23
  "esbuild": "^0.25.0",
24
24
  "fast-glob": "^3.3.3",
25
- "filesize": "^10.1.6",
25
+ "filesize": "^11.0.2",
26
26
  "fs-extra": "^11.3.1",
27
- "get-port-please": "^3.1.2",
27
+ "get-port-please": "^3.2.0",
28
28
  "giget": "^1.2.3 || ^2.0.0",
29
29
  "hookable": "^5.5.3",
30
- "import-meta-resolve": "^4.1.0",
30
+ "import-meta-resolve": "^4.2.0",
31
31
  "is-wsl": "^3.1.0",
32
32
  "json5": "^2.2.3",
33
33
  "jszip": "^3.10.1",
34
- "linkedom": "^0.18.10",
34
+ "linkedom": "^0.18.12",
35
35
  "magicast": "^0.3.5",
36
- "minimatch": "^10.0.1",
36
+ "minimatch": "^10.0.3",
37
37
  "nano-spawn": "^1.0.2",
38
38
  "normalize-path": "^3.0.0",
39
- "nypm": "^0.6.0",
39
+ "nypm": "^0.6.1",
40
40
  "ohash": "^2.0.11",
41
- "open": "^10.1.2",
41
+ "open": "^10.2.0",
42
42
  "ora": "^8.2.0",
43
- "perfect-debounce": "^1.0.0",
43
+ "perfect-debounce": "^2.0.0",
44
44
  "picocolors": "^1.1.1",
45
45
  "prompts": "^2.4.2",
46
- "publish-browser-extension": "^2.3.0 || ^3.0.0",
46
+ "publish-browser-extension": "^2.3.0 || ^3.0.2",
47
47
  "scule": "^1.3.0",
48
48
  "unimport": "^3.13.1 || ^4.0.0 || ^5.0.0",
49
49
  "vite": "^5.4.19 || ^6.3.4 || ^7.0.0",
50
50
  "vite-node": "^2.1.4 || ^3.1.2",
51
- "web-ext-run": "^0.2.3",
51
+ "web-ext-run": "^0.2.4",
52
52
  "@wxt-dev/browser": "^0.1.4"
53
53
  },
54
54
  "devDependencies": {
@@ -168,6 +168,14 @@
168
168
  "types": "./dist/browser.d.ts",
169
169
  "default": "./dist/browser.mjs"
170
170
  },
171
+ "./testing/fake-browser": {
172
+ "types": "./dist/testing/fake-browser.d.ts",
173
+ "default": "./dist/testing/fake-browser.mjs"
174
+ },
175
+ "./testing/vitest-plugin": {
176
+ "types": "./dist/testing/wxt-vitest-plugin.d.ts",
177
+ "default": "./dist/testing/wxt-vitest-plugin.mjs"
178
+ },
171
179
  "./testing": {
172
180
  "types": "./dist/testing/index.d.ts",
173
181
  "default": "./dist/testing/index.mjs"