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

Make node and browser entry points identical #5318

Merged
merged 7 commits into from
Aug 18, 2021
Merged

Conversation

sam-gc
Copy link
Contributor

@sam-gc sam-gc commented Aug 17, 2021

This change uses @rollup/plugin-alias to overwrite the browser-specific imports to point to a set of no-ops and errors. I also had to change a bunch of the testing machinery to make this work.

@changeset-bot
Copy link

changeset-bot bot commented Aug 17, 2021

⚠️ No Changeset found

Latest commit: 1fd69b4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@sam-gc sam-gc requested review from avolkovi and Feiyang1 August 17, 2021 23:16
@github-actions
Copy link
Contributor

Changeset File Check ⚠️

  • Changeset formatting error in following file:
    Package "firebase-compat-typings-test" must depend on the current version of "firebase-exp": "9.0.0-beta.8" vs "file:../../packages-exp/firebase-exp"
    Package "firebase-compat-typings-test" must depend on the current version of "firebase-exp": "9.0.0-beta.8" vs "file:../../packages-exp/firebase-exp"
    Package "firebase-compat-typings-test" must depend on the current version of "firebase-exp": "9.0.0-beta.8" vs "file:../../packages-exp/firebase-exp"
    Some packages have been changed but no changesets were found. Run `changeset add` to resolve this error.
    If this change doesn't need a release, run `changeset add --empty`.
    

@sam-gc sam-gc requested a review from yuchenshi August 17, 2021 23:16
@sam-gc sam-gc marked this pull request as ready for review August 17, 2021 23:17
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 17, 2021

Binary Size Report

Affected SDKs

No changes between base commit (fbb32e7) and head commit (05cd62b).

Test Logs

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 17, 2021

Size Analysis Report

Affected Products

  • @firebase/auth-exp

    • browserLocalPersistence

    • browserPopupRedirectResolver

@yuchenshi yuchenshi assigned sam-gc and unassigned avolkovi and yuchenshi Aug 18, 2021
@@ -47,64 +36,65 @@ export {
// Core functionality shared by all clients
export * from './src';

// Additional DOM dependend functionality
// Additional DOM dependend functionality; we need to import and then
// export separately so that the rollup alias will work (for aliasing these
Copy link
Member

Choose a reason for hiding this comment

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

interesting. Is it WAI, or a bug in the plugin? If it's a bug, it may be worth linking to the issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's WAI I think. It uses resolveId which is import statements according to rollup. See: https://github.com/rollup/rollup-plugin-alias/blob/master/src/index.js

sam-gc and others added 4 commits August 18, 2021 15:03

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Co-authored-by: Feiyang <feiyangc@google.com>
@sam-gc sam-gc merged commit 0a91a90 into master Aug 18, 2021
@sam-gc sam-gc deleted the sam-gc/node-entry branch August 18, 2021 23:51
@Feiyang1 Feiyang1 added this to the v9 GA milestone Aug 18, 2021
schmidt-sebastian pushed a commit that referenced this pull request Aug 20, 2021
* Overhaul node/browser entry points so that they are identical; use rollup-plugin-alias to overwrite browser-specific features

* Formatting, license

* Revert bad change

* Update packages-exp/auth-exp/rollup.config.shared.js

Co-authored-by: Feiyang <feiyangc@google.com>

* Fix popup/redirect stuff

* Fix popup/redirect stuff

Co-authored-by: Feiyang <feiyangc@google.com>
@firebase firebase locked and limited conversation to collaborators Sep 18, 2021
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.

None yet

5 participants