Skip to content

Use the SDK version from Firebase package.json #3443

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

Merged
merged 2 commits into from
Jul 21, 2020

Conversation

schmidt-sebastian
Copy link
Contributor

This change is needed since the firebase-exp SDK is not meant to depend on @firebase/app

@changeset-bot
Copy link

changeset-bot bot commented Jul 20, 2020

💥 No Changeset

Latest commit: 9d2ab11

Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂

If these changes should be published to npm, 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

This change is needed since the firebase-exp SDK is not meant to depend on @firebase/app
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jul 20, 2020

Binary Size Report

Affected SDKs

  • @firebase/firestore

    Type Base (7d5678b) Head (e677e39) Diff
    browser 246 kB 246 kB -536 B (-0.2%)
    esm2017 193 kB 193 kB -108 B (-0.1%)
    main 469 kB 468 kB -27 B (-0.0%)
    module 244 kB 244 kB -512 B (-0.2%)
    react-native 194 kB 193 kB -97 B (-0.1%)
  • @firebase/firestore/exp

    Type Base (7d5678b) Head (e677e39) Diff
    browser 187 kB 187 kB -143 B (-0.1%)
    main 508 kB 508 kB -38 B (-0.0%)
    react-native 187 kB 187 kB -145 B (-0.1%)
  • @firebase/firestore/lite

    Type Base (7d5678b) Head (e677e39) Diff
    browser 67.9 kB 67.8 kB -61 B (-0.1%)
    main 494 kB 494 kB -44 B (-0.0%)
    react-native 67.9 kB 67.9 kB -53 B (-0.1%)
  • @firebase/firestore/memory

    Type Base (7d5678b) Head (e677e39) Diff
    browser 185 kB 185 kB +77 B (+0.0%)
    esm2017 145 kB 145 kB +66 B (+0.0%)
    main 344 kB 344 kB +247 B (+0.1%)
    module 183 kB 183 kB +65 B (+0.0%)
    react-native 145 kB 145 kB +80 B (+0.1%)
  • @firebase/storage

    Type Base (7d5678b) Head (e677e39) Diff
    esm2017 56.4 kB 54.9 kB -1.50 kB (-2.7%)
    main 62.8 kB 61.3 kB -1.46 kB (-2.3%)
    module 62.6 kB 61.1 kB -1.47 kB (-2.4%)
  • firebase

    Type Base (7d5678b) Head (e677e39) Diff
    firebase-firestore.js 285 kB 284 kB -546 B (-0.2%)
    firebase-firestore.memory.js 224 kB 224 kB +65 B (+0.0%)
    firebase-storage.js 40.9 kB 39.9 kB -1.02 kB (-2.5%)
    firebase.js 820 kB 818 kB -1.57 kB (-0.2%)

Test Logs

Copy link
Member

@Feiyang1 Feiyang1 left a comment

Choose a reason for hiding this comment

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

You will need to use 'rollup-plugin-json'

/** The semver (www.semver.org) version of the SDK. */
export const SDK_VERSION = firebase.SDK_VERSION;
export { version as SDK_VERSION } from '../../../firebase/package.json';
Copy link
Member

Choose a reason for hiding this comment

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

You will need to use 'rollup-plugin-json' to resolve it in all build tasks.
You will want to set preferConst: true for es2017 builds.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am already using it in exp and lite, and we have been using it in the legacy build already. Is there some other target that is missing?

Copy link
Member

Choose a reason for hiding this comment

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

My mistake. I did see it in rollup.config.es5.js, but now I realize es5 builds are based on esm2017 builds which uses it.

@schmidt-sebastian schmidt-sebastian merged commit c2829cd into master Jul 21, 2020
@firebase firebase locked and limited conversation to collaborators Aug 21, 2020
@schmidt-sebastian schmidt-sebastian deleted the mrschmidt/version branch November 9, 2020 22:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants