@atlaspack/core 2.16.2-canary.121 → 2.16.2-canary.123
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/public/BundleGraph.js +5 -20
- package/package.json +17 -17
- package/src/public/BundleGraph.js +11 -20
|
@@ -32,13 +32,6 @@ var _Dependency = _interopRequireWildcard(require("./Dependency"));
|
|
|
32
32
|
var _Target = require("./Target");
|
|
33
33
|
var _utils = require("../utils");
|
|
34
34
|
var _BundleGroup = _interopRequireWildcard(require("./BundleGroup"));
|
|
35
|
-
function _featureFlags() {
|
|
36
|
-
const data = require("@atlaspack/feature-flags");
|
|
37
|
-
_featureFlags = function () {
|
|
38
|
-
return data;
|
|
39
|
-
};
|
|
40
|
-
return data;
|
|
41
|
-
}
|
|
42
35
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
43
36
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
44
37
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -271,19 +264,11 @@ class BundleGraph {
|
|
|
271
264
|
for (let bundle of bundles) {
|
|
272
265
|
const conditions = bundleConditions.get(bundle.id) ?? new Map();
|
|
273
266
|
const currentCondition = conditions.get(cond.key);
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
});
|
|
280
|
-
} else {
|
|
281
|
-
conditions.set(cond.key, {
|
|
282
|
-
bundle,
|
|
283
|
-
ifTrueBundles,
|
|
284
|
-
ifFalseBundles
|
|
285
|
-
});
|
|
286
|
-
}
|
|
267
|
+
conditions.set(cond.key, {
|
|
268
|
+
bundle,
|
|
269
|
+
ifTrueBundles: [...((currentCondition === null || currentCondition === void 0 ? void 0 : currentCondition.ifTrueBundles) ?? []), ...ifTrueBundles],
|
|
270
|
+
ifFalseBundles: [...((currentCondition === null || currentCondition === void 0 ? void 0 : currentCondition.ifFalseBundles) ?? []), ...ifFalseBundles]
|
|
271
|
+
});
|
|
287
272
|
bundleConditions.set(bundle.id, conditions);
|
|
288
273
|
}
|
|
289
274
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/core",
|
|
3
|
-
"version": "2.16.2-canary.
|
|
3
|
+
"version": "2.16.2-canary.123+dbb40721e",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -21,21 +21,21 @@
|
|
|
21
21
|
"check-ts": "tsc --noEmit index.d.ts"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@atlaspack/build-cache": "2.13.3-canary.
|
|
25
|
-
"@atlaspack/cache": "3.1.1-canary.
|
|
26
|
-
"@atlaspack/diagnostic": "2.14.1-canary.
|
|
27
|
-
"@atlaspack/events": "2.14.1-canary.
|
|
28
|
-
"@atlaspack/feature-flags": "2.14.1-canary.
|
|
29
|
-
"@atlaspack/fs": "2.14.5-canary.
|
|
30
|
-
"@atlaspack/graph": "3.4.1-canary.
|
|
31
|
-
"@atlaspack/logger": "2.14.5-canary.
|
|
32
|
-
"@atlaspack/package-manager": "2.14.5-canary.
|
|
33
|
-
"@atlaspack/plugin": "2.14.5-canary.
|
|
34
|
-
"@atlaspack/profiler": "2.14.1-canary.
|
|
35
|
-
"@atlaspack/rust": "3.2.1-canary.
|
|
36
|
-
"@atlaspack/types": "2.14.5-canary.
|
|
37
|
-
"@atlaspack/utils": "2.14.5-canary.
|
|
38
|
-
"@atlaspack/workers": "2.14.5-canary.
|
|
24
|
+
"@atlaspack/build-cache": "2.13.3-canary.191+dbb40721e",
|
|
25
|
+
"@atlaspack/cache": "3.1.1-canary.123+dbb40721e",
|
|
26
|
+
"@atlaspack/diagnostic": "2.14.1-canary.191+dbb40721e",
|
|
27
|
+
"@atlaspack/events": "2.14.1-canary.191+dbb40721e",
|
|
28
|
+
"@atlaspack/feature-flags": "2.14.1-canary.191+dbb40721e",
|
|
29
|
+
"@atlaspack/fs": "2.14.5-canary.123+dbb40721e",
|
|
30
|
+
"@atlaspack/graph": "3.4.1-canary.191+dbb40721e",
|
|
31
|
+
"@atlaspack/logger": "2.14.5-canary.123+dbb40721e",
|
|
32
|
+
"@atlaspack/package-manager": "2.14.5-canary.123+dbb40721e",
|
|
33
|
+
"@atlaspack/plugin": "2.14.5-canary.123+dbb40721e",
|
|
34
|
+
"@atlaspack/profiler": "2.14.1-canary.191+dbb40721e",
|
|
35
|
+
"@atlaspack/rust": "3.2.1-canary.123+dbb40721e",
|
|
36
|
+
"@atlaspack/types": "2.14.5-canary.123+dbb40721e",
|
|
37
|
+
"@atlaspack/utils": "2.14.5-canary.123+dbb40721e",
|
|
38
|
+
"@atlaspack/workers": "2.14.5-canary.123+dbb40721e",
|
|
39
39
|
"@mischnic/json-sourcemap": "^0.1.0",
|
|
40
40
|
"@parcel/source-map": "^2.1.1",
|
|
41
41
|
"base-x": "^3.0.8",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"./src/serializerCore.js": "./src/serializerCore.browser.js"
|
|
61
61
|
},
|
|
62
62
|
"type": "commonjs",
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "dbb40721ebeb45990a14ba04e6b44e7f836fb32d"
|
|
64
64
|
}
|
|
@@ -31,7 +31,6 @@ import Dependency, {
|
|
|
31
31
|
import {targetToInternalTarget} from './Target';
|
|
32
32
|
import {fromInternalSourceLocation} from '../utils';
|
|
33
33
|
import BundleGroup, {bundleGroupToInternalBundleGroup} from './BundleGroup';
|
|
34
|
-
import {getFeatureFlag} from '@atlaspack/feature-flags';
|
|
35
34
|
|
|
36
35
|
// Friendly access for other modules within this package that need access
|
|
37
36
|
// to the internal bundle.
|
|
@@ -492,25 +491,17 @@ export default class BundleGraph<TBundle: IBundle>
|
|
|
492
491
|
|
|
493
492
|
const currentCondition = conditions.get(cond.key);
|
|
494
493
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
ifTrueBundles
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
ifFalseBundles
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
});
|
|
507
|
-
} else {
|
|
508
|
-
conditions.set(cond.key, {
|
|
509
|
-
bundle,
|
|
510
|
-
ifTrueBundles,
|
|
511
|
-
ifFalseBundles,
|
|
512
|
-
});
|
|
513
|
-
}
|
|
494
|
+
conditions.set(cond.key, {
|
|
495
|
+
bundle,
|
|
496
|
+
ifTrueBundles: [
|
|
497
|
+
...(currentCondition?.ifTrueBundles ?? []),
|
|
498
|
+
...ifTrueBundles,
|
|
499
|
+
],
|
|
500
|
+
ifFalseBundles: [
|
|
501
|
+
...(currentCondition?.ifFalseBundles ?? []),
|
|
502
|
+
...ifFalseBundles,
|
|
503
|
+
],
|
|
504
|
+
});
|
|
514
505
|
|
|
515
506
|
bundleConditions.set(bundle.id, conditions);
|
|
516
507
|
}
|