@atlaspack/packager-js 2.14.5-canary.153 → 2.14.5-canary.155
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/lib/DevPackager.js
CHANGED
|
@@ -200,7 +200,7 @@ class DevPackager {
|
|
|
200
200
|
interpreter = _interpreter;
|
|
201
201
|
}
|
|
202
202
|
let importScripts = '';
|
|
203
|
-
if (this.bundle.env.isWorker()) {
|
|
203
|
+
if (this.bundle.env.isWorker() || this.bundle.env.isTesseract()) {
|
|
204
204
|
let bundles = this.bundleGraph.getReferencedBundles(this.bundle);
|
|
205
205
|
for (let b of bundles) {
|
|
206
206
|
importScripts += `importScripts("${(0, _utils().relativeBundlePath)(this.bundle, b)}");\n`;
|
|
@@ -86,6 +86,7 @@ const GLOBALS_BY_CONTEXT = {
|
|
|
86
86
|
'web-worker': new Set([...BUILTINS, ...Object.keys(_globals().default.worker)]),
|
|
87
87
|
'service-worker': new Set([...BUILTINS, ...Object.keys(_globals().default.serviceworker)]),
|
|
88
88
|
worklet: new Set([...BUILTINS]),
|
|
89
|
+
tesseract: new Set([...BUILTINS, ...Object.keys(_globals().default.worker)]),
|
|
89
90
|
node: new Set([...BUILTINS, ...Object.keys(_globals().default.node)]),
|
|
90
91
|
'electron-main': new Set([...BUILTINS, ...Object.keys(_globals().default.node)]),
|
|
91
92
|
'electron-renderer': new Set([...BUILTINS, ...Object.keys(_globals().default.node), ...Object.keys(_globals().default.browser)])
|
|
@@ -1252,7 +1253,7 @@ ${code}
|
|
|
1252
1253
|
}
|
|
1253
1254
|
|
|
1254
1255
|
// Add importScripts for sibling bundles in workers.
|
|
1255
|
-
if (this.bundle.env.isWorker() || this.bundle.env.isWorklet()) {
|
|
1256
|
+
if (this.bundle.env.isWorker() || this.bundle.env.isTesseract() || this.bundle.env.isWorklet()) {
|
|
1256
1257
|
let importScripts = '';
|
|
1257
1258
|
let bundles = this.bundleGraph.getReferencedBundles(this.bundle);
|
|
1258
1259
|
for (let b of bundles) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/packager-js",
|
|
3
|
-
"version": "2.14.5-canary.
|
|
3
|
+
"version": "2.14.5-canary.155+7f5841c39",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
"node": ">= 16.0.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@atlaspack/diagnostic": "2.14.1-canary.
|
|
20
|
-
"@atlaspack/feature-flags": "2.14.1-canary.
|
|
21
|
-
"@atlaspack/plugin": "2.14.5-canary.
|
|
22
|
-
"@atlaspack/rust": "3.2.1-canary.
|
|
23
|
-
"@atlaspack/types": "2.14.5-canary.
|
|
24
|
-
"@atlaspack/utils": "2.14.5-canary.
|
|
19
|
+
"@atlaspack/diagnostic": "2.14.1-canary.223+7f5841c39",
|
|
20
|
+
"@atlaspack/feature-flags": "2.14.1-canary.223+7f5841c39",
|
|
21
|
+
"@atlaspack/plugin": "2.14.5-canary.155+7f5841c39",
|
|
22
|
+
"@atlaspack/rust": "3.2.1-canary.155+7f5841c39",
|
|
23
|
+
"@atlaspack/types": "2.14.5-canary.155+7f5841c39",
|
|
24
|
+
"@atlaspack/utils": "2.14.5-canary.155+7f5841c39",
|
|
25
25
|
"@parcel/source-map": "^2.1.1",
|
|
26
26
|
"globals": "^13.2.0",
|
|
27
27
|
"nullthrows": "^1.1.1",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"check-ts": "tsc --emitDeclarationOnly --rootDir src",
|
|
33
33
|
"build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "7f5841c39df049f9546cccbeea2a7337e0337b45"
|
|
36
36
|
}
|
package/src/DevPackager.ts
CHANGED
|
@@ -250,7 +250,7 @@ export class DevPackager {
|
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
let importScripts = '';
|
|
253
|
-
if (this.bundle.env.isWorker()) {
|
|
253
|
+
if (this.bundle.env.isWorker() || this.bundle.env.isTesseract()) {
|
|
254
254
|
let bundles = this.bundleGraph.getReferencedBundles(this.bundle);
|
|
255
255
|
for (let b of bundles) {
|
|
256
256
|
importScripts += `importScripts("${relativeBundlePath(
|
|
@@ -54,6 +54,7 @@ const GLOBALS_BY_CONTEXT = {
|
|
|
54
54
|
...Object.keys(globals.serviceworker),
|
|
55
55
|
]),
|
|
56
56
|
worklet: new Set([...BUILTINS]),
|
|
57
|
+
tesseract: new Set([...BUILTINS, ...Object.keys(globals.worker)]),
|
|
57
58
|
node: new Set([...BUILTINS, ...Object.keys(globals.node)]),
|
|
58
59
|
'electron-main': new Set([...BUILTINS, ...Object.keys(globals.node)]),
|
|
59
60
|
'electron-renderer': new Set([
|
|
@@ -1682,7 +1683,11 @@ ${code}
|
|
|
1682
1683
|
}
|
|
1683
1684
|
|
|
1684
1685
|
// Add importScripts for sibling bundles in workers.
|
|
1685
|
-
if (
|
|
1686
|
+
if (
|
|
1687
|
+
this.bundle.env.isWorker() ||
|
|
1688
|
+
this.bundle.env.isTesseract() ||
|
|
1689
|
+
this.bundle.env.isWorklet()
|
|
1690
|
+
) {
|
|
1686
1691
|
let importScripts = '';
|
|
1687
1692
|
let bundles = this.bundleGraph.getReferencedBundles(this.bundle);
|
|
1688
1693
|
for (let b of bundles) {
|