-
Notifications
You must be signed in to change notification settings - Fork 27.5k
feat($parse): config option blockPrivateSymbols=false #4926
Conversation
if (typeof name !== 'string' && toString.apply(name) !== "[object String]") { | ||
return name; | ||
} | ||
function ensureSafeMemberName(name, fullExpression, options, allowConstructor) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would pass just the "blockPrivateSymbols", it feels weird, that this function accepts "options" and "allowConstructo" (which is an option too).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
LGTM. I was not sure about the "blockPrivateSymbols" config name, but can't think of any better. I was also thinking about making the "private pattern" configurable, so that people can use different convention than |
I agree that making it configurable has a little benefit. Based on what is picked, it could even block Angular core's own expressions which won't have an idea of the configured value. |
It's good to note that this PR has the blocking disabled by default 👍 |
👍 |
Thank you! |
thanks for the code bloat. |
@goya - Hi from the look of your GH repositories, it seems you are quite keen on mobile apps. So I understand your concern about keeping the code base tight. That being said after this patch the minified gzipped angular.js file is still only 36435 bytes, with the patch adding only about 0.14% to the size of the file. |
@goya thanks for your useful comments and contribution to this project. |
Thank you! 👍 |
Hiding `_*` properties was a feature primarily for developers using Closure compiler and Google JS style. We didn't realize how many people will be affected by this change. We might introduce this feature in the future, probably under a config option, but it needs more research and so I'm reverting the change for now. This reverts commit 3d6a89e. Closes angular#4926 Closes angular#4842 Closes angular#4865 Closes angular#4859 Closes angular#4849 Conflicts: src/ng/parse.js
Hiding `_*` properties was a feature primarily for developers using Closure compiler and Google JS style. We didn't realize how many people will be affected by this change. We might introduce this feature in the future, probably under a config option, but it needs more research and so I'm reverting the change for now. This reverts commit 3d6a89e. Closes angular#4926 Closes angular#4842 Closes angular#4865 Closes angular#4859 Closes angular#4849 Conflicts: src/ng/parse.js
No description provided.