Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Angular web detection and other minor changes #11491

Conversation

stocaaro
Copy link
Member

@stocaaro stocaaro commented Jun 13, 2023

Description of changes

In the latest version of Angular, it is protecting its updates to window from being visible in code outside of Angular. Maybe this is zones? Either way, I've added a fallback approach that leverages the dom. From what I'm reading using both of these together should cover all recent versions of Angular.

Also expanded variable names per a comment from Chris earlier and added tsignore in a bunch of places. Angular was happy with no warnings until I started importing internal pieces. When it is compiling the detection code for itself, it warns on these without the annotations. Should have been fine, but resolved on the off chance that a different strict build environment is rebuilding this code.

Description of how you validated changes

Retested with angular using linking (earlier verification was done by injecting the angular code into an app, which is within the zone, so the old approach worked.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@stocaaro stocaaro requested review from a team as code owners June 13, 2023 13:28
@stocaaro stocaaro merged commit c0cb9b9 into aws-amplify:feat/user-agent-enhancements/main Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants