angular/packages/zone.js/test
arturovt a27600c463 fix(zone.js): do not mutate event listener options (may be readonly) (#55796)
Prior to this commit, event listener options were mutated directly, for example,
`options.signal = undefined` or `options.once = false`.

This issue arises in apps using third-party libraries where the responsibility lies
with the library provider. Some libraries, like WalletConnect, pass an abort controller
as `addEventListener` options. Because the abort controller has the `signal` property,
this is a valid case. Thus, mutating options would throw an error since `signal`
is a readonly property.

Even though zone.js is being deprecated as Angular moves towards zoneless change detection,
this fix is necessary for apps that still use zone.js and cannot migrate to zoneless change
detection because they rely on third-party libraries and are not responsible for the code
used in them.

Closes #54142

PR Close #55796
2024-05-22 16:20:34 -07:00
..
assets refactor(zone.js): remove onProp eventNames array to reduce the bundle size (#40962) 2022-03-01 18:41:15 +00:00
browser fix(zone.js): do not mutate event listener options (may be readonly) (#55796) 2024-05-22 16:20:34 -07:00
closure refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
common refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
extra refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
jest refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
node refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
npm_package fix(zone.js): correctly bundle zone-patch-rxjs (#55826) 2024-05-16 09:21:18 -07:00
patch refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
performance refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
promise fix(zone.js): Promise.resolve(subPromise) should return subPromise (#53423) 2023-12-11 10:55:12 -08:00
rxjs refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
typings build: use installed deps from main repo (#55433) 2024-04-22 11:40:07 -07:00
webdriver refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
zone-spec refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
browser-env-setup.ts refactor(zone.js): updates fake polyfill to remove top-level side effect (#53443) 2024-03-15 18:11:34 -07:00
browser-zone-setup.ts fix(zone.js): disable wrapping unhandled promise error by default (#52492) 2023-11-03 09:33:20 -07:00
browser_disable_wrap_uncaught_promise_rejection_entry_point.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
browser_disable_wrap_uncaught_promise_rejection_setup.ts fix(zone.js): disable wrapping unhandled promise error by default (#52492) 2023-11-03 09:33:20 -07:00
browser_entry_point.ts refactor(zone.js): update Zone bundles to call patch* functions (#53443) 2024-03-15 18:11:33 -07:00
browser_es2015_entry_point.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
browser_shadydom_entry_point.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
browser_shadydom_setup.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
browser_symbol_setup.ts fix(zone.js): disable wrapping unhandled promise error by default (#52492) 2023-11-03 09:33:20 -07:00
BUILD.bazel refactor(zone.js): change from scripts to modules (#53445) 2024-01-09 13:20:50 -08:00
common_tests.ts fix(zone.js): enable monkey patching of the queueMicrotask() API in node.js (#50530) 2023-06-07 12:42:33 -07:00
fake_entry.js build: move zone.js to angular repo (#30962) 2019-06-20 11:27:39 -07:00
jasmine-patch.spec.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
karma_test.bzl feat(zone.js): remove legacy files and access to deep imports (#51752) 2023-09-14 12:11:05 +02:00
main.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
mocha-patch.spec.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
node-env-setup.ts refactor(zone.js): update Node test entry point to call patch functions (#53443) 2024-03-15 18:11:34 -07:00
node_bluebird_entry_point.init.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
node_entry_point.init.ts refactor(zone.js): update Node test entry point to call patch functions (#53443) 2024-03-15 18:11:34 -07:00
node_error_disable_policy.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
node_error_disable_policy_entry_point.init.ts refactor: update zone.js and tests to work with ESM (#48521) 2022-12-19 19:50:44 +00:00
node_error_entry_point.init.ts refactor(zone.js): fix Node error disable/lazy policy tests (#53443) 2024-03-15 18:11:34 -07:00
node_error_lazy_policy.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
node_error_lazy_policy_entry_point.init.ts refactor: update zone.js and tests to work with ESM (#48521) 2022-12-19 19:50:44 +00:00
node_tests.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
saucelabs.js build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
test-env-setup-jasmine.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
test-env-setup-mocha.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
test-util.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
test_fake_polyfill.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
ws-server.js refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
ws-webworker-context.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
wtf_mock.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00
zone_worker_entry_point.ts refactor: migrate zone.js to prettier formatting (#55427) 2024-04-29 09:52:07 -07:00