wxt 0.16.8-alpha1 → 0.16.8

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.
@@ -1,9 +1,5 @@
1
1
  // package.json
2
- var version = "0.16.8-alpha1";
3
-
4
- // src/core/utils/fs.ts
5
- import fs from "fs-extra";
6
- import glob from "fast-glob";
2
+ var version = "0.16.8";
7
3
 
8
4
  // src/core/utils/paths.ts
9
5
  import systemPath from "node:path";
@@ -18,6 +14,8 @@ var CSS_EXTENSIONS = ["css", "scss", "sass", "less", "styl", "stylus"];
18
14
  var CSS_EXTENSIONS_PATTERN = `+(${CSS_EXTENSIONS.join("|")})`;
19
15
 
20
16
  // src/core/utils/fs.ts
17
+ import fs from "fs-extra";
18
+ import glob from "fast-glob";
21
19
  async function writeFileIfDifferent(file, newContents) {
22
20
  const existingContents = await fs.readFile(file, "utf-8").catch(() => void 0);
23
21
  if (existingContents !== newContents) {
@@ -2940,6 +2938,7 @@ async function registerWxt(command, inlineConfig = {}, server) {
2940
2938
  }
2941
2939
 
2942
2940
  export {
2941
+ unnormalizePath,
2943
2942
  wxt,
2944
2943
  registerWxt,
2945
2944
  detectDevChanges,
package/dist/cli.js CHANGED
@@ -2152,7 +2152,7 @@ function getChunkSortWeight(filename) {
2152
2152
  import pc4 from "picocolors";
2153
2153
 
2154
2154
  // package.json
2155
- var version = "0.16.8-alpha1";
2155
+ var version = "0.16.8";
2156
2156
 
2157
2157
  // src/core/utils/log/printHeader.ts
2158
2158
  import { consola as consola2 } from "consola";
@@ -3127,20 +3127,11 @@ async function createServer(inlineConfig) {
3127
3127
  };
3128
3128
  const buildAndOpenBrowser = async () => {
3129
3129
  server.currentOutput = await internalBuild();
3130
- const additionalFiles = server.currentOutput.steps.flatMap((step, i) => {
3131
- if (Array.isArray(step.entrypoints) && i === 0) {
3132
- return [];
3133
- }
3134
- return step.chunks.flatMap((chunk) => {
3135
- if (chunk.type === "asset")
3136
- return [];
3137
- return chunk.moduleIds;
3138
- });
3139
- }).filter(
3140
- (file) => !file.includes("node_modules") && !file.startsWith("\0")
3141
- );
3142
- console.log("Adding files:", additionalFiles);
3143
- server.watcher.add(additionalFiles);
3130
+ try {
3131
+ server.watcher.add(getExternalOutputDependencies(server));
3132
+ } catch (err) {
3133
+ wxt.config.logger.warn("Failed to register additional file paths:", err);
3134
+ }
3144
3135
  await runner.openBrowser();
3145
3136
  };
3146
3137
  const closeAndRecreateRunner = async () => {
@@ -3314,6 +3305,20 @@ function getFilenameList(names) {
3314
3305
  return pc7.cyan(name);
3315
3306
  }).join(pc7.dim(", "));
3316
3307
  }
3308
+ function getExternalOutputDependencies(server) {
3309
+ return server.currentOutput?.steps.flatMap((step, i) => {
3310
+ if (Array.isArray(step.entrypoints) && i === 0) {
3311
+ return [];
3312
+ }
3313
+ return step.chunks.flatMap((chunk) => {
3314
+ if (chunk.type === "asset")
3315
+ return [];
3316
+ return chunk.moduleIds;
3317
+ });
3318
+ }).filter(
3319
+ (file) => !file.includes("node_modules") && !file.startsWith("\0")
3320
+ ).map(unnormalizePath).filter((file) => !file.startsWith(wxt.config.root)) ?? [];
3321
+ }
3317
3322
 
3318
3323
  // src/core/initialize.ts
3319
3324
  import prompts from "prompts";
package/dist/index.cjs CHANGED
@@ -4579,7 +4579,7 @@ function getChunkSortWeight(filename) {
4579
4579
  var import_picocolors4 = __toESM(require("picocolors"), 1);
4580
4580
 
4581
4581
  // package.json
4582
- var version = "0.16.8-alpha1";
4582
+ var version = "0.16.8";
4583
4583
 
4584
4584
  // src/core/utils/log/printHeader.ts
4585
4585
  var import_consola2 = require("consola");
@@ -5560,20 +5560,11 @@ async function createServer(inlineConfig) {
5560
5560
  };
5561
5561
  const buildAndOpenBrowser = async () => {
5562
5562
  server.currentOutput = await internalBuild();
5563
- const additionalFiles = server.currentOutput.steps.flatMap((step, i) => {
5564
- if (Array.isArray(step.entrypoints) && i === 0) {
5565
- return [];
5566
- }
5567
- return step.chunks.flatMap((chunk) => {
5568
- if (chunk.type === "asset")
5569
- return [];
5570
- return chunk.moduleIds;
5571
- });
5572
- }).filter(
5573
- (file) => !file.includes("node_modules") && !file.startsWith("\0")
5574
- );
5575
- console.log("Adding files:", additionalFiles);
5576
- server.watcher.add(additionalFiles);
5563
+ try {
5564
+ server.watcher.add(getExternalOutputDependencies(server));
5565
+ } catch (err) {
5566
+ wxt.config.logger.warn("Failed to register additional file paths:", err);
5567
+ }
5577
5568
  await runner.openBrowser();
5578
5569
  };
5579
5570
  const closeAndRecreateRunner = async () => {
@@ -5747,6 +5738,20 @@ function getFilenameList(names) {
5747
5738
  return import_picocolors7.default.cyan(name);
5748
5739
  }).join(import_picocolors7.default.dim(", "));
5749
5740
  }
5741
+ function getExternalOutputDependencies(server) {
5742
+ return server.currentOutput?.steps.flatMap((step, i) => {
5743
+ if (Array.isArray(step.entrypoints) && i === 0) {
5744
+ return [];
5745
+ }
5746
+ return step.chunks.flatMap((chunk) => {
5747
+ if (chunk.type === "asset")
5748
+ return [];
5749
+ return chunk.moduleIds;
5750
+ });
5751
+ }).filter(
5752
+ (file) => !file.includes("node_modules") && !file.startsWith("\0")
5753
+ ).map(unnormalizePath).filter((file) => !file.startsWith(wxt.config.root)) ?? [];
5754
+ }
5750
5755
 
5751
5756
  // src/core/initialize.ts
5752
5757
  var import_prompts = __toESM(require("prompts"), 1);
package/dist/index.d.cts CHANGED
@@ -64,6 +64,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
64
64
  */
65
65
  declare function zip(config?: InlineConfig): Promise<string[]>;
66
66
 
67
- var version = "0.16.8-alpha1";
67
+ var version = "0.16.8";
68
68
 
69
69
  export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
package/dist/index.d.ts CHANGED
@@ -64,6 +64,6 @@ declare function prepare(config: InlineConfig): Promise<void>;
64
64
  */
65
65
  declare function zip(config?: InlineConfig): Promise<string[]>;
66
66
 
67
- var version = "0.16.8-alpha1";
67
+ var version = "0.16.8";
68
68
 
69
69
  export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
package/dist/index.js CHANGED
@@ -13,9 +13,10 @@ import {
13
13
  rebuild,
14
14
  registerWxt,
15
15
  resolvePerBrowserOption,
16
+ unnormalizePath,
16
17
  version,
17
18
  wxt
18
- } from "./chunk-7WFBUGKG.js";
19
+ } from "./chunk-N26YUOBL.js";
19
20
  import "./chunk-VBXJIVYU.js";
20
21
 
21
22
  // src/core/build.ts
@@ -229,20 +230,11 @@ async function createServer(inlineConfig) {
229
230
  };
230
231
  const buildAndOpenBrowser = async () => {
231
232
  server.currentOutput = await internalBuild();
232
- const additionalFiles = server.currentOutput.steps.flatMap((step, i) => {
233
- if (Array.isArray(step.entrypoints) && i === 0) {
234
- return [];
235
- }
236
- return step.chunks.flatMap((chunk) => {
237
- if (chunk.type === "asset")
238
- return [];
239
- return chunk.moduleIds;
240
- });
241
- }).filter(
242
- (file) => !file.includes("node_modules") && !file.startsWith("\0")
243
- );
244
- console.log("Adding files:", additionalFiles);
245
- server.watcher.add(additionalFiles);
233
+ try {
234
+ server.watcher.add(getExternalOutputDependencies(server));
235
+ } catch (err) {
236
+ wxt.config.logger.warn("Failed to register additional file paths:", err);
237
+ }
246
238
  await runner.openBrowser();
247
239
  };
248
240
  const closeAndRecreateRunner = async () => {
@@ -416,6 +408,20 @@ function getFilenameList(names) {
416
408
  return pc2.cyan(name);
417
409
  }).join(pc2.dim(", "));
418
410
  }
411
+ function getExternalOutputDependencies(server) {
412
+ return server.currentOutput?.steps.flatMap((step, i) => {
413
+ if (Array.isArray(step.entrypoints) && i === 0) {
414
+ return [];
415
+ }
416
+ return step.chunks.flatMap((chunk) => {
417
+ if (chunk.type === "asset")
418
+ return [];
419
+ return chunk.moduleIds;
420
+ });
421
+ }).filter(
422
+ (file) => !file.includes("node_modules") && !file.startsWith("\0")
423
+ ).map(unnormalizePath).filter((file) => !file.startsWith(wxt.config.root)) ?? [];
424
+ }
419
425
 
420
426
  // src/core/initialize.ts
421
427
  import prompts from "prompts";
package/dist/testing.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  tsconfigPaths,
6
6
  unimport,
7
7
  webextensionPolyfillMock
8
- } from "./chunk-7WFBUGKG.js";
8
+ } from "./chunk-N26YUOBL.js";
9
9
  import "./chunk-VBXJIVYU.js";
10
10
 
11
11
  // src/testing/fake-browser.ts
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wxt",
3
3
  "type": "module",
4
- "version": "0.16.8-alpha1",
4
+ "version": "0.16.8",
5
5
  "description": "Next gen framework for developing web extensions",
6
6
  "engines": {
7
7
  "node": ">=18",