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

Upgrade to TypeScript 5 #8561

Merged
merged 26 commits into from
Oct 25, 2024
Merged

Upgrade to TypeScript 5 #8561

merged 26 commits into from
Oct 25, 2024

Conversation

dlarocque
Copy link
Contributor

@dlarocque dlarocque commented Oct 9, 2024

This PR upgrades the version of TypeScript across our entire repo to 5.5.4 (latest is 5.6.3).

The most notable changes are

  • Modernizing the Prune DTS script to use the updated TypeScript Compiler API.
  • Upgrading dependencies that are no longer compatible with newer versions of TS (mostly @types/ packages)
  • Fixing newly reported TS compiler errors
  • Updating our code to use the updated built-in types (e.g. from lib.dom.d.ts)

Copy link

changeset-bot bot commented Oct 9, 2024

⚠️ No Changeset found

Latest commit: d693bfd

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 9, 2024

Size Report 1

Affected Products

  • @firebase/firestore

    TypeBase (fe44715)Merge (f4a8fb3)Diff
    browser381 kB381 kB+17 B (+0.0%)
    module381 kB381 kB+17 B (+0.0%)
    react-native381 kB381 kB+17 B (+0.0%)
  • @firebase/rules-unit-testing

    TypeBase (fe44715)Merge (f4a8fb3)Diff
    main12.3 kB12.3 kB-10 B (-0.1%)
  • bundle

    TypeBase (fe44715)Merge (f4a8fb3)Diff
    firestore (CSI Auto Indexing Disable and Delete)272 kB272 kB+17 B (+0.0%)
    firestore (CSI Auto Indexing Enable)272 kB272 kB+17 B (+0.0%)
    firestore (Persistence)303 kB303 kB+17 B (+0.0%)
    firestore (Query Cursors)249 kB249 kB+17 B (+0.0%)
    firestore (Query)246 kB246 kB+17 B (+0.0%)
    firestore (Read data once)234 kB234 kB+17 B (+0.0%)
    firestore (Read Write w Persistence)328 kB328 kB+17 B (+0.0%)
    firestore (Realtime updates)236 kB236 kB+17 B (+0.0%)
    firestore (Transaction)214 kB214 kB+17 B (+0.0%)
    firestore (Write data)213 kB213 kB+17 B (+0.0%)
  • firebase

    TypeBase (fe44715)Merge (f4a8fb3)Diff
    firebase-app.js103 kB101 kB-2.66 kB (-2.6%)
    firebase-compat.js794 kB794 kB+17 B (+0.0%)
    firebase-firestore-compat.js346 kB346 kB+17 B (+0.0%)
    firebase-firestore.js440 kB440 kB+17 B (+0.0%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Oct 9, 2024

Size Analysis Report 1

Affected Products

  • @firebase/firestore

    • addDoc

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size132 kB132 kB+17 B (+0.0%)
      size-with-ext-deps204 kB204 kB+17 B (+0.0%)
    • clearIndexedDbPersistence

    • deleteDoc

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size122 kB122 kB+17 B (+0.0%)
      size-with-ext-deps194 kB194 kB+17 B (+0.0%)
    • disableNetwork

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size111 kB111 kB+17 B (+0.0%)
      size-with-ext-deps183 kB183 kB+17 B (+0.0%)
    • enableIndexedDbPersistence

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size187 kB187 kB+17 B (+0.0%)
      size-with-ext-deps258 kB258 kB+17 B (+0.0%)
    • enableMultiTabIndexedDbPersistence

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size222 kB223 kB+17 B (+0.0%)
      size-with-ext-deps295 kB295 kB+17 B (+0.0%)
    • enableNetwork

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size111 kB111 kB+17 B (+0.0%)
      size-with-ext-deps183 kB183 kB+17 B (+0.0%)
    • executeWrite

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size121 kB121 kB+17 B (+0.0%)
      size-with-ext-deps193 kB193 kB+17 B (+0.0%)
    • getAggregateFromServer

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size119 kB119 kB+17 B (+0.0%)
      size-with-ext-deps190 kB190 kB+17 B (+0.0%)
    • getCountFromServer

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size119 kB119 kB+17 B (+0.0%)
      size-with-ext-deps191 kB191 kB+17 B (+0.0%)
    • getDoc

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size153 kB153 kB+17 B (+0.0%)
      size-with-ext-deps225 kB225 kB+17 B (+0.0%)
    • getDocFromServer

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size153 kB153 kB+17 B (+0.0%)
      size-with-ext-deps225 kB225 kB+17 B (+0.0%)
    • getDocs

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size154 kB154 kB+17 B (+0.0%)
      size-with-ext-deps226 kB226 kB+17 B (+0.0%)
    • getDocsFromServer

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size154 kB154 kB+17 B (+0.0%)
      size-with-ext-deps226 kB226 kB+17 B (+0.0%)
    • loadBundle

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size120 kB120 kB+17 B (+0.0%)
      size-with-ext-deps192 kB192 kB+17 B (+0.0%)
    • memoryLocalCache

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size105 kB105 kB+17 B (+0.0%)
      size-with-ext-deps177 kB177 kB+17 B (+0.0%)
    • onSnapshot

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size155 kB155 kB+17 B (+0.0%)
      size-with-ext-deps227 kB227 kB+17 B (+0.0%)
    • onSnapshotsInSync

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size144 kB144 kB+17 B (+0.0%)
      size-with-ext-deps216 kB216 kB+17 B (+0.0%)
    • persistentLocalCache

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size183 kB183 kB+17 B (+0.0%)
      size-with-ext-deps255 kB255 kB+17 B (+0.0%)
    • persistentMultipleTabManager

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size218 kB218 kB+17 B (+0.0%)
      size-with-ext-deps290 kB290 kB+17 B (+0.0%)
    • persistentSingleTabManager

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size182 kB182 kB+17 B (+0.0%)
      size-with-ext-deps254 kB254 kB+17 B (+0.0%)
    • runTransaction

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size132 kB132 kB+17 B (+0.0%)
      size-with-ext-deps204 kB204 kB+17 B (+0.0%)
    • setDoc

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size131 kB131 kB+17 B (+0.0%)
      size-with-ext-deps203 kB203 kB+17 B (+0.0%)
    • updateDoc

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size132 kB132 kB+17 B (+0.0%)
      size-with-ext-deps203 kB204 kB+17 B (+0.0%)
    • waitForPendingWrites

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size111 kB111 kB+17 B (+0.0%)
      size-with-ext-deps183 kB183 kB+17 B (+0.0%)
    • writeBatch

      Size

      TypeBase (fe44715)Merge (f4a8fb3)Diff
      size134 kB134 kB+17 B (+0.0%)
      size-with-ext-deps205 kB205 kB+17 B (+0.0%)

Test Logs

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

package.json Outdated Show resolved Hide resolved
Copy link
Member

@yuchenshi yuchenshi left a comment

Choose a reason for hiding this comment

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

Approval for rules-unit-testing (with action items)

packages/rules-unit-testing/src/impl/discovery.ts Outdated Show resolved Hide resolved
packages/rules-unit-testing/test/impl/discovery.test.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@hsubox76 hsubox76 left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! Really thorough job on the prune-dts overhaul.

@dconeybe
Copy link
Contributor

@dlarocque Is there anything specific that you wanted me to look at in this PR, like specific files?

@dlarocque
Copy link
Contributor Author

@dlarocque Is there anything specific that you wanted me to look at in this PR, like specific files?

I believe the only notable changes to Firestore are:

I don't think there should be any problems with these, I'm just making sure I don't accidentally introduce any breaking changes since I'm not familiar with Firestore.

Copy link
Contributor

@dconeybe dconeybe left a comment

Choose a reason for hiding this comment

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

Firestore changes LGTM.

Copy link
Contributor

@egilmorez egilmorez left a comment

Choose a reason for hiding this comment

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

Doc changes LG, thanks!

@dlarocque dlarocque merged commit e577a40 into main Oct 25, 2024
50 checks passed
@dlarocque dlarocque deleted the dl/ts5 branch October 25, 2024 12:24
@firebase firebase locked and limited conversation to collaborators Nov 25, 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.

7 participants