Skip to content

Commit 0aa9e16

Browse files
ahnpnlthymikee
authored andcommitted
Update dependencies; use Angular 5 in example (#101)
1 parent 190b7bc commit 0aa9e16

File tree

10 files changed

+2338
-1196
lines changed

10 files changed

+2338
-1196
lines changed

circle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
machine:
22
environment:
3-
YARN_VERSION: 0.22.0
3+
YARN_VERSION: 1.3.2
44
PATH: "${PATH}:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin"
55
node:
6-
version: 7
6+
version: 8.9.3
77
dependencies:
88
pre:
99
- |

example/package.json

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,39 @@
1515
},
1616
"private": true,
1717
"dependencies": {
18-
"@angular/animations": "^4.1.0",
19-
"@angular/common": "^4.1.0",
20-
"@angular/compiler": "^4.1.0",
21-
"@angular/core": "^4.1.0",
22-
"@angular/forms": "^4.1.0",
23-
"@angular/http": "^4.1.0",
24-
"@angular/platform-browser": "^4.1.0",
25-
"@angular/platform-browser-dynamic": "^4.1.0",
26-
"@angular/router": "^4.1.0",
18+
"@angular/animations": "^5.0.0",
19+
"@angular/common": "^5.0.0",
20+
"@angular/compiler": "^5.0.0",
21+
"@angular/core": "^5.0.0",
22+
"@angular/forms": "^5.0.0",
23+
"@angular/http": "^5.0.0",
24+
"@angular/platform-browser": "^5.0.0",
25+
"@angular/platform-browser-dynamic": "^5.0.0",
26+
"@angular/router": "^5.0.0",
2727
"core-js": "^2.4.1",
28-
"rxjs": "^5.1.0",
28+
"rxjs": "^5.5.2",
2929
"zone.js": "^0.8.18"
3030
},
3131
"devDependencies": {
32-
"@angular/cli": "1.0.0",
33-
"@angular/compiler-cli": "^4.1.0",
32+
"@angular/cli": "1.6.1",
33+
"@angular/compiler-cli": "^5.0.0",
3434
"@types/jest": "^19.2.2",
3535
"@types/node": "~6.0.60",
36-
"codelyzer": "~2.0.0",
37-
"jasmine-core": "~2.5.2",
38-
"jasmine-spec-reporter": "~3.2.0",
36+
"codelyzer": "^4.0.1",
37+
"jasmine-core": "~2.6.2",
38+
"jasmine-spec-reporter": "~4.1.0",
3939
"jest": "^21.0.1",
40-
"jest-preset-angular": "^3.0.1",
41-
"karma": "~1.4.1",
42-
"karma-chrome-launcher": "~2.0.0",
40+
"jest-preset-angular": "^4.0.2",
41+
"karma": "~1.7.0",
42+
"karma-chrome-launcher": "~2.1.1",
4343
"karma-cli": "~1.0.1",
44-
"karma-coverage-istanbul-reporter": "^0.2.0",
44+
"karma-coverage-istanbul-reporter": "^1.2.1",
4545
"karma-jasmine": "~1.1.0",
4646
"karma-jasmine-html-reporter": "^0.2.2",
47-
"protractor": "~5.1.0",
48-
"ts-node": "~2.0.0",
49-
"tslint": "~4.5.0",
50-
"typescript": "~2.3.0"
47+
"protractor": "~5.1.2",
48+
"ts-node": "~3.2.0",
49+
"tslint": "~5.7.0",
50+
"typescript": "~2.4.2"
5151
},
5252
"jest": {
5353
"preset": "jest-preset-angular",

example/src/app/__snapshots__/app.component.spec.ts.snap

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,29 @@ exports[`AppComponent snaps 1`] = `
66
title={[Function String]}
77
variableWithPrecedingDolar={[Function Number]}
88
>
9-
<h1>
9+
<h1
10+
class="ng-tns-c1-0"
11+
>
1012
1113
app works!
1214
13-
<app-calc />
15+
<app-calc
16+
class="ng-tns-c1-0"
17+
/>
1418
1519
16-
<span>
20+
<span
21+
class="ng-tns-c1-0"
22+
>
1723
aaa $1234
1824
</span>
1925
2026
2127
22-
<span>
28+
<span
29+
class="ng-tns-c1-0 ng-star-inserted"
30+
style=""
31+
>
2332
ddd
2433
</span>
2534

example/src/app/app.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, HostBinding } from '@angular/core';
1+
import {Component, HostBinding, OnInit} from '@angular/core';
22
import {trigger, transition, style, animate} from '@angular/animations';
33

44
@Component({
@@ -7,14 +7,16 @@ import {trigger, transition, style, animate} from '@angular/animations';
77
templateUrl: './app.component.html',
88
styleUrls: ['./app.component.css'],
99
})
10-
export class AppComponent {
10+
export class AppComponent implements OnInit{
1111
@HostBinding('@routerTransition')
1212
title = 'app works!';
1313
hasClass = true;
1414
variableWithPrecedingDolar = 1234;
15+
16+
ngOnInit() {}
1517
}
1618

17-
function slideToLeft() {
19+
export function slideToLeft() {
1820
return trigger('routerTransition', [
1921
transition(':enter', [
2022
style({transform: 'translateX(200%)', position: 'fixed', width: '100%'}),

example/src/jestGlobalMocks.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
global['CSS'] = null;
2+
13
const mock = () => {
24
let storage = {};
35
return {
@@ -21,3 +23,15 @@ Object.defineProperty(window, 'getComputedStyle', {
2123
};
2224
}
2325
});
26+
/**
27+
* ISSUE: https://github.com/angular/material2/issues/7101
28+
* Workaround for JSDOM missing transform property
29+
*/
30+
Object.defineProperty(document.body.style, 'transform', {
31+
value: () => {
32+
return {
33+
enumerable: true,
34+
configurable: true,
35+
};
36+
},
37+
});

example/src/tsconfig.app.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"compilerOptions": {
44
"outDir": "../out-tsc/app",
55
"module": "es2015",
6-
"baseUrl": "",
7-
"types": []
6+
"baseUrl": ""
87
},
98
"exclude": [
109
"test.ts",

example/src/tsconfig.spec.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
"module": "commonjs",
66
"target": "es5",
77
"baseUrl": "",
8-
"types": [
9-
"jasmine",
10-
"node"
11-
],
128
"allowJs": true
139
},
1410
"files": [

0 commit comments

Comments
 (0)