Skip to content

Commit 2b37515

Browse files
devversionjosephperrott
authored andcommitted
refactor(core): remove version placeholder workaround (#16231)
Removes the duplicate version placeholder variable which is no longer needed since we moved the Material version symbol into the `@angular/material/core` secondary entry-point.
1 parent 4a934c6 commit 2b37515

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

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

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

9-
import {NgModule, InjectionToken, Optional, Inject, isDevMode, Version} from '@angular/core';
10-
import {HammerLoader, HAMMER_LOADER} from '@angular/platform-browser';
11-
import {BidiModule} from '@angular/cdk/bidi';
129
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-
10+
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';
2014

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

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

0 commit comments

Comments
 (0)