@atlaspack/feature-flags 2.25.4 → 2.25.5-dev-af891f2f6.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/LICENSE +201 -0
- package/dist/index.js +40 -7
- package/lib/index.js +41 -8
- package/lib/types/index.d.ts +40 -7
- package/package.json +3 -2
- package/src/index.ts +41 -8
- package/tsconfig.tsbuildinfo +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright (c) 2024 Atlassian US., Inc.
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/dist/index.js
CHANGED
|
@@ -20,24 +20,28 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
20
20
|
* Rust backed requests
|
|
21
21
|
*
|
|
22
22
|
* @author Matt Jones <mjones4@atlassian.com>
|
|
23
|
+
* @since 2024-05-01
|
|
23
24
|
*/
|
|
24
25
|
atlaspackV3: false,
|
|
25
26
|
/**
|
|
26
27
|
* Use node.js implementation of @parcel/watcher watchman backend
|
|
27
28
|
*
|
|
28
29
|
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
30
|
+
* @since 2024-08-09
|
|
29
31
|
*/
|
|
30
32
|
useWatchmanWatcher: false,
|
|
31
33
|
/**
|
|
32
34
|
* Configure runtime to enable retriable dynamic imports
|
|
33
35
|
*
|
|
34
36
|
* @author David Alsh <dalsh@atlassian.com>
|
|
37
|
+
* @since 2024-08-21
|
|
35
38
|
*/
|
|
36
39
|
importRetry: false,
|
|
37
40
|
/**
|
|
38
41
|
* Fixes quadratic cache invalidation issue
|
|
39
42
|
*
|
|
40
43
|
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
44
|
+
* @since 2024-10-21
|
|
41
45
|
*/
|
|
42
46
|
fixQuadraticCacheInvalidation: 'OLD',
|
|
43
47
|
/**
|
|
@@ -46,6 +50,7 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
46
50
|
* and requires server-side support.
|
|
47
51
|
*
|
|
48
52
|
* @author Jake Lane <jlane2@atlassian.com>
|
|
53
|
+
* @since 2024-09-11
|
|
49
54
|
*/
|
|
50
55
|
conditionalBundlingApi: false,
|
|
51
56
|
/**
|
|
@@ -55,6 +60,7 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
55
60
|
* - NEW: Return VCS result, but don't call watchman
|
|
56
61
|
*
|
|
57
62
|
* @author Celeste Carloni <ccarloni@atlassian.com>
|
|
63
|
+
* @since 2025-02-04
|
|
58
64
|
*/
|
|
59
65
|
vcsMode: 'OLD',
|
|
60
66
|
/**
|
|
@@ -64,37 +70,35 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
64
70
|
* - Reduce size of the caches by deduplicating data
|
|
65
71
|
*
|
|
66
72
|
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
73
|
+
* @since 2025-05-13
|
|
67
74
|
*/
|
|
68
75
|
cachePerformanceImprovements: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
69
76
|
/**
|
|
70
77
|
* Deduplicates environments across cache / memory entities
|
|
71
78
|
*
|
|
72
79
|
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
80
|
+
* @since 2025-06-11
|
|
73
81
|
*/
|
|
74
82
|
environmentDeduplication: false,
|
|
75
83
|
/**
|
|
76
84
|
* Enable scanning for the presence of loadable to determine side effects
|
|
77
85
|
*
|
|
78
86
|
* @author Ben Jervis <bjervis@atlassian.com>
|
|
87
|
+
* @since 2025-03-07
|
|
79
88
|
*/
|
|
80
89
|
loadableSideEffects: false,
|
|
81
|
-
/**
|
|
82
|
-
* Enable performance optimization for the resolver specifier to_string
|
|
83
|
-
* conversions
|
|
84
|
-
*
|
|
85
|
-
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
86
|
-
*/
|
|
87
|
-
reduceResolverStringCreation: false,
|
|
88
90
|
/**
|
|
89
91
|
* Fixes source maps for inline bundles
|
|
90
92
|
*
|
|
91
93
|
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
94
|
+
* @since 2025-04-08
|
|
92
95
|
*/
|
|
93
96
|
inlineBundlesSourceMapFixes: false,
|
|
94
97
|
/** Enable patch project paths. This will patch the project paths to be relative to the project root.
|
|
95
98
|
* This feature is experimental and should not be used in production. It will used to test downloadble cache artefacts.
|
|
96
99
|
*
|
|
97
100
|
* @author Celeste Carloni <ccarloni@atlassian.com>
|
|
101
|
+
* @since 2025-04-10
|
|
98
102
|
*/
|
|
99
103
|
patchProjectPaths: false,
|
|
100
104
|
/**
|
|
@@ -102,12 +106,14 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
102
106
|
* Used heavily for inline bundles.
|
|
103
107
|
*
|
|
104
108
|
* @author Matt Jones <mjones4@atlassian.com>
|
|
109
|
+
* @since 2025-04-17
|
|
105
110
|
*/
|
|
106
111
|
inlineStringReplacementPerf: false,
|
|
107
112
|
/**
|
|
108
113
|
* Enable resolution of bundler config starting from the CWD
|
|
109
114
|
*
|
|
110
115
|
* @author Ben Jervis <bjervis@atlassian.com>
|
|
116
|
+
* @since 2025-05-29
|
|
111
117
|
*/
|
|
112
118
|
resolveBundlerConfigFromCwd: false,
|
|
113
119
|
/**
|
|
@@ -115,12 +121,14 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
115
121
|
* they're safe to do so.
|
|
116
122
|
*
|
|
117
123
|
* @author Ben Jervis <bjervis@atlassian.com>
|
|
124
|
+
* @since 2025-06-17
|
|
118
125
|
*/
|
|
119
126
|
applyScopeHoistingImprovement: false,
|
|
120
127
|
/**
|
|
121
128
|
* Enable a change where a constant module only have the namespacing object added in bundles where it is required
|
|
122
129
|
*
|
|
123
130
|
* @author Marcin Szczepanski <mszczepanski@atlassian.com>
|
|
131
|
+
* @since 2025-06-19
|
|
124
132
|
*/
|
|
125
133
|
inlineConstOptimisationFix: false,
|
|
126
134
|
/**
|
|
@@ -129,12 +137,14 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
129
137
|
* - Moving the functionality of the react-refresh runtime into the react-refresh-wrap transformer
|
|
130
138
|
*
|
|
131
139
|
* @author Marcin Szczepanski <mszczepanski@atlassian.com>
|
|
140
|
+
* @since 2025-06-20
|
|
132
141
|
*/
|
|
133
142
|
hmrImprovements: false,
|
|
134
143
|
/**
|
|
135
144
|
* Enables the new packaging progress CLI experience
|
|
136
145
|
*
|
|
137
146
|
* @author Matt Jones <mjones4@atlassian.com>
|
|
147
|
+
* @since 2025-07-02
|
|
138
148
|
*/
|
|
139
149
|
cliProgressReportingImprovements: false,
|
|
140
150
|
/**
|
|
@@ -142,6 +152,7 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
142
152
|
* Imports with the same `webpackChunkName` will be bundled together.
|
|
143
153
|
*
|
|
144
154
|
* @author Ben Jervis <bjervis@atlassian.com>
|
|
155
|
+
* @since 2025-07-08
|
|
145
156
|
*/
|
|
146
157
|
supportWebpackChunkName: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
147
158
|
/**
|
|
@@ -150,11 +161,13 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
150
161
|
* Split into two flags, to allow usage in the dev or prod packagers separately
|
|
151
162
|
*
|
|
152
163
|
* @author Jake Lane <jlane2@atlassian.com>
|
|
164
|
+
* @since 2025-07-08
|
|
153
165
|
*/
|
|
154
166
|
condbDevFallbackDev: false,
|
|
155
167
|
/**
|
|
156
168
|
*
|
|
157
169
|
* @author Jake Lane <jlane2@atlassian.com>
|
|
170
|
+
* @since 2025-07-08
|
|
158
171
|
*/
|
|
159
172
|
condbDevFallbackProd: false,
|
|
160
173
|
/**
|
|
@@ -162,6 +175,7 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
162
175
|
* a full bundling pass is required based on the AssetGraph's bundlingVersion.
|
|
163
176
|
*
|
|
164
177
|
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
178
|
+
* @since 2025-07-08
|
|
165
179
|
*/
|
|
166
180
|
incrementalBundlingVersioning: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
167
181
|
/**
|
|
@@ -169,18 +183,21 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
169
183
|
* async bundles.
|
|
170
184
|
*
|
|
171
185
|
* @author Matt Jones <mjones4@atlassian.com>
|
|
186
|
+
* @since 2025-08-20
|
|
172
187
|
*/
|
|
173
188
|
removeRedundantSharedBundles: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
174
189
|
/**
|
|
175
190
|
* When enabled, single file output bundles have a stable name
|
|
176
191
|
*
|
|
177
192
|
* @author Marcin Szczepanski <mszczepanski@atlassian.com>
|
|
193
|
+
* @since 2025-08-21
|
|
178
194
|
*/
|
|
179
195
|
singleFileOutputStableName: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
180
196
|
/**
|
|
181
197
|
* Enable optimised prelude for the ScopeHoistingPackager.
|
|
182
198
|
*
|
|
183
199
|
* @author Jake Lane <jlane2@atlassian.com>
|
|
200
|
+
* @since 2025-08-22
|
|
184
201
|
*/
|
|
185
202
|
useNewPrelude: false,
|
|
186
203
|
/**
|
|
@@ -188,6 +205,7 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
188
205
|
* be at the top level of the bundle.
|
|
189
206
|
*
|
|
190
207
|
* @author Ben Jervis <bjervis@atlassian.com>
|
|
208
|
+
* @since 2025-08-27
|
|
191
209
|
*/
|
|
192
210
|
applyScopeHoistingImprovementV2: false,
|
|
193
211
|
/**
|
|
@@ -196,24 +214,28 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
196
214
|
* This allows building only specific entries for specific targets.
|
|
197
215
|
*
|
|
198
216
|
* @author Marcin Szczepanski <mszczepanski@atlassian.com>
|
|
217
|
+
* @since 2025-09-03
|
|
199
218
|
*/
|
|
200
219
|
allowExplicitTargetEntries: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
201
220
|
/**
|
|
202
221
|
* When enabled, the packager will avoid using the binding helper for exports where possible.
|
|
203
222
|
*
|
|
204
223
|
* @author Jake Lane <jlane2@atlassian.com>
|
|
224
|
+
* @since 2025-09-08
|
|
205
225
|
*/
|
|
206
226
|
exportsRebindingOptimisation: false,
|
|
207
227
|
/**
|
|
208
228
|
* When enabled, allows custom per-target "env" properties to be used in transformers.
|
|
209
229
|
*
|
|
210
230
|
* @author Marcin Szczepanski <mszczepanski@atlassian.com>
|
|
231
|
+
* @since 2025-09-04
|
|
211
232
|
*/
|
|
212
233
|
customEnvInTargets: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
213
234
|
/**
|
|
214
235
|
* When enabled, ensures the `unstableSingleFileOutput` environment property is preserved during CSS transformation
|
|
215
236
|
*
|
|
216
237
|
* @author Marcin Szczepanski <mszczepanski@atlassian.com>
|
|
238
|
+
* @since 2025-09-09
|
|
217
239
|
*/
|
|
218
240
|
preserveUnstableSingleFileOutputInCss: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
219
241
|
/**
|
|
@@ -221,14 +243,25 @@ exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
221
243
|
* project relative paths
|
|
222
244
|
*
|
|
223
245
|
* @author Matt Jones <mjones4@atlassian.com>
|
|
246
|
+
* @since 2025-09-18
|
|
224
247
|
*/
|
|
225
248
|
symbolLocationFix: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
226
249
|
/**
|
|
227
250
|
* When enabled, avoid retaining sourcesContent in memory during transformation.
|
|
228
251
|
* Source contents will be inlined only during final map stringify if needed.
|
|
229
252
|
* @author Shanon Jackson <sjackson3@atlassian.com>
|
|
253
|
+
* @since 2025-09-22
|
|
230
254
|
*/
|
|
231
255
|
omitSourcesContentInMemory: false,
|
|
256
|
+
/**
|
|
257
|
+
* Fixes an issue in BundleGraph.fromAssetGraph where Dependency.sourceAssetId
|
|
258
|
+
* diverging from Asset.id can cause it to fail. The fix to to stop using Dependency.sourceAssetId
|
|
259
|
+
* all together and use graph.getNodeIdsConnectedTo instead.
|
|
260
|
+
*
|
|
261
|
+
* @author Matt Jones <mjones4@atlassian.com>
|
|
262
|
+
* @since 2025-09-29
|
|
263
|
+
*/
|
|
264
|
+
sourceAssetIdBundleGraphFix: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
232
265
|
};
|
|
233
266
|
let featureFlagValues = { ...exports.DEFAULT_FEATURE_FLAGS };
|
|
234
267
|
function setFeatureFlags(flags) {
|
package/lib/index.js
CHANGED
|
@@ -19,24 +19,28 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
19
19
|
* Rust backed requests
|
|
20
20
|
*
|
|
21
21
|
* @author Matt Jones <mjones4@atlassian.com>
|
|
22
|
+
* @since 2024-05-01
|
|
22
23
|
*/
|
|
23
24
|
atlaspackV3: false,
|
|
24
25
|
/**
|
|
25
26
|
* Use node.js implementation of @parcel/watcher watchman backend
|
|
26
27
|
*
|
|
27
28
|
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
29
|
+
* @since 2024-08-09
|
|
28
30
|
*/
|
|
29
31
|
useWatchmanWatcher: false,
|
|
30
32
|
/**
|
|
31
33
|
* Configure runtime to enable retriable dynamic imports
|
|
32
34
|
*
|
|
33
35
|
* @author David Alsh <dalsh@atlassian.com>
|
|
36
|
+
* @since 2024-08-21
|
|
34
37
|
*/
|
|
35
38
|
importRetry: false,
|
|
36
39
|
/**
|
|
37
40
|
* Fixes quadratic cache invalidation issue
|
|
38
41
|
*
|
|
39
42
|
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
43
|
+
* @since 2024-10-21
|
|
40
44
|
*/
|
|
41
45
|
fixQuadraticCacheInvalidation: 'OLD',
|
|
42
46
|
/**
|
|
@@ -45,6 +49,7 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
45
49
|
* and requires server-side support.
|
|
46
50
|
*
|
|
47
51
|
* @author Jake Lane <jlane2@atlassian.com>
|
|
52
|
+
* @since 2024-09-11
|
|
48
53
|
*/
|
|
49
54
|
conditionalBundlingApi: false,
|
|
50
55
|
/**
|
|
@@ -54,6 +59,7 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
54
59
|
* - NEW: Return VCS result, but don't call watchman
|
|
55
60
|
*
|
|
56
61
|
* @author Celeste Carloni <ccarloni@atlassian.com>
|
|
62
|
+
* @since 2025-02-04
|
|
57
63
|
*/
|
|
58
64
|
vcsMode: 'OLD',
|
|
59
65
|
/**
|
|
@@ -63,37 +69,35 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
63
69
|
* - Reduce size of the caches by deduplicating data
|
|
64
70
|
*
|
|
65
71
|
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
72
|
+
* @since 2025-05-13
|
|
66
73
|
*/
|
|
67
74
|
cachePerformanceImprovements: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
68
75
|
/**
|
|
69
76
|
* Deduplicates environments across cache / memory entities
|
|
70
77
|
*
|
|
71
78
|
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
79
|
+
* @since 2025-06-11
|
|
72
80
|
*/
|
|
73
81
|
environmentDeduplication: false,
|
|
74
82
|
/**
|
|
75
83
|
* Enable scanning for the presence of loadable to determine side effects
|
|
76
84
|
*
|
|
77
85
|
* @author Ben Jervis <bjervis@atlassian.com>
|
|
86
|
+
* @since 2025-03-07
|
|
78
87
|
*/
|
|
79
88
|
loadableSideEffects: false,
|
|
80
|
-
/**
|
|
81
|
-
* Enable performance optimization for the resolver specifier to_string
|
|
82
|
-
* conversions
|
|
83
|
-
*
|
|
84
|
-
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
85
|
-
*/
|
|
86
|
-
reduceResolverStringCreation: false,
|
|
87
89
|
/**
|
|
88
90
|
* Fixes source maps for inline bundles
|
|
89
91
|
*
|
|
90
92
|
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
93
|
+
* @since 2025-04-08
|
|
91
94
|
*/
|
|
92
95
|
inlineBundlesSourceMapFixes: false,
|
|
93
96
|
/** Enable patch project paths. This will patch the project paths to be relative to the project root.
|
|
94
97
|
* This feature is experimental and should not be used in production. It will used to test downloadble cache artefacts.
|
|
95
98
|
*
|
|
96
99
|
* @author Celeste Carloni <ccarloni@atlassian.com>
|
|
100
|
+
* @since 2025-04-10
|
|
97
101
|
*/
|
|
98
102
|
patchProjectPaths: false,
|
|
99
103
|
/**
|
|
@@ -101,12 +105,14 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
101
105
|
* Used heavily for inline bundles.
|
|
102
106
|
*
|
|
103
107
|
* @author Matt Jones <mjones4@atlassian.com>
|
|
108
|
+
* @since 2025-04-17
|
|
104
109
|
*/
|
|
105
110
|
inlineStringReplacementPerf: false,
|
|
106
111
|
/**
|
|
107
112
|
* Enable resolution of bundler config starting from the CWD
|
|
108
113
|
*
|
|
109
114
|
* @author Ben Jervis <bjervis@atlassian.com>
|
|
115
|
+
* @since 2025-05-29
|
|
110
116
|
*/
|
|
111
117
|
resolveBundlerConfigFromCwd: false,
|
|
112
118
|
/**
|
|
@@ -114,12 +120,14 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
114
120
|
* they're safe to do so.
|
|
115
121
|
*
|
|
116
122
|
* @author Ben Jervis <bjervis@atlassian.com>
|
|
123
|
+
* @since 2025-06-17
|
|
117
124
|
*/
|
|
118
125
|
applyScopeHoistingImprovement: false,
|
|
119
126
|
/**
|
|
120
127
|
* Enable a change where a constant module only have the namespacing object added in bundles where it is required
|
|
121
128
|
*
|
|
122
129
|
* @author Marcin Szczepanski <mszczepanski@atlassian.com>
|
|
130
|
+
* @since 2025-06-19
|
|
123
131
|
*/
|
|
124
132
|
inlineConstOptimisationFix: false,
|
|
125
133
|
/**
|
|
@@ -128,12 +136,14 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
128
136
|
* - Moving the functionality of the react-refresh runtime into the react-refresh-wrap transformer
|
|
129
137
|
*
|
|
130
138
|
* @author Marcin Szczepanski <mszczepanski@atlassian.com>
|
|
139
|
+
* @since 2025-06-20
|
|
131
140
|
*/
|
|
132
141
|
hmrImprovements: false,
|
|
133
142
|
/**
|
|
134
143
|
* Enables the new packaging progress CLI experience
|
|
135
144
|
*
|
|
136
145
|
* @author Matt Jones <mjones4@atlassian.com>
|
|
146
|
+
* @since 2025-07-02
|
|
137
147
|
*/
|
|
138
148
|
cliProgressReportingImprovements: false,
|
|
139
149
|
/**
|
|
@@ -141,6 +151,7 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
141
151
|
* Imports with the same `webpackChunkName` will be bundled together.
|
|
142
152
|
*
|
|
143
153
|
* @author Ben Jervis <bjervis@atlassian.com>
|
|
154
|
+
* @since 2025-07-08
|
|
144
155
|
*/
|
|
145
156
|
supportWebpackChunkName: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
146
157
|
/**
|
|
@@ -149,11 +160,13 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
149
160
|
* Split into two flags, to allow usage in the dev or prod packagers separately
|
|
150
161
|
*
|
|
151
162
|
* @author Jake Lane <jlane2@atlassian.com>
|
|
163
|
+
* @since 2025-07-08
|
|
152
164
|
*/
|
|
153
165
|
condbDevFallbackDev: false,
|
|
154
166
|
/**
|
|
155
167
|
*
|
|
156
168
|
* @author Jake Lane <jlane2@atlassian.com>
|
|
169
|
+
* @since 2025-07-08
|
|
157
170
|
*/
|
|
158
171
|
condbDevFallbackProd: false,
|
|
159
172
|
/**
|
|
@@ -161,6 +174,7 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
161
174
|
* a full bundling pass is required based on the AssetGraph's bundlingVersion.
|
|
162
175
|
*
|
|
163
176
|
* @author Pedro Tacla Yamada <pyamada@atlassian.com>
|
|
177
|
+
* @since 2025-07-08
|
|
164
178
|
*/
|
|
165
179
|
incrementalBundlingVersioning: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
166
180
|
/**
|
|
@@ -168,18 +182,21 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
168
182
|
* async bundles.
|
|
169
183
|
*
|
|
170
184
|
* @author Matt Jones <mjones4@atlassian.com>
|
|
185
|
+
* @since 2025-08-20
|
|
171
186
|
*/
|
|
172
187
|
removeRedundantSharedBundles: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
173
188
|
/**
|
|
174
189
|
* When enabled, single file output bundles have a stable name
|
|
175
190
|
*
|
|
176
191
|
* @author Marcin Szczepanski <mszczepanski@atlassian.com>
|
|
192
|
+
* @since 2025-08-21
|
|
177
193
|
*/
|
|
178
194
|
singleFileOutputStableName: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
179
195
|
/**
|
|
180
196
|
* Enable optimised prelude for the ScopeHoistingPackager.
|
|
181
197
|
*
|
|
182
198
|
* @author Jake Lane <jlane2@atlassian.com>
|
|
199
|
+
* @since 2025-08-22
|
|
183
200
|
*/
|
|
184
201
|
useNewPrelude: false,
|
|
185
202
|
/**
|
|
@@ -187,6 +204,7 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
187
204
|
* be at the top level of the bundle.
|
|
188
205
|
*
|
|
189
206
|
* @author Ben Jervis <bjervis@atlassian.com>
|
|
207
|
+
* @since 2025-08-27
|
|
190
208
|
*/
|
|
191
209
|
applyScopeHoistingImprovementV2: false,
|
|
192
210
|
/**
|
|
@@ -195,24 +213,28 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
195
213
|
* This allows building only specific entries for specific targets.
|
|
196
214
|
*
|
|
197
215
|
* @author Marcin Szczepanski <mszczepanski@atlassian.com>
|
|
216
|
+
* @since 2025-09-03
|
|
198
217
|
*/
|
|
199
218
|
allowExplicitTargetEntries: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
200
219
|
/**
|
|
201
220
|
* When enabled, the packager will avoid using the binding helper for exports where possible.
|
|
202
221
|
*
|
|
203
222
|
* @author Jake Lane <jlane2@atlassian.com>
|
|
223
|
+
* @since 2025-09-08
|
|
204
224
|
*/
|
|
205
225
|
exportsRebindingOptimisation: false,
|
|
206
226
|
/**
|
|
207
227
|
* When enabled, allows custom per-target "env" properties to be used in transformers.
|
|
208
228
|
*
|
|
209
229
|
* @author Marcin Szczepanski <mszczepanski@atlassian.com>
|
|
230
|
+
* @since 2025-09-04
|
|
210
231
|
*/
|
|
211
232
|
customEnvInTargets: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
212
233
|
/**
|
|
213
234
|
* When enabled, ensures the `unstableSingleFileOutput` environment property is preserved during CSS transformation
|
|
214
235
|
*
|
|
215
236
|
* @author Marcin Szczepanski <mszczepanski@atlassian.com>
|
|
237
|
+
* @since 2025-09-09
|
|
216
238
|
*/
|
|
217
239
|
preserveUnstableSingleFileOutputInCss: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
218
240
|
/**
|
|
@@ -220,14 +242,25 @@ const DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {
|
|
|
220
242
|
* project relative paths
|
|
221
243
|
*
|
|
222
244
|
* @author Matt Jones <mjones4@atlassian.com>
|
|
245
|
+
* @since 2025-09-18
|
|
223
246
|
*/
|
|
224
247
|
symbolLocationFix: process.env.ATLASPACK_BUILD_ENV === 'test',
|
|
225
248
|
/**
|
|
226
249
|
* When enabled, avoid retaining sourcesContent in memory during transformation.
|
|
227
250
|
* Source contents will be inlined only during final map stringify if needed.
|
|
228
251
|
* @author Shanon Jackson <sjackson3@atlassian.com>
|
|
252
|
+
* @since 2025-09-22
|
|
253
|
+
*/
|
|
254
|
+
omitSourcesContentInMemory: false,
|
|
255
|
+
/**
|
|
256
|
+
* Fixes an issue in BundleGraph.fromAssetGraph where Dependency.sourceAssetId
|
|
257
|
+
* diverging from Asset.id can cause it to fail. The fix to to stop using Dependency.sourceAssetId
|
|
258
|
+
* all together and use graph.getNodeIdsConnectedTo instead.
|
|
259
|
+
*
|
|
260
|
+
* @author Matt Jones <mjones4@atlassian.com>
|
|
261
|
+
* @since 2025-09-29
|
|
229
262
|
*/
|
|
230
|
-
|
|
263
|
+
sourceAssetIdBundleGraphFix: process.env.ATLASPACK_BUILD_ENV === 'test'
|
|
231
264
|
};
|
|
232
265
|
let featureFlagValues = {
|
|
233
266
|
...DEFAULT_FEATURE_FLAGS
|