wxt 0.18.5 → 0.18.7

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.
Files changed (35) hide show
  1. package/dist/{chunk-7AOGIMIM.js → chunk-A3R6ZPUA.js} +120 -175
  2. package/dist/{chunk-5X3S6AWF.js → chunk-BERPNPEZ.js} +2 -4
  3. package/dist/{chunk-ZZCTFNQ5.js → chunk-BM6QYGAW.js} +1 -1
  4. package/dist/{chunk-NAMV4VWQ.js → chunk-KPD5J7PZ.js} +1 -1
  5. package/dist/{chunk-VBXJIVYU.js → chunk-QGM4M3NI.js} +1 -2
  6. package/dist/{chunk-73I7FAJU.js → chunk-SGKCDMVR.js} +1 -2
  7. package/dist/cli.js +141 -213
  8. package/dist/client.js +12 -24
  9. package/dist/{execa-QQUOQNS3.js → execa-ATHZH2Y4.js} +1576 -610
  10. package/dist/{execa-5TSWMF32.js → execa-D7CMCKO2.js} +1576 -610
  11. package/dist/{index-q2ZwJBs6.d.cts → index-D6lH9OkP.d.cts} +7 -3
  12. package/dist/{index-q2ZwJBs6.d.ts → index-D6lH9OkP.d.ts} +7 -3
  13. package/dist/index.cjs +2187 -1176
  14. package/dist/index.d.cts +3 -3
  15. package/dist/index.d.ts +3 -3
  16. package/dist/index.js +23 -38
  17. package/dist/modules.cjs +11 -2
  18. package/dist/modules.d.cts +31 -3
  19. package/dist/modules.d.ts +31 -3
  20. package/dist/modules.js +11 -3
  21. package/dist/{prompt-Y7B5HSD5.js → prompt-25QIVJDC.js} +28 -55
  22. package/dist/{prompt-TFJ7OLL7.js → prompt-7BMKNSWS.js} +28 -55
  23. package/dist/sandbox.js +2 -4
  24. package/dist/storage.cjs +4 -8
  25. package/dist/storage.js +6 -10
  26. package/dist/testing.cjs +47 -72
  27. package/dist/testing.d.cts +1 -1
  28. package/dist/testing.d.ts +1 -1
  29. package/dist/testing.js +4 -4
  30. package/dist/virtual/background-entrypoint.js +3 -6
  31. package/dist/virtual/content-script-isolated-world-entrypoint.js +1 -2
  32. package/dist/virtual/content-script-main-world-entrypoint.js +1 -2
  33. package/dist/virtual/reload-html.js +1 -2
  34. package/dist/virtual/unlisted-script-entrypoint.js +1 -2
  35. package/package.json +34 -33
@@ -4,8 +4,7 @@ import { initPlugins } from "virtual:wxt-plugins";
4
4
 
5
5
  // src/sandbox/utils/logger.ts
6
6
  function print(method, ...args) {
7
- if (import.meta.env.MODE === "production")
8
- return;
7
+ if (import.meta.env.MODE === "production") return;
9
8
  if (typeof args[0] === "string") {
10
9
  const message = args.shift();
11
10
  method(`[wxt] ${message}`, ...args);
@@ -120,8 +119,7 @@ async function reloadTabsForContentScript(contentScript) {
120
119
  );
121
120
  const matchingTabs = allTabs.filter((tab) => {
122
121
  const url = tab.url;
123
- if (!url)
124
- return false;
122
+ if (!url) return false;
125
123
  return !!matchPatterns.find((pattern) => pattern.includes(url));
126
124
  });
127
125
  await Promise.all(matchingTabs.map((tab) => browser2.tabs.reload(tab.id)));
@@ -134,8 +132,7 @@ async function reloadContentScriptMv2(_payload) {
134
132
  if (import.meta.env.COMMAND === "serve") {
135
133
  try {
136
134
  const ws = setupWebSocket((message) => {
137
- if (message.event === "wxt:reload-extension")
138
- browser3.runtime.reload();
135
+ if (message.event === "wxt:reload-extension") browser3.runtime.reload();
139
136
  if (message.event === "wxt:reload-content-script" && message.data != null)
140
137
  reloadContentScript(message.data);
141
138
  });
@@ -3,8 +3,7 @@ import definition from "virtual:user-content-script-isolated-world-entrypoint";
3
3
 
4
4
  // src/sandbox/utils/logger.ts
5
5
  function print(method, ...args) {
6
- if (import.meta.env.MODE === "production")
7
- return;
6
+ if (import.meta.env.MODE === "production") return;
8
7
  if (typeof args[0] === "string") {
9
8
  const message = args.shift();
10
9
  method(`[wxt] ${message}`, ...args);
@@ -3,8 +3,7 @@ import definition from "virtual:user-content-script-main-world-entrypoint";
3
3
 
4
4
  // src/sandbox/utils/logger.ts
5
5
  function print(method, ...args) {
6
- if (import.meta.env.MODE === "production")
7
- return;
6
+ if (import.meta.env.MODE === "production") return;
8
7
  if (typeof args[0] === "string") {
9
8
  const message = args.shift();
10
9
  method(`[wxt] ${message}`, ...args);
@@ -1,7 +1,6 @@
1
1
  // src/sandbox/utils/logger.ts
2
2
  function print(method, ...args) {
3
- if (import.meta.env.MODE === "production")
4
- return;
3
+ if (import.meta.env.MODE === "production") return;
5
4
  if (typeof args[0] === "string") {
6
5
  const message = args.shift();
7
6
  method(`[wxt] ${message}`, ...args);
@@ -3,8 +3,7 @@ import definition from "virtual:user-unlisted-script-entrypoint";
3
3
 
4
4
  // src/sandbox/utils/logger.ts
5
5
  function print(method, ...args) {
6
- if (import.meta.env.MODE === "production")
7
- return;
6
+ if (import.meta.env.MODE === "production") return;
8
7
  if (typeof args[0] === "string") {
9
8
  const message = args.shift();
10
9
  method(`[wxt] ${message}`, ...args);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wxt",
3
3
  "type": "module",
4
- "version": "0.18.5",
4
+ "version": "0.18.7",
5
5
  "description": "Next gen framework for developing web extensions",
6
6
  "repository": {
7
7
  "type": "git",
@@ -92,71 +92,72 @@
92
92
  },
93
93
  "dependencies": {
94
94
  "@aklinker1/rollup-plugin-visualizer": "5.12.0",
95
- "@types/webextension-polyfill": "^0.10.5",
95
+ "@types/webextension-polyfill": "^0.10.7",
96
96
  "@webext-core/fake-browser": "^1.3.1",
97
97
  "@webext-core/isolated-element": "^1.1.2",
98
98
  "@webext-core/match-patterns": "^1.0.3",
99
- "async-mutex": "^0.4.0",
100
- "c12": "^1.5.1",
99
+ "async-mutex": "^0.4.1",
100
+ "c12": "^1.11.1",
101
101
  "cac": "^6.7.14",
102
- "chokidar": "^3.5.3",
102
+ "chokidar": "^3.6.0",
103
103
  "ci-info": "^4.0.0",
104
- "defu": "^6.1.3",
104
+ "defu": "^6.1.4",
105
105
  "dequal": "^2.0.3",
106
- "esbuild": "^0.19.5",
107
- "fast-glob": "^3.3.1",
108
- "filesize": "^10.0.8",
109
- "fs-extra": "^11.1.1",
110
- "get-port": "^7.0.0",
111
- "giget": "^1.1.3",
106
+ "esbuild": "^0.19.12",
107
+ "fast-glob": "^3.3.2",
108
+ "filesize": "^10.1.2",
109
+ "fs-extra": "^11.2.0",
110
+ "get-port": "^7.1.0",
111
+ "giget": "^1.2.3",
112
112
  "hookable": "^5.5.3",
113
- "is-wsl": "^3.0.0",
114
- "jiti": "^1.21.0",
113
+ "is-wsl": "^3.1.0",
114
+ "jiti": "^1.21.6",
115
115
  "json5": "^2.2.3",
116
116
  "jszip": "^3.10.1",
117
- "linkedom": "^0.18.2",
117
+ "linkedom": "^0.18.3",
118
118
  "magicast": "^0.3.4",
119
- "minimatch": "^9.0.3",
119
+ "minimatch": "^9.0.4",
120
120
  "natural-compare": "^1.4.0",
121
121
  "normalize-path": "^3.0.0",
122
122
  "nypm": "^0.3.8",
123
+ "ohash": "^1.1.3",
123
124
  "open": "^10.1.0",
124
125
  "ora": "^7.0.1",
125
- "picocolors": "^1.0.0",
126
+ "picocolors": "^1.0.1",
126
127
  "prompts": "^2.4.2",
127
128
  "publish-browser-extension": "^2.1.3",
128
- "unimport": "^3.4.0",
129
- "vite": "^5.2.8",
129
+ "unimport": "^3.7.2",
130
+ "vite": "^5.3.0",
130
131
  "web-ext-run": "^0.2.0",
131
132
  "webextension-polyfill": "^0.10.0"
132
133
  },
133
134
  "devDependencies": {
134
- "@aklinker1/check": "^1.1.1",
135
- "@faker-js/faker": "^8.3.1",
135
+ "@aklinker1/check": "^1.3.1",
136
+ "@faker-js/faker": "^8.4.1",
136
137
  "@types/fs-extra": "^11.0.4",
137
138
  "@types/lodash.merge": "^4.6.9",
138
139
  "@types/natural-compare": "^1.4.3",
139
- "@types/node": "^20.10.3",
140
+ "@types/node": "^20.14.2",
140
141
  "@types/normalize-path": "^3.0.2",
141
142
  "@types/prompts": "^2.4.9",
142
- "execa": "^9.1.0",
143
+ "execa": "^9.2.0",
143
144
  "extract-zip": "^2.0.1",
144
- "happy-dom": "^13.3.8",
145
+ "happy-dom": "^13.10.1",
145
146
  "lodash.merge": "^4.6.2",
146
- "p-map": "^7.0.0",
147
- "publint": "^0.2.6",
148
- "tsup": "^8.0.1",
149
- "tsx": "^4.11.2",
150
- "typescript": "^5.3.2"
147
+ "p-map": "^7.0.2",
148
+ "publint": "^0.2.8",
149
+ "tsup": "^8.1.0",
150
+ "tsx": "^4.15.4",
151
+ "typescript": "^5.4.5"
151
152
  },
152
153
  "scripts": {
153
154
  "wxt": "tsx src/cli/index.ts",
154
- "build": "tsx scripts/build.ts",
155
- "check": "run-s -c check:*",
155
+ "build": "buildc -- tsx scripts/build.ts",
156
+ "check": "buildc --deps-only -- run-s -c check:*",
156
157
  "check:default": "check",
157
158
  "check:tsc-virtual": "tsc --noEmit -p src/virtual",
158
- "test": "vitest",
159
- "test:e2e": "vitest -r e2e",
159
+ "test": "buildc --deps-only -- vitest",
160
+ "test:e2e": "buildc --deps-only -- vitest -r e2e",
160
161
  "sync-releases": "pnpx changelogen@latest gh release"
161
162
  }
162
163
  }