Skip to content

Commit eb80c30

Browse files
josephperrottAndrewKushnir
authored andcommitted
build: update symbol extractor tests to stabalize the order of the symbols listed (#64389)
Update to ensure that the symbols in the list of extracted symbols is consistent even when multiple bundle files are extracted from. PR Close #64389
1 parent 861cee3 commit eb80c30

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

packages/core/test/bundling/defer/bundle.golden_symbols.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@
110110
"DeferBlockBehavior",
111111
"DeferBlockInternalState",
112112
"DeferBlockState",
113+
"DeferComponent",
113114
"DeferDependenciesLoadingState",
114115
"DestroyRef",
115116
"EFFECTS",
@@ -746,8 +747,7 @@
746747
"wasLastNodeCreated",
747748
"writeDirectClass",
748749
"writeDirectStyle",
749-
"writeToDirectiveInput",
750-
"DeferComponent"
750+
"writeToDirectiveInput"
751751
]
752752
}
753753
}

tools/symbol-extractor/cli.mts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ function main(argv: [string, string, string] | [string, string]): boolean {
8686
if (doUpdate) {
8787
const newGolden: GoldenFile = {
8888
chunks: {
89-
main: eagerlyLoadedSymbols,
90-
lazy: lazySymbols,
89+
// Ensure stability of symbol lists, we need to make sure we resort the lists for because
90+
// the ordering of glob results for the bundle files isn't guaranteed.
91+
main: eagerlyLoadedSymbols.sort(),
92+
lazy: lazySymbols.sort(),
9193
},
9294
};
9395

0 commit comments

Comments
 (0)