@atlaspack/feature-flags 2.17.0 → 2.18.1

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,26 @@
1
1
  # @atlaspack/feature-flags
2
2
 
3
+ ## 2.18.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#633](https://github.com/atlassian-labs/atlaspack/pull/633) [`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b) Thanks [@sbhuiyan-atlassian](https://github.com/sbhuiyan-atlassian)! - Ported various HMR changes from Parcel
8
+
9
+ - [#626](https://github.com/atlassian-labs/atlaspack/pull/626) [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca) Thanks [@yamadapc](https://github.com/yamadapc)! - Clean-up tsconfig invalidation improvements feature-flag
10
+
11
+ ## 2.18.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#627](https://github.com/atlassian-labs/atlaspack/pull/627) [`85c52d3`](https://github.com/atlassian-labs/atlaspack/commit/85c52d3f7717b3c84a118d18ab98cfbfd71dcbd2) Thanks [@benjervis](https://github.com/benjervis)! - Adds a feature flag for `applyScopeHoistingImprovement`
16
+
17
+ ### Patch Changes
18
+
19
+ - [#632](https://github.com/atlassian-labs/atlaspack/pull/632) [`10fbcfb`](https://github.com/atlassian-labs/atlaspack/commit/10fbcfbfa49c7a83da5d7c40983e36e87f524a75) Thanks [@marcins](https://github.com/marcins)! - Added a new feature flag `inlineConstOptimisationFix` which when enabled changes the behaviour for output of constant modules. This fixes two issues with constant modules:
20
+
21
+ - Previously constant modules, if they needed a namespace anywhere, would have a namespace everywhere, with this change they only have a namespace in the bundles where needed.
22
+ - Previously in the case of wrapped assets, a constant module dependnecy of that wrapped asset would be rendered after the module - which meant the minifier would not be able to inline the constants safely. With this flag all constant modules are rendered at the top of the bundle.
23
+
3
24
  ## 2.17.0
4
25
 
5
26
  ### Minor Changes
package/lib/index.js CHANGED
@@ -28,7 +28,6 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
28
28
  patchProjectPaths: false,
29
29
  cachePerformanceImprovements: process.env.NODE_ENV === 'test',
30
30
  environmentDeduplication: false,
31
- granularTsConfigInvalidation: false,
32
31
  inlineStringReplacementPerf: false,
33
32
  conditionalBundlingAsyncRuntime: false,
34
33
  // Default to true as it's a monitoring change. Can be turned off if necessary.
@@ -36,7 +35,10 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
36
35
  conditionalBundlingReporterDuplicateFix: false,
37
36
  resolveBundlerConfigFromCwd: false,
38
37
  conditionalBundlingReporterSameConditionFix: false,
39
- condbHtmlPackagerChange: false
38
+ condbHtmlPackagerChange: false,
39
+ applyScopeHoistingImprovement: false,
40
+ inlineConstOptimisationFix: false,
41
+ hmrImprovements: false
40
42
  };
41
43
  let featureFlagValues = {
42
44
  ...DEFAULT_FEATURE_FLAGS
package/lib/types.d.ts CHANGED
@@ -44,11 +44,6 @@ export type FeatureFlags = {
44
44
  */
45
45
  vcsMode: ConsistencyCheckFeatureFlagValue;
46
46
 
47
- /**
48
- * Enable granular TS config invalidation
49
- */
50
- granularTsConfigInvalidation: boolean;
51
-
52
47
  /**
53
48
  * Refactor cache to:
54
49
  * - Split writes into multiple entries
@@ -123,6 +118,24 @@ export type FeatureFlags = {
123
118
  * Enable a change to the html packager to load more bundles when conditional bundling fallback mode is enabled
124
119
  */
125
120
  condbHtmlPackagerChange: boolean;
121
+
122
+ /**
123
+ * Enable a setting that allows for more assets to be scope hoisted, if
124
+ * they're safe to do so.
125
+ */
126
+ applyScopeHoistingImprovement: boolean;
127
+
128
+ /**
129
+ * Enable a change where a constant module only have the namespacing object added in bundles where it is required
130
+ */
131
+ inlineConstOptimisationFix: boolean;
132
+
133
+ /**
134
+ * Improves/fixes HMR behaviour by:
135
+ * - Fixing HMR behaviour with lazy bundle edges
136
+ * - Moving the functionality of the react-refresh runtime into the react-refresh-wrap transformer
137
+ */
138
+ hmrImprovements: boolean;
126
139
  };
127
140
  export declare var CONSISTENCY_CHECK_VALUES: ReadonlyArray<string>;
128
141
  export type ConsistencyCheckFeatureFlagValue = $ElementType<typeof CONSISTENCY_CHECK_VALUES, number>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/feature-flags",
3
- "version": "2.17.0",
3
+ "version": "2.18.1",
4
4
  "description": "Provides internal feature-flags for the atlaspack codebase.",
5
5
  "license": "(MIT OR Apache-2.0)",
6
6
  "publishConfig": {
package/src/index.js CHANGED
@@ -29,7 +29,6 @@ export const DEFAULT_FEATURE_FLAGS: FeatureFlags = {
29
29
  patchProjectPaths: false,
30
30
  cachePerformanceImprovements: process.env.NODE_ENV === 'test',
31
31
  environmentDeduplication: false,
32
- granularTsConfigInvalidation: false,
33
32
  inlineStringReplacementPerf: false,
34
33
  conditionalBundlingAsyncRuntime: false,
35
34
  // Default to true as it's a monitoring change. Can be turned off if necessary.
@@ -38,6 +37,9 @@ export const DEFAULT_FEATURE_FLAGS: FeatureFlags = {
38
37
  resolveBundlerConfigFromCwd: false,
39
38
  conditionalBundlingReporterSameConditionFix: false,
40
39
  condbHtmlPackagerChange: false,
40
+ applyScopeHoistingImprovement: false,
41
+ inlineConstOptimisationFix: false,
42
+ hmrImprovements: false,
41
43
  };
42
44
 
43
45
  let featureFlagValues: FeatureFlags = {...DEFAULT_FEATURE_FLAGS};
package/src/types.js CHANGED
@@ -37,10 +37,6 @@ export type FeatureFlags = {|
37
37
  * - NEW: Return VCS result, but don't call watchman
38
38
  */
39
39
  vcsMode: ConsistencyCheckFeatureFlagValue,
40
- /**
41
- * Enable granular TS config invalidation
42
- */
43
- granularTsConfigInvalidation: boolean,
44
40
  /**
45
41
  * Refactor cache to:
46
42
  * - Split writes into multiple entries
@@ -102,6 +98,21 @@ export type FeatureFlags = {|
102
98
  * Enable a change to the html packager to load more bundles when conditional bundling fallback mode is enabled
103
99
  */
104
100
  condbHtmlPackagerChange: boolean,
101
+ /**
102
+ * Enable a setting that allows for more assets to be scope hoisted, if
103
+ * they're safe to do so.
104
+ */
105
+ applyScopeHoistingImprovement: boolean,
106
+ /**
107
+ * Enable a change where a constant module only have the namespacing object added in bundles where it is required
108
+ */
109
+ inlineConstOptimisationFix: boolean,
110
+ /**
111
+ * Improves/fixes HMR behaviour by:
112
+ * - Fixing HMR behaviour with lazy bundle edges
113
+ * - Moving the functionality of the react-refresh runtime into the react-refresh-wrap transformer
114
+ */
115
+ hmrImprovements: boolean,
105
116
  |};
106
117
 
107
118
  declare export var CONSISTENCY_CHECK_VALUES: $ReadOnlyArray<string>;