Skip to content

Commit 8f08543

Browse files
authored
Revert "refactor(core): remove version placeholder workaround (#16231)"
This reverts commit 2b37515.
1 parent c1e07ad commit 8f08543

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/material/core/common-behaviors/common-module.ts

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
import {VERSION as CDK_VERSION} from '@angular/cdk';
9+
import {NgModule, InjectionToken, Optional, Inject, isDevMode, Version} from '@angular/core';
10+
import {HammerLoader, HAMMER_LOADER} from '@angular/platform-browser';
1011
import {BidiModule} from '@angular/cdk/bidi';
11-
import {Inject, InjectionToken, isDevMode, NgModule, Optional} from '@angular/core';
12-
import {HAMMER_LOADER, HammerLoader} from '@angular/platform-browser';
13-
import {VERSION as MAT_VERSION} from '../version';
12+
import {VERSION as CDK_VERSION} from '@angular/cdk';
13+
14+
// Private version constant to circumvent test/build issues,
15+
// i.e. avoid core to depend on the @angular/material primary entry-point
16+
// Can be removed once the Material primary entry-point no longer
17+
// re-exports all secondary entry-points
18+
const VERSION = new Version('0.0.0-PLACEHOLDER');
19+
1420

1521
/** Injection token that configures whether the Material sanity checks are enabled. */
1622
export const MATERIAL_SANITY_CHECKS = new InjectionToken<boolean>('mat-sanity-checks', {
@@ -108,9 +114,9 @@ export class MatCommonModule {
108114

109115
/** Checks whether the material version matches the cdk version */
110116
private _checkCdkVersionMatch(): void {
111-
if (MAT_VERSION.full !== CDK_VERSION.full) {
117+
if (VERSION.full !== CDK_VERSION.full) {
112118
console.warn(
113-
'The Angular Material version (' + MAT_VERSION.full + ') does not match ' +
119+
'The Angular Material version (' + VERSION.full + ') does not match ' +
114120
'the Angular CDK version (' + CDK_VERSION.full + ').\n' +
115121
'Please ensure the versions of these two packages exactly match.'
116122
);

0 commit comments

Comments
 (0)