Skip to content

Commit

Permalink
build: upgrade to Angular and Material v7 and add strict flags (#855)
Browse files Browse the repository at this point in the history
* Upgrade to Angular v7
* Upgrade to Angular Material v7
* Add nostrictPropertyInitialization flag
* Add noUnusedLocals flag and remove tslint option
* Add noImplicitThis flag
* Add noImplicitAny flag
* Enable strictMetadataEmit flag
* Various refactors to support the above flags
* Switch to yarn

Fixes #851
  • Loading branch information
CaerusKaru authored Oct 5, 2018
1 parent 76c110e commit 5234d69
Show file tree
Hide file tree
Showing 71 changed files with 7,610 additions and 7,662 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ jobs:
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-{{ checksum "yarn.lock" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: npm install
- run: yarn install --frozen-lockfile --non-interactive

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
key: v1-dependencies-{{ checksum "yarn.lock" }}

# run the build!
- run: npm run lib:build
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ before_install:
- source ./scripts/ci/env.sh

install:
- npm install
- yarn install --frozen-lockfile --non-interactive

before_script:
- mkdir -p $LOGS_DIR
Expand All @@ -59,5 +59,6 @@ script:
- ./scripts/ci/travis-script.sh

cache:
yarn: true
directories:
- ./node_modules/
13,799 changes: 6,999 additions & 6,800 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"universal:serve": "gulp universal:serve"
},
"version": "6.0.0-beta.18",
"requiredAngularVersion": ">=6.0.0 <7.0.0",
"requiredAngularVersion": ">=7.0.0-rc.0",
"dependencies": {
"@angular/cdk": "^6.4.7",
"@angular/common": "^6.1.6",
Expand Down Expand Up @@ -66,7 +66,7 @@
"cli-color": "^1.3.0",
"dgeni": "^0.4.10",
"dgeni-packages": "^0.26.7",
"firebase": "^4.13.1",
"firebase": "^5.5.2",
"firebase-admin": "^5.13.1",
"firebase-tools": "^4.2.1",
"fs-extra": "^3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/core/base/base-adapter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {MediaMonitor} from '../media-monitor/media-monitor';
import {StyleUtils} from '../style-utils/style-utils';

describe('BaseDirectiveAdapter class', () => {
let component;
let component: any;
beforeEach(() => {
component = new BaseDirectiveAdapter('', {} as MediaMonitor, {} as ElementRef, {} as StyleUtils); // tslint:disable-line:max-line-length
});
Expand Down
4 changes: 2 additions & 2 deletions src/lib/core/base/base-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class BaseDirectiveAdapter extends BaseDirective {
* @see BaseDirective._mqActivation
*/
get mqActivation(): ResponsiveActivation {
return this._mqActivation;
return this._mqActivation!;
}

/**
Expand All @@ -64,7 +64,7 @@ export class BaseDirectiveAdapter extends BaseDirective {
/**
* @see BaseDirective._queryInput
*/
queryInput(key) {
queryInput(key: string | null) {
return key ? this._queryInput(key) : undefined;
}

Expand Down
282 changes: 0 additions & 282 deletions src/lib/core/base/base-legacy.ts

This file was deleted.

10 changes: 5 additions & 5 deletions src/lib/core/base/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export abstract class BaseDirective implements OnDestroy, OnChanges {
}

/** Access the current value (if any) of the @Input property */
protected _queryInput(key) {
protected _queryInput(key: string) {
return this._inputMap[key];
}

Expand Down Expand Up @@ -218,19 +218,19 @@ export abstract class BaseDirective implements OnDestroy, OnChanges {
}

/** Fast validator for presence of attribute on the host element */
protected hasKeyValue(key) {
return this._mqActivation.hasKeyValue(key);
protected hasKeyValue(key: string) {
return this._mqActivation!.hasKeyValue(key);
}

protected get hasInitialized() {
return this._hasInitialized;
}

/** MediaQuery Activation Tracker */
protected _mqActivation: ResponsiveActivation;
protected _mqActivation?: ResponsiveActivation;

/** Dictionary of input keys with associated values */
protected _inputMap = {};
protected _inputMap: {[key: string]: any} = {};

/**
* Has the `ngOnInit()` method fired
Expand Down
Loading

0 comments on commit 5234d69

Please sign in to comment.