@atlaspack/utils 2.13.2-dev.3689 → 2.14.1-canary.3710
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 +19 -0
- package/lib/index.js +59 -1
- package/lib/index.js.map +1 -1
- package/package.json +8 -7
- package/src/replaceBundleReferences.js +14 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaspack/utils
|
|
2
2
|
|
|
3
|
+
## 2.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#339](https://github.com/atlassian-labs/atlaspack/pull/339) [`bfe81e5`](https://github.com/atlassian-labs/atlaspack/commit/bfe81e551c4e4bb2cac7fc4745222e66962c1728) Thanks [@yamadapc](https://github.com/yamadapc)! - Update cache invalidation metrics with build type
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#429](https://github.com/atlassian-labs/atlaspack/pull/429) [`4837b69`](https://github.com/atlassian-labs/atlaspack/commit/4837b6988e56ca842a24797b796160964d3696ce) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Increase performance of inline bundle packaging (enabled via `featureFlags.inlineStringReplacementPerf`)
|
|
12
|
+
|
|
13
|
+
- [#414](https://github.com/atlassian-labs/atlaspack/pull/414) [`eff9809`](https://github.com/atlassian-labs/atlaspack/commit/eff98093703b9999a511b87a19562f5aaccfcb53) Thanks [@alshdavid](https://github.com/alshdavid)! - Added type:commonjs to package.json files
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`bfe81e5`](https://github.com/atlassian-labs/atlaspack/commit/bfe81e551c4e4bb2cac7fc4745222e66962c1728), [`fa4fcf6`](https://github.com/atlassian-labs/atlaspack/commit/fa4fcf69a82b0a3727066ada6e93a149b259936e), [`cd964ee`](https://github.com/atlassian-labs/atlaspack/commit/cd964eed5a330ae63733656ded691d1ea3afe4e3), [`ce4ce95`](https://github.com/atlassian-labs/atlaspack/commit/ce4ce953914e08991cf58c70c98f758690e5ee21), [`28dee1d`](https://github.com/atlassian-labs/atlaspack/commit/28dee1db7d9a995161b45f76c1a03b80ccaeab4b), [`a317453`](https://github.com/atlassian-labs/atlaspack/commit/a317453432b7f30e98f2a4cbcafdaa5601bcde63), [`2055adb`](https://github.com/atlassian-labs/atlaspack/commit/2055adbe31de792e2a2a591b94d2f33f50735879), [`cfa1c63`](https://github.com/atlassian-labs/atlaspack/commit/cfa1c63d710c5f9c9abc55f34220b70fb517c3b8), [`17427a2`](https://github.com/atlassian-labs/atlaspack/commit/17427a2b2fc9c34ef0b941907c2868edef6d1507), [`104a46a`](https://github.com/atlassian-labs/atlaspack/commit/104a46a5ee1fae176d29fcc6420d6bd9c01b35b1), [`9572aca`](https://github.com/atlassian-labs/atlaspack/commit/9572aca2a2313a3c05551f73e556128e77a37732), [`34b740d`](https://github.com/atlassian-labs/atlaspack/commit/34b740d4e2449fba7b50cb9708c56d8033dca5b9), [`4837b69`](https://github.com/atlassian-labs/atlaspack/commit/4837b6988e56ca842a24797b796160964d3696ce), [`e5fa92d`](https://github.com/atlassian-labs/atlaspack/commit/e5fa92de26c87fb5d4d681af1931451749ba970a), [`3650f7c`](https://github.com/atlassian-labs/atlaspack/commit/3650f7c9ab803b5ae20b223e82b2268a1b614e43), [`eff9809`](https://github.com/atlassian-labs/atlaspack/commit/eff98093703b9999a511b87a19562f5aaccfcb53), [`c2ef915`](https://github.com/atlassian-labs/atlaspack/commit/c2ef915dc54784ce4b8180025ac1b2e13b375002), [`f635123`](https://github.com/atlassian-labs/atlaspack/commit/f635123f9a06961bc5e053e237f1023f10800ea3), [`4812d0f`](https://github.com/atlassian-labs/atlaspack/commit/4812d0f7400af0f8416f1b7175ecb87700860a68), [`80d963e`](https://github.com/atlassian-labs/atlaspack/commit/80d963ed950f5d742ebd78014cf74f3c65cd4474), [`8fae5f3`](https://github.com/atlassian-labs/atlaspack/commit/8fae5f3005bd7c806b175b4df1754abf58922591), [`3005307`](https://github.com/atlassian-labs/atlaspack/commit/30053076dfd20ca62ddbc682f58adb994029ac55), [`cc66aaa`](https://github.com/atlassian-labs/atlaspack/commit/cc66aaa66d67dd0cb89e083f387a278e74aad3f0), [`67df3f1`](https://github.com/atlassian-labs/atlaspack/commit/67df3f1af1432d77ee6b8850010d976d3313693a), [`0c3ad7a`](https://github.com/atlassian-labs/atlaspack/commit/0c3ad7a302330da1d5e3c025963cc583eb5c28ed)]:
|
|
16
|
+
- @atlaspack/diagnostic@2.14.0
|
|
17
|
+
- @atlaspack/logger@2.14.0
|
|
18
|
+
- @atlaspack/markdown-ansi@2.14.0
|
|
19
|
+
- @atlaspack/rust@3.0.0
|
|
20
|
+
- @atlaspack/codeframe@2.13.2
|
|
21
|
+
|
|
3
22
|
## 2.13.1
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/lib/index.js
CHANGED
|
@@ -36882,6 +36882,61 @@ async function $ee3627c5b9a79308$export$3b1983e9896f988b(options) {
|
|
|
36882
36882
|
|
|
36883
36883
|
|
|
36884
36884
|
|
|
36885
|
+
// We need to do these gymnastics as we don't want flow-to-ts to touch DEFAULT_FEATURE_FLAGS,
|
|
36886
|
+
// but we want to export FeatureFlags for Flow
|
|
36887
|
+
const $df36044ff56b59a7$export$f38af5fc86a6e665 = {
|
|
36888
|
+
exampleConsistencyCheckFeature: 'OLD',
|
|
36889
|
+
exampleFeature: false,
|
|
36890
|
+
atlaspackV3: false,
|
|
36891
|
+
useWatchmanWatcher: false,
|
|
36892
|
+
importRetry: false,
|
|
36893
|
+
fixQuadraticCacheInvalidation: 'OLD',
|
|
36894
|
+
useLmdbJsLite: false,
|
|
36895
|
+
conditionalBundlingApi: false,
|
|
36896
|
+
vcsMode: 'OLD',
|
|
36897
|
+
loadableSideEffects: false,
|
|
36898
|
+
reduceResolverStringCreation: false,
|
|
36899
|
+
inlineBundlesSourceMapFixes: false,
|
|
36900
|
+
conditionalBundlingNestedRuntime: false,
|
|
36901
|
+
patchProjectPaths: false,
|
|
36902
|
+
inlineStringReplacementPerf: false
|
|
36903
|
+
};
|
|
36904
|
+
let $df36044ff56b59a7$var$featureFlagValues = {
|
|
36905
|
+
...$df36044ff56b59a7$export$f38af5fc86a6e665
|
|
36906
|
+
};
|
|
36907
|
+
function $df36044ff56b59a7$export$9378dc6d04015c6c(flags) {
|
|
36908
|
+
$df36044ff56b59a7$var$featureFlagValues = flags;
|
|
36909
|
+
}
|
|
36910
|
+
function $df36044ff56b59a7$export$fd1910e9e858e73f(flagName) {
|
|
36911
|
+
const value = $df36044ff56b59a7$var$featureFlagValues[flagName];
|
|
36912
|
+
return value === true || value === 'NEW';
|
|
36913
|
+
}
|
|
36914
|
+
function $df36044ff56b59a7$export$7064bb599f663d7e(flagName) {
|
|
36915
|
+
return $df36044ff56b59a7$var$featureFlagValues[flagName];
|
|
36916
|
+
}
|
|
36917
|
+
function $df36044ff56b59a7$export$4e72f634438c2ba2(flag, oldFn, newFn, diffFn, report) {
|
|
36918
|
+
const value = $df36044ff56b59a7$var$featureFlagValues[flag];
|
|
36919
|
+
if (!value || value === false || value === 'OLD') return oldFn();
|
|
36920
|
+
if (value === true || value === 'NEW') return newFn();
|
|
36921
|
+
const oldStartTime = performance.now();
|
|
36922
|
+
const oldResult = oldFn();
|
|
36923
|
+
const oldExecutionTimeMs = performance.now() - oldStartTime;
|
|
36924
|
+
const newStartTime = performance.now();
|
|
36925
|
+
const newResult = newFn();
|
|
36926
|
+
const newExecutionTimeMs = performance.now() - newStartTime;
|
|
36927
|
+
const diff = diffFn(oldResult, newResult);
|
|
36928
|
+
report({
|
|
36929
|
+
isDifferent: diff.isDifferent,
|
|
36930
|
+
oldExecutionTimeMs: oldExecutionTimeMs,
|
|
36931
|
+
newExecutionTimeMs: newExecutionTimeMs,
|
|
36932
|
+
custom: diff.custom
|
|
36933
|
+
}, oldResult, newResult);
|
|
36934
|
+
if (value === 'NEW_AND_CHECK') return newResult;
|
|
36935
|
+
return oldResult;
|
|
36936
|
+
}
|
|
36937
|
+
|
|
36938
|
+
|
|
36939
|
+
|
|
36885
36940
|
|
|
36886
36941
|
|
|
36887
36942
|
|
|
@@ -36961,7 +37016,10 @@ function $d8174e6a6043cc6d$export$a22ef0cbdf8abc95({ dependency: dependency, fro
|
|
|
36961
37016
|
}
|
|
36962
37017
|
function $d8174e6a6043cc6d$var$performReplacement(replacements, contents, map) {
|
|
36963
37018
|
let finalContents = contents;
|
|
36964
|
-
|
|
37019
|
+
if ((0, $df36044ff56b59a7$export$fd1910e9e858e73f)('inlineStringReplacementPerf')) {
|
|
37020
|
+
let replacementList = Array.from(replacements.values());
|
|
37021
|
+
if (replacementList.length > 0) finalContents = (0, $1HDjh$atlaspackrust.performStringReplacements)(contents, replacementList);
|
|
37022
|
+
} else for (let { from: from, to: to } of replacements.values())// Perform replacement
|
|
36965
37023
|
finalContents = finalContents.split(from).join(to);
|
|
36966
37024
|
return {
|
|
36967
37025
|
contents: finalContents,
|