Skip to content

Commit cf7c0a7

Browse files
committed
refactor(version): Create version subpackage for @angular/material, @angular/cdk, @angular/cdk-experimental and @angular/material-experimental
1 parent 933d44c commit cf7c0a7

29 files changed

+291
-22
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
/src/material/toolbar/** @devversion
3838
/src/material/tooltip/** @andrewseguin
3939
/src/material/tree/** @jelbourn @andrewseguin
40+
/src/material/version/** @josephperrott
4041

4142
# Angular Material core
4243
/src/material/core/* @jelbourn
@@ -78,6 +79,7 @@
7879
/src/cdk/testing/** @devversion
7980
/src/cdk/text-field/** @mmalerba
8081
/src/cdk/tree/** @jelbourn @andrewseguin
82+
/src/cdk/version/** @josephperrott
8183

8284
# Moment adapter package
8385
/src/material-moment-adapter/** @mmalerba
@@ -95,13 +97,15 @@
9597
/src/material-experimental/mdc-slide-toggle/** @crisbeto
9698
/src/material-experimental/mdc-tabs/** @crisbeto
9799
/src/material-experimental/popover-edit/** @kseamon @andrewseguin
100+
/src/material-experimental/version/** @josephperrott
98101

99102
# CDK experimental package
100103
/src/cdk-experimental/** @jelbourn
101104
/src/cdk-experimental/dialog/** @jelbourn @josephperrott @crisbeto
102105
/src/cdk-experimental/popover-edit/** @kseamon @andrewseguin
103106
/src/cdk-experimental/scrolling/** @mmalerba
104107
/src/cdk-experimental/testing/** @mmalerba
108+
/src/cdk-experimental/version/** @josephperrott
105109

106110
# Docs examples & guides
107111
/guides/** @jelbourn

packages.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ CDK_PACKAGES = [
2020
"tree",
2121
]
2222

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

2525
CDK_EXPERIMENTAL_PACKAGES = [
2626
"dialog",
2727
"popover-edit",
2828
"scrolling",
2929
]
3030

31-
CDK_EXPERIMENTAL_TARGETS = ["//src/cdk-experimental"] + [
31+
CDK_EXPERIMENTAL_TARGETS = ["//src/cdk-experimental", "//src/cdk-experimental/version"] + [
3232
"//src/cdk-experimental/%s" % p
3333
for p in CDK_EXPERIMENTAL_PACKAGES
3434
]
@@ -71,7 +71,7 @@ MATERIAL_PACKAGES = [
7171
"tree",
7272
]
7373

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

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

96-
MATERIAL_EXPERIMENTAL_TARGETS = ["//src/material-experimental"] + [
96+
MATERIAL_EXPERIMENTAL_TARGETS = ["//src/material-experimental", "//src/material-experimental/version"] + [
9797
"//src/material-experimental/%s" % p
9898
for p in MATERIAL_EXPERIMENTAL_PACKAGES
9999
]

src/cdk-experimental/version.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@
88

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

11-
/** Current version of the CDK Experimental package. */
11+
/**
12+
* Current version of the CDK Experimental package.
13+
* @deprecated @breaking-change 9.0.0 Import VERSION from @angular/cdk-experimental/version
14+
* instead.
15+
*/
1216
export const VERSION = new Version('0.0.0-PLACEHOLDER');
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package(default_visibility = ["//visibility:public"])
2+
3+
load("//tools:defaults.bzl", "ts_library")
4+
5+
ts_library(
6+
name = "version",
7+
srcs = glob(
8+
["**/*.ts"],
9+
),
10+
module_name = "@angular/cdk-experimental/version",
11+
deps = [
12+
"@npm//@angular/core",
13+
],
14+
)
15+
16+
filegroup(
17+
name = "source-files",
18+
srcs = glob(["**/*.ts"]),
19+
)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
export * from './public-api';
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
export * from './version';
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "../tsconfig-build",
3+
"files": [
4+
"public-api.ts"
5+
],
6+
"angularCompilerOptions": {
7+
"annotateForClosureCompiler": true,
8+
"strictMetadataEmit": true,
9+
"flatModuleOutFile": "index.js",
10+
"flatModuleId": "@angular/cdk-experimental/version",
11+
"skipTemplateCodegen": true,
12+
"fullTemplateTypeCheck": true
13+
}
14+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* @license
3+
* Copyright Google LLC All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
9+
import {Version} from '@angular/core';
10+
11+
/** Current version of Angular CDK Experimental. */
12+
export const VERSION = new Version('0.0.0-PLACEHOLDER');

src/cdk/version.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@
88

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

11-
/** Current version of the Angular Component Development Kit. */
11+
/**
12+
* Current version of the Angular Component Development Kit.
13+
* @deprecated @breaking-change 9.0.0 Import VERSION from @angular/cdk/version instead.
14+
*/
1215
export const VERSION = new Version('0.0.0-PLACEHOLDER');

src/cdk/version/BUILD.bazel

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package(default_visibility = ["//visibility:public"])
2+
3+
load("//tools:defaults.bzl", "ts_library")
4+
5+
ts_library(
6+
name = "version",
7+
srcs = glob(
8+
["**/*.ts"],
9+
),
10+
module_name = "@angular/cdk/version",
11+
deps = [
12+
"@npm//@angular/core",
13+
],
14+
)
15+
16+
filegroup(
17+
name = "source-files",
18+
srcs = glob(["**/*.ts"]),
19+
)

0 commit comments

Comments
 (0)