@atlaspack/feature-flags 2.17.0 → 2.18.0
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 +13 -0
- package/lib/index.js +3 -1
- package/lib/types.d.ts +11 -0
- package/package.json +1 -1
- package/src/index.js +2 -0
- package/src/types.js +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaspack/feature-flags
|
|
2
2
|
|
|
3
|
+
## 2.18.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#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`
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#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:
|
|
12
|
+
|
|
13
|
+
- 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.
|
|
14
|
+
- 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.
|
|
15
|
+
|
|
3
16
|
## 2.17.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/lib/index.js
CHANGED
|
@@ -36,7 +36,9 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
36
36
|
conditionalBundlingReporterDuplicateFix: false,
|
|
37
37
|
resolveBundlerConfigFromCwd: false,
|
|
38
38
|
conditionalBundlingReporterSameConditionFix: false,
|
|
39
|
-
condbHtmlPackagerChange: false
|
|
39
|
+
condbHtmlPackagerChange: false,
|
|
40
|
+
applyScopeHoistingImprovement: false,
|
|
41
|
+
inlineConstOptimisationFix: false
|
|
40
42
|
};
|
|
41
43
|
let featureFlagValues = {
|
|
42
44
|
...DEFAULT_FEATURE_FLAGS
|
package/lib/types.d.ts
CHANGED
|
@@ -123,6 +123,17 @@ export type FeatureFlags = {
|
|
|
123
123
|
* Enable a change to the html packager to load more bundles when conditional bundling fallback mode is enabled
|
|
124
124
|
*/
|
|
125
125
|
condbHtmlPackagerChange: boolean;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Enable a setting that allows for more assets to be scope hoisted, if
|
|
129
|
+
* they're safe to do so.
|
|
130
|
+
*/
|
|
131
|
+
applyScopeHoistingImprovement: boolean;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Enable a change where a constant module only have the namespacing object added in bundles where it is required
|
|
135
|
+
*/
|
|
136
|
+
inlineConstOptimisationFix: boolean;
|
|
126
137
|
};
|
|
127
138
|
export declare var CONSISTENCY_CHECK_VALUES: ReadonlyArray<string>;
|
|
128
139
|
export type ConsistencyCheckFeatureFlagValue = $ElementType<typeof CONSISTENCY_CHECK_VALUES, number>;
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -38,6 +38,8 @@ export const DEFAULT_FEATURE_FLAGS: FeatureFlags = {
|
|
|
38
38
|
resolveBundlerConfigFromCwd: false,
|
|
39
39
|
conditionalBundlingReporterSameConditionFix: false,
|
|
40
40
|
condbHtmlPackagerChange: false,
|
|
41
|
+
applyScopeHoistingImprovement: false,
|
|
42
|
+
inlineConstOptimisationFix: false,
|
|
41
43
|
};
|
|
42
44
|
|
|
43
45
|
let featureFlagValues: FeatureFlags = {...DEFAULT_FEATURE_FLAGS};
|
package/src/types.js
CHANGED
|
@@ -102,6 +102,15 @@ export type FeatureFlags = {|
|
|
|
102
102
|
* Enable a change to the html packager to load more bundles when conditional bundling fallback mode is enabled
|
|
103
103
|
*/
|
|
104
104
|
condbHtmlPackagerChange: boolean,
|
|
105
|
+
/**
|
|
106
|
+
* Enable a setting that allows for more assets to be scope hoisted, if
|
|
107
|
+
* they're safe to do so.
|
|
108
|
+
*/
|
|
109
|
+
applyScopeHoistingImprovement: boolean,
|
|
110
|
+
/**
|
|
111
|
+
* Enable a change where a constant module only have the namespacing object added in bundles where it is required
|
|
112
|
+
*/
|
|
113
|
+
inlineConstOptimisationFix: boolean,
|
|
105
114
|
|};
|
|
106
115
|
|
|
107
116
|
declare export var CONSISTENCY_CHECK_VALUES: $ReadOnlyArray<string>;
|