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

Commit 5234d69

Browse files
authored
build: upgrade to Angular and Material v7 and add strict flags (#855)
* 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
1 parent 76c110e commit 5234d69

File tree

71 files changed

+7610
-7662
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+7610
-7662
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ jobs:
2222
# Download and cache dependencies
2323
- restore_cache:
2424
keys:
25-
- v1-dependencies-{{ checksum "package.json" }}
25+
- v1-dependencies-{{ checksum "yarn.lock" }}
2626
# fallback to using the latest cache if no exact match is found
2727
- v1-dependencies-
2828

29-
- run: npm install
29+
- run: yarn install --frozen-lockfile --non-interactive
3030

3131
- save_cache:
3232
paths:
3333
- node_modules
34-
key: v1-dependencies-{{ checksum "package.json" }}
34+
key: v1-dependencies-{{ checksum "yarn.lock" }}
3535

3636
# run the build!
3737
- run: npm run lib:build

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ before_install:
5050
- source ./scripts/ci/env.sh
5151

5252
install:
53-
- npm install
53+
- yarn install --frozen-lockfile --non-interactive
5454

5555
before_script:
5656
- mkdir -p $LOGS_DIR
@@ -59,5 +59,6 @@ script:
5959
- ./scripts/ci/travis-script.sh
6060

6161
cache:
62+
yarn: true
6263
directories:
6364
- ./node_modules/

package-lock.json

Lines changed: 6999 additions & 6800 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"universal:serve": "gulp universal:serve"
2727
},
2828
"version": "6.0.0-beta.18",
29-
"requiredAngularVersion": ">=6.0.0 <7.0.0",
29+
"requiredAngularVersion": ">=7.0.0-rc.0",
3030
"dependencies": {
3131
"@angular/cdk": "^6.4.7",
3232
"@angular/common": "^6.1.6",
@@ -66,7 +66,7 @@
6666
"cli-color": "^1.3.0",
6767
"dgeni": "^0.4.10",
6868
"dgeni-packages": "^0.26.7",
69-
"firebase": "^4.13.1",
69+
"firebase": "^5.5.2",
7070
"firebase-admin": "^5.13.1",
7171
"firebase-tools": "^4.2.1",
7272
"fs-extra": "^3.0.1",

src/lib/core/base/base-adapter.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {MediaMonitor} from '../media-monitor/media-monitor';
1212
import {StyleUtils} from '../style-utils/style-utils';
1313

1414
describe('BaseDirectiveAdapter class', () => {
15-
let component;
15+
let component: any;
1616
beforeEach(() => {
1717
component = new BaseDirectiveAdapter('', {} as MediaMonitor, {} as ElementRef, {} as StyleUtils); // tslint:disable-line:max-line-length
1818
});

src/lib/core/base/base-adapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class BaseDirectiveAdapter extends BaseDirective {
4040
* @see BaseDirective._mqActivation
4141
*/
4242
get mqActivation(): ResponsiveActivation {
43-
return this._mqActivation;
43+
return this._mqActivation!;
4444
}
4545

4646
/**
@@ -64,7 +64,7 @@ export class BaseDirectiveAdapter extends BaseDirective {
6464
/**
6565
* @see BaseDirective._queryInput
6666
*/
67-
queryInput(key) {
67+
queryInput(key: string | null) {
6868
return key ? this._queryInput(key) : undefined;
6969
}
7070

src/lib/core/base/base-legacy.ts

Lines changed: 0 additions & 282 deletions
This file was deleted.

src/lib/core/base/base.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export abstract class BaseDirective implements OnDestroy, OnChanges {
108108
}
109109

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

@@ -218,19 +218,19 @@ export abstract class BaseDirective implements OnDestroy, OnChanges {
218218
}
219219

220220
/** Fast validator for presence of attribute on the host element */
221-
protected hasKeyValue(key) {
222-
return this._mqActivation.hasKeyValue(key);
221+
protected hasKeyValue(key: string) {
222+
return this._mqActivation!.hasKeyValue(key);
223223
}
224224

225225
protected get hasInitialized() {
226226
return this._hasInitialized;
227227
}
228228

229229
/** MediaQuery Activation Tracker */
230-
protected _mqActivation: ResponsiveActivation;
230+
protected _mqActivation?: ResponsiveActivation;
231231

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

235235
/**
236236
* Has the `ngOnInit()` method fired

0 commit comments

Comments
 (0)