@atlaspack/packager-js 2.14.5-canary.155 → 2.14.5-canary.157
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 +17 -0
- package/lib/ScopeHoistingPackager.js +8 -0
- package/package.json +8 -8
- package/src/ScopeHoistingPackager.ts +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaspack/packager-js
|
|
2
2
|
|
|
3
|
+
## 2.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#732](https://github.com/atlassian-labs/atlaspack/pull/732) [`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45) Thanks [@vykimnguyen](https://github.com/vykimnguyen)! - add tesseract context
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#744](https://github.com/atlassian-labs/atlaspack/pull/744) [`3718bff`](https://github.com/atlassian-labs/atlaspack/commit/3718bff20484138e405e321472336ac058432e10) Thanks [@benjervis](https://github.com/benjervis)! - Fix the scope hoisting improvements feature by making all entry assets of a bundle
|
|
12
|
+
wrapped, which means there is no top level scope.
|
|
13
|
+
- Updated dependencies [[`ad26146`](https://github.com/atlassian-labs/atlaspack/commit/ad26146f13b4c1cc65d4a0f9c67060b90ef14ff3), [`f1b48e7`](https://github.com/atlassian-labs/atlaspack/commit/f1b48e7a04e005cef0f36a3e692087a9ecdb6f7a), [`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45), [`73dd7ba`](https://github.com/atlassian-labs/atlaspack/commit/73dd7baab69456ef2f6e4a0cc7dbb04f407eb148)]:
|
|
14
|
+
- @atlaspack/rust@3.6.0
|
|
15
|
+
- @atlaspack/feature-flags@2.22.0
|
|
16
|
+
- @atlaspack/utils@2.18.1
|
|
17
|
+
- @atlaspack/plugin@2.14.24
|
|
18
|
+
- @atlaspack/types@2.15.14
|
|
19
|
+
|
|
3
20
|
## 2.20.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -316,6 +316,14 @@ class ScopeHoistingPackager {
|
|
|
316
316
|
}
|
|
317
317
|
});
|
|
318
318
|
if ((0, _featureFlags().getFeatureFlag)('applyScopeHoistingImprovement')) {
|
|
319
|
+
// Make all entry assets wrapped, to avoid any top level hoisting
|
|
320
|
+
for (let entryAsset of this.bundle.getEntryAssets()) {
|
|
321
|
+
if (!this.wrappedAssets.has(entryAsset.id)) {
|
|
322
|
+
this.wrappedAssets.add(entryAsset.id);
|
|
323
|
+
wrapped.push(entryAsset);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
319
327
|
// Tracks which assets have been assigned to a wrap group
|
|
320
328
|
let assignedAssets = new Set();
|
|
321
329
|
for (let wrappedAsset of wrapped) {
|
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.157+15a002dd2",
|
|
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.225+15a002dd2",
|
|
20
|
+
"@atlaspack/feature-flags": "2.14.1-canary.225+15a002dd2",
|
|
21
|
+
"@atlaspack/plugin": "2.14.5-canary.157+15a002dd2",
|
|
22
|
+
"@atlaspack/rust": "3.2.1-canary.157+15a002dd2",
|
|
23
|
+
"@atlaspack/types": "2.14.5-canary.157+15a002dd2",
|
|
24
|
+
"@atlaspack/utils": "2.14.5-canary.157+15a002dd2",
|
|
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": "15a002dd20ce80711376e69044fb87b944084ac7"
|
|
36
36
|
}
|
|
@@ -388,6 +388,7 @@ export class ScopeHoistingPackager {
|
|
|
388
388
|
let queue = new PromiseQueue({maxConcurrent: 32});
|
|
389
389
|
let wrapped: Array<Asset> = [];
|
|
390
390
|
let constant: Array<Asset> = [];
|
|
391
|
+
|
|
391
392
|
this.bundle.traverseAssets((asset) => {
|
|
392
393
|
queue.add(async () => {
|
|
393
394
|
let [code, map] = await Promise.all([
|
|
@@ -426,6 +427,14 @@ export class ScopeHoistingPackager {
|
|
|
426
427
|
});
|
|
427
428
|
|
|
428
429
|
if (getFeatureFlag('applyScopeHoistingImprovement')) {
|
|
430
|
+
// Make all entry assets wrapped, to avoid any top level hoisting
|
|
431
|
+
for (let entryAsset of this.bundle.getEntryAssets()) {
|
|
432
|
+
if (!this.wrappedAssets.has(entryAsset.id)) {
|
|
433
|
+
this.wrappedAssets.add(entryAsset.id);
|
|
434
|
+
wrapped.push(entryAsset);
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
|
|
429
438
|
// Tracks which assets have been assigned to a wrap group
|
|
430
439
|
let assignedAssets = new Set<Asset>();
|
|
431
440
|
|