feat(zone.js): move all zone optional bundles to plugins folders (#36540)

Zone.js has a lot of optional bundles, such as `zone-patch-message-port`, those
bundles are monkey patch for specified APIs usually for soem experimental APIs or
some old APIs only available for specified platforms. Those bundles will not be
loaded by default.

In this commit, since we have several main `sub packages` such as `zone`, `zone-node`,
`zone-testing`, I put all the optional bundles under `plugins` folders for consistency.

PR Close #36540
This commit is contained in:
JiaLiPassion 2020-06-09 23:12:21 +09:00 committed by Misko Hevery
parent 583a9d38a1
commit b199ef6bfc
59 changed files with 537 additions and 0 deletions

View File

@ -82,6 +82,7 @@ pkg_npm(
":LICENSE_copy", ":LICENSE_copy",
":zone_externs", ":zone_externs",
"//packages/zone.js/dist:dist_bundle_group", "//packages/zone.js/dist:dist_bundle_group",
"//packages/zone.js/plugins:plugin_bundle_group",
] + [ ] + [
"//packages/zone.js/bundles:" + b + "-es5.dist" "//packages/zone.js/bundles:" + b + "-es5.dist"
for b in BUNDLES_ENTRY_POINTS.keys() for b in BUNDLES_ENTRY_POINTS.keys()

View File

@ -0,0 +1,63 @@
package(default_visibility = ["//visibility:public"])
filegroup(
name = "plugin_bundle_group",
srcs = [
"//packages/zone.js/plugins:async-test.min/package.json",
"//packages/zone.js/plugins:async-test/package.json",
"//packages/zone.js/plugins:fake-async-test.min/package.json",
"//packages/zone.js/plugins:fake-async-test/package.json",
"//packages/zone.js/plugins:jasmine-patch.min/package.json",
"//packages/zone.js/plugins:jasmine-patch/package.json",
"//packages/zone.js/plugins:long-stack-trace-zone.min/package.json",
"//packages/zone.js/plugins:long-stack-trace-zone/package.json",
"//packages/zone.js/plugins:mocha-patch.min/package.json",
"//packages/zone.js/plugins:mocha-patch/package.json",
"//packages/zone.js/plugins:proxy.min/package.json",
"//packages/zone.js/plugins:proxy/package.json",
"//packages/zone.js/plugins:sync-test.min/package.json",
"//packages/zone.js/plugins:sync-test/package.json",
"//packages/zone.js/plugins:task-tracking.min/package.json",
"//packages/zone.js/plugins:task-tracking/package.json",
"//packages/zone.js/plugins:webapis-media-query.min/package.json",
"//packages/zone.js/plugins:webapis-media-query/package.json",
"//packages/zone.js/plugins:webapis-notification.min/package.json",
"//packages/zone.js/plugins:webapis-notification/package.json",
"//packages/zone.js/plugins:webapis-rtc-peer-connection.min/package.json",
"//packages/zone.js/plugins:webapis-rtc-peer-connection/package.json",
"//packages/zone.js/plugins:webapis-shadydom.min/package.json",
"//packages/zone.js/plugins:webapis-shadydom/package.json",
"//packages/zone.js/plugins:wtf.min/package.json",
"//packages/zone.js/plugins:wtf/package.json",
"//packages/zone.js/plugins:zone-bluebird.min/package.json",
"//packages/zone.js/plugins:zone-bluebird/package.json",
"//packages/zone.js/plugins:zone-error.min/package.json",
"//packages/zone.js/plugins:zone-error/package.json",
"//packages/zone.js/plugins:zone-legacy.min/package.json",
"//packages/zone.js/plugins:zone-legacy/package.json",
"//packages/zone.js/plugins:zone-patch-canvas.min/package.json",
"//packages/zone.js/plugins:zone-patch-canvas/package.json",
"//packages/zone.js/plugins:zone-patch-cordova.min/package.json",
"//packages/zone.js/plugins:zone-patch-cordova/package.json",
"//packages/zone.js/plugins:zone-patch-electron.min/package.json",
"//packages/zone.js/plugins:zone-patch-electron/package.json",
"//packages/zone.js/plugins:zone-patch-fetch.min/package.json",
"//packages/zone.js/plugins:zone-patch-fetch/package.json",
"//packages/zone.js/plugins:zone-patch-jsonp.min/package.json",
"//packages/zone.js/plugins:zone-patch-jsonp/package.json",
"//packages/zone.js/plugins:zone-patch-message-port.min/package.json",
"//packages/zone.js/plugins:zone-patch-message-port/package.json",
"//packages/zone.js/plugins:zone-patch-promise-test.min/package.json",
"//packages/zone.js/plugins:zone-patch-promise-test/package.json",
"//packages/zone.js/plugins:zone-patch-resize-observer.min/package.json",
"//packages/zone.js/plugins:zone-patch-resize-observer/package.json",
"//packages/zone.js/plugins:zone-patch-rxjs.min/package.json",
"//packages/zone.js/plugins:zone-patch-rxjs-fake-async.min/package.json",
"//packages/zone.js/plugins:zone-patch-rxjs-fake-async/package.json",
"//packages/zone.js/plugins:zone-patch-rxjs/package.json",
"//packages/zone.js/plugins:zone-patch-socket-io.min/package.json",
"//packages/zone.js/plugins:zone-patch-socket-io/package.json",
"//packages/zone.js/plugins:zone-patch-user-media.min/package.json",
"//packages/zone.js/plugins:zone-patch-user-media/package.json",
],
)

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/async-test.min",
"main": "../../bundles/async-test.umd.min.js",
"fesm2015": "../../fesm2015/async-test.min.js",
"es2015": "../../fesm2015/async-test.min.js",
"module": "../../fesm2015/async-test.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/async-test",
"main": "../../bundles/async-test.umd.js",
"fesm2015": "../../fesm2015/async-test.js",
"es2015": "../../fesm2015/async-test.js",
"module": "../../fesm2015/async-test.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/fake-async-test.min",
"main": "../../bundles/fake-async-test.umd.min.js",
"fesm2015": "../../fesm2015/fake-async-test.min.js",
"es2015": "../../fesm2015/fake-async-test.min.js",
"module": "../../fesm2015/fake-async-test.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/fake-async-test",
"main": "../../bundles/fake-async-test.umd.js",
"fesm2015": "../../fesm2015/fake-async-test.js",
"es2015": "../../fesm2015/fake-async-test.js",
"module": "../../fesm2015/fake-async-test.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/jasmine-patch.min",
"main": "../../bundles/jasmine-patch.umd.min.js",
"fesm2015": "../../fesm2015/jasmine-patch.min.js",
"es2015": "../../fesm2015/jasmine-patch.min.js",
"module": "../../fesm2015/jasmine-patch.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/jasmine-patch",
"main": "../../bundles/jasmine-patch.umd.js",
"fesm2015": "../../fesm2015/jasmine-patch.js",
"es2015": "../../fesm2015/jasmine-patch.js",
"module": "../../fesm2015/jasmine-patch.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/long-stack-trace-zone.min",
"main": "../../bundles/long-stack-trace-zone.umd.min.js",
"fesm2015": "../../fesm2015/long-stack-trace-zone.min.js",
"es2015": "../../fesm2015/long-stack-trace-zone.min.js",
"module": "../../fesm2015/long-stack-trace-zone.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/long-stack-trace-zone",
"main": "../../bundles/long-stack-trace-zone.umd.js",
"fesm2015": "../../fesm2015/long-stack-trace-zone.js",
"es2015": "../../fesm2015/long-stack-trace-zone.js",
"module": "../../fesm2015/long-stack-trace-zone.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/mocha-patch.min",
"main": "../../bundles/mocha-patch.umd.min.js",
"fesm2015": "../../fesm2015/mocha-patch.min.js",
"es2015": "../../fesm2015/mocha-patch.min.js",
"module": "../../fesm2015/mocha-patch.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/mocha-patch",
"main": "../../bundles/mocha-patch.umd.js",
"fesm2015": "../../fesm2015/mocha-patch.js",
"es2015": "../../fesm2015/mocha-patch.js",
"module": "../../fesm2015/mocha-patch.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/proxy.min",
"main": "../../bundles/proxy.umd.min.js",
"fesm2015": "../../fesm2015/proxy.min.js",
"es2015": "../../fesm2015/proxy.min.js",
"module": "../../fesm2015/proxy.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/proxy",
"main": "../../bundles/proxy.umd.js",
"fesm2015": "../../fesm2015/proxy.js",
"es2015": "../../fesm2015/proxy.js",
"module": "../../fesm2015/proxy.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/sync-test.min",
"main": "../../bundles/sync-test.umd.min.js",
"fesm2015": "../../fesm2015/sync-test.min.js",
"es2015": "../../fesm2015/sync-test.min.js",
"module": "../../fesm2015/sync-test.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/sync-test",
"main": "../../bundles/sync-test.umd.js",
"fesm2015": "../../fesm2015/sync-test.js",
"es2015": "../../fesm2015/sync-test.js",
"module": "../../fesm2015/sync-test.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/task-tracking.min",
"main": "../../bundles/task-tracking.umd.min.js",
"fesm2015": "../../fesm2015/task-tracking.min.js",
"es2015": "../../fesm2015/task-tracking.min.js",
"module": "../../fesm2015/task-tracking.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/task-tracking",
"main": "../../bundles/task-tracking.umd.js",
"fesm2015": "../../fesm2015/task-tracking.js",
"es2015": "../../fesm2015/task-tracking.js",
"module": "../../fesm2015/task-tracking.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/webapis-media-query.min",
"main": "../../bundles/webapis-media-query.umd.min.js",
"fesm2015": "../../fesm2015/webapis-media-query.min.js",
"es2015": "../../fesm2015/webapis-media-query.min.js",
"module": "../../fesm2015/webapis-media-query.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/webapis-media-query",
"main": "../../bundles/webapis-media-query.umd.js",
"fesm2015": "../../fesm2015/webapis-media-query.js",
"es2015": "../../fesm2015/webapis-media-query.js",
"module": "../../fesm2015/webapis-media-query.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/webapis-notification.min",
"main": "../../bundles/webapis-notification.umd.min.js",
"fesm2015": "../../fesm2015/webapis-notification.min.js",
"es2015": "../../fesm2015/webapis-notification.min.js",
"module": "../../fesm2015/webapis-notification.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/webapis-notification",
"main": "../../bundles/webapis-notification.umd.js",
"fesm2015": "../../fesm2015/webapis-notification.js",
"es2015": "../../fesm2015/webapis-notification.js",
"module": "../../fesm2015/webapis-notification.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/webapis-rtc-peer-connection.min",
"main": "../../bundles/webapis-rtc-peer-connection.umd.min.js",
"fesm2015": "../../fesm2015/webapis-rtc-peer-connection.min.js",
"es2015": "../../fesm2015/webapis-rtc-peer-connection.min.js",
"module": "../../fesm2015/webapis-rtc-peer-connection.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/webapis-rtc-peer-connection",
"main": "../../bundles/webapis-rtc-peer-connection.umd.js",
"fesm2015": "../../fesm2015/webapis-rtc-peer-connection.js",
"es2015": "../../fesm2015/webapis-rtc-peer-connection.js",
"module": "../../fesm2015/webapis-rtc-peer-connection.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/webapis-shadydom.min",
"main": "../../bundles/webapis-shadydom.umd.min.js",
"fesm2015": "../../fesm2015/webapis-shadydom.min.js",
"es2015": "../../fesm2015/webapis-shadydom.min.js",
"module": "../../fesm2015/webapis-shadydom.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/webapis-shadydom",
"main": "../../bundles/webapis-shadydom.umd.js",
"fesm2015": "../../fesm2015/webapis-shadydom.js",
"es2015": "../../fesm2015/webapis-shadydom.js",
"module": "../../fesm2015/webapis-shadydom.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/wtf.min",
"main": "../../bundles/wtf.umd.min.js",
"fesm2015": "../../fesm2015/wtf.min.js",
"es2015": "../../fesm2015/wtf.min.js",
"module": "../../fesm2015/wtf.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/wtf",
"main": "../../bundles/wtf.umd.js",
"fesm2015": "../../fesm2015/wtf.js",
"es2015": "../../fesm2015/wtf.js",
"module": "../../fesm2015/wtf.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-bluebird.min",
"main": "../../bundles/zone-bluebird.umd.min.js",
"fesm2015": "../../fesm2015/zone-bluebird.min.js",
"es2015": "../../fesm2015/zone-bluebird.min.js",
"module": "../../fesm2015/zone-bluebird.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-bluebird",
"main": "../../bundles/zone-bluebird.umd.js",
"fesm2015": "../../fesm2015/zone-bluebird.js",
"es2015": "../../fesm2015/zone-bluebird.js",
"module": "../../fesm2015/zone-bluebird.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-error.min",
"main": "../../bundles/zone-error.umd.min.js",
"fesm2015": "../../fesm2015/zone-error.min.js",
"es2015": "../../fesm2015/zone-error.min.js",
"module": "../../fesm2015/zone-error.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-error",
"main": "../../bundles/zone-error.umd.js",
"fesm2015": "../../fesm2015/zone-error.js",
"es2015": "../../fesm2015/zone-error.js",
"module": "../../fesm2015/zone-error.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-legacy.min",
"main": "../../bundles/zone-legacy.umd.min.js",
"fesm2015": "../../fesm2015/zone-legacy.min.js",
"es2015": "../../fesm2015/zone-legacy.min.js",
"module": "../../fesm2015/zone-legacy.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-legacy",
"main": "../../bundles/zone-legacy.umd.js",
"fesm2015": "../../fesm2015/zone-legacy.js",
"es2015": "../../fesm2015/zone-legacy.js",
"module": "../../fesm2015/zone-legacy.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-canvas.min",
"main": "../../bundles/zone-patch-canvas.umd.min.js",
"fesm2015": "../../fesm2015/zone-patch-canvas.min.js",
"es2015": "../../fesm2015/zone-patch-canvas.min.js",
"module": "../../fesm2015/zone-patch-canvas.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-canvas",
"main": "../../bundles/zone-patch-canvas.umd.js",
"fesm2015": "../../fesm2015/zone-patch-canvas.js",
"es2015": "../../fesm2015/zone-patch-canvas.js",
"module": "../../fesm2015/zone-patch-canvas.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-cordova.min",
"main": "../../bundles/zone-patch-cordova.umd.min.js",
"fesm2015": "../../fesm2015/zone-patch-cordova.min.js",
"es2015": "../../fesm2015/zone-patch-cordova.min.js",
"module": "../../fesm2015/zone-patch-cordova.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-cordova",
"main": "../../bundles/zone-patch-cordova.umd.js",
"fesm2015": "../../fesm2015/zone-patch-cordova.js",
"es2015": "../../fesm2015/zone-patch-cordova.js",
"module": "../../fesm2015/zone-patch-cordova.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-electron.min",
"main": "../../bundles/zone-patch-electron.umd.min.js",
"fesm2015": "../../fesm2015/zone-patch-electron.min.js",
"es2015": "../../fesm2015/zone-patch-electron.min.js",
"module": "../../fesm2015/zone-patch-electron.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-electron",
"main": "../../bundles/zone-patch-electron.umd.js",
"fesm2015": "../../fesm2015/zone-patch-electron.js",
"es2015": "../../fesm2015/zone-patch-electron.js",
"module": "../../fesm2015/zone-patch-electron.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-fetch.min",
"main": "../../bundles/zone-patch-fetch.umd.min.js",
"fesm2015": "../../fesm2015/zone-patch-fetch.min.js",
"es2015": "../../fesm2015/zone-patch-fetch.min.js",
"module": "../../fesm2015/zone-patch-fetch.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-fetch",
"main": "../../bundles/zone-patch-fetch.umd.js",
"fesm2015": "../../fesm2015/zone-patch-fetch.js",
"es2015": "../../fesm2015/zone-patch-fetch.js",
"module": "../../fesm2015/zone-patch-fetch.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-jsonp.min",
"main": "../../bundles/zone-patch-jsonp.umd.min.js",
"fesm2015": "../../fesm2015/zone-patch-jsonp.min.js",
"es2015": "../../fesm2015/zone-patch-jsonp.min.js",
"module": "../../fesm2015/zone-patch-jsonp.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-jsonp",
"main": "../../bundles/zone-patch-jsonp.umd.js",
"fesm2015": "../../fesm2015/zone-patch-jsonp.js",
"es2015": "../../fesm2015/zone-patch-jsonp.js",
"module": "../../fesm2015/zone-patch-jsonp.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-message-port.min",
"main": "../../bundles/zone-patch-message-port.umd.min.js",
"fesm2015": "../../fesm2015/zone-patch-message-port.min.js",
"es2015": "../../fesm2015/zone-patch-message-port.min.js",
"module": "../../fesm2015/zone-patch-message-port.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-message-port",
"main": "../../bundles/zone-patch-message-port.umd.js",
"fesm2015": "../../fesm2015/zone-patch-message-port.js",
"es2015": "../../fesm2015/zone-patch-message-port.js",
"module": "../../fesm2015/zone-patch-message-port.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-promise-test.min",
"main": "../../bundles/zone-patch-promise-test.umd.min.js",
"fesm2015": "../../fesm2015/zone-patch-promise-test.min.js",
"es2015": "../../fesm2015/zone-patch-promise-test.min.js",
"module": "../../fesm2015/zone-patch-promise-test.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-promise-test",
"main": "../../bundles/zone-patch-promise-test.umd.js",
"fesm2015": "../../fesm2015/zone-patch-promise-test.js",
"es2015": "../../fesm2015/zone-patch-promise-test.js",
"module": "../../fesm2015/zone-patch-promise-test.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-resize-observer.min",
"main": "../../bundles/zone-patch-resize-observer.umd.min.js",
"fesm2015": "../../fesm2015/zone-patch-resize-observer.min.js",
"es2015": "../../fesm2015/zone-patch-resize-observer.min.js",
"module": "../../fesm2015/zone-patch-resize-observer.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-resize-observer",
"main": "../../bundles/zone-patch-resize-observer.umd.js",
"fesm2015": "../../fesm2015/zone-patch-resize-observer.js",
"es2015": "../../fesm2015/zone-patch-resize-observer.js",
"module": "../../fesm2015/zone-patch-resize-observer.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-rxjs-fake-async.min",
"main": "../../bundles/zone-patch-rxjs-fake-async.umd.min.js",
"fesm2015": "../../fesm2015/zone-patch-rxjs-fake-async.min.js",
"es2015": "../../fesm2015/zone-patch-rxjs-fake-async.min.js",
"module": "../../fesm2015/zone-patch-rxjs-fake-async.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-rxjs-fake-async",
"main": "../../bundles/zone-patch-rxjs-fake-async.umd.js",
"fesm2015": "../../fesm2015/zone-patch-rxjs-fake-async.js",
"es2015": "../../fesm2015/zone-patch-rxjs-fake-async.js",
"module": "../../fesm2015/zone-patch-rxjs-fake-async.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-rxjs.min",
"main": "../../bundles/zone-patch-rxjs.umd.min.js",
"fesm2015": "../../fesm2015/zone-patch-rxjs.min.js",
"es2015": "../../fesm2015/zone-patch-rxjs.min.js",
"module": "../../fesm2015/zone-patch-rxjs.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-rxjs",
"main": "../../bundles/zone-patch-rxjs.umd.js",
"fesm2015": "../../fesm2015/zone-patch-rxjs.js",
"es2015": "../../fesm2015/zone-patch-rxjs.js",
"module": "../../fesm2015/zone-patch-rxjs.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-socket-io.min",
"main": "../../bundles/zone-patch-socket-io.umd.min.js",
"fesm2015": "../../fesm2015/zone-patch-socket-io.min.js",
"es2015": "../../fesm2015/zone-patch-socket-io.min.js",
"module": "../../fesm2015/zone-patch-socket-io.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-socket-io",
"main": "../../bundles/zone-patch-socket-io.umd.js",
"fesm2015": "../../fesm2015/zone-patch-socket-io.js",
"es2015": "../../fesm2015/zone-patch-socket-io.js",
"module": "../../fesm2015/zone-patch-socket-io.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-user-media.min",
"main": "../../bundles/zone-patch-user-media.umd.min.js",
"fesm2015": "../../fesm2015/zone-patch-user-media.min.js",
"es2015": "../../fesm2015/zone-patch-user-media.min.js",
"module": "../../fesm2015/zone-patch-user-media.min.js"
}

View File

@ -0,0 +1,7 @@
{
"name": "zone.js/zone-patch-user-media",
"main": "../../bundles/zone-patch-user-media.umd.js",
"fesm2015": "../../fesm2015/zone-patch-user-media.js",
"es2015": "../../fesm2015/zone-patch-user-media.js",
"module": "../../fesm2015/zone-patch-user-media.js"
}

View File

@ -103,6 +103,87 @@ describe('Zone.js npm_package', () => {
}); });
}); });
describe('plugins folder check', () => {
it('should contain all plugin folders in ./plugins', () => {
const expected = [
'async-test',
'async-test.min',
'fake-async-test',
'fake-async-test.min',
'jasmine-patch',
'jasmine-patch.min',
'long-stack-trace-zone',
'long-stack-trace-zone.min',
'mocha-patch',
'mocha-patch.min',
'proxy',
'proxy.min',
'sync-test',
'sync-test.min',
'task-tracking',
'task-tracking.min',
'webapis-media-query',
'webapis-media-query.min',
'webapis-notification',
'webapis-notification.min',
'webapis-rtc-peer-connection',
'webapis-rtc-peer-connection.min',
'webapis-shadydom',
'webapis-shadydom.min',
'wtf',
'wtf.min',
'zone-bluebird',
'zone-bluebird.min',
'zone-error',
'zone-error.min',
'zone-legacy',
'zone-legacy.min',
'zone-patch-canvas',
'zone-patch-canvas.min',
'zone-patch-cordova',
'zone-patch-cordova.min',
'zone-patch-electron',
'zone-patch-electron.min',
'zone-patch-fetch',
'zone-patch-fetch.min',
'zone-patch-jsonp',
'zone-patch-jsonp.min',
'zone-patch-message-port',
'zone-patch-message-port.min',
'zone-patch-promise-test',
'zone-patch-promise-test.min',
'zone-patch-resize-observer',
'zone-patch-resize-observer.min',
'zone-patch-rxjs-fake-async',
'zone-patch-rxjs-fake-async.min',
'zone-patch-rxjs',
'zone-patch-rxjs.min',
'zone-patch-socket-io',
'zone-patch-socket-io.min',
'zone-patch-user-media',
'zone-patch-user-media.min',
].sort();
checkInSubFolder('./plugins', () => {
const list = shx.ls('./').stdout.split('\n').sort().slice(1);
expect(list.length).toBe(expected.length);
for (let i = 0; i < list.length; i++) {
expect(list[i]).toEqual(expected[i]);
const packageJson = shx.cat(`${list[i]}/package.json`);
const umdMinName = list[i].indexOf('.min') === -1 ?
`${list[i]}.umd` :
`${list[i].substring(0, list[i].indexOf('.min'))}.umd.min`;
expect(packageJson).toContain(`"name": "zone.js/${list[i]}"`);
expect(packageJson).toContain(`"main": "../../bundles/${umdMinName}.js"`);
expect(packageJson).toContain(`"fesm2015": "../../fesm2015/${list[i]}.js"`);
expect(packageJson).toContain(`"es2015": "../../fesm2015/${list[i]}.js"`);
expect(packageJson).toContain(`"module": "../../fesm2015/${list[i]}.js"`);
}
});
});
});
describe('dist file list', () => { describe('dist file list', () => {
it('should contain all files', () => { it('should contain all files', () => {
const expected = [ const expected = [