Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit f8e9d75

Browse files
authored
chore: update to 9.0.0-beta.28 with changelog (#1179)
1 parent 8099fca commit f8e9d75

File tree

6 files changed

+70
-65
lines changed

6 files changed

+70
-65
lines changed

CHANGELOG.md

+29
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
<a name="9.0.0-beta.28"></a>
2+
# [9.0.0-beta.28](https://github.com/angular/flex-layout/compare/8.0.0-beta.27...9.0.0-beta.28) (2020-01-27)
3+
4+
This release adds compatibility for Angular v9, which removed some private APIs this library depended on.
5+
6+
### Bug Fixes
7+
8+
* **ssr:** reset class counter to zero before each render ([#1153](https://github.com/angular/flex-layout/issues/1153)) ([d062708](https://github.com/angular/flex-layout/commit/d062708))
9+
10+
11+
### Features
12+
13+
* **core:** support beforeprint and afterprint hooks ([#1080](https://github.com/angular/flex-layout/issues/1080)) ([8302998](https://github.com/angular/flex-layout/commit/8302998)), closes [#603](https://github.com/angular/flex-layout/issues/603)
14+
* change tslib from direct dependency to peerDependency ([#1132](https://github.com/angular/flex-layout/issues/1132)) ([06268b8](https://github.com/angular/flex-layout/commit/06268b8))
15+
16+
17+
### BREAKING CHANGES
18+
19+
* We no longer directly have a direct depedency on `tslib`. Instead it is now listed a `peerDependency`.
20+
21+
Users not using the CLI will need to manually install `tslib` via;
22+
```
23+
yarn add tslib
24+
```
25+
or
26+
```
27+
npm install tslib --save
28+
```
29+
130
<a name="8.0.0-beta.27"></a>
231
# [8.0.0-beta.27](https://github.com/angular/flex-layout/compare/8.0.0-beta.26...8.0.0-beta.27) (2019-08-30)
332

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"universal:serve": "gulp universal:serve",
2828
"postinstall": "ngcc --properties es2015 browser module main --create-ivy-entry-points"
2929
},
30-
"version": "8.0.0-beta.27",
30+
"version": "9.0.0-beta.28",
3131
"requiredAngularVersion": ">=9.0.0-rc.11",
3232
"dependencies": {
3333
"@angular/cdk": "^9.0.0-rc.8",

src/lib/core/media-observer/media-observer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export class MediaObserver implements OnDestroy {
6666
/**
6767
* @deprecated Use `asObservable()` instead.
6868
* @breaking-change 8.0.0-beta.25
69-
* @deletion-target v8.0.0-beta.26
69+
* @deletion-target 10.0.0
7070
*/
7171
readonly media$: Observable<MediaChange>;
7272

src/lib/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
},
2424
"homepage": "https://github.com/angular/flex-layout#readme",
2525
"peerDependencies": {
26-
"@angular/cdk": "^9.0.0-rc.0",
26+
"@angular/cdk": "^9.0.0-rc.8",
2727
"@angular/core": "0.0.0-NG",
2828
"@angular/common": "0.0.0-NG",
2929
"@angular/platform-browser": "0.0.0-NG",

tools/tslint-rules/deletionTargetRule.ts

-62
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import * as ts from 'typescript';
2+
import * as Lint from 'tslint';
3+
import * as utils from 'tsutils';
4+
5+
/** Doc tag that can be used to indicate a breaking change. */
6+
const BREAKING_CHANGE = '@breaking-change';
7+
8+
/** Name of the old doc tag that was being used to indicate a breaking change. */
9+
const DELETION_TARGET = '@deletion-target';
10+
11+
/**
12+
* Rule that ensures that comments, indicating a deprecation
13+
* or a breaking change, have a valid version.
14+
*/
15+
export class Rule extends Lint.Rules.AbstractRule {
16+
apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
17+
return this.applyWithFunction(sourceFile, (ctx: Lint.WalkContext<any>) => {
18+
utils.forEachComment(ctx.sourceFile, (file, {pos, end}) => {
19+
const commentText = file.substring(pos, end);
20+
21+
// TODO(crisbeto): remove this check once most of the pending
22+
// PRs start using `breaking-change`.
23+
if (commentText.indexOf(DELETION_TARGET) > -1) {
24+
ctx.addFailure(pos, end, `${DELETION_TARGET} has been replaced with ${BREAKING_CHANGE}.`);
25+
return;
26+
}
27+
28+
const hasBreakingChange = commentText.indexOf(BREAKING_CHANGE) > -1;
29+
30+
if (!hasBreakingChange && commentText.indexOf('@deprecated') > -1) {
31+
ctx.addFailure(pos, end, `@deprecated marker has to have a ${BREAKING_CHANGE}.`);
32+
} if (hasBreakingChange && !/\d+\.\d+\.\d+/.test(commentText)) {
33+
ctx.addFailure(pos, end, `${BREAKING_CHANGE} must have a version.`);
34+
}
35+
});
36+
});
37+
}
38+
}

0 commit comments

Comments
 (0)