Skip to content

Conversation

Twixes
Copy link
Member

@Twixes Twixes commented Mar 7, 2023

Changes

This upgrades TypeScript from 4.6 4.8 to 4.9 (current latest) in the frontend. The highlights:

  • 4.7's instantiation expressions, e.g. const makeWrenchBox = makeBox<Wrench> – basically bringing non-generic instances of generic functions (I ran into this being impossible a few times in the past, so kudos)
  • 4.9's satisfies operator, e.g. const palette = { red: [255, 0, 0], green: "#00ff00", bleu: [0, 0, 255] } satisfies Record<Colors, string | RGB> – this is awesome, since it allows combining type enforcement with const ergonomics

It was the latter that actually prompted me to do this.

@Twixes Twixes requested a review from mariusandra March 7, 2023 17:45
Copy link
Collaborator

@mariusandra mariusandra left a comment

Choose a reason for hiding this comment

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

If only tests would pass 👍

@Twixes Twixes changed the title chore(deps): Upgrade TypeScript to 4.9 in the frontend chore(deps): Upgrade TypeScript to 4.9 in the frontend Mar 8, 2023
@Twixes
Copy link
Member Author

Twixes commented Mar 8, 2023

Solved, there's just one issue with Kea in definitionEditLogic.test.ts:
Can not access "actionCreators" on logic "scenes.data-management.events.eventDefinitionsTableLogic.scene" because it is not mounted!
This is despite the logic being mounted a few lines above, so I've no idea what's going on.

@Twixes Twixes changed the title chore(deps): Upgrade TypeScript to 4.9 in the frontend chore(deps): Upgrade TypeScript from 4.8 to 4.9 in the frontend Mar 8, 2023
@Twixes
Copy link
Member Author

Twixes commented Mar 8, 2023

Also, noticed we were already on 4.8, because the version was pinned loosely, only on the major component. TypeScript doesn't follow semver though, so that wasn't ideal (they always go up to x.9 and then roll over to (x+1).0, treating every *.x.* release as major-ish).

@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week.

@mariusandra
Copy link
Collaborator

There was a bug in Kea 3.1.4 with mounting logics that had a default key, but weren't given any props when mounting.

I released 3.1.5, but for 10min now it's not showing up in the npm repo :/.

image

but

image

and it won't let me republish. So I guess we'll wait 🤔

@Twixes Twixes removed the stale label Mar 16, 2023
@Twixes
Copy link
Member Author

Twixes commented Mar 16, 2023

Awesome, thanks for the fix @mariusandra!

@Twixes Twixes merged commit 7e71c3c into master Mar 16, 2023
@Twixes Twixes deleted the ts-4.9 branch March 16, 2023 12:35
fuziontech added a commit that referenced this pull request Mar 16, 2023
* master: (101 commits)
  feat: feedback tab - improve the UI and switch to HogQL (#14777)
  feat(experiments): cache experiment results (#14742)
  fix(empty-state): properly fix query timeout state (#14793)
  chore(feature-flag): release json payload flag (#14775)
  feat(hogql): make sure joins work with properties (#14790)
  test(frontend): Tune visual regression test failure threshold (#14766)
  feat(hogql): count distinct and count star (#14786)
  feat(perf): only load experiment results once (#14772)
  feat: allow new insight type choice from sidebar (#14759)
  fix(persons): hide persons in the future (#14308)
  feat: allow query cards in saved insights grid (#14784)
  fix(lemon-ui): Align padding for small/large buttons with icons (#14750)
  chore(deps): Upgrade TypeScript from 4.8 to 4.9 in the frontend (#14609)
  feat: rename insight query tab to json tab (#14781)
  feat: use same top heading for insight card and exported insight (#14780)
  feat: define new insight urls in one place (#14778)
  fix(hogql): person properties in a funnel breakdown (#14765)
  fix: hide query based insights in recently viewed list (#14774)
  feat: improve query summaries (#14768)
  feat(hogql): add sampling support (#14733)
  ...
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.

3 participants