@atlaspack/types-internal 2.12.1-dev.3502 → 2.12.1-dev.3565
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/index.d.ts +14 -1
- package/package.json +4 -4
- package/src/index.js +15 -1
package/lib/index.d.ts
CHANGED
|
@@ -1394,6 +1394,11 @@ export interface Bundle {
|
|
|
1394
1394
|
*/
|
|
1395
1395
|
readonly hashReference: string;
|
|
1396
1396
|
|
|
1397
|
+
/**
|
|
1398
|
+
* Name of the manual shared bundle config, if that caused this bundle to be created
|
|
1399
|
+
*/
|
|
1400
|
+
readonly manualSharedBundle: string | null | undefined;
|
|
1401
|
+
|
|
1397
1402
|
/**
|
|
1398
1403
|
* Returns the assets that are executed immediately when the bundle is loaded.
|
|
1399
1404
|
* Some bundles may not have any entry assets, for example, shared bundles.
|
|
@@ -1476,6 +1481,11 @@ export interface MutableBundleGraph extends BundleGraph<Bundle> {
|
|
|
1476
1481
|
addBundleToBundleGroup(arg0: Bundle, arg1: BundleGroup): void;
|
|
1477
1482
|
createAssetReference(arg0: Dependency, arg1: Asset, arg2: Bundle): void;
|
|
1478
1483
|
createBundleReference(arg0: Bundle, arg1: Bundle): void;
|
|
1484
|
+
|
|
1485
|
+
/** Creates a conditional relationship in the graph between two bundles
|
|
1486
|
+
* Used to track which bundles conditionally reference another
|
|
1487
|
+
*/
|
|
1488
|
+
createBundleConditionalReference(arg0: Bundle, arg1: Bundle): void;
|
|
1479
1489
|
createBundle(arg0: CreateBundleOpts): Bundle;
|
|
1480
1490
|
|
|
1481
1491
|
/** Turns an edge (Dependency -> Asset-s) into (Dependency -> BundleGroup -> Asset-s) */
|
|
@@ -1638,14 +1648,17 @@ export interface BundleGraph<TBundle extends Bundle> {
|
|
|
1638
1648
|
ifTrueBundles: Array<TBundle>;
|
|
1639
1649
|
ifFalseBundles: Array<TBundle>;
|
|
1640
1650
|
}>>;
|
|
1641
|
-
getConditionsForDependencies(deps: Array<Dependency
|
|
1651
|
+
getConditionsForDependencies(deps: Array<Dependency>, bundle: NamedBundle): Set<{
|
|
1642
1652
|
publicId: string;
|
|
1643
1653
|
key: string;
|
|
1644
1654
|
ifTrueDependency: Dependency;
|
|
1645
1655
|
ifFalseDependency: Dependency;
|
|
1656
|
+
ifTrueBundles: Array<TBundle>;
|
|
1657
|
+
ifFalseBundles: Array<TBundle>;
|
|
1646
1658
|
ifTrueAssetId: string;
|
|
1647
1659
|
ifFalseAssetId: string;
|
|
1648
1660
|
}>;
|
|
1661
|
+
getReferencedConditionalBundles(bundle: Bundle): Array<TBundle>;
|
|
1649
1662
|
}
|
|
1650
1663
|
|
|
1651
1664
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/types-internal",
|
|
3
|
-
"version": "2.12.1-dev.
|
|
3
|
+
"version": "2.12.1-dev.3565+b31bc6b33",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"check-ts": "tsc --noEmit lib/index.d.ts"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@atlaspack/diagnostic": "2.12.1-dev.
|
|
20
|
-
"@atlaspack/feature-flags": "2.12.1-dev.
|
|
19
|
+
"@atlaspack/diagnostic": "2.12.1-dev.3565+b31bc6b33",
|
|
20
|
+
"@atlaspack/feature-flags": "2.12.1-dev.3565+b31bc6b33",
|
|
21
21
|
"@parcel/source-map": "^2.1.1",
|
|
22
22
|
"utility-types": "^3.10.0"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "b31bc6b33de40c158b9f4d8ff177238be0de409d"
|
|
25
25
|
}
|
package/src/index.js
CHANGED
|
@@ -1412,6 +1412,10 @@ export interface Bundle {
|
|
|
1412
1412
|
* bundle. Hash references are replaced with a content hash of the bundle after packaging and optimizing.
|
|
1413
1413
|
*/
|
|
1414
1414
|
+hashReference: string;
|
|
1415
|
+
/**
|
|
1416
|
+
* Name of the manual shared bundle config, if that caused this bundle to be created
|
|
1417
|
+
*/
|
|
1418
|
+
+manualSharedBundle: ?string;
|
|
1415
1419
|
/**
|
|
1416
1420
|
* Returns the assets that are executed immediately when the bundle is loaded.
|
|
1417
1421
|
* Some bundles may not have any entry assets, for example, shared bundles.
|
|
@@ -1497,6 +1501,10 @@ export interface MutableBundleGraph extends BundleGraph<Bundle> {
|
|
|
1497
1501
|
addBundleToBundleGroup(Bundle, BundleGroup): void;
|
|
1498
1502
|
createAssetReference(Dependency, Asset, Bundle): void;
|
|
1499
1503
|
createBundleReference(Bundle, Bundle): void;
|
|
1504
|
+
/** Creates a conditional relationship in the graph between two bundles
|
|
1505
|
+
* Used to track which bundles conditionally reference another
|
|
1506
|
+
*/
|
|
1507
|
+
createBundleConditionalReference(Bundle, Bundle): void;
|
|
1500
1508
|
createBundle(CreateBundleOpts): Bundle;
|
|
1501
1509
|
/** Turns an edge (Dependency -> Asset-s) into (Dependency -> BundleGroup -> Asset-s) */
|
|
1502
1510
|
createBundleGroup(Dependency, Target): BundleGroup;
|
|
@@ -1642,14 +1650,20 @@ export interface BundleGraph<TBundle: Bundle> {
|
|
|
1642
1650
|
|},
|
|
1643
1651
|
>,
|
|
1644
1652
|
>;
|
|
1645
|
-
getConditionsForDependencies(
|
|
1653
|
+
getConditionsForDependencies(
|
|
1654
|
+
deps: Array<Dependency>,
|
|
1655
|
+
bundle: NamedBundle,
|
|
1656
|
+
): Set<{|
|
|
1646
1657
|
publicId: string,
|
|
1647
1658
|
key: string,
|
|
1648
1659
|
ifTrueDependency: Dependency,
|
|
1649
1660
|
ifFalseDependency: Dependency,
|
|
1661
|
+
ifTrueBundles: Array<TBundle>,
|
|
1662
|
+
ifFalseBundles: Array<TBundle>,
|
|
1650
1663
|
ifTrueAssetId: string,
|
|
1651
1664
|
ifFalseAssetId: string,
|
|
1652
1665
|
|}>;
|
|
1666
|
+
getReferencedConditionalBundles(bundle: Bundle): Array<TBundle>;
|
|
1653
1667
|
}
|
|
1654
1668
|
|
|
1655
1669
|
/**
|