@atlaspack/bundler-default 3.0.1 → 3.0.2

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaspack/bundler-default
2
2
 
3
+ ## 3.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#613](https://github.com/atlassian-labs/atlaspack/pull/613) [`4ca19d8`](https://github.com/atlassian-labs/atlaspack/commit/4ca19d8060dfcd279183e4039f2ecb43334ac44c) Thanks [@marcins](https://github.com/marcins)! - Ensure that constant modules are correctly included in MSBs even if they wouldn't otherwise be.
8
+
9
+ - Updated dependencies [[`73ea3c4`](https://github.com/atlassian-labs/atlaspack/commit/73ea3c4d85d4401fdd15abcbf988237e890e7ad3), [`b1b3693`](https://github.com/atlassian-labs/atlaspack/commit/b1b369317c66f8a431c170df2ebba4fa5b2e38ef)]:
10
+ - @atlaspack/feature-flags@2.17.0
11
+ - @atlaspack/graph@3.5.1
12
+ - @atlaspack/utils@2.14.11
13
+ - @atlaspack/plugin@2.14.11
14
+
3
15
  ## 3.0.1
4
16
 
5
17
  ### Patch Changes
package/lib/idealGraph.js CHANGED
@@ -161,17 +161,15 @@ function createIdealGraph(assetGraph, config, entries, logger) {
161
161
  assetGraph.traverse((node, _, actions) => {
162
162
  if (node.type === 'asset' && (!Array.isArray(c.types) || c.types.includes(node.value.type))) {
163
163
  let projectRelativePath = _path().default.relative(config.projectRoot, node.value.filePath);
164
- if (!assetRegexes.some(regex => regex.test(projectRelativePath))) {
165
- return;
166
- }
167
164
 
168
165
  // We track all matching MSB's for constant modules as they are never duplicated
169
166
  // and need to be assigned to all matching bundles
170
167
  if (node.value.meta.isConstantModule === true) {
171
168
  constantModuleToMSB.get(node.value).push(c);
172
169
  }
173
- manualAssetToConfig.set(node.value, c);
174
- return;
170
+ if (assetRegexes.some(regex => regex.test(projectRelativePath))) {
171
+ manualAssetToConfig.set(node.value, c);
172
+ }
175
173
  }
176
174
  if (node.type === 'dependency' && (node.value.priority === 'lazy' || (0, _featureFlags().getFeatureFlag)('conditionalBundlingApi') && node.value.priority === 'conditional') && parentAsset) {
177
175
  // Don't walk past the bundle group assets
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/bundler-default",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "type": "commonjs",
6
6
  "publishConfig": {
@@ -17,11 +17,11 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@atlaspack/diagnostic": "2.14.1",
20
- "@atlaspack/feature-flags": "2.16.0",
21
- "@atlaspack/graph": "3.5.0",
22
- "@atlaspack/plugin": "2.14.10",
20
+ "@atlaspack/feature-flags": "2.17.0",
21
+ "@atlaspack/graph": "3.5.1",
22
+ "@atlaspack/plugin": "2.14.11",
23
23
  "@atlaspack/rust": "3.3.5",
24
- "@atlaspack/utils": "2.14.10",
24
+ "@atlaspack/utils": "2.14.11",
25
25
  "nullthrows": "^1.1.1",
26
26
  "many-keys-map": "^1.0.3"
27
27
  }
package/src/idealGraph.js CHANGED
@@ -204,17 +204,16 @@ export function createIdealGraph(
204
204
  config.projectRoot,
205
205
  node.value.filePath,
206
206
  );
207
- if (!assetRegexes.some((regex) => regex.test(projectRelativePath))) {
208
- return;
209
- }
210
207
 
211
208
  // We track all matching MSB's for constant modules as they are never duplicated
212
209
  // and need to be assigned to all matching bundles
213
210
  if (node.value.meta.isConstantModule === true) {
214
211
  constantModuleToMSB.get(node.value).push(c);
215
212
  }
216
- manualAssetToConfig.set(node.value, c);
217
- return;
213
+
214
+ if (assetRegexes.some((regex) => regex.test(projectRelativePath))) {
215
+ manualAssetToConfig.set(node.value, c);
216
+ }
218
217
  }
219
218
 
220
219
  if (