mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor: various build and import specificer fixes for strict deps (#63323)
Change direct deps in bazel targets and import specifiers within files to maintain strict deps requirements ahead of enabling strict deps tests in the repo PR Close #63323
This commit is contained in:
committed by
Andrew Kushnir
parent
a9d4ccfff3
commit
3df1dccebe
@@ -11,7 +11,7 @@ import {NavigationItem} from '../../interfaces/index';
|
||||
import {NavigationState} from '../../services/index';
|
||||
import {RouterLink, RouterLinkActive} from '@angular/router';
|
||||
import {IconComponent} from '../icon/icon.component';
|
||||
import {IsActiveNavigationItem} from '../../pipes/is-active-navigation-item.pipe';
|
||||
import {IsActiveNavigationItem} from '../../pipes';
|
||||
import {NgTemplateOutlet} from '@angular/common';
|
||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ ng_project(
|
||||
"//adev/shared-docs/directives",
|
||||
"//adev/shared-docs/interfaces",
|
||||
"//adev/shared-docs/pipes",
|
||||
"//adev/shared-docs/providers",
|
||||
"//adev/shared-docs/services",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -20,19 +20,18 @@ import {
|
||||
viewChildren,
|
||||
} from '@angular/core';
|
||||
|
||||
import {WINDOW} from '../../providers/index';
|
||||
import {ClickOutside} from '../../directives/index';
|
||||
import {Search, SearchHistory} from '../../services/index';
|
||||
import {WINDOW} from '../../providers';
|
||||
import {ClickOutside, SearchItem} from '../../directives';
|
||||
import {Search, SearchHistory} from '../../services';
|
||||
|
||||
import {TextField} from '../text-field/text-field.component';
|
||||
import {FormControl, ReactiveFormsModule} from '@angular/forms';
|
||||
import {ActiveDescendantKeyManager} from '@angular/cdk/a11y';
|
||||
import {SearchItem} from '../../directives/search-item/search-item.directive';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
import {Router, RouterLink} from '@angular/router';
|
||||
import {fromEvent} from 'rxjs';
|
||||
import {AlgoliaIcon} from '../algolia-icon/algolia-icon.component';
|
||||
import {RelativeLink} from '../../pipes/relative-link.pipe';
|
||||
import {RelativeLink} from '../../pipes';
|
||||
import {SearchHistoryComponent} from '../search-history/search-history.component';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -38,6 +38,8 @@ ts_project(
|
||||
":search-history",
|
||||
"//adev:node_modules/@angular/core",
|
||||
"//adev:node_modules/@angular/platform-browser",
|
||||
"//adev:node_modules/@angular/router",
|
||||
"//adev/shared-docs/providers",
|
||||
"//adev/shared-docs/services",
|
||||
"//adev/shared-docs/testing",
|
||||
],
|
||||
|
||||
@@ -21,7 +21,7 @@ import {ActiveDescendantKeyManager} from '@angular/cdk/a11y';
|
||||
|
||||
import {SearchHistory} from '../../services';
|
||||
import {RelativeLink} from '../../pipes';
|
||||
import {SearchItem} from '../../directives/search-item/search-item.directive';
|
||||
import {SearchItem} from '../../directives';
|
||||
|
||||
@Component({
|
||||
selector: 'docs-search-history',
|
||||
|
||||
@@ -17,7 +17,7 @@ import {
|
||||
} from '@angular/core';
|
||||
import {Location, ViewportScroller} from '@angular/common';
|
||||
import {TableOfContentsLevel} from '../../interfaces/index';
|
||||
import {TableOfContentsLoader} from '../../services/table-of-contents-loader.service';
|
||||
import {TableOfContentsLoader} from '../../services';
|
||||
import {IconComponent} from '../icon/icon.component';
|
||||
|
||||
@Component({
|
||||
|
||||
@@ -26,9 +26,12 @@ ng_project(
|
||||
"//adev:node_modules/rxjs",
|
||||
"//adev/shared-docs/components/breadcrumb",
|
||||
"//adev/shared-docs/components/copy-source-code-button",
|
||||
"//adev/shared-docs/components/icon",
|
||||
"//adev/shared-docs/components/table-of-contents",
|
||||
"//adev/shared-docs/interfaces",
|
||||
"//adev/shared-docs/providers",
|
||||
"//adev/shared-docs/services",
|
||||
"//adev/shared-docs/utils",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -28,11 +28,11 @@ import {
|
||||
effect,
|
||||
} from '@angular/core';
|
||||
import {takeUntilDestroyed} from '@angular/core/rxjs-interop';
|
||||
import {TOC_SKIP_CONTENT_MARKER, NavigationState} from '../../../services/index';
|
||||
import {TOC_SKIP_CONTENT_MARKER, NavigationState} from '../../../services';
|
||||
import {TableOfContents} from '../../table-of-contents/table-of-contents.component';
|
||||
import {IconComponent} from '../../icon/icon.component';
|
||||
import {handleHrefClickEventWithRouter} from '../../../utils/index';
|
||||
import {Snippet} from '../../../interfaces/index';
|
||||
import {handleHrefClickEventWithRouter} from '../../../utils';
|
||||
import {Snippet} from '../../../interfaces';
|
||||
import {Router} from '@angular/router';
|
||||
import {fromEvent} from 'rxjs';
|
||||
|
||||
|
||||
@@ -8,3 +8,4 @@
|
||||
|
||||
export * from './click-outside/click-outside.directive';
|
||||
export * from './external-link/external-link.directive';
|
||||
export * from './search-item/search-item.directive';
|
||||
|
||||
@@ -9,6 +9,7 @@ ng_project(
|
||||
exclude = ["*.spec.ts"],
|
||||
),
|
||||
deps = [
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:utils",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/directive-forest",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
|
||||
@@ -28,6 +28,7 @@ ng_project(
|
||||
"//:node_modules/@angular/forms",
|
||||
"//:node_modules/@angular/material",
|
||||
"//:node_modules/rxjs",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-environment",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-providers:supported_apis",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-services:browser_styles",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-services:frame_manager",
|
||||
|
||||
@@ -35,6 +35,7 @@ ts_test_library(
|
||||
srcs = glob(["*_spec.ts"]),
|
||||
deps = [
|
||||
":supported_apis",
|
||||
"//:node_modules/@angular/core",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -74,6 +74,7 @@ ts_test_library(
|
||||
"//:node_modules/@angular/common",
|
||||
"//:node_modules/@angular/core",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-environment",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-operations",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-providers:window",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-services/test-utils:app_operations_mock",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-services/test-utils:settings_mock",
|
||||
|
||||
@@ -23,6 +23,7 @@ ng_project(
|
||||
"//:node_modules/@angular/material",
|
||||
"//:node_modules/rxjs",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-operations",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-services:frame_manager",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/breadcrumbs",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source",
|
||||
@@ -46,6 +47,13 @@ ts_test_library(
|
||||
"//:node_modules/@angular/platform-browser",
|
||||
"//:node_modules/tslib",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-operations",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-services:frame_manager",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/breadcrumbs",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/signal-graph:signal-graph-manager",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.dev/license
|
||||
*/
|
||||
|
||||
import {indexForest} from './';
|
||||
import {indexForest} from './index';
|
||||
import {DevToolsNode} from '../../../../../../../protocol';
|
||||
|
||||
describe('indexForest', () => {
|
||||
|
||||
+1
@@ -16,6 +16,7 @@ ts_test_library(
|
||||
srcs = glob(["*.spec.ts"]),
|
||||
deps = [
|
||||
":signal-graph-manager",
|
||||
"//:node_modules/@angular/core",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
+1
@@ -28,5 +28,6 @@ ng_project(
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/shared:estimate-frame-rate",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/tab-update",
|
||||
"//devtools/projects/ng-devtools/src/lib/shared/button",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
+1
@@ -26,5 +26,6 @@ ng_project(
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/record-formatter/flamegraph-formatter",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer:recording-visualizer-types",
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer/profile-formatter",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
+1
@@ -7,5 +7,6 @@ ts_project(
|
||||
srcs = ["profile-formatter.ts"],
|
||||
deps = [
|
||||
"//devtools/projects/ng-devtools/src/lib/devtools-tabs/profiler/recording-timeline/recording-visualizer:recording-visualizer-types",
|
||||
"//devtools/projects/protocol",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -30,6 +30,7 @@ ng_project(
|
||||
"//devtools/projects/ng-devtools-backend",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib:highlighter",
|
||||
"//devtools/projects/ng-devtools-backend/src/lib/component-tree",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-services:frame_manager",
|
||||
"//devtools/projects/protocol",
|
||||
"//devtools/projects/shell-browser/src/app:backend",
|
||||
"//devtools/projects/shell-browser/src/app:background",
|
||||
|
||||
@@ -23,6 +23,7 @@ ng_project(
|
||||
"//:node_modules/@angular/router",
|
||||
"//devtools/projects/ng-devtools",
|
||||
"//devtools/projects/ng-devtools/src/lib/application-services:frame_manager",
|
||||
"//devtools/projects/ng-devtools/src/lib/shared/split",
|
||||
"//devtools/projects/protocol",
|
||||
"//devtools/src:iframe_message_bus",
|
||||
],
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {APP_ID, DOCUMENT, inject, makeStateKey, TransferState} from '@angular/core';
|
||||
import {firstValueFrom} from 'rxjs';
|
||||
|
||||
/**
|
||||
* This function serializes the transfer state into the DOM.
|
||||
|
||||
@@ -13,6 +13,7 @@ ng_project(
|
||||
],
|
||||
),
|
||||
deps = [
|
||||
"//:node_modules/rxjs",
|
||||
"//packages/common",
|
||||
"//packages/core",
|
||||
"//packages/upgrade",
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import {NgtscProgram} from '../../src/ngtsc/program';
|
||||
import {CompilerOptions} from '../../src/transformers/api';
|
||||
import {createCompilerHost} from '../../src/transformers/compiler_host';
|
||||
import {platform} from 'os';
|
||||
import {platform} from 'node:os';
|
||||
import ts from 'typescript';
|
||||
|
||||
import {ErrorCode, ngErrorCode} from '../../src/ngtsc/diagnostics';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
/// <reference types="node" />
|
||||
import {inspect} from 'util';
|
||||
import {inspect} from 'node:util';
|
||||
import ts from 'typescript';
|
||||
|
||||
import {runInEachFileSystem} from '../../src/ngtsc/file_system/testing';
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import {runInEachFileSystem} from '../../src/ngtsc/file_system/testing';
|
||||
import {loadStandardTestFiles} from '../../src/ngtsc/testing';
|
||||
import {platform} from 'os';
|
||||
import {platform} from 'node:os';
|
||||
|
||||
import {NgtscTestEnvironment} from './env';
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ ng_project(
|
||||
deps = [
|
||||
"//:node_modules/rxjs",
|
||||
"//packages/core",
|
||||
"//packages/core/primitives/signals",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ ts_project(
|
||||
srcs = glob(["**/*.ts"]),
|
||||
data = ["schema.json"],
|
||||
deps = [
|
||||
"//:node_modules/@angular-devkit/schematics",
|
||||
"//:node_modules/@types/node",
|
||||
"//:node_modules/typescript",
|
||||
"//packages/compiler",
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
load("//tools:defaults2.bzl", "angular_jasmine_test", "ng_project", "ng_web_test_suite")
|
||||
load("//tools:defaults2.bzl", "angular_jasmine_test", "ng_project", "ng_web_test_suite", "ts_config")
|
||||
|
||||
package(default_visibility = ["//visibility:private"])
|
||||
|
||||
ts_config(
|
||||
name = "tsconfig",
|
||||
src = "tsconfig.json",
|
||||
deps = [
|
||||
"//packages/core:tsconfig_test",
|
||||
],
|
||||
)
|
||||
|
||||
ng_project(
|
||||
name = "selectorless_test_lib",
|
||||
testonly = True,
|
||||
srcs = glob(["**/*.ts"]),
|
||||
extends = "//packages/core:tsconfig_test",
|
||||
tsconfig = ":tsconfig.json",
|
||||
tsconfig = ":tsconfig",
|
||||
visibility = ["//:__pkg__"],
|
||||
deps = [
|
||||
"//packages/core",
|
||||
|
||||
@@ -65,20 +65,11 @@ ts_project(
|
||||
],
|
||||
)
|
||||
|
||||
ts_project(
|
||||
name = "render3_node_lib",
|
||||
testonly = True,
|
||||
srcs = [],
|
||||
deps = [
|
||||
":domino",
|
||||
":render3_lib",
|
||||
],
|
||||
)
|
||||
|
||||
angular_jasmine_test(
|
||||
name = "render3",
|
||||
data = [
|
||||
":render3_node_lib",
|
||||
":domino",
|
||||
":render3_lib",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ ng_project(
|
||||
),
|
||||
deps = [
|
||||
"//packages/core",
|
||||
"//packages/core/src/util",
|
||||
"//packages/core/testing",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@ ts_config(
|
||||
name = "tsconfig",
|
||||
src = "tsconfig.json",
|
||||
deps = [
|
||||
"//packages:tsconfig_test",
|
||||
"//packages/core:tsconfig_test",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -16,7 +16,6 @@ ts_project(
|
||||
srcs = glob(
|
||||
["**/*.ts"],
|
||||
),
|
||||
extends = "//packages/core:tsconfig_test",
|
||||
tsconfig = ":tsconfig",
|
||||
deps = [
|
||||
"//packages/core",
|
||||
|
||||
@@ -17,6 +17,7 @@ ts_project(
|
||||
"//packages/compiler-cli/src/ngtsc/reflection",
|
||||
"//packages/core/schematics/migrations/signal-migration/src",
|
||||
"//packages/core/schematics/migrations/signal-queries-migration:migration",
|
||||
"//packages/core/schematics/utils/tsurge",
|
||||
"//packages/language-service:api",
|
||||
"//packages/language-service/src/utils",
|
||||
],
|
||||
|
||||
@@ -9,6 +9,7 @@ ts_project(
|
||||
visibility = ["//packages/localize/tools/test:__subpackages__"],
|
||||
deps = [
|
||||
"//:node_modules/@babel/generator",
|
||||
"//:node_modules/@types/babel__core",
|
||||
"//:node_modules/@types/babel__generator",
|
||||
"//:node_modules/tinyglobby",
|
||||
"//packages:types",
|
||||
|
||||
@@ -44,6 +44,7 @@ ts_project(
|
||||
"//packages/platform-browser",
|
||||
"//packages/platform-browser/animations",
|
||||
"//packages/platform-server",
|
||||
"//packages/platform-server:bundled_domino_lib",
|
||||
"//packages/private/testing",
|
||||
"//packages/router",
|
||||
],
|
||||
|
||||
@@ -16,6 +16,7 @@ ng_project(
|
||||
"//packages/core",
|
||||
"//packages/platform-browser",
|
||||
"//packages/upgrade",
|
||||
"//packages/upgrade/src/common",
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ ng_project(
|
||||
),
|
||||
deps = [
|
||||
"//packages/core/testing",
|
||||
"//packages/upgrade/src/common",
|
||||
"//packages/upgrade/static",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.dev/license
|
||||
*/
|
||||
import '../zone.umd.js';
|
||||
const testClosureFunction = () => {
|
||||
const logs: string[] = [];
|
||||
// call all Zone exposed functions
|
||||
|
||||
@@ -18,6 +18,7 @@ ts_project(
|
||||
srcs = ["browser_tests.init.mts"],
|
||||
deps = [
|
||||
":zone_base_setup_lib",
|
||||
"//:node_modules/zone.js",
|
||||
"//packages/compiler",
|
||||
"//packages/core/testing",
|
||||
"//packages/platform-browser/animations",
|
||||
|
||||
Reference in New Issue
Block a user