Skip to content

Conversation

@gribnoysup
Copy link
Collaborator

@gribnoysup gribnoysup commented Jul 4, 2025

Now that eslint and (more importantly) typescript-eslint is up to date we can update typescript to latest finally. This was also in the way of POC for @mongodb-js/ts-autocomplete integration in compass (package is on latest typescript causing verison bump for the whole monorepo causing a buch of issues to pop up). This could be worked around, but it's also good to be on latest version

First two commit are just the version bump, all the required fixes are in their own commits to make it a bit easier to review this

@gribnoysup gribnoysup requested a review from a team as a code owner July 4, 2025 13:17
Comment on lines +5 to +6
"module": "nodenext",
"moduleResolution": "nodenext"
Copy link
Collaborator Author

@gribnoysup gribnoysup Jul 4, 2025

Choose a reason for hiding this comment

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

For now was easier to keep everything else on node16 and only switch e2e to nodenext, I think in theory we might want to use this module config option everywhere (or rather a combination of this and bundler), but I didn't want to deal with implications in this PR

@gribnoysup gribnoysup force-pushed the update-typescript-to-latest branch from a6433f4 to 0f9e525 Compare July 4, 2025 15:45
Comment on lines +286 to +288
preferences: new InMemoryPreferencesAccess(
options.preferences
) as PreferencesAccess,
Copy link
Collaborator Author

@gribnoysup gribnoysup Jul 4, 2025

Choose a reason for hiding this comment

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

For all those TS2742 cases, sometimes it was easier (and better, we don't actually want these types to escape module boundaries in most cases) to make sure that internal interfaces are not leaking

...args: Parameters<typeof configureStore>
) {
): Promise<
RenderPluginWithConnectionsResult<typeof CompassAggregationsPlugin.provider>
Copy link
Collaborator Author

@gribnoysup gribnoysup Jul 4, 2025

Choose a reason for hiding this comment

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

... and sometimes I only managed to make it work by explicitly re-annotating fuctions as the error text suggests doing (which is also not bad, but in some cases was caused by some annoying type resolution quirks rather than real issues)

};

// @ts-expect-error typescript is correctly highlighting that this esm import
// is missing a path, but we're passing this through bundler, so that's kinda
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
// is missing a path, but we're passing this through bundler, so that's kinda
// is missing an extension in the path, but we're passing this through bundler, so that's kinda

@gribnoysup
Copy link
Collaborator Author

Seems like we lost all macos14-arm hosts and so the ci is stuck, will merge as everything else is passing

@gribnoysup gribnoysup merged commit 39ce982 into main Jul 7, 2025
30 of 31 checks passed
@gribnoysup gribnoysup deleted the update-typescript-to-latest branch July 7, 2025 11:12
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