Skip to content

Commit aae723d

Browse files
authored
feat(*): Upgrade to Angular 6, fix breaking changes (#83)
- Upgrade to Angular 6 and RxJS 6, plus update other dependencies - Fix breaking changes (mostly RxJS imports) - Remove unused imports - Update and simplify webpack config (upgrade to Webpack 4, remove dll stuff and other plugins) - Update jest config (verbose, ignore dist folder) - Replace custom typings file with `web-animations-js` typings Closes #82. BREAKING CHANGE: The upgrade to Angular 6 breaks compatibility with Angular 5.
1 parent 7b8bc7f commit aae723d

17 files changed

+18291
-14122
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/node_modules
33

44
# Build
5-
/build
65
/dist
76

87
# Test coverage

.travis.yml

Lines changed: 12 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@ sudo: false
44
language: node_js
55
node_js:
66
- "lts/*"
7-
cache:
8-
directories:
9-
- node_modules
7+
cache: false
108
notifications:
119
email: false
1210
branches:
1311
only:
1412
- master
1513
- develop
16-
- /^greenkeeper/.*$/
1714

1815
# Build stages
1916
stages:
@@ -27,59 +24,34 @@ jobs:
2724
include:
2825

2926
- stage: build
30-
env:
31-
- ANGULAR=5.0.x
32-
install:
33-
- npm install
34-
- npm install @angular/common@$ANGULAR @angular/core@$ANGULAR
35-
script:
36-
- npm run build:js
37-
- npm run build:sass
38-
- npm run build:css
39-
-
40-
env:
41-
- ANGULAR=5.1.x
27+
before_install:
28+
- npm install -g npm
4229
install:
43-
- npm install
44-
- npm install @angular/common@$ANGULAR @angular/core@$ANGULAR
30+
- npm ci
4531
script:
46-
- npm run build:js
47-
- npm run build:sass
48-
- npm run build:css
32+
- npm run build
4933

5034
- stage: test
51-
env:
52-
- ANGULAR=5.0.x
53-
install:
54-
- npm install
55-
- npm install @angular/common@$ANGULAR @angular/core@$ANGULAR
56-
script:
57-
- npm run test
58-
-
59-
env:
60-
- ANGULAR=5.1.x
35+
before_install:
36+
- npm install -g npm
6137
install:
62-
- npm install
63-
- npm install @angular/common@$ANGULAR @angular/core@$ANGULAR
38+
- npm ci
6439
script:
6540
- npm run test
6641
after_success:
6742
- npm run test:coverage
6843

6944
- stage: release
7045
before_install:
46+
- npm install -g npm
7147
# Clone the whole repository because we also need the develop branch for releasing (Travis only gives us the master by default)
7248
- git clone "https://github.com/$TRAVIS_REPO_SLUG.git" "$TRAVIS_REPO_SLUG";
7349
- cd "$TRAVIS_REPO_SLUG";
7450
- git checkout -qf "$TRAVIS_COMMIT";
7551
# Fix Travis CI issue of detached heads in git
7652
- git checkout master
7753
install:
78-
- npm install
79-
script:
80-
- npm run build:js
81-
- npm run build:sass
82-
- npm run build:css
54+
- npm ci
8355
before_deploy:
8456
# Login to Git to be able to make commits (required by automatic-release)
8557
- git config --global user.name "dominique-mueller";
@@ -88,6 +60,8 @@ jobs:
8860
- echo "https://$GH_TOKEN:@github.com" > .git/credentials;
8961
# Do release
9062
- npm run release
63+
- npm run build
64+
- npm run release:copy
9165
# Publish the dist folder
9266
- cd dist
9367
deploy:

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,14 @@ npm install angular-notifier
3636

3737
### Angular versions
3838

39-
The following list describes the Angular compatibility:
40-
41-
- **angular-notifier `1.x`**  is compatible with  **Angular `2.x`**
42-
- **angular-notifier `2.x`**  is compatible with  **Angular `4.x`**
43-
- **angular-notifier `3.x`**  is compatible with  **Angular `5.x`**
39+
The following list describes the compatibility with Angular:
40+
41+
| Angular Notifier | Angular |
42+
| ----------------- | ------- |
43+
| `1.x` | `2.x` |
44+
| `2.x` | `4.x` |
45+
| `3.x` | `5.x` |
46+
| `4.x` | `6.x` |
4447

4548
<br>
4649

jest.config.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
},
77
"__TRANSFORM_HTML__": true
88
},
9+
"modulePathIgnorePatterns": [
10+
"/dist/"
11+
],
912
"preset": "jest-preset-angular",
10-
"setupTestFrameworkScriptFile": "./jest.setup.ts"
13+
"setupTestFrameworkScriptFile": "./jest.setup.ts",
14+
"verbose": true
1115
}

jest.setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import 'jest-preset-angular';
77
// mocked away by Jest anyway.
88

99
// tslint:disable no-any
10-
( <any> window ).Element.prototype.animate = ( keyframes: any, options: any ): any => {
10+
( <any> window ).Element.prototype.animate = (): any => {
1111
// Nothing to implement
1212
};
1313
// tslint:enable no-any

0 commit comments

Comments
 (0)