File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed
rush-lib/src/logic/taskRunner Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111} from '../items/ApiItem' ;
1212import { ApiNameMixin } from './ApiNameMixin' ;
1313import { DeserializerContext } from '../model/DeserializerContext' ;
14- import { InternalError } from '@microsoft/node-core-library' ;
14+ import { InternalError , LegacyAdapters } from '@microsoft/node-core-library' ;
1515
1616/**
1717 * Constructor options for {@link (ApiItemContainerMixin:interface)}.
@@ -145,7 +145,7 @@ export function ApiItemContainerMixin<TBaseClass extends IApiItemConstructor>(ba
145145
146146 public get members ( ) : ReadonlyArray < ApiItem > {
147147 if ( ! this [ _membersSorted ] ) {
148- this [ _members ] . sort ( ( x , y ) => x . getSortKey ( ) . localeCompare ( y . getSortKey ( ) ) ) ;
148+ LegacyAdapters . sortStable ( this [ _members ] , ( x , y ) => x . getSortKey ( ) . localeCompare ( y . getSortKey ( ) ) ) ;
149149 this [ _membersSorted ] = true ;
150150 }
151151
Original file line number Diff line number Diff line change 44import * as colors from 'colors' ;
55import * as ts from 'typescript' ;
66import * as tsdoc from '@microsoft/tsdoc' ;
7- import { Sort , InternalError } from '@microsoft/node-core-library' ;
7+ import { Sort , InternalError , LegacyAdapters } from '@microsoft/node-core-library' ;
88import { AedocDefinitions } from '@microsoft/api-extractor-model' ;
99
1010import { TypeScriptMessageFormatter } from '../analyzer/TypeScriptMessageFormatter' ;
@@ -563,7 +563,7 @@ export class MessageRouter {
563563 * Sorts an array of messages according to a reasonable ordering
564564 */
565565 private _sortMessagesForOutput ( messages : ExtractorMessage [ ] ) : void {
566- messages . sort ( ( a , b ) => {
566+ LegacyAdapters . sortStable ( messages , ( a , b ) => {
567567 let diff : number ;
568568 // First sort by file name
569569 diff = Sort . compareByValue ( a . sourceFilePath , b . sourceFilePath ) ;
Original file line number Diff line number Diff line change 33
44import {
55 Terminal ,
6- ConsoleTerminalProvider
6+ ConsoleTerminalProvider ,
7+ Sort
78} from '@microsoft/node-core-library' ;
89
910import { ITask , ITaskDefinition } from './ITask' ;
@@ -105,9 +106,7 @@ export class TaskCollection {
105106 } ) ;
106107
107108 // Sort the queue in descending order, nothing will mess with the order
108- buildQueue . sort ( ( taskA : ITask , taskB : ITask ) : number => {
109- return taskB . criticalPathLength ! - taskA . criticalPathLength ! ;
110- } ) ;
109+ Sort . sortBy ( buildQueue , ( task : ITask ) : number => - task . criticalPathLength ! ) ;
111110
112111 return buildQueue ;
113112 }
You can’t perform that action at this time.
0 commit comments