Skip to content

Commit 44a8600

Browse files
devversionjelbourn
authored andcommitted
build: material-moment-adapter should not depend on all material packages (#13931)
Since we have the ability to only build specific parts of Material with Bazel, the `material-moment-adapter` should just depend on it's *actual* dependencies and not on the _whole set_ of Material entry-points.
1 parent a619ddc commit 44a8600

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/material-moment-adapter/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ ng_module(
99
srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
1010
module_name = "@angular/material-moment-adapter",
1111
deps = [
12+
"@angular//packages/core",
1213
"@npm//moment",
13-
"//src/lib:material"
14+
"//src/lib/core"
1415
],
1516
# Explicitly specify the tsconfig that is also used by Gulp. We need to explicitly use this
1617
# tsconfig because in order to import Moment with TypeScript, we need some special options

src/material-moment-adapter/adapter/index.ts

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

99
import {NgModule} from '@angular/core';
10-
import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material';
10+
import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';
1111
import {MAT_MOMENT_DATE_ADAPTER_OPTIONS, MomentDateAdapter} from './moment-date-adapter';
1212
import {MAT_MOMENT_DATE_FORMATS} from './moment-date-formats';
1313

src/material-moment-adapter/adapter/moment-date-adapter.ts

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

99
import {Inject, Injectable, Optional, InjectionToken} from '@angular/core';
10-
import {DateAdapter, MAT_DATE_LOCALE} from '@angular/material';
10+
import {DateAdapter, MAT_DATE_LOCALE} from '@angular/material/core';
1111
// Depending on whether rollup is used, moment needs to be imported differently.
1212
// Since Moment.js doesn't have a default export, we normally need to import using the `* as`
1313
// syntax. However, rollup creates a synthetic default module and we thus need to import it using

src/material-moment-adapter/adapter/moment-date-formats.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {MatDateFormats} from '@angular/material';
9+
import {MatDateFormats} from '@angular/material/core';
1010

1111

1212
export const MAT_MOMENT_DATE_FORMATS: MatDateFormats = {

0 commit comments

Comments
 (0)