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, web): fix compatibility with TrustedTypes #12383

Merged
merged 3 commits into from
Feb 27, 2024
Merged

fix(core, web): fix compatibility with TrustedTypes #12383

merged 3 commits into from
Feb 27, 2024

Conversation

Lyokone
Copy link
Contributor

@Lyokone Lyokone commented Feb 23, 2024

Description

Replace this paragraph with a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change.

Related Issues

closes #12301

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (melos run analyze) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change.
  • No, this is not a breaking change.

@Lyokone Lyokone marked this pull request as ready for review February 23, 2024 13:38
Comment on lines 22 to 26
<!--
If you wanna test the require-trusted-types-for CSP, uncomment the line below
and run the app in a browser that supports Trusted Types (e.g. Chrome 83+).
Note that you need to run the app in release mode till this issue is fixed:
https://github.com/requirejs/requirejs/issues/1832
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<!--
If you wanna test the require-trusted-types-for CSP, uncomment the line below
and run the app in a browser that supports Trusted Types (e.g. Chrome 83+).
Note that you need to run the app in release mode till this issue is fixed:
https://github.com/requirejs/requirejs/issues/1832
<!--
If you want to test the require-trusted-types-for CSP, uncomment the line below
and run the app in a browser that supports Trusted Types (e.g. Chrome 83+).
Note that you need to run the app in release mode until this issue is fixed:
https://github.com/requirejs/requirejs/issues/1832

Copy link
Member

@russellwheatley russellwheatley left a comment

Choose a reason for hiding this comment

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

Made a suggestion to docs, other than that, LGTM

<!--
If you wanna test the require-trusted-types-for CSP, uncomment the line below
and run the app in a browser that supports Trusted Types (e.g. Chrome 83+).
Note that you need to run the app in release mode till this issue is fixed:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Note that you need to run the app in release mode till this issue is fixed:
Note that you need to run the app in release mode until this issue is fixed:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Applied

@@ -19,10 +19,18 @@
<meta charset="UTF-8" />
<meta content="IE=Edge" http-equiv="X-UA-Compatible" />

<meta
<!--
If you wanna test the require-trusted-types-for CSP, uncomment the line below
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
If you wanna test the require-trusted-types-for CSP, uncomment the line below
If you want to test the require-trusted-types-for CSP, uncomment the line below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@Lyokone Lyokone merged commit 6c1f73d into master Feb 27, 2024
16 of 21 checks passed
@Lyokone Lyokone deleted the fix/12301 branch February 27, 2024 12:39
@nilsreichardt
Copy link
Contributor

A new version of web has been released: v0.5.1. It contains support for TrustedTypes. Should replace this PR with the version of web?

@firebase firebase locked and limited conversation to collaborators Mar 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 [firebase_core_web] TrustedType violations in firebase_core_web.dart - TrustedScript needed
5 participants