Skip to content

Commit 9b53927

Browse files
committed
Backport ng-cli 1.7.x modifications
1 parent 11162d1 commit 9b53927

File tree

5 files changed

+1161
-827
lines changed

5 files changed

+1161
-827
lines changed

package.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,30 @@
2929
"url": "https://github.com/mpalourdio/ng-http-loader/issues"
3030
},
3131
"peerDependencies": {
32-
"@angular/common": "^5.0.0",
33-
"@angular/core": "^5.0.0",
34-
"rxjs": "^5.5.2"
32+
"@angular/common": "^5.2.0",
33+
"@angular/core": "^5.2.0",
34+
"rxjs": "^5.5.6"
3535
},
3636
"devDependencies": {
37-
"@angular/cli": "^1.6.0",
38-
"@angular/common": "^5.0.0",
39-
"@angular/compiler": "^5.0.0",
40-
"@angular/compiler-cli": "^5.0.0",
41-
"@angular/core": "^5.0.0",
42-
"@angular/language-service": "^5.0.0",
43-
"@angular/platform-browser": "^5.0.0",
44-
"@angular/platform-browser-dynamic": "^5.0.0",
45-
"@types/jasmine": "~2.5.53",
37+
"@angular/cli": "^1.7.0",
38+
"@angular/common": "^5.2.0",
39+
"@angular/compiler": "^5.2.0",
40+
"@angular/compiler-cli": "^5.2.0",
41+
"@angular/core": "^5.2.0",
42+
"@angular/language-service": "^5.2.0",
43+
"@angular/platform-browser": "^5.2.0",
44+
"@angular/platform-browser-dynamic": "^5.2.0",
45+
"@types/jasmine": "~2.8.3",
4646
"@types/jasminewd2": "~2.0.2",
4747
"@types/node": "~6.0.60",
4848
"codelyzer": "^4.0.1",
4949
"core-js": "^2.4.1",
5050
"gulp": "^3.9.1",
5151
"gulp-clean": "^0.3.2",
5252
"gulp-inline-ng2-template": "^4.0.0",
53-
"jasmine-core": "~2.6.2",
54-
"jasmine-spec-reporter": "~4.1.0",
55-
"karma": "~1.7.0",
53+
"jasmine-core": "~2.8.0",
54+
"jasmine-spec-reporter": "~4.2.1",
55+
"karma": "~2.0.0",
5656
"karma-chrome-launcher": "~2.2.0",
5757
"karma-cli": "~1.0.1",
5858
"karma-coverage-istanbul-reporter": "^1.2.1",
@@ -61,10 +61,10 @@
6161
"karma-phantomjs-launcher": "^1.0.4",
6262
"phantomjs-prebuilt": "^2.1.14",
6363
"protractor": "~5.1.2",
64-
"rxjs": "^5.5.2",
65-
"ts-node": "~3.2.0",
66-
"tslint": "~5.7.0",
67-
"typescript": "~2.4.2",
68-
"zone.js": "^0.8.14"
64+
"rxjs": "^5.5.6",
65+
"ts-node": "~4.1.0",
66+
"tslint": "~5.9.1",
67+
"typescript": "~2.5.3",
68+
"zone.js": "^0.8.19"
6969
}
7070
}

polyfills.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,23 @@ import 'core-js/es7/reflect';
5252
**/
5353
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
5454

55+
/**
56+
* By default, zone.js will patch all possible macroTask and DomEvents
57+
* user can disable parts of macroTask/DomEvents patch by setting following flags
58+
*/
59+
60+
// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
61+
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
62+
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
5563

64+
/*
65+
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
66+
* with the following flag, it will bypass `zone.js` patch for IE/Edge
67+
*/
68+
// (window as any).__Zone_enable_cross_context_check = true;
5669

5770
/***************************************************************************************************
58-
* Zone JS is required by Angular itself.
71+
* Zone JS is required by default for Angular itself.
5972
*/
6073
import 'zone.js/dist/zone'; // Included with Angular CLI.
6174

test.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
11
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
22

3-
import 'zone.js/dist/long-stack-trace-zone';
4-
import 'zone.js/dist/proxy.js';
5-
import 'zone.js/dist/sync-test';
6-
import 'zone.js/dist/jasmine-patch';
7-
import 'zone.js/dist/async-test';
8-
import 'zone.js/dist/fake-async-test';
3+
import 'zone.js/dist/zone-testing';
94
import { getTestBed } from '@angular/core/testing';
105
import {
116
BrowserDynamicTestingModule,
127
platformBrowserDynamicTesting
138
} from '@angular/platform-browser-dynamic/testing';
149

15-
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
16-
declare const __karma__: any;
1710
declare const require: any;
1811

19-
// Prevent Karma from running prematurely.
20-
__karma__.loaded = function () {};
21-
2212
// First, initialize the Angular testing environment.
2313
getTestBed().initTestEnvironment(
2414
BrowserDynamicTestingModule,
@@ -28,5 +18,3 @@ getTestBed().initTestEnvironment(
2818
const context = require.context('./test/', true, /\.spec\.ts$/);
2919
// And load the modules.
3020
context.keys().map(context);
31-
// Finally, start Karma to run the tests.
32-
__karma__.start();

tslint.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@
107107
"variable-declaration": "nospace"
108108
}
109109
],
110-
"typeof-compare": true,
111110
"unified-signatures": true,
112111
"variable-name": false,
113112
"whitespace": [

0 commit comments

Comments
 (0)