Skip to content

Conversation

@varomodt
Copy link

Currently, this defineProperties patch does not work for symbol properties which will not be enumerated by Object.keys. This CL adds a second case for symbols, with a small feature guard for IE.

PR Checklist

Please check if your PR fulfills the following requirements:

I'm unsure if this change requires a change to tests or docs. Please let me know if it does.

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Allows usage of Object.defineProperties with symbol properties.

Does this PR introduce a breaking change?

  • Yes
  • No

Not unless there is an application currently depending on a symbol property not being applied by defineProperties.

Other information

Currently, this `defineProperties` patch does not work for symbol properties which will not be enumerated by Object.keys. This CL adds a second case for symbols, with a small feature guard for IE.
@pullapprove pullapprove bot requested a review from JiaLiPassion February 12, 2022 00:59
@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer area: zones Issues related to zone.js hotlist: google labels Feb 12, 2022
@ngbot ngbot bot modified the milestone: Backlog Feb 12, 2022
varomodt and others added 7 commits February 11, 2022 17:53
Currently, this `defineProperties` patch does not work for symbol
properties which will not be enumerated by Object.keys. This CL adds a
second case for symbols, with a small feature guard for IE.

Please check if your PR fulfills the following requirements:

- [X] The commit message follows our guidelines:
  https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit
  - [ ] Tests for the changes have been added (for bug fixes / features)
  - [ ] Docs have been added / updated (for bug fixes / features)

  I'm unsure if this change requires a change to tests or docs. Please
  let me know if it does.

What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

- [X] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] angular.io application / infrastructure changes
- [ ] Other... Please describe:

<!-- Please describe the current behavior that you are modifying, or
link to a relevant issue. -->

Issue Number: N/A

Allows usage of Object.defineProperties with symbol properties.

- [ ] Yes
- [X] No

<!-- If this PR contains a breaking change, please describe the impact
and migration path for existing applications below. -->

Not unless there is an application currently depending on a symbol
property _not_ being applied by defineProperties.
Currently, this defineProperties patch does not work for symbol
properties which will not be enumerated by Object.keys. This CL adds a
second case for symbols, with a small feature guard for IE.
Update type definition to remove `any` cast
Add test cases of `Object.definiProperties()` zone.js patch to test
1. defineProperties for normal string props
2. defineProperties for symbol props
3. defineProperties for normal string props + symbol props
@JiaLiPassion
Copy link
Contributor

@varomodt, thank you for the PR.
I added two commits to update the type def to remove the any cast, and also added test cases. Also this PR closes #44095

@JiaLiPassion JiaLiPassion added target: minor This PR is targeted for the next minor release and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 12, 2022
varomodt and others added 6 commits February 14, 2022 12:23
Currently, this `defineProperties` patch does not work for symbol
properties which will not be enumerated by Object.keys. This CL adds a
second case for symbols, with a small feature guard for IE.
Update type definition to remove `any` cast
Add test cases of `Object.definiProperties()` zone.js patch to test
1. defineProperties for normal string props
2. defineProperties for symbol props
3. defineProperties for normal string props + symbol props
Currently, this `defineProperties` patch does not work for symbol
properties which will not be enumerated by Object.keys. This CL adds a
second case for symbols, with a small feature guard for IE.
Currently, this `defineProperties` patch does not work for symbol
properties which will not be enumerated by Object.keys. This CL adds a
second case for symbols, with a small feature guard for IE.
Currently, this defineProperties patch does not work for symbol
properties which will not be enumerated by Object.keys. This CL adds a
second case for symbols, with a small feature guard for IE.
Copy link
Contributor

@JiaLiPassion JiaLiPassion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @varomodt
It seems there are several commits not belong to this PR, and also several commits seems not changing files, could you check it and rebase the PR?
Also could you please update the commit message to meet the guideline here https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit,
thank you.

@JiaLiPassion
Copy link
Contributor

@varomodt , I checked your commits, it seems there are some aio, animations commits are mixed there, do you mind I create another PR to only include the defileProperties fix? Thank you.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: zones Issues related to zone.js hotlist: google target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants