@atlaspack/runtime-webextension 2.12.1-dev.3450 → 2.12.1-dev.3466

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/runtime-webextension",
3
- "version": "2.12.1-dev.3450+58845ef87",
3
+ "version": "2.12.1-dev.3466+9a12fb8bd",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -13,12 +13,12 @@
13
13
  "source": "src/WebExtensionRuntime.js",
14
14
  "engines": {
15
15
  "node": ">= 16.0.0",
16
- "parcel": "^2.12.1-dev.3450+58845ef87"
16
+ "parcel": "^2.12.1-dev.3466+9a12fb8bd"
17
17
  },
18
18
  "dependencies": {
19
- "@atlaspack/plugin": "2.12.1-dev.3450+58845ef87",
20
- "@atlaspack/utils": "2.12.1-dev.3450+58845ef87",
19
+ "@atlaspack/plugin": "2.12.1-dev.3466+9a12fb8bd",
20
+ "@atlaspack/utils": "2.12.1-dev.3466+9a12fb8bd",
21
21
  "nullthrows": "^1.1.1"
22
22
  },
23
- "gitHead": "58845ef87446fcedb7d7d8876440c64184645cbb"
23
+ "gitHead": "9a12fb8bd1b72e407ed043e20337dc60fbec9cbe"
24
24
  }
@@ -23,7 +23,7 @@ export default (new Runtime({
23
23
  if (bundle.getMainEntry()?.meta.webextEntry === true) {
24
24
  // Hack to bust packager cache when any descendants update
25
25
  const descendants = [];
26
- bundleGraph.traverseBundles(b => {
26
+ bundleGraph.traverseBundles((b) => {
27
27
  descendants.push(b.id);
28
28
  }, bundle);
29
29
  return {
@@ -34,12 +34,14 @@ export default (new Runtime({
34
34
  } else if (options.hmrOptions && bundle.type == 'js') {
35
35
  const manifest = bundleGraph
36
36
  .getBundles()
37
- .find(b => b.getMainEntry()?.meta.webextEntry === true);
37
+ .find((b) => b.getMainEntry()?.meta.webextEntry === true);
38
38
  const entry = manifest?.getMainEntry();
39
39
  const insertDep = entry?.meta.webextBGInsert;
40
40
  if (!manifest || !entry || insertDep == null) return;
41
41
  const insertBundle = bundleGraph.getReferencedBundle(
42
- nullthrows(entry?.getDependencies().find(dep => dep.id === insertDep)),
42
+ nullthrows(
43
+ entry?.getDependencies().find((dep) => dep.id === insertDep),
44
+ ),
43
45
  nullthrows(manifest),
44
46
  );
45
47
  let firstInsertableBundle;
@@ -8,7 +8,7 @@ let promisify =
8
8
  (...args) => {
9
9
  if (typeof browser === 'undefined') {
10
10
  return new Promise((resolve, reject) =>
11
- obj[fn](...args, res =>
11
+ obj[fn](...args, (res) =>
12
12
  env.runtime.lastError ? reject(env.runtime.lastError) : resolve(res),
13
13
  ),
14
14
  );
@@ -21,9 +21,9 @@ let messageTab = promisify(env.tabs, 'sendMessage');
21
21
 
22
22
  env.runtime.reload = () => {
23
23
  queryTabs({})
24
- .then(tabs => {
24
+ .then((tabs) => {
25
25
  return Promise.all(
26
- tabs.map(tab => {
26
+ tabs.map((tab) => {
27
27
  if (tab.id === avoidID) return;
28
28
  return messageTab(tab.id, {
29
29
  __parcel_hmr_reload__: true,