From a36155d9ef2554875b7117376d49531e86d5f87b Mon Sep 17 00:00:00 2001 From: Shuaib Hasan Akib Date: Wed, 30 Sep 2026 08:17:58 +0600 Subject: [PATCH] refactor(devtools): import rxjs operators from the `rxjs` entry point Since RxJS 7.2, all operators are exported from the main `rxjs` entry point, and RxJS recommends importing them from there. `rxjs/operators` is only kept for backward compatibility and is expected to be removed in a future major version. Switch the remaining `rxjs/operators` imports in devtools to `rxjs`, merging them into the existing `rxjs` import where there is one. Unlike the framework packages, which still support RxJS 6 through their peer dependency range, devtools is bundled with the repository's RxJS 7, so this is safe. No runtime or bundle size changes: both entry points expose the same tree-shakable operators. --- .../ng-devtools-backend/src/lib/client-event-subscribers.ts | 2 +- .../directive-forest/component-data-source/index.ts | 3 +-- .../property-resolver/property-data-source.ts | 3 +-- .../tree-map-visualizer/tree-map-visualizer.component.ts | 3 +-- .../signal-details/signal-value-tree/signal-data-source.ts | 3 +-- .../ng-devtools/src/lib/shared/split/split.component.ts | 3 +-- 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/devtools/projects/ng-devtools-backend/src/lib/client-event-subscribers.ts b/devtools/projects/ng-devtools-backend/src/lib/client-event-subscribers.ts index 7c5b5bdf771..fdf008f59e5 100644 --- a/devtools/projects/ng-devtools-backend/src/lib/client-event-subscribers.ts +++ b/devtools/projects/ng-devtools-backend/src/lib/client-event-subscribers.ts @@ -7,7 +7,7 @@ */ import {ɵDebugSignalGraph as InternalDebugSignalGraph} from '@angular/core'; -import {debounceTime} from 'rxjs/operators'; +import {debounceTime} from 'rxjs'; import { ComponentExplorerViewQuery, ComponentType, diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source/index.ts b/devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source/index.ts index 5b6fa001982..8a1a05e0e4e 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source/index.ts +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source/index.ts @@ -16,8 +16,7 @@ import { HydrationStatus, ChangeDetection, } from '../../../../../../../protocol'; -import {BehaviorSubject, merge, Observable} from 'rxjs'; -import {map} from 'rxjs/operators'; +import {BehaviorSubject, merge, Observable, map} from 'rxjs'; import {diff} from '../../diffing'; import {IndexedNode, indexForest} from '../index-forest'; diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver/property-data-source.ts b/devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver/property-data-source.ts index a52486bf3ff..a072a62f7d1 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver/property-data-source.ts +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver/property-data-source.ts @@ -17,8 +17,7 @@ import { MessageBus, Properties, } from '../../../../../../protocol'; -import {BehaviorSubject, merge, Observable, Subscription} from 'rxjs'; -import {map} from 'rxjs/operators'; +import {BehaviorSubject, merge, Observable, Subscription, map} from 'rxjs'; import {diff} from '../diffing'; diff --git a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer/tree-map-visualizer/tree-map-visualizer.component.ts b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer/tree-map-visualizer/tree-map-visualizer.component.ts index 6afd2310308..cd462009083 100644 --- a/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer/tree-map-visualizer/tree-map-visualizer.component.ts +++ b/devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer/tree-map-visualizer/tree-map-visualizer.component.ts @@ -17,8 +17,7 @@ import { viewChild, } from '@angular/core'; import {ProfilerFrame} from '../../../../../../../../protocol'; -import {Subject, Subscription} from 'rxjs'; -import {debounceTime} from 'rxjs/operators'; +import {Subject, Subscription, debounceTime} from 'rxjs'; import {render} from 'webtreemap/build/treemap'; import {TreeMapFormatter, TreeMapNode} from '../../record-formatter/tree-map-formatter'; diff --git a/devtools/projects/ng-devtools/src/lib/shared/signal-details/signal-value-tree/signal-data-source.ts b/devtools/projects/ng-devtools/src/lib/shared/signal-details/signal-value-tree/signal-data-source.ts index 3c1f27ea313..3f61406cd1e 100644 --- a/devtools/projects/ng-devtools/src/lib/shared/signal-details/signal-value-tree/signal-data-source.ts +++ b/devtools/projects/ng-devtools/src/lib/shared/signal-details/signal-value-tree/signal-data-source.ts @@ -17,8 +17,7 @@ import { Properties, SignalNodePosition, } from '../../../../../../protocol'; -import {BehaviorSubject, merge, Observable, Subject} from 'rxjs'; -import {takeUntil} from 'rxjs/operators'; +import {BehaviorSubject, merge, Observable, Subject, takeUntil} from 'rxjs'; import {FlatNode, Property} from '../../object-tree-explorer/object-tree-types'; export const arrayifyProps = ( diff --git a/devtools/projects/ng-devtools/src/lib/shared/split/split.component.ts b/devtools/projects/ng-devtools/src/lib/shared/split/split.component.ts index 4729c0b5244..feb83ac8998 100644 --- a/devtools/projects/ng-devtools/src/lib/shared/split/split.component.ts +++ b/devtools/projects/ng-devtools/src/lib/shared/split/split.component.ts @@ -23,8 +23,7 @@ import { ViewChildren, } from '@angular/core'; import {outputFromObservable} from '@angular/core/rxjs-interop'; -import {Observable, Subject, Subscriber} from 'rxjs'; -import {debounceTime} from 'rxjs/operators'; +import {Observable, Subject, Subscriber, debounceTime} from 'rxjs'; import { Direction,