@atlaspack/runtime-webextension 2.14.5-canary.137 → 2.14.5-canary.139
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/CHANGELOG.md
CHANGED
|
@@ -75,7 +75,9 @@ var _default = exports.default = new (_plugin().Runtime)({
|
|
|
75
75
|
const entry = manifest === null || manifest === void 0 ? void 0 : manifest.getMainEntry();
|
|
76
76
|
const insertDep = entry === null || entry === void 0 ? void 0 : entry.meta.webextBGInsert;
|
|
77
77
|
if (!manifest || !entry || insertDep == null) return;
|
|
78
|
-
const insertBundle = bundleGraph.getReferencedBundle((0, _nullthrows().default)(entry === null || entry === void 0 ? void 0 : entry.getDependencies()
|
|
78
|
+
const insertBundle = bundleGraph.getReferencedBundle((0, _nullthrows().default)(entry === null || entry === void 0 ? void 0 : entry.getDependencies()
|
|
79
|
+
// @ts-expect-error TS2304
|
|
80
|
+
.find(dep => dep.id === insertDep)), (0, _nullthrows().default)(manifest));
|
|
79
81
|
let firstInsertableBundle;
|
|
80
82
|
bundleGraph.traverseBundles((b, _, actions) => {
|
|
81
83
|
if (b.type == 'js') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/runtime-webextension",
|
|
3
|
-
"version": "2.14.5-canary.
|
|
3
|
+
"version": "2.14.5-canary.139+d2fd84977",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,16 +9,20 @@
|
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/atlassian-labs/atlaspack.git"
|
|
11
11
|
},
|
|
12
|
-
"main": "lib/WebExtensionRuntime.js",
|
|
13
|
-
"source": "src/WebExtensionRuntime.
|
|
12
|
+
"main": "./lib/WebExtensionRuntime.js",
|
|
13
|
+
"source": "./src/WebExtensionRuntime.ts",
|
|
14
|
+
"types": "./lib/WebExtensionRuntime.d.ts",
|
|
14
15
|
"engines": {
|
|
15
16
|
"node": ">= 16.0.0"
|
|
16
17
|
},
|
|
17
18
|
"dependencies": {
|
|
18
|
-
"@atlaspack/plugin": "2.14.5-canary.
|
|
19
|
-
"@atlaspack/utils": "2.14.5-canary.
|
|
19
|
+
"@atlaspack/plugin": "2.14.5-canary.139+d2fd84977",
|
|
20
|
+
"@atlaspack/utils": "2.14.5-canary.139+d2fd84977",
|
|
20
21
|
"nullthrows": "^1.1.1"
|
|
21
22
|
},
|
|
22
23
|
"type": "commonjs",
|
|
23
|
-
"
|
|
24
|
-
|
|
24
|
+
"scripts": {
|
|
25
|
+
"check-ts": "tsc --emitDeclarationOnly --rootDir src"
|
|
26
|
+
},
|
|
27
|
+
"gitHead": "d2fd849770fe6305e9c694bd97b1bd905abd9d94"
|
|
28
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
// @flow strict-local
|
|
2
|
-
|
|
3
1
|
import {Runtime} from '@atlaspack/plugin';
|
|
4
2
|
import {replaceURLReferences} from '@atlaspack/utils';
|
|
5
3
|
import nullthrows from 'nullthrows';
|
|
@@ -11,7 +9,7 @@ const AUTORELOAD_BG = fs.readFileSync(
|
|
|
11
9
|
'utf8',
|
|
12
10
|
);
|
|
13
11
|
|
|
14
|
-
export default
|
|
12
|
+
export default new Runtime({
|
|
15
13
|
loadConfig({config}) {
|
|
16
14
|
config.invalidateOnBuild();
|
|
17
15
|
},
|
|
@@ -22,7 +20,7 @@ export default (new Runtime({
|
|
|
22
20
|
|
|
23
21
|
if (bundle.getMainEntry()?.meta.webextEntry === true) {
|
|
24
22
|
// Hack to bust packager cache when any descendants update
|
|
25
|
-
const descendants = [];
|
|
23
|
+
const descendants: Array<string> = [];
|
|
26
24
|
bundleGraph.traverseBundles((b) => {
|
|
27
25
|
descendants.push(b.id);
|
|
28
26
|
}, bundle);
|
|
@@ -40,7 +38,10 @@ export default (new Runtime({
|
|
|
40
38
|
if (!manifest || !entry || insertDep == null) return;
|
|
41
39
|
const insertBundle = bundleGraph.getReferencedBundle(
|
|
42
40
|
nullthrows(
|
|
43
|
-
entry
|
|
41
|
+
entry
|
|
42
|
+
?.getDependencies()
|
|
43
|
+
// @ts-expect-error TS2304
|
|
44
|
+
.find((dep: Dependency) => dep.id === insertDep),
|
|
44
45
|
),
|
|
45
46
|
nullthrows(manifest),
|
|
46
47
|
);
|
|
@@ -81,4 +82,4 @@ export default (new Runtime({
|
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
|
-
})
|
|
85
|
+
}) as Runtime<unknown>;
|
package/tsconfig.json
ADDED