Skip to content

build: moment-adapter package should not depend on all material entry-points #13931

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/material-moment-adapter/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ ng_module(
srcs = glob(["**/*.ts"], exclude=["**/*.spec.ts"]),
module_name = "@angular/material-moment-adapter",
deps = [
"@angular//packages/core",
"@npm//moment",
"//src/lib:material"
"//src/lib/core"
],
# Explicitly specify the tsconfig that is also used by Gulp. We need to explicitly use this
# tsconfig because in order to import Moment with TypeScript, we need some special options
Expand Down
2 changes: 1 addition & 1 deletion src/material-moment-adapter/adapter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

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

Expand Down
2 changes: 1 addition & 1 deletion src/material-moment-adapter/adapter/moment-date-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

import {Inject, Injectable, Optional, InjectionToken} from '@angular/core';
import {DateAdapter, MAT_DATE_LOCALE} from '@angular/material';
import {DateAdapter, MAT_DATE_LOCALE} from '@angular/material/core';
// Depending on whether rollup is used, moment needs to be imported differently.
// Since Moment.js doesn't have a default export, we normally need to import using the `* as`
// syntax. However, rollup creates a synthetic default module and we thus need to import it using
Expand Down
2 changes: 1 addition & 1 deletion src/material-moment-adapter/adapter/moment-date-formats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* found in the LICENSE file at https://angular.io/license
*/

import {MatDateFormats} from '@angular/material';
import {MatDateFormats} from '@angular/material/core';


export const MAT_MOMENT_DATE_FORMATS: MatDateFormats = {
Expand Down