@atlaspack/feature-flags 2.14.1-dev.138 → 2.14.1-dev.141

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,66 @@
1
1
  # @atlaspack/feature-flags
2
2
 
3
+ ## 2.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#619](https://github.com/atlassian-labs/atlaspack/pull/619) [`73ea3c4`](https://github.com/atlassian-labs/atlaspack/commit/73ea3c4d85d4401fdd15abcbf988237e890e7ad3) Thanks [@matt-koko](https://github.com/matt-koko)! - export `CONSISTENCY_CHECK_VALUES` for consumption in other products
8
+
9
+ ### Patch Changes
10
+
11
+ - [#623](https://github.com/atlassian-labs/atlaspack/pull/623) [`b1b3693`](https://github.com/atlassian-labs/atlaspack/commit/b1b369317c66f8a431c170df2ebba4fa5b2e38ef) Thanks [@JakeLane](https://github.com/JakeLane)! - Load same conditional bundles as conditional manifest in HTML
12
+
13
+ ## 2.16.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [#582](https://github.com/atlassian-labs/atlaspack/pull/582) [`f4da1e1`](https://github.com/atlassian-labs/atlaspack/commit/f4da1e120e73eeb5e8b8927f05e88f04d6148c7b) Thanks [@matt-koko](https://github.com/matt-koko)! - Export DEFAULT_FEATURE_FLAGS so it will be included in the associate type declaration file and able to be imported elsewhere.
18
+
19
+ This will enable patterns like:
20
+
21
+ ```
22
+ import type { FeatureFlags } from '@atlaspack/feature-flags';
23
+ import { DEFAULT_FEATURE_FLAGS } from '@atlaspack/feature-flags';
24
+ ```
25
+
26
+ ### Patch Changes
27
+
28
+ - [#503](https://github.com/atlassian-labs/atlaspack/pull/503) [`209692f`](https://github.com/atlassian-labs/atlaspack/commit/209692ffb11eae103a0d65c5e1118a5aa1625818) Thanks [@JakeLane](https://github.com/JakeLane)! - Fix conditional bundling reporter when condition is reused
29
+
30
+ ## 2.15.1
31
+
32
+ ### Patch Changes
33
+
34
+ - [#551](https://github.com/atlassian-labs/atlaspack/pull/551) [`30f6017`](https://github.com/atlassian-labs/atlaspack/commit/30f60175ba4d272c5fc193973c63bc298584775b) Thanks [@yamadapc](https://github.com/yamadapc)! - Log request tracker invalidation counts on start-up
35
+
36
+ ## 2.15.0
37
+
38
+ ### Minor Changes
39
+
40
+ - [#547](https://github.com/atlassian-labs/atlaspack/pull/547) [`a1773d2`](https://github.com/atlassian-labs/atlaspack/commit/a1773d2a62d0ef7805ac7524621dcabcc1afe929) Thanks [@benjervis](https://github.com/benjervis)! - Add a feature flag for resolving the configuration for `@atlaspack/bundler-default` from CWD, rather than exclusively from the project root.
41
+
42
+ ## 2.14.4
43
+
44
+ ### Patch Changes
45
+
46
+ - [#542](https://github.com/atlassian-labs/atlaspack/pull/542) [`e0f5337`](https://github.com/atlassian-labs/atlaspack/commit/e0f533757bd1019dbd108a04952c87da15286e09) Thanks [@yamadapc](https://github.com/yamadapc)! - Add feature-flagged option to use rayon thread-pool to optimize inline requires
47
+
48
+ ## 2.14.3
49
+
50
+ ### Patch Changes
51
+
52
+ - [#511](https://github.com/atlassian-labs/atlaspack/pull/511) [`11d6f16`](https://github.com/atlassian-labs/atlaspack/commit/11d6f16b6397dee2f217167e5c98b39edb63f7a7) Thanks [@yamadapc](https://github.com/yamadapc)! - Clean-up dylib worker threads segmentation fault bug fix feature-flag
53
+
54
+ ## 2.14.2
55
+
56
+ ### Patch Changes
57
+
58
+ - [#494](https://github.com/atlassian-labs/atlaspack/pull/494) [`9b85d3e`](https://github.com/atlassian-labs/atlaspack/commit/9b85d3e645b10bd027eed2304afc970a5ba40062) Thanks [@JakeLane](https://github.com/JakeLane)! - When conditionalBundlingReporterDuplicateFix is enabled, avoid duplicated writes to the descriptor and logging
59
+
60
+ - [#510](https://github.com/atlassian-labs/atlaspack/pull/510) [`17b9579`](https://github.com/atlassian-labs/atlaspack/commit/17b9579484eced0ed8f23e2aba6d23b3c7238c39) Thanks [@yamadapc](https://github.com/yamadapc)! - Add unused feature-flag for cache rework changes
61
+
62
+ - [#512](https://github.com/atlassian-labs/atlaspack/pull/512) [`8f4e6c1`](https://github.com/atlassian-labs/atlaspack/commit/8f4e6c1b0e7c1fd48624afda48c1dcc599f1460f) Thanks [@yamadapc](https://github.com/yamadapc)! - Remove LMDB cache back-end
63
+
3
64
  ## 2.14.1
4
65
 
5
66
  ### Patch Changes
package/lib/index.js CHANGED
@@ -3,13 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.DEFAULT_FEATURE_FLAGS = void 0;
6
+ exports.DEFAULT_FEATURE_FLAGS = exports.CONSISTENCY_CHECK_VALUES = void 0;
7
7
  exports.getFeatureFlag = getFeatureFlag;
8
8
  exports.getFeatureFlagValue = getFeatureFlagValue;
9
9
  exports.runWithConsistencyCheck = runWithConsistencyCheck;
10
10
  exports.setFeatureFlags = setFeatureFlags;
11
11
  // We need to do these gymnastics as we don't want flow-to-ts to touch DEFAULT_FEATURE_FLAGS,
12
12
  // but we want to export FeatureFlags for Flow
13
+ const CONSISTENCY_CHECK_VALUES = exports.CONSISTENCY_CHECK_VALUES = Object.freeze(['NEW', 'OLD', 'NEW_AND_CHECK', 'OLD_AND_CHECK']);
13
14
  const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
14
15
  exampleConsistencyCheckFeature: 'OLD',
15
16
  exampleFeature: false,
@@ -17,18 +18,25 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
17
18
  useWatchmanWatcher: false,
18
19
  importRetry: false,
19
20
  fixQuadraticCacheInvalidation: 'OLD',
20
- useLmdbJsLite: true,
21
21
  conditionalBundlingApi: false,
22
+ inlineRequiresMultiThreading: false,
22
23
  vcsMode: 'OLD',
23
24
  loadableSideEffects: false,
24
25
  reduceResolverStringCreation: false,
25
26
  inlineBundlesSourceMapFixes: false,
26
27
  conditionalBundlingNestedRuntime: false,
27
28
  patchProjectPaths: false,
28
- enableRustWorkerThreadDylibHack: true,
29
+ cachePerformanceImprovements: process.env.NODE_ENV === 'test',
30
+ environmentDeduplication: false,
31
+ granularTsConfigInvalidation: false,
29
32
  inlineStringReplacementPerf: false,
30
33
  conditionalBundlingAsyncRuntime: false,
31
- conditionalBundlingReporterDuplicateFix: false
34
+ // Default to true as it's a monitoring change. Can be turned off if necessary.
35
+ verboseRequestInvalidationStats: true,
36
+ conditionalBundlingReporterDuplicateFix: false,
37
+ resolveBundlerConfigFromCwd: false,
38
+ conditionalBundlingReporterSameConditionFix: false,
39
+ condbHtmlPackagerChange: false
32
40
  };
33
41
  let featureFlagValues = {
34
42
  ...DEFAULT_FEATURE_FLAGS
package/lib/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { $ElementType } from "utility-types";
1
2
  export type FeatureFlags = {
2
3
  // This feature flag mostly exists to test the feature flag system, and doesn't have any build/runtime effect
3
4
  readonly exampleFeature: boolean;
@@ -18,11 +19,6 @@ export type FeatureFlags = {
18
19
  */
19
20
  importRetry: boolean;
20
21
 
21
- /**
22
- * Enable Rust based LMDB wrapper library
23
- */
24
- useLmdbJsLite: boolean;
25
-
26
22
  /**
27
23
  * Fixes quadratic cache invalidation issue
28
24
  */
@@ -35,6 +31,11 @@ export type FeatureFlags = {
35
31
  */
36
32
  conditionalBundlingApi: boolean;
37
33
 
34
+ /**
35
+ * Run inline requires optimizer in the rayon thread pool.
36
+ */
37
+ inlineRequiresMultiThreading: boolean;
38
+
38
39
  /**
39
40
  * Enable VCS mode. Expected values are:
40
41
  * - OLD - default value, return watchman result
@@ -43,6 +44,24 @@ export type FeatureFlags = {
43
44
  */
44
45
  vcsMode: ConsistencyCheckFeatureFlagValue;
45
46
 
47
+ /**
48
+ * Enable granular TS config invalidation
49
+ */
50
+ granularTsConfigInvalidation: boolean;
51
+
52
+ /**
53
+ * Refactor cache to:
54
+ * - Split writes into multiple entries
55
+ * - Remove "large file blob" writes
56
+ * - Reduce size of the caches by deduplicating data
57
+ */
58
+ cachePerformanceImprovements: boolean;
59
+
60
+ /**
61
+ * Deduplicates environments across cache / memory entities
62
+ */
63
+ environmentDeduplication: boolean;
64
+
46
65
  /**
47
66
  * Enable scanning for the presence of loadable to determine side effects
48
67
  */
@@ -54,6 +73,11 @@ export type FeatureFlags = {
54
73
  */
55
74
  reduceResolverStringCreation: boolean;
56
75
 
76
+ /**
77
+ * Add verbose metrics for request tracker invalidation
78
+ */
79
+ verboseRequestInvalidationStats: boolean;
80
+
57
81
  /**
58
82
  * Fixes source maps for inline bundles
59
83
  */
@@ -69,11 +93,6 @@ export type FeatureFlags = {
69
93
  */
70
94
  patchProjectPaths: boolean;
71
95
 
72
- /**
73
- * Enable loading of the parcel dylib in the main thread.
74
- */
75
- enableRustWorkerThreadDylibHack: boolean;
76
-
77
96
  /**
78
97
  * Enables optimized inline string replacement perf for the packager.
79
98
  * Used heavily for inline bundles.
@@ -89,5 +108,22 @@ export type FeatureFlags = {
89
108
  * Fix a bug where the conditional manifest reporter would report and write the same manifest multiple times
90
109
  */
91
110
  conditionalBundlingReporterDuplicateFix: boolean;
111
+
112
+ /**
113
+ * Enable resolution of bundler config starting from the CWD
114
+ */
115
+ resolveBundlerConfigFromCwd: boolean;
116
+
117
+ /**
118
+ * Fix a bug where the conditional manifest reporter would drop bundles that have the same condition
119
+ */
120
+ conditionalBundlingReporterSameConditionFix: boolean;
121
+
122
+ /**
123
+ * Enable a change to the html packager to load more bundles when conditional bundling fallback mode is enabled
124
+ */
125
+ condbHtmlPackagerChange: boolean;
92
126
  };
93
- export type ConsistencyCheckFeatureFlagValue = "NEW" | "OLD" | "NEW_AND_CHECK" | "OLD_AND_CHECK";
127
+ export declare var CONSISTENCY_CHECK_VALUES: ReadonlyArray<string>;
128
+ export type ConsistencyCheckFeatureFlagValue = $ElementType<typeof CONSISTENCY_CHECK_VALUES, number>;
129
+ export declare var DEFAULT_FEATURE_FLAGS: FeatureFlags;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/feature-flags",
3
- "version": "2.14.1-dev.138+7df3f2cee",
3
+ "version": "2.14.1-dev.141+84eec3484",
4
4
  "description": "Provides internal feature-flags for the atlaspack codebase.",
5
5
  "license": "(MIT OR Apache-2.0)",
6
6
  "publishConfig": {
@@ -21,5 +21,5 @@
21
21
  "node": ">= 16.0.0"
22
22
  },
23
23
  "type": "commonjs",
24
- "gitHead": "7df3f2ceef899e67a62d99a53652584695291051"
24
+ "gitHead": "84eec348413c647de4872f902c4bc8ff54c347f3"
25
25
  }
package/src/index.js CHANGED
@@ -5,6 +5,13 @@ import type {FeatureFlags as _FeatureFlags} from './types';
5
5
  // but we want to export FeatureFlags for Flow
6
6
  export type FeatureFlags = _FeatureFlags;
7
7
 
8
+ export const CONSISTENCY_CHECK_VALUES: $ReadOnlyArray<string> = Object.freeze([
9
+ 'NEW',
10
+ 'OLD',
11
+ 'NEW_AND_CHECK',
12
+ 'OLD_AND_CHECK',
13
+ ]);
14
+
8
15
  export const DEFAULT_FEATURE_FLAGS: FeatureFlags = {
9
16
  exampleConsistencyCheckFeature: 'OLD',
10
17
  exampleFeature: false,
@@ -12,18 +19,25 @@ export const DEFAULT_FEATURE_FLAGS: FeatureFlags = {
12
19
  useWatchmanWatcher: false,
13
20
  importRetry: false,
14
21
  fixQuadraticCacheInvalidation: 'OLD',
15
- useLmdbJsLite: true,
16
22
  conditionalBundlingApi: false,
23
+ inlineRequiresMultiThreading: false,
17
24
  vcsMode: 'OLD',
18
25
  loadableSideEffects: false,
19
26
  reduceResolverStringCreation: false,
20
27
  inlineBundlesSourceMapFixes: false,
21
28
  conditionalBundlingNestedRuntime: false,
22
29
  patchProjectPaths: false,
23
- enableRustWorkerThreadDylibHack: true,
30
+ cachePerformanceImprovements: process.env.NODE_ENV === 'test',
31
+ environmentDeduplication: false,
32
+ granularTsConfigInvalidation: false,
24
33
  inlineStringReplacementPerf: false,
25
34
  conditionalBundlingAsyncRuntime: false,
35
+ // Default to true as it's a monitoring change. Can be turned off if necessary.
36
+ verboseRequestInvalidationStats: true,
26
37
  conditionalBundlingReporterDuplicateFix: false,
38
+ resolveBundlerConfigFromCwd: false,
39
+ conditionalBundlingReporterSameConditionFix: false,
40
+ condbHtmlPackagerChange: false,
27
41
  };
28
42
 
29
43
  let featureFlagValues: FeatureFlags = {...DEFAULT_FEATURE_FLAGS};
package/src/types.js CHANGED
@@ -16,10 +16,6 @@ export type FeatureFlags = {|
16
16
  * Configure runtime to enable retriable dynamic imports
17
17
  */
18
18
  importRetry: boolean,
19
- /**
20
- * Enable Rust based LMDB wrapper library
21
- */
22
- useLmdbJsLite: boolean,
23
19
  /**
24
20
  * Fixes quadratic cache invalidation issue
25
21
  */
@@ -30,6 +26,10 @@ export type FeatureFlags = {|
30
26
  * and requires server-side support.
31
27
  */
32
28
  conditionalBundlingApi: boolean,
29
+ /**
30
+ * Run inline requires optimizer in the rayon thread pool.
31
+ */
32
+ inlineRequiresMultiThreading: boolean,
33
33
  /**
34
34
  * Enable VCS mode. Expected values are:
35
35
  * - OLD - default value, return watchman result
@@ -37,6 +37,21 @@ 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
+ /**
45
+ * Refactor cache to:
46
+ * - Split writes into multiple entries
47
+ * - Remove "large file blob" writes
48
+ * - Reduce size of the caches by deduplicating data
49
+ */
50
+ cachePerformanceImprovements: boolean,
51
+ /**
52
+ * Deduplicates environments across cache / memory entities
53
+ */
54
+ environmentDeduplication: boolean,
40
55
  /**
41
56
  * Enable scanning for the presence of loadable to determine side effects
42
57
  */
@@ -46,6 +61,10 @@ export type FeatureFlags = {|
46
61
  * conversions
47
62
  */
48
63
  reduceResolverStringCreation: boolean,
64
+ /**
65
+ * Add verbose metrics for request tracker invalidation
66
+ */
67
+ verboseRequestInvalidationStats: boolean,
49
68
  /**
50
69
  * Fixes source maps for inline bundles
51
70
  */
@@ -58,10 +77,6 @@ export type FeatureFlags = {|
58
77
  * This feature is experimental and should not be used in production. It will used to test downloadble cache artefacts.
59
78
  */
60
79
  patchProjectPaths: boolean,
61
- /**
62
- * Enable loading of the parcel dylib in the main thread.
63
- */
64
- enableRustWorkerThreadDylibHack: boolean,
65
80
  /**
66
81
  * Enables optimized inline string replacement perf for the packager.
67
82
  * Used heavily for inline bundles.
@@ -75,10 +90,24 @@ export type FeatureFlags = {|
75
90
  * Fix a bug where the conditional manifest reporter would report and write the same manifest multiple times
76
91
  */
77
92
  conditionalBundlingReporterDuplicateFix: boolean,
93
+ /**
94
+ * Enable resolution of bundler config starting from the CWD
95
+ */
96
+ resolveBundlerConfigFromCwd: boolean,
97
+ /**
98
+ * Fix a bug where the conditional manifest reporter would drop bundles that have the same condition
99
+ */
100
+ conditionalBundlingReporterSameConditionFix: boolean,
101
+ /**
102
+ * Enable a change to the html packager to load more bundles when conditional bundling fallback mode is enabled
103
+ */
104
+ condbHtmlPackagerChange: boolean,
78
105
  |};
79
106
 
80
- export type ConsistencyCheckFeatureFlagValue =
81
- | 'NEW'
82
- | 'OLD'
83
- | 'NEW_AND_CHECK'
84
- | 'OLD_AND_CHECK';
107
+ declare export var CONSISTENCY_CHECK_VALUES: $ReadOnlyArray<string>;
108
+ export type ConsistencyCheckFeatureFlagValue = $ElementType<
109
+ typeof CONSISTENCY_CHECK_VALUES,
110
+ number,
111
+ >;
112
+
113
+ declare export var DEFAULT_FEATURE_FLAGS: FeatureFlags;