Skip to content

build!: update build targets to ES2020 #9101

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 6 commits into from
Jul 12, 2025
Merged

build!: update build targets to ES2020 #9101

merged 6 commits into from
Jul 12, 2025

Conversation

hsubox76
Copy link
Contributor

@hsubox76 hsubox76 commented Jun 17, 2025

Updating build targets to "ES2020" which should be widely adopted by now. On our supported environments page we recommend ES Stable polyfills, and "ES stable" is 2024 at this point. This will go out with the v12 breaking change.

The only snag is that ES2020 does not play well with "istanbul-instrumenter-loader" which is the coverage plugin that runs on karma tests. It hasn't been updated in years so we need to find a new coverage tool. We don't really report the coverage results anywhere right now anyway (I think our reporting is broken), so we're not losing anything, although we do need to fix all of this. We are still running command-line istanbul (not through the loader) on all node tests though.

The only other fix was moving some deps around in the size-analysis folder to satisfy the linter.

Copy link

changeset-bot bot commented Jun 17, 2025

⚠️ No Changeset found

Latest commit: adab1a0

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

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

google-oss-bot commented Jun 17, 2025

Size Report 1

Affected Products

  • @firebase/ai

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser41.1 kB38.7 kB-2.38 kB (-5.8%)
    main44.0 kB41.6 kB-2.41 kB (-5.5%)
    module41.1 kB38.7 kB-2.38 kB (-5.8%)
  • @firebase/analytics

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser21.8 kB21.5 kB-370 B (-1.7%)
    main23.1 kB22.7 kB-370 B (-1.6%)
    module21.8 kB21.5 kB-370 B (-1.7%)
  • @firebase/app

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser19.5 kB19.1 kB-461 B (-2.4%)
    main20.4 kB19.9 kB-461 B (-2.3%)
    module19.5 kB19.1 kB-461 B (-2.4%)
    react-native20.4 kB19.9 kB-461 B (-2.3%)
  • @firebase/app-check

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser26.9 kB26.3 kB-613 B (-2.3%)
    main27.9 kB27.3 kB-613 B (-2.2%)
    module26.9 kB26.3 kB-613 B (-2.3%)
  • @firebase/app-compat

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser5.33 kB5.25 kB-77 B (-1.4%)
    main5.90 kB5.82 kB-77 B (-1.3%)
    module5.33 kB5.25 kB-77 B (-1.4%)
  • @firebase/auth

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser193 kB188 kB-5.22 kB (-2.7%)
    cordova166 kB161 kB-4.76 kB (-2.9%)
    main147 kB144 kB-3.69 kB (-2.5%)
    module193 kB188 kB-5.22 kB (-2.7%)
    react-native165 kB161 kB-4.35 kB (-2.6%)
  • @firebase/auth-compat

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser20.2 kB20.0 kB-271 B (-1.3%)
    main22.4 kB22.1 kB-271 B (-1.2%)
    module20.2 kB20.0 kB-271 B (-1.3%)
  • @firebase/auth-cordova

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser166 kB161 kB-4.76 kB (-2.9%)
    module166 kB161 kB-4.76 kB (-2.9%)
  • @firebase/auth-web-extension

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser142 kB139 kB-3.91 kB (-2.7%)
    main160 kB155 kB-4.12 kB (-2.6%)
    module142 kB139 kB-3.91 kB (-2.7%)
  • @firebase/auth/internal

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser204 kB198 kB-6.11 kB (-3.0%)
    main174 kB169 kB-4.66 kB (-2.7%)
    module204 kB198 kB-6.11 kB (-3.0%)
  • @firebase/component

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser6.54 kB6.38 kB-154 B (-2.4%)
    main6.87 kB6.72 kB-154 B (-2.2%)
    module6.54 kB6.38 kB-154 B (-2.4%)
  • @firebase/data-connect

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser21.7 kB21.3 kB-417 B (-1.9%)
    main24.0 kB23.6 kB-417 B (-1.7%)
    module21.7 kB21.3 kB-417 B (-1.9%)
  • @firebase/database

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser250 kB249 kB-280 B (-0.1%)
    main254 kB254 kB-280 B (-0.1%)
    module250 kB249 kB-280 B (-0.1%)
  • @firebase/database-compat

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser18.3 kB18.2 kB-41 B (-0.2%)
    main18.9 kB18.9 kB-41 B (-0.2%)
    module18.3 kB18.2 kB-41 B (-0.2%)
  • @firebase/database-compat/standalone

    TypeBase (f11b552)Merge (d9571ec)Diff
    main366 kB366 kB-782 B (-0.2%)
  • @firebase/firestore

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser394 kB392 kB-2.33 kB (-0.6%)
    main615 kB611 kB-3.53 kB (-0.6%)
    module394 kB392 kB-2.33 kB (-0.6%)
    react-native395 kB392 kB-2.33 kB (-0.6%)
  • @firebase/firestore-compat

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser20.6 kB20.3 kB-312 B (-1.5%)
    main21.0 kB20.7 kB-312 B (-1.5%)
    module20.6 kB20.3 kB-312 B (-1.5%)
    react-native20.6 kB20.3 kB-312 B (-1.5%)
  • @firebase/firestore-lite

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser116 kB115 kB-959 B (-0.8%)
    main159 kB158 kB-1.25 kB (-0.8%)
    module116 kB115 kB-959 B (-0.8%)
    react-native116 kB116 kB-959 B (-0.8%)
  • @firebase/functions

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser14.2 kB13.9 kB-324 B (-2.3%)
    main14.7 kB14.4 kB-324 B (-2.2%)
    module14.2 kB13.9 kB-324 B (-2.3%)
  • @firebase/functions-compat

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser1.79 kB1.73 kB-58 B (-3.2%)
    main2.12 kB2.07 kB-58 B (-2.7%)
    module1.79 kB1.73 kB-58 B (-3.2%)
  • @firebase/installations

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser17.8 kB17.6 kB-126 B (-0.7%)
    main18.3 kB18.2 kB-126 B (-0.7%)
    module17.8 kB17.6 kB-126 B (-0.7%)
  • @firebase/logger

    TypeBase (f11b552)Merge (d9571ec)Diff
    main3.83 kB3.78 kB-46 B (-1.2%)
    module3.25 kB3.21 kB-46 B (-1.4%)
  • @firebase/messaging

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser22.0 kB21.5 kB-489 B (-2.2%)
    main22.4 kB22.0 kB-489 B (-2.2%)
    module22.0 kB21.5 kB-489 B (-2.2%)
  • @firebase/messaging-sw

    TypeBase (f11b552)Merge (d9571ec)Diff
    main24.1 kB23.3 kB-773 B (-3.2%)
    module23.5 kB22.8 kB-773 B (-3.3%)
  • @firebase/performance

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser31.5 kB31.1 kB-482 B (-1.5%)
    main32.0 kB31.5 kB-482 B (-1.5%)
    module31.5 kB31.1 kB-482 B (-1.5%)
  • @firebase/remote-config

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser23.2 kB22.7 kB-497 B (-2.1%)
    main24.4 kB23.9 kB-497 B (-2.0%)
    module23.2 kB22.7 kB-497 B (-2.1%)
  • @firebase/rules-unit-testing

    TypeBase (f11b552)Merge (d9571ec)Diff
    main12.3 kB11.7 kB-578 B (-4.7%)
  • @firebase/storage

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser58.5 kB58.3 kB-159 B (-0.3%)
    main60.0 kB59.8 kB-213 B (-0.4%)
    module58.5 kB58.3 kB-159 B (-0.3%)
  • @firebase/storage-compat

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser5.67 kB5.66 kB-13 B (-0.2%)
    main6.05 kB6.04 kB-13 B (-0.2%)
    module5.67 kB5.66 kB-13 B (-0.2%)
  • @firebase/util

    TypeBase (f11b552)Merge (d9571ec)Diff
    browser29.4 kB29.1 kB-282 B (-1.0%)
    main35.8 kB35.5 kB-282 B (-0.8%)
    module29.4 kB29.1 kB-282 B (-1.0%)
  • bundle

    46 size changes

    TypeBase (f11b552)Merge (d9571ec)Diff
    analytics (logEvent)44.7 kB43.8 kB-975 B (-2.2%)
    app-check (CustomProvider)38.0 kB37.2 kB-803 B (-2.1%)
    app-check (ReCaptchaEnterpriseProvider)40.5 kB39.6 kB-943 B (-2.3%)
    app-check (ReCaptchaV3Provider)40.5 kB39.5 kB-943 B (-2.3%)
    auth (Anonymous)78.0 kB74.8 kB-3.22 kB (-4.1%)
    auth (EmailAndPassword)88.1 kB84.5 kB-3.62 kB (-4.1%)
    auth (GoogleFBTwitterGitHubPopup)109 kB105 kB-4.03 kB (-3.7%)
    auth (GooglePopup)102 kB98.1 kB-3.90 kB (-3.8%)
    auth (GoogleRedirect)102 kB98.3 kB-3.90 kB (-3.8%)
    auth (Phone)95.5 kB91.7 kB-3.81 kB (-4.0%)
    database (Append to a list of data)154 kB154 kB-789 B (-0.5%)
    database (Filtering data)153 kB153 kB-789 B (-0.5%)
    database (Listen for child events)170 kB169 kB-789 B (-0.5%)
    database (Listen for value events + Detach listeners)170 kB169 kB-789 B (-0.5%)
    database (Listen for value events)170 kB169 kB-789 B (-0.5%)
    database (Read data once)169 kB168 kB-789 B (-0.5%)
    database (Save data as transactions)172 kB171 kB-846 B (-0.5%)
    database (Sort data)155 kB154 kB-789 B (-0.5%)
    database (Write data)154 kB153 kB-789 B (-0.5%)
    firestore (CSI Auto Indexing Disable and Delete)290 kB288 kB-2.04 kB (-0.7%)
    firestore (CSI Auto Indexing Enable)290 kB288 kB-2.04 kB (-0.7%)
    firestore (Persistence)321 kB319 kB-1.64 kB (-0.5%)
    firestore (Query Cursors)260 kB259 kB-1.52 kB (-0.6%)
    firestore (Query)258 kB256 kB-1.62 kB (-0.6%)
    firestore (Read data once)247 kB246 kB-1.42 kB (-0.6%)
    firestore (Read Write w Persistence)341 kB339 kB-1.84 kB (-0.5%)
    firestore (Realtime updates)248 kB246 kB-1.52 kB (-0.6%)
    firestore (Transaction)227 kB225 kB-1.90 kB (-0.8%)
    firestore (Write data)228 kB226 kB-1.78 kB (-0.8%)
    firestore-lite (Query Cursors)111 kB110 kB-1.47 kB (-1.3%)
    firestore-lite (Query)107 kB106 kB-1.47 kB (-1.4%)
    firestore-lite (Read data once)82.7 kB81.5 kB-1.16 kB (-1.4%)
    firestore-lite (Transaction)108 kB107 kB-1.29 kB (-1.2%)
    firestore-lite (Write data)92.2 kB91.0 kB-1.16 kB (-1.3%)
    functions (call)39.5 kB38.6 kB-860 B (-2.2%)
    messaging (send + receive)47.5 kB46.4 kB-1.10 kB (-2.3%)
    performance (trace)63.0 kB62.0 kB-1.04 kB (-1.6%)
    remote-config (getAndFetch)48.8 kB47.8 kB-1.03 kB (-2.1%)
    storage (getBytes)47.3 kB46.6 kB-692 B (-1.5%)
    storage (getDownloadURL)49.4 kB48.7 kB-692 B (-1.4%)
    storage (getMetadata)48.8 kB48.1 kB-692 B (-1.4%)
    storage (list + listAll)48.2 kB47.5 kB-692 B (-1.4%)
    storage (updateMetadata)49.1 kB48.4 kB-692 B (-1.4%)
    storage (uploadBytes)53.9 kB53.2 kB-692 B (-1.3%)
    storage (uploadBytesResumable)63.9 kB63.1 kB-732 B (-1.1%)
    storage (uploadString)54.1 kB53.4 kB-705 B (-1.3%)

  • firebase

    32 size changes

    TypeBase (f11b552)Merge (d9571ec)Diff
    firebase-ai.js33.5 kB30.5 kB-2.98 kB (-8.9%)
    firebase-analytics-compat.js25.7 kB25.4 kB-313 B (-1.2%)
    firebase-analytics.js29.7 kB29.3 kB-411 B (-1.4%)
    firebase-app-check-compat.js23.1 kB22.8 kB-313 B (-1.4%)
    firebase-app-check.js25.5 kB25.0 kB-489 B (-1.9%)
    firebase-app-compat.js31.8 kB31.4 kB-415 B (-1.3%)
    firebase-app.js103 kB102 kB-907 B (-0.9%)
    firebase-auth-compat.js146 kB142 kB-3.11 kB (-2.1%)
    firebase-auth-cordova.js143 kB139 kB-3.85 kB (-2.7%)
    firebase-auth-web-extension.js125 kB122 kB-3.30 kB (-2.6%)
    firebase-auth.js163 kB159 kB-4.28 kB (-2.6%)
    firebase-compat.js806 kB800 kB-6.64 kB (-0.8%)
    firebase-data-connect.js22.8 kB22.5 kB-280 B (-1.2%)
    firebase-database-compat.js168 kB168 kB-208 B (-0.1%)
    firebase-database.js192 kB192 kB-332 B (-0.2%)
    firebase-firestore-compat.js351 kB349 kB-1.30 kB (-0.4%)
    firebase-firestore-lite.js139 kB138 kB-1.04 kB (-0.7%)
    firebase-firestore.js458 kB455 kB-2.46 kB (-0.5%)
    firebase-functions-compat.js14.8 kB14.7 kB-109 B (-0.7%)
    firebase-functions.js19.6 kB19.4 kB-204 B (-1.0%)
    firebase-installations-compat.js12.9 kB12.7 kB-123 B (-1.0%)
    firebase-installations.js15.2 kB15.0 kB-152 B (-1.0%)
    firebase-messaging-compat.js37.0 kB36.3 kB-698 B (-1.9%)
    firebase-messaging-sw.js30.1 kB29.3 kB-814 B (-2.7%)
    firebase-messaging.js29.1 kB28.6 kB-538 B (-1.8%)
    firebase-performance-compat.js40.5 kB40.2 kB-352 B (-0.9%)
    firebase-performance-standalone-compat.js105 kB104 kB-952 B (-0.9%)
    firebase-performance.js46.0 kB45.5 kB-504 B (-1.1%)
    firebase-remote-config-compat.js28.3 kB27.9 kB-331 B (-1.2%)
    firebase-remote-config.js32.7 kB32.2 kB-447 B (-1.4%)
    firebase-storage-compat.js44.3 kB44.2 kB-66 B (-0.1%)
    firebase-storage.js51.2 kB51.1 kB-140 B (-0.3%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Jun 17, 2025

Size Analysis Report 1

This report is too large (284,509 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/Adcqx30fo0.html

"devDependencies": {
"@firebase/app": "0.13.1",
"@firebase/logger": "0.4.4",
"dependencies": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did all of these dev dependencies suddenly become dependencies?

Copy link
Contributor

Choose a reason for hiding this comment

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

We discussed offline. It's due to linter errors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They shouldn't be devDependencies because they're used in the builds of the test apps in this directory. The linter complains about it, if it's run. It doesn't affect the functionality of this package though and it's an internal package that isn't shipped to users.

@hsubox76 hsubox76 changed the title Update build targets to ES2020 build: update build targets to ES2020 Jul 1, 2025
@hsubox76 hsubox76 changed the title build: update build targets to ES2020 build!: update build targets to ES2020 Jul 1, 2025
@hsubox76 hsubox76 marked this pull request as ready for review July 8, 2025 18:16
Copy link
Contributor

@dlarocque dlarocque left a comment

Choose a reason for hiding this comment

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

I think we should update all bundle names from names like index.esm2017.js to index.esm2020.js.

@dconeybe
Copy link
Contributor

dconeybe commented Jul 8, 2025

I think we should update all bundle names from names like index.esm2017.js to index.esm2020.js.

Drive-by comment: should we just omit the year, and just call the file index.esm.js?

@hsubox76 hsubox76 requested review from avolkovi and yoyomyo as code owners July 9, 2025 22:21
@hsubox76 hsubox76 requested a review from aashishpatil-g as a code owner July 9, 2025 22:21
@hsubox76
Copy link
Contributor Author

hsubox76 commented Jul 9, 2025

I think we should update all bundle names from names like index.esm2017.js to index.esm2020.js.

Done per @dconeybe 's suggestion of removing the year, plus updating a bunch of other places I missed, and comments. The year is still in the platform logging tag though. That's probably helpful information.

@dlarocque dlarocque self-requested a review July 10, 2025 14:25
@hsubox76 hsubox76 merged commit 2d72099 into main Jul 12, 2025
98 of 109 checks passed
@hsubox76 hsubox76 deleted the ch-es2020 branch July 12, 2025 00:27
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.

5 participants