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

Handle app-compat environment check where self does not exist #8378

Merged
merged 4 commits into from
Jul 24, 2024

Conversation

hsubox76
Copy link
Contributor

Properly handle the case in app-compat checks where window exists but self does not. (This apparently occurs in Ionic Stencil's Jest preset.)

This is a safer check as isBrowser() now checks for the existence of window, so if it passes, the second condition shouldn't error.

Fixes #8365

Copy link

changeset-bot bot commented Jul 19, 2024

🦋 Changeset detected

Latest commit: 77fb068

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@firebase/app-compat Patch
firebase Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Changeset File Check ⚠️

  • Warning: This PR modifies files in the following packages but they have not been included in the changeset file:%0A - @firebase/util%0A%0A Make sure this was intentional.

@hsubox76 hsubox76 marked this pull request as ready for review July 19, 2024 17:46
@hsubox76 hsubox76 requested review from a team as code owners July 19, 2024 17:46
@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • @firebase/app-compat

    TypeBase (14b7720)Merge (d1995c8)Diff
    browser5.28 kB5.28 kB+4 B (+0.1%)
    esm56.13 kB6.14 kB+4 B (+0.1%)
    main6.73 kB6.74 kB+4 B (+0.1%)
    module5.28 kB5.28 kB+4 B (+0.1%)
  • firebase

    TypeBase (14b7720)Merge (d1995c8)Diff
    firebase-app-compat.js31.7 kB31.7 kB+4 B (+0.0%)
    firebase-app.js102 kB102 kB+175 B (+0.2%)
    firebase-compat.js789 kB789 kB+4 B (+0.0%)
    firebase-performance-standalone-compat.js70.6 kB70.6 kB+4 B (+0.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/sXzLYGneSq.html

@google-oss-bot
Copy link
Contributor

@hsubox76 hsubox76 requested review from DellaBitta and dlarocque July 19, 2024 21:47
@hsubox76 hsubox76 merged commit b9244a5 into master Jul 24, 2024
42 of 43 checks passed
@hsubox76 hsubox76 deleted the ch-is-browser branch July 24, 2024 16:34
@google-oss-bot google-oss-bot mentioned this pull request Jul 30, 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.

ReferenceError: self is not defined on Jest tests [email protected]
4 participants