Skip to content

Commit 41466a7

Browse files
tsc036thePunderWoman
authored andcommitted
refactor(core): move profile_types.ts to primtives
move profile_types.ts so the types can be used in Wiz code (cherry picked from commit cf47ce2)
1 parent 1dcecdf commit 41466a7

File tree

21 files changed

+47
-16
lines changed

21 files changed

+47
-16
lines changed

devtools/projects/ng-devtools-backend/src/lib/hooks/profiler/native.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
import {ɵProfilerEvent} from '@angular/core';
10-
1110
import {getDirectiveHostElement} from '../../directive-forest';
1211
import {ngDebugClient} from '../../ng-debug-api/ng-debug-api';
1312
import {runOutsideAngular} from '../../utils';

packages/core/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ ng_project(
3939
"//packages/core/primitives/di",
4040
"//packages/core/primitives/dom-navigation",
4141
"//packages/core/primitives/event-dispatch",
42+
"//packages/core/primitives/profiler",
4243
"//packages/core/primitives/signals",
4344
"//packages/core/src/compiler",
4445
"//packages/core/src/di/interface",
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
load("//tools:defaults.bzl", "ts_project")
2+
3+
package(default_visibility = [
4+
"//packages:__pkg__",
5+
"//packages/core:__subpackages__",
6+
])
7+
8+
ts_project(
9+
name = "profiler",
10+
srcs = glob(
11+
[
12+
"**/*.ts",
13+
],
14+
),
15+
)
16+
17+
filegroup(
18+
name = "files_for_docgen",
19+
srcs = glob([
20+
"*.ts",
21+
"src/**/*.ts",
22+
]),
23+
visibility = ["//visibility:public"],
24+
)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Angular Profiler Types
2+
3+
This directory contains types related to the [Angular Devtools Profiler](https://angular.dev/tools/devtools/profiler). These types are for code that needs to hook into the Angular Devtools Profiler lifecycle.
File renamed without changes.

packages/core/src/application/application_ref.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import {TESTABILITY} from '../testability/testability';
4646
import {NgZone} from '../zone/ng_zone';
4747

4848
import {profiler} from '../render3/profiler';
49-
import {ProfilerEvent} from '../render3/profiler_types';
49+
import {ProfilerEvent} from '../../primitives/profiler/src/profiler_types';
5050
import {EffectScheduler} from '../render3/reactivity/root_effect_scheduler';
5151
import {isReactiveLViewConsumer} from '../render3/reactive_lview_consumer';
5252
import {ApplicationInitStatus} from './application_init';

packages/core/src/application/create_application.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import {ChangeDetectionScheduler} from '../change_detection/scheduling/zoneless_
1919
import {ChangeDetectionSchedulerImpl} from '../change_detection/scheduling/zoneless_scheduling_impl';
2020
import {bootstrap} from '../platform/bootstrap';
2121
import {profiler} from '../render3/profiler';
22-
import {ProfilerEvent} from '../render3/profiler_types';
22+
import {ProfilerEvent} from '../../primitives/profiler/src/profiler_types';
2323
import {errorHandlerEnvironmentInitializer} from '../error_handler';
2424
import {RuntimeError, RuntimeErrorCode} from '../errors';
2525
import {PlatformRef} from '../platform/platform_ref';

packages/core/src/core_render3_private_export.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,10 @@ export {
269269
} from './render3/jit/partial';
270270
export {compilePipe as ɵcompilePipe} from './render3/jit/pipe';
271271
export {isNgModule as ɵisNgModule} from './render3/jit/util';
272-
export {Profiler as ɵProfiler, ProfilerEvent as ɵProfilerEvent} from './render3/profiler_types';
272+
export {
273+
Profiler as ɵProfiler,
274+
ProfilerEvent as ɵProfilerEvent,
275+
} from '../primitives/profiler/src/profiler_types';
273276
export {
274277
FrameworkAgnosticGlobalUtils as ɵFrameworkAgnosticGlobalUtils,
275278
GlobalDevModeUtils as ɵGlobalDevModeUtils,

packages/core/src/defer/rendering.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ import {
5252
getTemplateIndexForState,
5353
} from './utils';
5454
import {profiler} from '../render3/profiler';
55-
import {ProfilerEvent} from '../render3/profiler_types';
55+
import {ProfilerEvent} from '../../primitives/profiler/src/profiler_types';
5656
import {addLViewToLContainer, removeLViewFromLContainer} from '../render3/view/container';
5757

5858
/**

packages/core/src/render3/after_render/manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {type DestroyRef} from '../../linker/destroy_ref';
1818
import {NgZone} from '../../zone';
1919
import {AFTER_RENDER_SEQUENCES_TO_ADD, FLAGS, LView, LViewFlags} from '../interfaces/view';
2020
import {profiler} from '../profiler';
21-
import {ProfilerEvent} from '../profiler_types';
21+
import {ProfilerEvent} from '../../../primitives/profiler/src/profiler_types';
2222
import {markAncestorsForTraversal} from '../util/view_utils';
2323
import {AfterRenderPhase, AfterRenderRef} from './api';
2424

0 commit comments

Comments
 (0)