Skip to content

chore: convert TS enums exports in Firebase AI into const variables #9137

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

hsubox76
Copy link
Contributor

Following the AIP guidance here (internal link - excerpt below):
https://g3doc.corp.google.com/firebase/g3doc/aip/3270.md?cl=head#typescript-enums-and-const-enums

You must not export TypeScript enums because they are not tree-shakable, meaning they will be included in the bundle even if they are not imported by developers. You should export a plain JavaScript object instead for a key value map.

This could break some users depending on how they are consuming these enums so we will mark this as a breaking change and release with the breaking release.

Copy link

changeset-bot bot commented Jun 30, 2025

🦋 Changeset detected

Latest commit: cf320ab

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

This PR includes changesets to release 3 packages
Name Type
@firebase/ai Major
firebase Major
@firebase/rules-unit-testing Major

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

@hsubox76 hsubox76 added this to the v12 milestone Jun 30, 2025
@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • @firebase/ai

    TypeBase (3d44792)Merge (3647bd1)Diff
    browser42.5 kB41.4 kB-1.11 kB (-2.6%)
    main43.7 kB44.7 kB+966 B (+2.2%)
    module42.5 kB41.4 kB-1.11 kB (-2.6%)
  • firebase

    TypeBase (3d44792)Merge (3647bd1)Diff
    firebase-ai.js33.8 kB33.8 kB-26 B (-0.1%)
    firebase-vertexai.js33.8 kB33.8 kB-26 B (-0.1%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

Size Analysis Report 1

This report is too large (90,683 characters) to be displayed here in a GitHub comment. Please use the below link to see the full report on Google Cloud Storage.

Test Logs

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

@hsubox76 hsubox76 changed the title Convert TS enums exports in Firebase AI into const variables. chore: convert TS enums exports in Firebase AI into const variables Jun 30, 2025
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