Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.

Commit a7f151b

Browse files
author
Burak Tasci
authored
feat: upgrade to angular 5 (#53)
* feat: upgrade to angular 5 * chore(packages): add request * chore(package): update deps * chore(package): update deps * upgrade to Angular 5
1 parent 1d08333 commit a7f151b

File tree

8 files changed

+741
-616
lines changed

8 files changed

+741
-616
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ Server platform loaders [ngx-translate]
1111
> Please support this project by simply putting a Github star. Share this library with friends on Twitter and everywhere else you can.
1212
1313
#### NOTICE
14-
> This *[4.x.x] branch* is intented to work with `@angular v4.x.x`. If you're developing on a later release of **Angular**
15-
than `v4.x.x`, then you should probably choose the appropriate version of this library by visiting the *[master] branch*.
14+
> This *[5.x.x] branch* is intented to work with `@angular v5.x.x`. If you're developing on a later release of **Angular**
15+
than `v5.x.x`, then you should probably choose the appropriate version of this library by visiting the *[master] branch*.
1616

1717
## Packages:
1818
Name | Description | NPM
@@ -32,10 +32,10 @@ If you want to file a bug, contribute some code, or improve documentation, pleas
3232
## License
3333
The MIT License (MIT)
3434

35-
Copyright (c) 2017 [Burak Tasci]
35+
Copyright (c) 2018 [Burak Tasci]
3636

3737
[master]: https://github.com/ngx-translate/core/tree/master
38-
[4.x.x]: https://github.com/ngx-translate/core/tree/4.x.x
38+
[5.x.x]: https://github.com/ngx-translate/core/tree/5.x.x
3939
[ngx-translate]: https://github.com/ngx-translate/core
4040
[ng-seed/universal]: https://github.com/ng-seed/universal
4141
[Burak Tasci]: https://github.com/fulls1z3

package.json

+19-18
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,34 @@
2828
"release": "standard-version"
2929
},
3030
"devDependencies": {
31-
"@angular/common": "~4.4.4",
32-
"@angular/compiler": "~4.4.4",
33-
"@angular/compiler-cli": "~4.4.4",
34-
"@angular/core": "~4.4.4",
35-
"core-js": "~2.5.1",
36-
"rxjs": "~5.4.3",
37-
"zone.js": "~0.8.18",
38-
"@ngx-translate/core": "~6.0.1",
31+
"@angular/common": "5.1.2",
32+
"@angular/compiler": "5.1.2",
33+
"@angular/compiler-cli": "5.1.2",
34+
"@angular/core": "5.1.2",
35+
"core-js": "~2.5.3",
36+
"rxjs": "~5.5.6",
37+
"zone.js": "~0.8.19",
38+
"request": "~2.83.0",
39+
"@ngx-translate/core": "~9.0.2",
3940
"@ngx-cache/core": "4.0.1",
40-
"@types/node": "~8.0.32",
41-
"@types/jest": "~21.1.2",
41+
"@types/node": "~8.5.7",
42+
"@types/jest": "~22.0.1",
4243
"rimraf": "~2.6.2",
43-
"ts-node": "~3.3.0",
44+
"ts-node": "~4.1.0",
4445
"glob": "~7.1.2",
4546
"camelcase": "~4.1.0",
4647
"rollup": "~0.42.0",
4748
"rollup-plugin-node-resolve": "~3.0.0",
48-
"rollup-plugin-commonjs": "~8.2.1",
49+
"rollup-plugin-commonjs": "~8.2.6",
4950
"rollup-plugin-sourcemaps": "~0.4.2",
5051
"rollup-plugin-uglify": "~2.0.1",
51-
"jest": "~21.2.1",
52-
"jest-preset-angular": "~4.0.0",
52+
"jest": "~22.0.4",
53+
"jest-preset-angular": "~5.0.0",
5354
"jest-junit-reporter": "~1.1.0",
54-
"standard-version": "~4.2.0",
55-
"codelyzer": "~3.2.0",
56-
"tslint": "~5.7.0",
57-
"angular-tslint-rules": "1.0.4",
55+
"standard-version": "~4.3.0",
56+
"codelyzer": "~4.0.2",
57+
"tslint": "~5.8.0",
58+
"angular-tslint-rules": "1.1.0",
5859
"typescript": "~2.5.3"
5960
},
6061
"jest": {

packages/@ngx-universal/translate-loader/README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Loader for [ngx-translate] that provides application settings to **browser**/**s
1010
> Please support this project by simply putting a Github star. Share this library with friends on Twitter and everywhere else you can.
1111
1212
#### NOTICE
13-
> This *[4.x.x] branch* is intented to work with `@angular v4.x.x`. If you're developing on a later release of **Angular**
14-
than `v4.x.x`, then you should probably choose the appropriate version of this library by visiting the *[master] branch*.
13+
> This *[5.x.x] branch* is intented to work with `@angular v5.x.x`. If you're developing on a later release of **Angular**
14+
than `v5.x.x`, then you should probably choose the appropriate version of this library by visiting the *[master] branch*.
1515

1616
## Table of contents:
1717
- [Prerequisites](#prerequisites)
@@ -27,7 +27,7 @@ than `v4.x.x`, then you should probably choose the appropriate version of this l
2727
## <a name="prerequisites"></a> Prerequisites
2828
This library depends on `Angular v4.0.0`. Older versions contain outdated dependencies, might produce errors.
2929

30-
Also, please ensure that you are using **`Typescript v2.3.4`** or higher.
30+
Also, please ensure that you are using **`Typescript v2.5.3`** or higher.
3131

3232
## <a name="getting-started"></a> Getting started
3333
### <a name="installation"></a> Installation
@@ -65,12 +65,13 @@ the imports property of **app.module**.
6565
#### app.module.ts
6666
```TypeScript
6767
...
68+
import { HttpClient } from '@angular/common/http';
6869
import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
6970
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
7071
import { UniversalTranslateLoader } from '@ngx-universal/translate-loader';
7172
...
7273

73-
export function translateFactory(platformId: any, http: Http): TranslateLoader {
74+
export function translateFactory(platformId: any, http: HttpClient): TranslateLoader {
7475
const browserLoader = new TranslateHttpLoader(http);
7576

7677
return new UniversalTranslateLoader(platformId, browserLoader, './public/assets/i18n');
@@ -112,10 +113,10 @@ export class AppModule {
112113
## <a name="license"></a> License
113114
The MIT License (MIT)
114115

115-
Copyright (c) 2017 [Burak Tasci]
116+
Copyright (c) 2018 [Burak Tasci]
116117

117118
[master]: https://github.com/ngx-translate/core/tree/master
118-
[4.x.x]: https://github.com/ngx-translate/core/tree/4.x.x
119+
[5.x.x]: https://github.com/ngx-translate/core/tree/5.x.x
119120
[ngx-translate]: https://github.com/ngx-translate/core
120121
[ng-seed/universal]: https://github.com/ng-seed/universal
121122
[@ngx-translate/http-loader]: https://github.com/ngx-translate/http-loader

packages/@ngx-universal/translate-loader/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ngx-universal/translate-loader",
3-
"version": "4.0.1",
3+
"version": "5.0.0",
44
"description": "Loader for ngx-translate that provides translations to browser/server platforms",
55
"repository": {
66
"type": "git",
@@ -31,12 +31,12 @@
3131
"es2015": "./@ngx-universal/translate-loader.js",
3232
"typings": "./translate-loader.d.ts",
3333
"dependencies": {
34-
"tslib": "~1.7.1"
34+
"tslib": "~1.8.1"
3535
},
3636
"peerDependencies": {
37-
"@angular/common": ">=4.0.0 <5.0.0",
38-
"rxjs": ">=5.0.1",
39-
"@ngx-translate/core": ">=6.0.1",
40-
"@ngx-cache/core": ">=4.0.0 <5.0.0"
37+
"@angular/common": ">=5.0.0 <6.0.0",
38+
"rxjs": ">=5.5.0",
39+
"@ngx-translate/core": ">=8.0.0",
40+
"@ngx-cache/core": ">=5.0.0 <6.0.0"
4141
}
4242
}

tools/build/rollup.ts

+16-18
Original file line numberDiff line numberDiff line change
@@ -76,24 +76,22 @@ const build = (group: string, item: string, settings: any) => {
7676
// tslint:disable-next-line
7777
.then(() => console.log(`>>> ${group}/${item}: Inlining succeeded`))
7878
)
79-
.then(() => ngc({project: `${paths.temp}/tsconfig.es2015.json`})
80-
.then(exitCode => new Promise((res, reject) => {
81-
exitCode === 0
82-
? res()
83-
: reject();
84-
}))
85-
// tslint:disable-next-line
86-
.then(() => console.log(`>>> ${group}/${item}: ES2015 compilation succeeded`))
87-
)
88-
.then(() => ngc({project: `${paths.temp}/tsconfig.es5.json`})
89-
.then(exitCode => new Promise((res, reject) => {
90-
exitCode === 0
91-
? res()
92-
: reject();
93-
}))
94-
// tslint:disable-next-line
95-
.then(() => console.log(`>>> ${group}/${item}: ES5 compilation succeeded`))
96-
)
79+
.then(() => ngc(['--project', `${paths.temp}/tsconfig.es2015.json`]))
80+
.then(exitCode => new Promise((res, reject) => {
81+
exitCode === 0
82+
? res()
83+
: reject();
84+
}))
85+
// tslint:disable-next-line
86+
.then(() => console.log(`>>> ${group}/${item}: ES2015 compilation succeeded`))
87+
.then(() => ngc(['--project', `${paths.temp}/tsconfig.es5.json`]))
88+
.then(exitCode => new Promise((res, reject) => {
89+
exitCode === 0
90+
? res()
91+
: reject();
92+
}))
93+
// tslint:disable-next-line
94+
.then(() => console.log(`>>> ${group}/${item}: ES5 compilation succeeded`))
9795
.then(() => Promise.resolve()
9896
.then(() => relativeCopy('**/*.d.ts', paths.es2015, paths.dist))
9997
.then(() => relativeCopy('**/*.metadata.json', paths.es2015, paths.dist))

tools/tslint.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": [
3+
"../tslint.json"
4+
],
5+
"rules": {
6+
"no-implicit-dependencies": [
7+
true,
8+
"dev"
9+
]
10+
}
11+
}

tslint.json

+10-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,14 @@
22
"rulesDirectory": [
33
"node_modules/codelyzer"
44
],
5-
"extends": ["angular-tslint-rules"]
5+
"extends": [
6+
"angular-tslint-rules"
7+
],
8+
"rules": {
9+
"pipe-naming": [
10+
true,
11+
"camelCase",
12+
"config"
13+
]
14+
}
615
}

0 commit comments

Comments
 (0)