Skip to content

Commit

Permalink
fix: add support for Angular 8
Browse files Browse the repository at this point in the history
  • Loading branch information
asyncLiz committed Jun 17, 2019
1 parent a9c1b78 commit b72cae9
Show file tree
Hide file tree
Showing 10 changed files with 3,069 additions and 2,445 deletions.
2 changes: 1 addition & 1 deletion forms/src/forms.module.spec.ts
Expand Up @@ -12,7 +12,7 @@ describe('forms', () => {
template: '<paper-input [(ngModel)]="value" origami></paper-input>'
})
class AppComponent {
@ViewChild(OrigamiControlValueAccessor)
@ViewChild(OrigamiControlValueAccessor, { static: true })
accessor?: OrigamiControlValueAccessor;
value = 'foo';
}
Expand Down
2 changes: 1 addition & 1 deletion forms/src/value-accessor.spec.ts
Expand Up @@ -29,7 +29,7 @@ describe('forms', () => {
localStorage.setItem('vaadin.statistics.optout', 'true');

class BaseWithAccessor {
@ViewChild(OrigamiControlValueAccessor)
@ViewChild(OrigamiControlValueAccessor, { static: true })
accessor?: OrigamiControlValueAccessor;
}

Expand Down
5,459 changes: 3,041 additions & 2,418 deletions package-lock.json

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions package.json
Expand Up @@ -61,22 +61,23 @@
"yargs": "^12.0.1"
},
"peerDependencies": {
"@angular/core": "^5.0.0-rc.0 || ^5.0.0 || ^6.0.0-rc.0 || ^6.0.0 || ^7.0.0-rc.0 || ^7.0.0",
"@angular/forms": "^5.0.0-rc.0 || ^5.0.0 || ^6.0.0-rc.0 || ^6.0.0 || ^7.0.0-rc.0 || ^7.0.0",
"@angular/router": "^5.0.0-rc.0 || ^5.0.0 || ^6.0.0-rc.0 || ^6.0.0 || ^7.0.0-rc.0 || ^7.0.0",
"@angular/core": "^5.0.0-rc.0 || ^5.0.0 || ^6.0.0-rc.0 || ^6.0.0 || ^7.0.0-rc.0 || ^7.0.0 || ^8.0.0-rc.0 || ^8.0.0",
"@angular/common": "^5.0.0-rc.0 || ^5.0.0 || ^6.0.0-rc.0 || ^6.0.0 || ^7.0.0-rc.0 || ^7.0.0 || ^8.0.0-rc.0 || ^8.0.0",
"@angular/forms": "^5.0.0-rc.0 || ^5.0.0 || ^6.0.0-rc.0 || ^6.0.0 || ^7.0.0-rc.0 || ^7.0.0 || ^8.0.0-rc.0 || ^8.0.0",
"@angular/router": "^5.0.0-rc.0 || ^5.0.0 || ^6.0.0-rc.0 || ^6.0.0 || ^7.0.0-rc.0 || ^7.0.0 || ^8.0.0-rc.0 || ^8.0.0",
"@polymer/polymer": "^3.0.5",
"@webcomponents/webcomponentsjs": "^2.0.4",
"tslib": "^1.7.0"
},
"devDependencies": {
"@angular/common": "^7.0.0",
"@angular/compiler": "^7.0.0",
"@angular/compiler-cli": "^7.0.0",
"@angular/core": "^7.0.0",
"@angular/forms": "^7.0.0",
"@angular/platform-browser": "^7.0.0",
"@angular/platform-browser-dynamic": "^7.0.0",
"@angular/router": "^7.0.0",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/compiler-cli": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/forms": "^8.0.0",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0",
"@polymer/paper-checkbox": "^3.1.0",
"@polymer/paper-input": "^3.0.1",
"@polymer/paper-item": "^3.0.1",
Expand Down Expand Up @@ -105,14 +106,15 @@
"karma-typescript": "^4.0.0-beta.3",
"karma-typescript-es6-transform": "^4.0.0-beta.3",
"lint-staged": "^7.2.0",
"ng-packagr": "^4.7.0",
"ng-packagr": "^5.3.0",
"prettier": "^1.16.3",
"rxjs": "^6.5.2",
"standard-version": "^4.4.0",
"tsickle": "^0.34.0",
"tsickle": "^0.35.0",
"tslib": "^1.9.3",
"typescript": "^3.1.1",
"typescript": "^3.4.5",
"xhr-mock": "^2.4.1",
"zone.js": "^0.8.26"
"zone.js": "^0.9.1"
},
"engine": {
"node": ">=8.0.0"
Expand Down
1 change: 1 addition & 0 deletions styles/src/modules/inject-styles.spec.ts
Expand Up @@ -82,6 +82,7 @@ describe('styles', () => {
})
class EmulatedModule {}

debugger;
TestBed.configureTestingModule({
imports: [EmulatedModule, RouterTestingModule.withRoutes([])],
providers: [INJECT_STYLES_PROVIDER]
Expand Down
2 changes: 1 addition & 1 deletion styles/src/modules/inject-styles.ts
Expand Up @@ -124,6 +124,6 @@ export function patchRendererFactory(factory: RendererFactory2) {
INJECTED_SELECTORS.push(selector);
}

return $createRenderer.apply(this, arguments);
return $createRenderer.apply(this, <any>arguments);
};
}
6 changes: 2 additions & 4 deletions styles/src/shadycss/shared-styles-host.ts
@@ -1,8 +1,6 @@
import { Inject, Optional, Provider } from '@angular/core';
import {
DOCUMENT,
ɵDomSharedStylesHost as DomSharedStylesHost
} from '@angular/platform-browser';
import { DOCUMENT } from '@angular/common';
import { ɵDomSharedStylesHost as DomSharedStylesHost } from '@angular/platform-browser';
import { USING_APPLY, processStylesheets } from './process-stylesheets';

// First group is incorrect escape backslash, second group is rest of mixin detection
Expand Down
2 changes: 1 addition & 1 deletion templates/src/shim-template-append.ts
Expand Up @@ -30,7 +30,7 @@ export function shimHTMLTemplateAppend(): Promise<void> {
if (this.content) {
return this.content.appendChild(childNode);
} else {
return nativeAppend.apply(this, [childNode]);
return <T>nativeAppend.apply(this, [childNode]);
}
};
};
Expand Down
6 changes: 3 additions & 3 deletions templates/src/template.directive.spec.ts
Expand Up @@ -49,9 +49,9 @@ describe('templates', () => {
customElements.define(CustomElement.is, CustomElement);

class RepeatComponent {
@ViewChild(TemplateDirective)
@ViewChild(TemplateDirective, { static: true })
template!: TemplateDirective;
@ViewChild('repeat')
@ViewChild('repeat', { static: true })
repeatRef!: ElementRef;
items = [1, 2, 3];
}
Expand Down Expand Up @@ -244,7 +244,7 @@ describe('templates', () => {
this.elementRef.nativeElement,
'addEventListener'
).and.callThrough();
return $enablePropertyBindings.apply(this, arguments);
return $enablePropertyBindings.apply(this, <any>arguments);
}
);

Expand Down
2 changes: 1 addition & 1 deletion templates/src/template.module.spec.ts
Expand Up @@ -21,7 +21,7 @@ describe('templates', () => {
template: '<template></template>'
})
class TestComponent {
@ViewChild(TemplateDirective)
@ViewChild(TemplateDirective, { static: true })
templateDirective?: TemplateDirective;
}

Expand Down

0 comments on commit b72cae9

Please sign in to comment.