Skip to content

Commit

Permalink
chore: update to 9.0.0-beta.28 with changelog (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
CaerusKaru authored Jan 27, 2020
1 parent 8099fca commit f8e9d75
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 65 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
<a name="9.0.0-beta.28"></a>
# [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)

This release adds compatibility for Angular v9, which removed some private APIs this library depended on.

### Bug Fixes

* **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))


### Features

* **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)
* 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))


### BREAKING CHANGES

* We no longer directly have a direct depedency on `tslib`. Instead it is now listed a `peerDependency`.

Users not using the CLI will need to manually install `tslib` via;
```
yarn add tslib
```
or
```
npm install tslib --save
```

<a name="8.0.0-beta.27"></a>
# [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)

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"universal:serve": "gulp universal:serve",
"postinstall": "ngcc --properties es2015 browser module main --create-ivy-entry-points"
},
"version": "8.0.0-beta.27",
"version": "9.0.0-beta.28",
"requiredAngularVersion": ">=9.0.0-rc.11",
"dependencies": {
"@angular/cdk": "^9.0.0-rc.8",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/media-observer/media-observer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class MediaObserver implements OnDestroy {
/**
* @deprecated Use `asObservable()` instead.
* @breaking-change 8.0.0-beta.25
* @deletion-target v8.0.0-beta.26
* @deletion-target 10.0.0
*/
readonly media$: Observable<MediaChange>;

Expand Down
2 changes: 1 addition & 1 deletion src/lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/angular/flex-layout#readme",
"peerDependencies": {
"@angular/cdk": "^9.0.0-rc.0",
"@angular/cdk": "^9.0.0-rc.8",
"@angular/core": "0.0.0-NG",
"@angular/common": "0.0.0-NG",
"@angular/platform-browser": "0.0.0-NG",
Expand Down
62 changes: 0 additions & 62 deletions tools/tslint-rules/deletionTargetRule.ts

This file was deleted.

38 changes: 38 additions & 0 deletions tools/tslint-rules/requireBreakingChangeVersionRule.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import * as ts from 'typescript';
import * as Lint from 'tslint';
import * as utils from 'tsutils';

/** Doc tag that can be used to indicate a breaking change. */
const BREAKING_CHANGE = '@breaking-change';

/** Name of the old doc tag that was being used to indicate a breaking change. */
const DELETION_TARGET = '@deletion-target';

/**
* Rule that ensures that comments, indicating a deprecation
* or a breaking change, have a valid version.
*/
export class Rule extends Lint.Rules.AbstractRule {
apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
return this.applyWithFunction(sourceFile, (ctx: Lint.WalkContext<any>) => {
utils.forEachComment(ctx.sourceFile, (file, {pos, end}) => {
const commentText = file.substring(pos, end);

// TODO(crisbeto): remove this check once most of the pending
// PRs start using `breaking-change`.
if (commentText.indexOf(DELETION_TARGET) > -1) {
ctx.addFailure(pos, end, `${DELETION_TARGET} has been replaced with ${BREAKING_CHANGE}.`);
return;
}

const hasBreakingChange = commentText.indexOf(BREAKING_CHANGE) > -1;

if (!hasBreakingChange && commentText.indexOf('@deprecated') > -1) {
ctx.addFailure(pos, end, `@deprecated marker has to have a ${BREAKING_CHANGE}.`);
} if (hasBreakingChange && !/\d+\.\d+\.\d+/.test(commentText)) {
ctx.addFailure(pos, end, `${BREAKING_CHANGE} must have a version.`);
}
});
});
}
}

0 comments on commit f8e9d75

Please sign in to comment.