wxt 0.17.0 → 0.17.1

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,5 +1,5 @@
1
1
  // package.json
2
- var version = "0.17.0";
2
+ var version = "0.17.1";
3
3
 
4
4
  // src/core/utils/paths.ts
5
5
  import systemPath from "node:path";
package/dist/cli.js CHANGED
@@ -2181,7 +2181,7 @@ function getChunkSortWeight(filename) {
2181
2181
  import pc4 from "picocolors";
2182
2182
 
2183
2183
  // package.json
2184
- var version = "0.17.0";
2184
+ var version = "0.17.1";
2185
2185
 
2186
2186
  // src/core/utils/log/printHeader.ts
2187
2187
  import { consola as consola2 } from "consola";
package/dist/index.cjs CHANGED
@@ -4608,7 +4608,7 @@ function getChunkSortWeight(filename) {
4608
4608
  var import_picocolors4 = __toESM(require("picocolors"), 1);
4609
4609
 
4610
4610
  // package.json
4611
- var version = "0.17.0";
4611
+ var version = "0.17.1";
4612
4612
 
4613
4613
  // src/core/utils/log/printHeader.ts
4614
4614
  var import_consola2 = require("consola");
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.17.0";
67
+ var version = "0.17.1";
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.17.0";
67
+ var version = "0.17.1";
68
68
 
69
69
  export { BuildOutput, ExtensionRunnerConfig, InlineConfig, UserConfig, WxtDevServer, build, clean, createServer, defineConfig, defineRunnerConfig, initialize, prepare, version, zip };
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  unnormalizePath,
18
18
  version,
19
19
  wxt
20
- } from "./chunk-FD7GO6WM.js";
20
+ } from "./chunk-JPO52NRM.js";
21
21
  import "./chunk-VBXJIVYU.js";
22
22
 
23
23
  // src/core/build.ts
package/dist/storage.cjs CHANGED
@@ -83,7 +83,7 @@ function createStorage() {
83
83
  const driverKey = key.substring(deliminatorIndex + 1);
84
84
  if (driverKey == null)
85
85
  throw Error(
86
- `Storage key should be in the form of "area:key", but recieved "${key}"`
86
+ `Storage key should be in the form of "area:key", but received "${key}"`
87
87
  );
88
88
  return {
89
89
  driverArea,
@@ -8,7 +8,7 @@ interface WxtStorage {
8
8
  */
9
9
  getItem<T>(key: string, opts?: GetItemOptions<T>): Promise<T | null>;
10
10
  /**
11
- * Get multiple items from storage. There is no guarentee of order in the returned array.
11
+ * Get multiple items from storage. There is no guarantee of order in the returned array.
12
12
  *
13
13
  * @example
14
14
  * await storage.getItems(["local:installDate", "session:someCounter"]);
@@ -88,7 +88,7 @@ interface WxtStorage {
88
88
  snapshot(base: string, opts?: SnapshotOptions): Promise<Record<string, unknown>>;
89
89
  /**
90
90
  * Restores the results of `snapshot`. If new properties have been saved since the snapshot, they are
91
- * not overridden. Only values existing in the snapshot are overritten.
91
+ * not overridden. Only values existing in the snapshot are overridden.
92
92
  */
93
93
  restoreSnapshot(base: string, data: any): Promise<void>;
94
94
  /**
package/dist/storage.d.ts CHANGED
@@ -8,7 +8,7 @@ interface WxtStorage {
8
8
  */
9
9
  getItem<T>(key: string, opts?: GetItemOptions<T>): Promise<T | null>;
10
10
  /**
11
- * Get multiple items from storage. There is no guarentee of order in the returned array.
11
+ * Get multiple items from storage. There is no guarantee of order in the returned array.
12
12
  *
13
13
  * @example
14
14
  * await storage.getItems(["local:installDate", "session:someCounter"]);
@@ -88,7 +88,7 @@ interface WxtStorage {
88
88
  snapshot(base: string, opts?: SnapshotOptions): Promise<Record<string, unknown>>;
89
89
  /**
90
90
  * Restores the results of `snapshot`. If new properties have been saved since the snapshot, they are
91
- * not overridden. Only values existing in the snapshot are overritten.
91
+ * not overridden. Only values existing in the snapshot are overridden.
92
92
  */
93
93
  restoreSnapshot(base: string, data: any): Promise<void>;
94
94
  /**
package/dist/storage.js CHANGED
@@ -48,7 +48,7 @@ function createStorage() {
48
48
  const driverKey = key.substring(deliminatorIndex + 1);
49
49
  if (driverKey == null)
50
50
  throw Error(
51
- `Storage key should be in the form of "area:key", but recieved "${key}"`
51
+ `Storage key should be in the form of "area:key", but received "${key}"`
52
52
  );
53
53
  return {
54
54
  driverArea,
package/dist/testing.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  tsconfigPaths,
6
6
  unimport,
7
7
  webextensionPolyfillMock
8
- } from "./chunk-FD7GO6WM.js";
8
+ } from "./chunk-JPO52NRM.js";
9
9
  import "./chunk-VBXJIVYU.js";
10
10
 
11
11
  // src/testing/fake-browser.ts
@@ -75,8 +75,23 @@ async function reloadContentScriptMv3({
75
75
  if (registration === "runtime") {
76
76
  await reloadRuntimeContentScriptMv3(contentScript);
77
77
  } else {
78
- await reloadRuntimeContentScriptMv3(contentScript);
78
+ await reloadManifestContentScriptMv3(contentScript);
79
+ }
80
+ }
81
+ async function reloadManifestContentScriptMv3(contentScript) {
82
+ const id = `wxt:${contentScript.js[0]}`;
83
+ logger.log("Reloading content script:", contentScript);
84
+ const registered = await browser2.scripting.getRegisteredContentScripts();
85
+ logger.debug("Existing scripts:", registered);
86
+ const existing = registered.find((cs) => cs.id === id);
87
+ if (existing) {
88
+ logger.debug("Updating content script", existing);
89
+ await browser2.scripting.updateContentScripts([{ ...contentScript, id }]);
90
+ } else {
91
+ logger.debug("Registering new content script...");
92
+ await browser2.scripting.registerContentScripts([{ ...contentScript, id }]);
79
93
  }
94
+ await reloadTabsForContentScript(contentScript);
80
95
  }
81
96
  async function reloadRuntimeContentScriptMv3(contentScript) {
82
97
  logger.log("Reloading content script:", contentScript);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wxt",
3
3
  "type": "module",
4
- "version": "0.17.0",
4
+ "version": "0.17.1",
5
5
  "description": "Next gen framework for developing web extensions",
6
6
  "engines": {
7
7
  "node": ">=18",
package/dist/cli.d.ts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { }