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

Remove ES5 Support #8509

Merged
merged 21 commits into from
Sep 25, 2024
Merged

Remove ES5 Support #8509

merged 21 commits into from
Sep 25, 2024

Conversation

dlarocque
Copy link
Contributor

@dlarocque dlarocque commented Sep 20, 2024

Remove ES5 support. The new minimum ES version is ES2017.

Changes:

  • Update to target: 'es2017' in all tsconfig.json files
  • For all packages that provide an es2017 bundle (cjs or esm), we remove the es5 bundle.
  • For all packages that only provide an es5 bundle (cjs or esm), we upgrade the bundle to es2017.
  • Refactored es5BuildPlugins, es2017BuildPlugins to just be buildPlugins.
  • Remove all "esm5" resolution paths in all package.json files.
  • Update api extractor paths that used esm5 to use esm2017
  • Remove esm5 builds from binary size reports
  • Remove firebase-performance-standalone-compat es5 bundle
  • Add TODO's to upgrade code where we were blocked by having to support es5

Copy link

changeset-bot bot commented Sep 20, 2024

🦋 Changeset detected

Latest commit: 7380ecb

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

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

@dlarocque dlarocque marked this pull request as draft September 20, 2024 18:38
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 20, 2024

Size Report 1

Affected Products

  • @firebase/analytics

    TypeBase (09ba48f)Merge (ee20493)Diff
    main28.4 kB23.1 kB-5.36 kB (-18.9%)
  • @firebase/analytics-compat

    TypeBase (09ba48f)Merge (ee20493)Diff
    main3.24 kB3.01 kB-230 B (-7.1%)
  • @firebase/app

    TypeBase (09ba48f)Merge (ee20493)Diff
    main25.1 kB19.2 kB-5.89 kB (-23.5%)
  • @firebase/app-check

    TypeBase (09ba48f)Merge (ee20493)Diff
    main32.8 kB27.3 kB-5.51 kB (-16.8%)
  • @firebase/app-check-compat

    TypeBase (09ba48f)Merge (ee20493)Diff
    main2.94 kB2.74 kB-205 B (-7.0%)
  • @firebase/app-compat

    TypeBase (09ba48f)Merge (ee20493)Diff
    main6.78 kB5.90 kB-885 B (-13.0%)
  • @firebase/auth

    TypeBase (09ba48f)Merge (ee20493)Diff
    cordova209 kB161 kB-48.4 kB (-23.1%)
    main179 kB142 kB-36.7 kB (-20.5%)
    react-native199 kB157 kB-42.1 kB (-21.2%)
  • @firebase/auth-compat

    TypeBase (09ba48f)Merge (ee20493)Diff
    main29.4 kB22.4 kB-7.07 kB (-24.0%)
  • @firebase/auth-cordova

    TypeBase (09ba48f)Merge (ee20493)Diff
    browser209 kB161 kB-48.4 kB (-23.1%)
    module209 kB161 kB-48.4 kB (-23.1%)
  • @firebase/auth/internal

    TypeBase (09ba48f)Merge (ee20493)Diff
    main214 kB168 kB-46.1 kB (-21.5%)
  • @firebase/component

    TypeBase (09ba48f)Merge (ee20493)Diff
    main9.08 kB6.87 kB-2.21 kB (-24.3%)
  • @firebase/database

    TypeBase (09ba48f)Merge (ee20493)Diff
    main282 kB254 kB-28.7 kB (-10.2%)
  • @firebase/database-compat

    TypeBase (09ba48f)Merge (ee20493)Diff
    main22.2 kB18.9 kB-3.21 kB (-14.5%)
  • @firebase/database-compat/standalone

    TypeBase (09ba48f)Merge (ee20493)Diff
    main372 kB340 kB-31.9 kB (-8.6%)
  • @firebase/firestore-lite

    TypeBase (09ba48f)Merge (ee20493)Diff
    main153 kB153 kB+3 B (+0.0%)
  • @firebase/installations

    TypeBase (09ba48f)Merge (ee20493)Diff
    main23.9 kB18.3 kB-5.55 kB (-23.2%)
  • @firebase/installations-compat

    TypeBase (09ba48f)Merge (ee20493)Diff
    main1.48 kB1.27 kB-215 B (-14.5%)
  • @firebase/logger

    TypeBase (09ba48f)Merge (ee20493)Diff
    main5.41 kB3.83 kB-1.58 kB (-29.2%)
  • @firebase/messaging

    TypeBase (09ba48f)Merge (ee20493)Diff
    main27.4 kB21.8 kB-5.69 kB (-20.7%)
  • @firebase/messaging-compat

    TypeBase (09ba48f)Merge (ee20493)Diff
    main2.90 kB2.43 kB-468 B (-16.2%)
  • @firebase/messaging-sw

    TypeBase (09ba48f)Merge (ee20493)Diff
    main30.4 kB24.2 kB-6.27 kB (-20.6%)
  • @firebase/performance

    TypeBase (09ba48f)Merge (ee20493)Diff
    main31.4 kB29.5 kB-1.97 kB (-6.2%)
  • @firebase/performance-compat

    TypeBase (09ba48f)Merge (ee20493)Diff
    main1.69 kB1.42 kB-276 B (-16.3%)
  • @firebase/remote-config

    TypeBase (09ba48f)Merge (ee20493)Diff
    main25.3 kB20.2 kB-5.12 kB (-20.2%)
  • @firebase/remote-config-compat

    TypeBase (09ba48f)Merge (ee20493)Diff
    main3.09 kB2.18 kB-908 B (-29.4%)
  • @firebase/rules-unit-testing

    TypeBase (09ba48f)Merge (ee20493)Diff
    main17.6 kB12.3 kB-5.35 kB (-30.4%)
  • @firebase/storage-compat

    TypeBase (09ba48f)Merge (ee20493)Diff
    main8.82 kB6.05 kB-2.77 kB (-31.4%)
  • @firebase/util

    TypeBase (09ba48f)Merge (ee20493)Diff
    main30.9 kB29.2 kB-1.69 kB (-5.5%)
  • firebase

    TypeBase (09ba48f)Merge (ee20493)Diff
    firebase-app.js103 kB103 kB+317 B (+0.3%)
    firebase-auth-cordova.js177 kB134 kB-43.0 kB (-24.3%)
    firebase-compat.js791 kB791 kB-9 B (-0.0%)
    firebase-performance-standalone-compat.js70.7 kB93.6 kB+22.9 kB (+32.3%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Sep 20, 2024

@@ -1,6 +1,6 @@
{
"extends": "../../config/api-extractor.json",
"mainEntryPointFilePath": "<projectFolder>/dist/esm5/index.d.ts",
"mainEntryPointFilePath": "<projectFolder>/dist/esm2017/index.d.ts",
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder why this was even looking at the one in esm5 to begin with.

@dlarocque dlarocque marked this pull request as ready for review September 23, 2024 19:12
@dlarocque dlarocque changed the base branch from main to v11 September 24, 2024 14:10
@dlarocque dlarocque requested a review from a team as a code owner September 24, 2024 20:31
@dlarocque dlarocque merged commit 36cb017 into v11 Sep 25, 2024
37 of 40 checks passed
@dlarocque dlarocque deleted the dl/es5-deprecation branch September 25, 2024 14:55
hsubox76 added a commit that referenced this pull request Oct 17, 2024
* Add node engines fields specifying a minimum of 18 (#8457)

* Make memory lru gc the default (#8110)

* Make memory lru gc the default

* undo yarn.lock

* Make memory lru gc the default

* Fix tests

* V11 release removal of node-fetch and undici dependencies (#8492)

Our v11 release will require node 18+. Since fetch has been introduced in these node versions, we can remove our dependency on third party fetch implementations.

This change removes our usage of fetch variants undici and node-fetch for our node target builds and our CI tools.

* V11 - Remove functions node bundle (#8507)

With the removal of fetch we no long need to create a node bundle for functions. Instead the sourcebase may become isomorphic, so long as we remove the older node sources. And that's what the PR does!

* Initial changes for Vertex GA packaging (#8498)

* [Vertex GA] Rewrite Schema (#8479)

* [Vertex GA] Add new endpoint and error message. (#8497)

* [Vertex GA] Miscellaneous breaking changes for Vertex GA (#8514)

* Remove ES5 Support (#8509)

* Emit a module package file for functions ESM builds (#8517)

* Update API_NOT_ENABLED error for Vertex (#8549)

* Upgrade cjs bundles for storage and performance (#8557)

These should have been part of the bigger PR, but I missed these.

* Rollup JS files with rollup-typescript-plugin (#8503)

The rollup-typescript-plugin does not transpile JS files using the TS
compiler by default. This means that external dependencies that provide
JS bundles will not be transpiled to the target ES version specified in
the TypeScript config used by the plugin.

This resulted in one of our dependencies (https://github.com/jakearchibald/idb)
being included in the CDN bundles without being transpiled to
ES5 (the target ES version). Since this dependencies bundle uses
ES2018 syntax (object spread operator `{ ...x }`), this upgraded our CDN
bundles' minimum ES version requirement to ES2018 which isn't compatible with older browser versions.
To see the ES2018 syntax in one of the CDN bundles, see
https://www.gstatic.com/firebasejs/10.13.1/firebase-app.js and search for `...oldTraps`.

* Fix tsc errors in vertex tests (#8562)

* Make SafetySettings.method optional (#8567)

* Make SafetySettings.method optional

* Update API reports

---------

Co-authored-by: hsubox76 <[email protected]>

* [Vertex GA] Regenerate docs after Vertex GA changes (#8505)

* Close emulator file after download is complete (#8572)

* close file

* Add test:ci to end of test command in CI

* revert workflow file changes

* format

* rename vertexai package reference in a changeset (#8573)

* Missed one doc change from a PR (#8575)

* Overwrite undefined candidate index (#8577)

* Overwrite undefined candidate index

* Fix index overwrite condition to only be true when index is not a property

* Upgrade Vertex Mock Responses to V5 (#8579)

* Upgrade to mock responses v4

* Upgrade from v4 to v5 mock responses

---------

Co-authored-by: wu-hui <[email protected]>
Co-authored-by: DellaBitta <[email protected]>
Co-authored-by: Daniel La Rocque <[email protected]>
Co-authored-by: hsubox76 <[email protected]>
@firebase firebase locked and limited conversation to collaborators Oct 26, 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.

3 participants