angular-cn/packages
JiaLiPassion 45a73dddfd fix(zone.js): defineProperty patch should not swallow error (#37582)
Close #37432

zone.js monkey patches the `Object.defineProperty` API long time ago
angular/zone.js@383b479
to resolve issues in very old version of Chrome web which override the
property of `CustomElements`, and this is not an issue any longer, so
we want to remove this monkey patch, since it may swallow the errors when the user
want to define property on unconfigurable or frozen object properties.
But currently there are several apps and tests depends on this patch, since
it also change the `configurable` property to `true` by default, so
in this PR we update the logic to not to swallow error any longer unless the property
is the callbacks of `document.registerElements`.

BREAKING CHANGE:

ZoneJS no longer swallows errors produced by `Object.defineProperty` calls.

Prior to this change, ZoneJS monkey patched `Object.defineProperty` and if there is an error
(such as the property is not configurable or not writable) the patched logic swallowed it
and only console.log was produced. This behavior used to hide real errors,
so the logic is now updated to trigger original errors (if any). One exception
where the patch remains in place is `document.registerElement`
(to allow smooth transition for code/polyfills that rely on old behavior in legacy browsers).
If your code relies on the old behavior (where errors were not thrown before),
you may need to update the logic to handle the errors that are no longer masked by ZoneJS patch.

PR Close #37582
2020-09-08 12:44:18 -07:00
..
animations Revert "build: remove wombot proxy registry from package.jsons for release (#37378)" (#37495) 2020-06-10 08:21:45 -07:00
bazel feat(compiler-cli): add support for TypeScript 4.0 (#38076) 2020-08-24 13:06:59 -07:00
benchpress build: add wombot proxy for publish config for @angular/benchpress (#37752) 2020-06-25 17:08:18 -07:00
common docs(common): Wrong parameter description on TrackBy (#38495) 2020-08-18 10:08:44 -07:00
compiler refactor(compiler): move `ParsedTemplate` interface to compiler (#38594) 2020-09-08 11:43:25 -07:00
compiler-cli refactor(compiler): move `ParsedTemplate` interface to compiler (#38594) 2020-09-08 11:43:25 -07:00
core perf(core): use `ngDevMode` to tree-shake error messages (#38612) 2020-09-08 11:41:43 -07:00
docs docs(di): fix typo in advanced di doc (#36634) 2020-05-01 09:50:28 -07:00
elements feat(compiler-cli): add support for TypeScript 4.0 (#38076) 2020-08-24 13:06:59 -07:00
examples docs(common): fix selector field in NgIfAs example component (#35854) 2020-07-20 13:35:04 -07:00
forms fix(forms): ensure to emit `statusChanges` on subsequent value update/validations (#38354) 2020-09-01 10:36:31 -07:00
language-service refactor(compiler): move `ParsedTemplate` interface to compiler (#38594) 2020-09-08 11:43:25 -07:00
localize fix(localize): do not expose NodeJS typings in $localize runtime code (#38700) 2020-09-08 11:40:58 -07:00
misc/angular-in-memory-web-api feat(core): update reference and doc to change `async` to `waitAsync`. (#37583) 2020-08-03 12:54:13 -07:00
platform-browser refactor(platform-browser): specify return type of parseEventName (#38089) 2020-08-05 17:06:28 -07:00
platform-browser-dynamic feat(core): update reference and doc to change `async` to `waitAsync`. (#37583) 2020-08-03 12:54:13 -07:00
platform-server fix(platform-server): remove styles added by ServerStylesHost on destruction (#38367) 2020-08-10 13:12:23 -07:00
platform-webworker Revert "build: remove wombot proxy registry from package.jsons for release (#37378)" (#37495) 2020-06-10 08:21:45 -07:00
platform-webworker-dynamic Revert "build: remove wombot proxy registry from package.jsons for release (#37378)" (#37495) 2020-06-10 08:21:45 -07:00
private/testing build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
router fix(router): support lazy loading for empty path named outlets (#38379) 2020-09-08 10:15:21 -07:00
service-worker docs(service-worker): add links to service worker communication guide (#36847) 2020-08-31 11:41:16 -07:00
upgrade feat(core): update reference and doc to change `async` to `waitAsync`. (#37583) 2020-08-03 12:54:13 -07:00
zone.js fix(zone.js): defineProperty patch should not swallow error (#37582) 2020-09-08 12:44:18 -07:00
BUILD.bazel build: reference zone.js from source directly instead of npm. (#33046) 2019-11-06 00:48:34 +00:00
README.md docs: add doc reference to npm package readme (#33911) 2019-11-20 14:46:23 -08:00
circular-deps-test.conf.js build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
empty.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
goog.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
license-banner.txt build: bump year (#34651) 2020-01-13 07:21:43 -08:00
system.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build-no-strict.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-build.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-test.json refactor: fix typescript strict flag failures in all tests (#30993) 2019-07-18 14:21:26 -07:00
tsconfig.json build: import in-memory-web-api project (#37182) 2020-06-15 14:28:37 -07:00
types.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT