Skip to content

Commit 3759a83

Browse files
committed
feat(core): update angular-cli to 1.0.0-beta.31 and yarn to 0.20.0
1 parent f7073ab commit 3759a83

File tree

6 files changed

+387
-470
lines changed

6 files changed

+387
-470
lines changed

angular-cli.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"project": {
3-
"version": "1.0.0-beta.30",
3+
"version": "1.0.0-beta.31",
44
"name": "shardis"
55
},
66
"apps": [
77
{
88
"root": "src/main/typescript",
99
"outDir": "src/main/resources/static",
1010
"assets": [
11-
"assets",
12-
"favicon.ico"
13-
],
11+
"assets",
12+
"favicon.ico"
13+
],
1414
"index": "index.html",
1515
"main": "main.ts",
1616
"polyfills": "polyfills.ts",
@@ -22,7 +22,8 @@
2222
"../../../node_modules/clarity-ui/clarity-ui.min.css",
2323
"styles.scss"
2424
],
25-
"scripts": [],
25+
"scripts": [
26+
],
2627
"environments": {
2728
"source": "environments/environment.ts",
2829
"dev": "environments/environment.ts",
@@ -65,5 +66,6 @@
6566
"pipe": true,
6667
"service": true
6768
}
68-
}
69+
},
70+
"packageManager": "yarn"
6971
}

build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import org.gradle.api.tasks.bundling.Jar
55
import org.gradle.api.tasks.testing.Test
66
import org.gradle.language.jvm.tasks.ProcessResources
77
import org.gradle.plugins.ide.idea.model.IdeaModel
8-
import org.gradle.plugins.ide.idea.model.IdeaModule
98
import org.gradle.testing.jacoco.tasks.JacocoReport
109
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
1110

@@ -85,7 +84,7 @@ configure<IdeaModel>{
8584

8685
configure<NodeExtension> {
8786
version = "7.5.0"
88-
yarnVersion = "0.19.1"
87+
yarnVersion = "0.20.0"
8988
download = true
9089
workDir = file("${project.buildDir}/nodejs")
9190
yarnWorkDir = file("${project.buildDir}/yarn")

karma.conf.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = function (config) {
88
plugins: [
99
require('karma-jasmine'),
1010
require('karma-chrome-launcher'),
11-
require('karma-remap-istanbul'),
11+
require('karma-coverage-istanbul-reporter'),
1212
require('@angular/cli/plugins/karma')
1313
],
1414
files: [
@@ -20,18 +20,16 @@ module.exports = function (config) {
2020
mime: {
2121
'text/x-typescript': ['ts', 'tsx']
2222
},
23-
remapIstanbulReporter: {
24-
reports: {
25-
html: 'coverage',
26-
lcovonly: './coverage/coverage.lcov'
27-
}
23+
coverageIstanbulReporter: {
24+
reports: ['html', 'lcovonly'],
25+
fixWebpackSourcePaths: true
2826
},
2927
angularCli: {
3028
config: './angular-cli.json',
3129
environment: 'dev'
3230
},
3331
reporters: config.angularCli && config.angularCli.codeCoverage
34-
? ['progress', 'karma-remap-istanbul']
32+
? ['progress', 'coverage-istanbul']
3533
: ['progress'],
3634
port: 9876,
3735
colors: true,

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"zone.js": "0.7.6"
4242
},
4343
"devDependencies": {
44-
"@angular/cli": "1.0.0-beta.30",
44+
"@angular/cli": "1.0.0-beta.31",
4545
"@angular/compiler-cli": "2.4.7",
4646
"@types/jasmine": "2.5.41",
4747
"@types/node": "7.0.5",
@@ -55,13 +55,13 @@
5555
"karma-chrome-launcher": "2.0.0",
5656
"karma-cli": "1.0.1",
5757
"karma-jasmine": "1.1.0",
58-
"karma-remap-istanbul": "0.6.0",
58+
"karma-coverage-istanbul-reporter": "0.2.0",
5959
"protractor": "5.1.1",
6060
"rimraf": "2.5.4",
6161
"ts-node": "2.1.0",
6262
"tslint": "4.4.2",
6363
"typescript": "2.1.6",
64-
"yarn": "0.19.1"
64+
"yarn": "0.20.0"
6565
},
6666
"scripts": {
6767
"clean": "yarn cache clean && rimraf coverage src/main/resources/static/*",
@@ -93,6 +93,6 @@
9393
},
9494
"engines": {
9595
"node": ">= 7.0.0",
96-
"yarn": ">= 0.18.0"
96+
"yarn": ">= 0.20.0"
9797
}
9898
}

src/main/typescript/app/core/store/auth/auth.reducer.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import '@ngrx/core/add/operator/select';
22
import 'rxjs/add/operator/map';
33
import 'rxjs/add/operator/let';
44
import {AuthState, initialState} from './auth.state';
5-
import {Actions, ActionTypes} from './auth.actions';
5+
import {Actions, ActionTypes, ProcessTokenAction, AuthErrorAction} from './auth.actions';
66
import {AuthService} from './auth.service';
77

88
export function authReducer(state = initialState, action: Actions): AuthState {
@@ -12,16 +12,18 @@ export function authReducer(state = initialState, action: Actions): AuthState {
1212
return Object.assign({}, initialState);
1313

1414
case ActionTypes.PROCESS_TOKEN:
15-
const userData = AuthService.decodeAccessToken(action.jwtToken);
15+
const processTokenAction: ProcessTokenAction = action as ProcessTokenAction;
16+
const userData = AuthService.decodeAccessToken(processTokenAction.jwtToken);
1617
return Object.assign({}, initialState, {
1718
authenticated: true,
1819
tokenExpirationDate: new Date(userData.exp * 1000),
1920
userData: userData,
20-
jwtToken: action.jwtToken
21+
jwtToken: processTokenAction.jwtToken
2122
});
2223

2324
case ActionTypes.AUTH_ERROR:
24-
return Object.assign({}, userData, {error: action.error});
25+
const authErrorAction: AuthErrorAction = action as AuthErrorAction;
26+
return Object.assign({}, userData, {error: authErrorAction.error});
2527

2628
case ActionTypes.CLEAR_AUTH_ERROR:
2729
return Object.assign({}, userData, {error: null});

0 commit comments

Comments
 (0)