Skip to content

Commit c62ff66

Browse files
committed
fix(bundling): switch to using umd bundles
This means that we will stop polluting the global namespace when zone.js is included. Fixes angular#456
1 parent 0ea20fa commit c62ff66

18 files changed

+177
-52
lines changed

dist/async-test.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
(function (global, factory) {
2+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3+
typeof define === 'function' && define.amd ? define(factory) :
4+
(factory());
5+
}(this, (function () { 'use strict';
6+
17
(function () {
28
var AsyncTestZoneSpec = (function () {
39
function AsyncTestZoneSpec(finishCallback, failCallback, namePrefix) {
@@ -65,4 +71,6 @@
6571
// Export the class so that new instances can be created with proper
6672
// constructor params.
6773
Zone['AsyncTestZoneSpec'] = AsyncTestZoneSpec;
68-
})();
74+
})();
75+
76+
})));

dist/fake-async-test.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
(function (global, factory) {
2+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3+
typeof define === 'function' && define.amd ? define(factory) :
4+
(factory());
5+
}(this, (function () { 'use strict';
6+
17
(function (global) {
28
var Scheduler = (function () {
39
function Scheduler() {
@@ -235,4 +241,6 @@
235241
// Export the class so that new instances can be created with proper
236242
// constructor params.
237243
Zone['FakeAsyncTestZoneSpec'] = FakeAsyncTestZoneSpec;
238-
})(typeof window === 'object' && window || typeof self === 'object' && self || global);
244+
})(typeof window === 'object' && window || typeof self === 'object' && self || global);
245+
246+
})));

dist/jasmine-patch.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
(function (global, factory) {
2+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3+
typeof define === 'function' && define.amd ? define(factory) :
4+
(factory());
5+
}(this, (function () { 'use strict';
6+
17
var __extends = (undefined && undefined.__extends) || function (d, b) {
28
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
39
function __() { this.constructor = d; }
@@ -108,4 +114,6 @@ var __extends = (undefined && undefined.__extends) || function (d, b) {
108114
};
109115
return ZoneQueueRunner;
110116
}(QueueRunner));
111-
})();
117+
})();
118+
119+
})));

dist/jasmine-patch.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/long-stack-trace-zone.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
(function (global, factory) {
2+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3+
typeof define === 'function' && define.amd ? define(factory) :
4+
(factory());
5+
}(this, (function () { 'use strict';
6+
17
(function () {
28
var NEWLINE = '\n';
39
var SEP = ' ------------- ';
@@ -129,4 +135,6 @@
129135
}
130136
}
131137
computeIgnoreFrames();
132-
})();
138+
})();
139+
140+
})));

dist/long-stack-trace-zone.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/proxy.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
(function (global, factory) {
2+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3+
typeof define === 'function' && define.amd ? define(factory) :
4+
(factory());
5+
}(this, (function () { 'use strict';
6+
17
(function () {
28
var ProxyZoneSpec = (function () {
39
function ProxyZoneSpec(defaultSpecDelegate) {
@@ -105,4 +111,6 @@
105111
// Export the class so that new instances can be created with proper
106112
// constructor params.
107113
Zone['ProxyZoneSpec'] = ProxyZoneSpec;
108-
})();
114+
})();
115+
116+
})));

dist/proxy.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/sync-test.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
(function (global, factory) {
2+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3+
typeof define === 'function' && define.amd ? define(factory) :
4+
(factory());
5+
}(this, (function () { 'use strict';
6+
17
(function () {
28
var SyncTestZoneSpec = (function () {
39
function SyncTestZoneSpec(namePrefix) {
@@ -20,4 +26,6 @@
2026
// Export the class so that new instances can be created with proper
2127
// constructor params.
2228
Zone['SyncTestZoneSpec'] = SyncTestZoneSpec;
23-
})();
29+
})();
30+
31+
})));

dist/task-tracking.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
(function (global, factory) {
2+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3+
typeof define === 'function' && define.amd ? define(factory) :
4+
(factory());
5+
}(this, (function () { 'use strict';
6+
17
/**
28
* A `TaskTrackingZoneSpec` allows one to track all outstanding Tasks.
39
*
@@ -60,4 +66,6 @@ var TaskTrackingZoneSpec = (function () {
6066
}());
6167
// Export the class so that new instances can be created with proper
6268
// constructor params.
63-
Zone['TaskTrackingZoneSpec'] = TaskTrackingZoneSpec;
69+
Zone['TaskTrackingZoneSpec'] = TaskTrackingZoneSpec;
70+
71+
})));

dist/task-tracking.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/wtf.js

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
(function (global, factory) {
2+
typeof exports === 'object' && typeof module !== 'undefined' ? factory() :
3+
typeof define === 'function' && define.amd ? define(factory) :
4+
(factory());
5+
}(this, (function () { 'use strict';
6+
17
(function (global) {
2-
;
3-
;
8+
9+
410
// Detect and setup WTF.
511
var wtfTrace = null;
612
var wtfEvents = null;
@@ -66,7 +72,7 @@
6672
instance(zonePathName(targetZone), shallowObj(task.data, 2));
6773
return retValue;
6874
};
69-
;
75+
7076
WtfZoneSpec.forkInstance = wtfEnabled && wtfEvents.createInstance('Zone:fork(ascii zone, ascii newZone)');
7177
WtfZoneSpec.scheduleInstance = {};
7278
WtfZoneSpec.cancelInstance = {};
@@ -105,4 +111,6 @@
105111
return name;
106112
}
107113
Zone['wtfZoneSpec'] = !wtfEnabled ? null : new WtfZoneSpec();
108-
})(typeof window === 'object' && window || typeof self === 'object' && self || global);
114+
})(typeof window === 'object' && window || typeof self === 'object' && self || global);
115+
116+
})));

0 commit comments

Comments
 (0)