@atlaspack/packager-js 2.14.5-dev.55 → 2.14.5-dev.72
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 +20 -0
- package/lib/ScopeHoistingPackager.js +14 -0
- package/package.json +8 -8
- package/src/ScopeHoistingPackager.js +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaspack/packager-js
|
|
2
2
|
|
|
3
|
+
## 2.14.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`73ea3c4`](https://github.com/atlassian-labs/atlaspack/commit/73ea3c4d85d4401fdd15abcbf988237e890e7ad3), [`b1b3693`](https://github.com/atlassian-labs/atlaspack/commit/b1b369317c66f8a431c170df2ebba4fa5b2e38ef)]:
|
|
8
|
+
- @atlaspack/feature-flags@2.17.0
|
|
9
|
+
- @atlaspack/utils@2.14.11
|
|
10
|
+
- @atlaspack/types@2.15.1
|
|
11
|
+
- @atlaspack/plugin@2.14.11
|
|
12
|
+
|
|
13
|
+
## 2.14.10
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`51aba5f`](https://github.com/atlassian-labs/atlaspack/commit/51aba5fc0e49235ee06bbc3c376f48c3e7da5c4b), [`1e32d4e`](https://github.com/atlassian-labs/atlaspack/commit/1e32d4eae6b3af3968e8a0ef97d35b4347fd4196), [`35fdd4b`](https://github.com/atlassian-labs/atlaspack/commit/35fdd4b52da0af20f74667f7b8adfb2f90279b7c), [`6dd4ccb`](https://github.com/atlassian-labs/atlaspack/commit/6dd4ccb753541de32322d881f973d571dd57e4ca)]:
|
|
18
|
+
- @atlaspack/types@2.15.0
|
|
19
|
+
- @atlaspack/rust@3.3.5
|
|
20
|
+
- @atlaspack/plugin@2.14.10
|
|
21
|
+
- @atlaspack/utils@2.14.10
|
|
22
|
+
|
|
3
23
|
## 2.14.9
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -127,6 +127,12 @@ class ScopeHoistingPackager {
|
|
|
127
127
|
for (let b of this.bundleGraph.getReferencedBundles(this.bundle, {
|
|
128
128
|
recursive: false
|
|
129
129
|
})) {
|
|
130
|
+
// If the referenced bundle is a native node bundle then don't require it as
|
|
131
|
+
// an external as we don't want to require native node bundles from other
|
|
132
|
+
// OS architectures
|
|
133
|
+
if (process.env.ATLASPACK_SUPER_BUILD === 'true' && b.type === 'node') {
|
|
134
|
+
continue;
|
|
135
|
+
}
|
|
130
136
|
this.externals.set((0, _utils().relativeBundlePath)(this.bundle, b), new Map());
|
|
131
137
|
}
|
|
132
138
|
}
|
|
@@ -588,6 +594,14 @@ ${code}
|
|
|
588
594
|
this.externalAssets.add(resolved);
|
|
589
595
|
continue;
|
|
590
596
|
}
|
|
597
|
+
|
|
598
|
+
// If the referencedBundle is a native node import then require it
|
|
599
|
+
// directly
|
|
600
|
+
// Only enabled for internal builds for now
|
|
601
|
+
if (process.env.ATLASPACK_SUPER_BUILD === 'true' && referencedBundle && referencedBundle.type === 'node') {
|
|
602
|
+
replacements.set((0, _nullthrows().default)(dep.symbols.get('*')).local, `require('${(0, _utils().relativeBundlePath)(this.bundle, referencedBundle)}')`);
|
|
603
|
+
continue;
|
|
604
|
+
}
|
|
591
605
|
}
|
|
592
606
|
for (let [imported, {
|
|
593
607
|
local
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/packager-js",
|
|
3
|
-
"version": "2.14.5-dev.
|
|
3
|
+
"version": "2.14.5-dev.72+9840480de",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -15,16 +15,16 @@
|
|
|
15
15
|
"node": ">= 16.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@atlaspack/diagnostic": "2.14.1-dev.
|
|
19
|
-
"@atlaspack/feature-flags": "2.14.1-dev.
|
|
20
|
-
"@atlaspack/plugin": "2.14.5-dev.
|
|
21
|
-
"@atlaspack/rust": "3.2.1-dev.
|
|
22
|
-
"@atlaspack/types": "2.14.5-dev.
|
|
23
|
-
"@atlaspack/utils": "2.14.5-dev.
|
|
18
|
+
"@atlaspack/diagnostic": "2.14.1-dev.140+9840480de",
|
|
19
|
+
"@atlaspack/feature-flags": "2.14.1-dev.140+9840480de",
|
|
20
|
+
"@atlaspack/plugin": "2.14.5-dev.72+9840480de",
|
|
21
|
+
"@atlaspack/rust": "3.2.1-dev.72+9840480de",
|
|
22
|
+
"@atlaspack/types": "2.14.5-dev.72+9840480de",
|
|
23
|
+
"@atlaspack/utils": "2.14.5-dev.72+9840480de",
|
|
24
24
|
"@parcel/source-map": "^2.1.1",
|
|
25
25
|
"globals": "^13.2.0",
|
|
26
26
|
"nullthrows": "^1.1.1"
|
|
27
27
|
},
|
|
28
28
|
"type": "commonjs",
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "9840480de27511f558d8f5b8cf82220de977b4fb"
|
|
30
30
|
}
|
|
@@ -149,6 +149,13 @@ export class ScopeHoistingPackager {
|
|
|
149
149
|
for (let b of this.bundleGraph.getReferencedBundles(this.bundle, {
|
|
150
150
|
recursive: false,
|
|
151
151
|
})) {
|
|
152
|
+
// If the referenced bundle is a native node bundle then don't require it as
|
|
153
|
+
// an external as we don't want to require native node bundles from other
|
|
154
|
+
// OS architectures
|
|
155
|
+
if (process.env.ATLASPACK_SUPER_BUILD === 'true' && b.type === 'node') {
|
|
156
|
+
continue;
|
|
157
|
+
}
|
|
158
|
+
|
|
152
159
|
this.externals.set(relativeBundlePath(this.bundle, b), new Map());
|
|
153
160
|
}
|
|
154
161
|
}
|
|
@@ -809,6 +816,21 @@ ${code}
|
|
|
809
816
|
this.externalAssets.add(resolved);
|
|
810
817
|
continue;
|
|
811
818
|
}
|
|
819
|
+
|
|
820
|
+
// If the referencedBundle is a native node import then require it
|
|
821
|
+
// directly
|
|
822
|
+
// Only enabled for internal builds for now
|
|
823
|
+
if (
|
|
824
|
+
process.env.ATLASPACK_SUPER_BUILD === 'true' &&
|
|
825
|
+
referencedBundle &&
|
|
826
|
+
referencedBundle.type === 'node'
|
|
827
|
+
) {
|
|
828
|
+
replacements.set(
|
|
829
|
+
nullthrows(dep.symbols.get('*')).local,
|
|
830
|
+
`require('${relativeBundlePath(this.bundle, referencedBundle)}')`,
|
|
831
|
+
);
|
|
832
|
+
continue;
|
|
833
|
+
}
|
|
812
834
|
}
|
|
813
835
|
|
|
814
836
|
for (let [imported, {local}] of dep.symbols) {
|