Skip to content
Permalink
Browse files

feat: upgrade to angular 8

BREAKING CHANGE: angular 8 breaks the original behavior of ViewChild (and the library depends on it)
  • Loading branch information...
smnbbrv committed Jul 22, 2019
1 parent a28249c commit f4a831e2df86ff288e21ffc5bf8edba93e59da6f
File renamed without changes.

Large diffs are not rendered by default.

@@ -16,54 +16,53 @@
},
"private": true,
"dependencies": {
"@angular/animations": "~7.2.1",
"@angular/cdk": "^7.2.1",
"@angular/common": "~7.2.1",
"@angular/compiler": "~7.2.1",
"@angular/core": "~7.2.1",
"@angular/flex-layout": "^7.0.0-beta.23",
"@angular/forms": "~7.2.1",
"@angular/http": "~7.2.1",
"@angular/material": "^7.2.1",
"@angular/platform-browser": "~7.2.1",
"@angular/platform-browser-dynamic": "~7.2.1",
"@angular/router": "~7.2.1",
"@types/hls.js": "^0.12.0",
"core-js": "^2.6.2",
"dashjs": "^2.9.2",
"@angular/animations": "~8.1.2",
"@angular/cdk": "^8.1.1",
"@angular/common": "~8.1.2",
"@angular/compiler": "~8.1.2",
"@angular/core": "~8.1.2",
"@angular/flex-layout": "^8.0.0-beta.26",
"@angular/forms": "~8.1.2",
"@angular/material": "^8.1.1",
"@angular/platform-browser": "~8.1.2",
"@angular/platform-browser-dynamic": "~8.1.2",
"@angular/router": "~8.1.2",
"@types/hls.js": "^0.12.4",
"core-js": "^2.6.9",
"dashjs": "^2.9.3",
"hammerjs": "^2.0.8",
"hls.js": "^0.12.2",
"plyr": "^3.5.4",
"rxjs": "~6.3.3",
"zone.js": "^0.8.28"
"hls.js": "^0.12.4",
"plyr": "^3.5.6",
"rxjs": "~6.5.2",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.12.2",
"@angular-devkit/build-ng-packagr": "~0.12.2",
"@angular/cli": "~7.2.2",
"@angular/compiler-cli": "~7.2.1",
"@angular/language-service": "~7.2.1",
"@semantic-release/changelog": "^3.0.2",
"@semantic-release/git": "^7.0.8",
"@types/jasmine": "^3.3.6",
"@angular-devkit/build-angular": "~0.801.2",
"@angular-devkit/build-ng-packagr": "~0.801.2",
"@angular/cli": "~8.1.2",
"@angular/compiler-cli": "~8.1.2",
"@angular/language-service": "~8.1.2",
"@semantic-release/changelog": "^3.0.4",
"@semantic-release/git": "^7.0.16",
"@types/jasmine": "^3.3.14",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~10.12.18",
"codelyzer": "~4.5.0",
"coveralls": "^3.0.2",
"@types/node": "^10.12.30",
"codelyzer": "^5.0.1",
"coveralls": "^3.0.5",
"jasmine-core": "~3.3.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.4",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-coverage-istanbul-reporter": "^2.0.6",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"ng-packagr": "^4.6.0",
"karma-jasmine-html-reporter": "^1.4.2",
"ng-packagr": "^5.1.0",
"protractor": "^5.4.2",
"semantic-release": "^15.13.3",
"semantic-release": "^15.13.18",
"ts-node": "~7.0.0",
"tsickle": ">=0.29.0",
"tslib": "^1.9.0",
"tsickle": "^0.35.0",
"tslib": "^1.10.0",
"tslint": "~5.12.1",
"typescript": "~3.2.4"
"typescript": "~3.4.5"
}
}
@@ -16,8 +16,8 @@
"url": "https://github.com/smnbbrv/ngx-plyr"
},
"peerDependencies": {
"@angular/common": ">=6.0.0",
"@angular/core": ">=6.0.0",
"@angular/common": ">=8.0.0",
"@angular/core": ">=8.0.0",
"plyr": "^3.4.7"
},
"publishConfig": {
@@ -44,7 +44,7 @@ export class PlyrComponent implements AfterViewInit, OnChanges, OnDestroy {

@Input() private plyrOptions: Plyr.Options;

@ViewChild('v') private vr: ElementRef;
@ViewChild('v', { static: false }) private vr: ElementRef;

// ngx-plyr events
@Output() plyrInit = this.playerChange.pipe(filter(player => !!player)) as EventEmitter<Plyr>;
@@ -10,7 +10,7 @@ import { PlyrComponent } from '../../projects/ngx-plyr/src/lib/plyr/plyr.compone
export class AppComponent {

// get the component instance to have access to plyr instance
@ViewChild(PlyrComponent)
@ViewChild(PlyrComponent, { static: true })
plyr: PlyrComponent;

// or get it from plyrInit event
@@ -1,5 +1,9 @@
import { NgModule } from '@angular/core';
import { MatCardModule, MatButtonModule, MatToolbarModule, MatIconModule, MatDividerModule } from '@angular/material';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatDividerModule } from '@angular/material/divider';
import { MatIconModule } from '@angular/material/icon';
import { MatToolbarModule } from '@angular/material/toolbar';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { PlyrModule } from '../../projects/ngx-plyr/src/public_api';
@@ -1,6 +1,10 @@
import { NgModule } from '@angular/core';
import { FlexLayoutModule } from '@angular/flex-layout';
import { MatButtonModule, MatCardModule, MatDividerModule, MatIconModule, MatToolbarModule } from '@angular/material';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { MatDividerModule } from '@angular/material/divider';
import { MatIconModule } from '@angular/material/icon';
import { MatToolbarModule } from '@angular/material/toolbar';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { PlyrModule } from '../../projects/ngx-plyr/src/public_api';

@@ -18,57 +18,40 @@
* BROWSER POLYFILLS
*/

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';

/**
* If the application will be indexed by Google Search, the following is required.
* Googlebot uses a renderer based on Chrome 41.
* https://developers.google.com/search/docs/guides/rendering
**/
// import 'core-js/es6/array';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';

/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
**/
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.

/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/

// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames

/*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*/
// (window as any).__Zone_enable_cross_context_check = true;

/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
@@ -2,15 +2,16 @@
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"downlevelIteration": true,
"importHelpers": true,
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"module": "es2015",
"module": "esnext",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"target": "es2015",
"typeRoots": [
"node_modules/@types",
"typings"
@@ -121,12 +121,12 @@
"check-type"
],
"no-output-on-prefix": true,
"use-input-property-decorator": true,
"use-output-property-decorator": true,
"use-host-property-decorator": true,
"no-inputs-metadata-property": true,
"no-outputs-metadata-property": true,
"no-host-metadata-property": true,
"no-input-rename": true,
"no-output-rename": true,
"use-life-cycle-interface": true,
"use-lifecycle-interface": true,
"use-pipe-transform-interface": true,
"component-class-suffix": true,
"directive-class-suffix": true

0 comments on commit f4a831e

Please sign in to comment.
You can’t perform that action at this time.