diff --git a/build/lib/tsb/builder.js b/build/lib/tsb/builder.js index 0f4ea8c5e0b..1a08badd113 100644 --- a/build/lib/tsb/builder.js +++ b/build/lib/tsb/builder.js @@ -591,7 +591,7 @@ class LanguageServiceHost { while (this._dependenciesRecomputeList.length) { this._processFile(this._dependenciesRecomputeList.pop()); } - const cycles = this._dependencies.findCycles(filenames); + const cycles = this._dependencies.findCycles(filenames.sort((a, b) => a.localeCompare(b))); const result = new Map(); for (const [key, value] of cycles) { result.set(key, value?.join(' -> ')); diff --git a/build/lib/tsb/builder.ts b/build/lib/tsb/builder.ts index 06c9b9ec24c..94fcf1483db 100644 --- a/build/lib/tsb/builder.ts +++ b/build/lib/tsb/builder.ts @@ -669,7 +669,7 @@ class LanguageServiceHost implements ts.LanguageServiceHost { while (this._dependenciesRecomputeList.length) { this._processFile(this._dependenciesRecomputeList.pop()!); } - const cycles = this._dependencies.findCycles(filenames); + const cycles = this._dependencies.findCycles(filenames.sort((a, b) => a.localeCompare(b))); const result = new Map(); for (const [key, value] of cycles) { result.set(key, value?.join(' -> '));