Skip to content
Closed
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
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
/src/material/toolbar/** @devversion
/src/material/tooltip/** @andrewseguin
/src/material/tree/** @jelbourn @andrewseguin
/src/material/version/** @josephperrott

# Angular Material core
/src/material/core/* @jelbourn
Expand Down Expand Up @@ -78,6 +79,7 @@
/src/cdk/testing/** @devversion
/src/cdk/text-field/** @mmalerba
/src/cdk/tree/** @jelbourn @andrewseguin
/src/cdk/version/** @josephperrott

# Moment adapter package
/src/material-moment-adapter/** @mmalerba
Expand All @@ -95,13 +97,15 @@
/src/material-experimental/mdc-slide-toggle/** @crisbeto
/src/material-experimental/mdc-tabs/** @crisbeto
/src/material-experimental/popover-edit/** @kseamon @andrewseguin
/src/material-experimental/version/** @josephperrott

# CDK experimental package
/src/cdk-experimental/** @jelbourn
/src/cdk-experimental/dialog/** @jelbourn @josephperrott @crisbeto
/src/cdk-experimental/popover-edit/** @kseamon @andrewseguin
/src/cdk-experimental/scrolling/** @mmalerba
/src/cdk-experimental/testing/** @mmalerba
/src/cdk-experimental/version/** @josephperrott

# Docs examples & guides
/guides/** @jelbourn
Expand Down
8 changes: 4 additions & 4 deletions packages.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ CDK_PACKAGES = [
"tree",
]

CDK_TARGETS = ["//src/cdk"] + ["//src/cdk/%s" % p for p in CDK_PACKAGES]
CDK_TARGETS = ["//src/cdk", "//src/cdk/version"] + ["//src/cdk/%s" % p for p in CDK_PACKAGES]

CDK_EXPERIMENTAL_PACKAGES = [
"dialog",
"popover-edit",
"scrolling",
]

CDK_EXPERIMENTAL_TARGETS = ["//src/cdk-experimental"] + [
CDK_EXPERIMENTAL_TARGETS = ["//src/cdk-experimental", "//src/cdk-experimental/version"] + [
"//src/cdk-experimental/%s" % p
for p in CDK_EXPERIMENTAL_PACKAGES
]
Expand Down Expand Up @@ -71,7 +71,7 @@ MATERIAL_PACKAGES = [
"tree",
]

MATERIAL_TARGETS = ["//src/material:material"] + ["//src/material/%s" % p for p in MATERIAL_PACKAGES]
MATERIAL_TARGETS = ["//src/material:material", "//src/material/version"] + ["//src/material/%s" % p for p in MATERIAL_PACKAGES]

# List that references the sass libraries for each Material package. This can be used to create
# the theming scss-bundle or to specify dependencies for the all-theme.scss file.
Expand All @@ -93,7 +93,7 @@ MATERIAL_EXPERIMENTAL_PACKAGES = [
"popover-edit",
]

MATERIAL_EXPERIMENTAL_TARGETS = ["//src/material-experimental"] + [
MATERIAL_EXPERIMENTAL_TARGETS = ["//src/material-experimental", "//src/material-experimental/version"] + [
"//src/material-experimental/%s" % p
for p in MATERIAL_EXPERIMENTAL_PACKAGES
]
Expand Down
6 changes: 5 additions & 1 deletion src/cdk-experimental/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@

import {Version} from '@angular/core';

/** Current version of the CDK Experimental package. */
/**
* Current version of the CDK Experimental package.
* @deprecated @breaking-change 9.0.0 Import VERSION from @angular/cdk-experimental/version
* instead.
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
19 changes: 19 additions & 0 deletions src/cdk-experimental/version/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package(default_visibility = ["//visibility:public"])

load("//tools:defaults.bzl", "ts_library")

ts_library(
name = "version",
srcs = glob(
["**/*.ts"],
),
module_name = "@angular/cdk-experimental/version",
deps = [
"@npm//@angular/core",
],
)

filegroup(
name = "source-files",
srcs = glob(["**/*.ts"]),
)
9 changes: 9 additions & 0 deletions src/cdk-experimental/version/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

export * from './public-api';
9 changes: 9 additions & 0 deletions src/cdk-experimental/version/public-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

export * from './version';
14 changes: 14 additions & 0 deletions src/cdk-experimental/version/tsconfig-build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "../tsconfig-build",
"files": [
"public-api.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": true,
"flatModuleOutFile": "index.js",
"flatModuleId": "@angular/cdk-experimental/version",
"skipTemplateCodegen": true,
"fullTemplateTypeCheck": true
}
}
12 changes: 12 additions & 0 deletions src/cdk-experimental/version/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import {Version} from '@angular/core';

/** Current version of Angular CDK Experimental. */
export const VERSION = new Version('0.0.0-PLACEHOLDER');
5 changes: 4 additions & 1 deletion src/cdk/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@

import {Version} from '@angular/core';

/** Current version of the Angular Component Development Kit. */
/**
* Current version of the Angular Component Development Kit.
* @deprecated @breaking-change 9.0.0 Import VERSION from @angular/cdk/version instead.
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
19 changes: 19 additions & 0 deletions src/cdk/version/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package(default_visibility = ["//visibility:public"])

load("//tools:defaults.bzl", "ts_library")

ts_library(
name = "version",
srcs = glob(
["**/*.ts"],
),
module_name = "@angular/cdk/version",
deps = [
"@npm//@angular/core",
],
)

filegroup(
name = "source-files",
srcs = glob(["**/*.ts"]),
)
9 changes: 9 additions & 0 deletions src/cdk/version/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

export * from './public-api';
9 changes: 9 additions & 0 deletions src/cdk/version/public-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

export * from './version';
14 changes: 14 additions & 0 deletions src/cdk/version/tsconfig-build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "../tsconfig-build",
"files": [
"public-api.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": true,
"flatModuleOutFile": "index.js",
"flatModuleId": "@angular/cdk/version",
"skipTemplateCodegen": true,
"fullTemplateTypeCheck": true
}
}
12 changes: 12 additions & 0 deletions src/cdk/version/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import {Version} from '@angular/core';

/** Current version of the Angular Component Development Kit. */
export const VERSION = new Version('0.0.0-PLACEHOLDER');
5 changes: 5 additions & 0 deletions src/dev-app/system-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,13 @@ System.config({
'@angular/cdk/table': 'dist/packages/cdk/table/index.js',
'@angular/cdk/text-field': 'dist/packages/cdk/text-field/index.js',
'@angular/cdk/tree': 'dist/packages/cdk/tree/index.js',
'@angular/cdk/version': 'dist/packages/cdk/version/index.js',

'@angular/cdk-experimental/scrolling': 'dist/packages/cdk-experimental/scrolling/index.js',
'@angular/cdk-experimental/dialog': 'dist/packages/cdk-experimental/dialog/index.js',
'@angular/cdk-experimental/popover-edit':
'dist/packages/cdk-experimental/popover-edit/index.js',
'@angular/cdk-experimental/version': 'dist/packages/cdk-experimental/version/index.js',

'@angular/material/autocomplete': 'dist/packages/material/autocomplete/index.js',
'@angular/material/bottom-sheet': 'dist/packages/material/bottom-sheet/index.js',
Expand Down Expand Up @@ -133,6 +135,7 @@ System.config({
'@angular/material/tooltip': 'dist/packages/material/tooltip/index.js',
'@angular/material/badge': 'dist/packages/material/badge/index.js',
'@angular/material/tree': 'dist/packages/material/tree/index.js',
'@angular/material/version': 'dist/packages/material/version/index.js',

'@angular/material-experimental/mdc-button':
'dist/packages/material-experimental/mdc-button/index.js',
Expand All @@ -154,6 +157,8 @@ System.config({
'dist/packages/material-experimental/mdc-helpers/index.js',
'@angular/material-experimental/popover-edit':
'dist/packages/material-experimental/popover-edit/index.js',
'@angular/material-experimental/version':
'dist/packages/material-experimental/version/index.js',
},
packages: {
// Set the default extension for the root package, because otherwise the dev-app can't
Expand Down
6 changes: 5 additions & 1 deletion src/material-experimental/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@

import {Version} from '@angular/core';

/** Current version of the Material experimental package. */
/**
* Current version of the Material experimental package.
* @deprecated @breaking-change 9.0.0 Import VERSION from @angular/material-experimental/version
* instead.
*/
export const VERSION = new Version('0.0.0-PLACEHOLDER');
19 changes: 19 additions & 0 deletions src/material-experimental/version/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package(default_visibility = ["//visibility:public"])

load("//tools:defaults.bzl", "ts_library")

ts_library(
name = "version",
srcs = glob(
["**/*.ts"],
),
module_name = "@angular/material-experimental/version",
deps = [
"@npm//@angular/core",
],
)

filegroup(
name = "source-files",
srcs = glob(["**/*.ts"]),
)
9 changes: 9 additions & 0 deletions src/material-experimental/version/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

export * from './public-api';
9 changes: 9 additions & 0 deletions src/material-experimental/version/public-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

export * from './version';
14 changes: 14 additions & 0 deletions src/material-experimental/version/tsconfig-build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "../tsconfig-build",
"files": [
"public-api.ts"
],
"angularCompilerOptions": {
"annotateForClosureCompiler": true,
"strictMetadataEmit": true,
"flatModuleOutFile": "index.js",
"flatModuleId": "@angular/material-experimental/version",
"skipTemplateCodegen": true,
"fullTemplateTypeCheck": true
}
}
12 changes: 12 additions & 0 deletions src/material-experimental/version/version.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/

import {Version} from '@angular/core';

/** Current version of the Material experimental package. */
export const VERSION = new Version('0.0.0-PLACEHOLDER');
3 changes: 2 additions & 1 deletion src/material/core/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ ng_module(
] + glob(["**/*.html"]),
module_name = "@angular/material/core",
deps = [
"//src/cdk",
"//src/cdk/a11y",
"//src/cdk/bidi",
"//src/cdk/coercion",
"//src/cdk/keycodes",
"//src/cdk/platform",
"//src/cdk/version",
"//src/material/version",
"@npm//@angular/animations",
"@npm//@angular/common",
"@npm//@angular/core",
Expand Down
15 changes: 5 additions & 10 deletions src/material/core/common-behaviors/common-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@
* found in the LICENSE file at https://angular.io/license
*/

import {NgModule, InjectionToken, Optional, Inject, isDevMode, Version} from '@angular/core';
import {NgModule, InjectionToken, Optional, Inject, isDevMode} from '@angular/core';
import {HammerLoader, HAMMER_LOADER} from '@angular/platform-browser';
import {BidiModule} from '@angular/cdk/bidi';
import {VERSION as CDK_VERSION} from '@angular/cdk';

// Private version constant to circumvent test/build issues,
// i.e. avoid core to depend on the @angular/material primary entry-point
// Can be removed once the Material primary entry-point no longer
// re-exports all secondary entry-points
const VERSION = new Version('0.0.0-PLACEHOLDER');
import {VERSION as CDK_VERSION} from '@angular/cdk/version';
import {VERSION as MAT_VERSION} from '@angular/material/version';


/** Injection token that configures whether the Material sanity checks are enabled. */
Expand Down Expand Up @@ -114,9 +109,9 @@ export class MatCommonModule {

/** Checks whether the material version matches the cdk version */
private _checkCdkVersionMatch(): void {
if (VERSION.full !== CDK_VERSION.full) {
if (MAT_VERSION.full !== CDK_VERSION.full) {
console.warn(
'The Angular Material version (' + VERSION.full + ') does not match ' +
'The Angular Material version (' + MAT_VERSION.full + ') does not match ' +
'the Angular CDK version (' + CDK_VERSION.full + ').\n' +
'Please ensure the versions of these two packages exactly match.'
);
Expand Down
9 changes: 5 additions & 4 deletions src/material/core/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* found in the LICENSE file at https://angular.io/license
*/

import {Version} from '@angular/core';

/** Current version of Angular Material. */
export const VERSION = new Version('0.0.0-PLACEHOLDER');
/**
* Current version of Angular Material.
* @deprecated @breaking-change 9.0.0 Import VERSION from @angular/material/version instead.
*/
export {VERSION} from '@angular/material/version';
Loading