[ts-next-plugin] remove typescript vfs and related metadata plugin (#78237)
PR https://github.com/vercel/next.js/pull/77213 introduced replacing the
custom language service and host with the `@typescript/vfs` package. It
did improve performance for large codebases, but it is still a problem
when the plugin is initialized multiple times with multiple virtual
language services from multiple apps, resulting in **freezing the IDE**.
Why did we need the "virtual language service" in the first place? It
was to support features like providing completions and diagnostics for
metadata export without explicitly setting the type. To achieve this, we
stored a copy of the file in the virtual language service with the
additional type:
```diff
- export const metadata = {}
+ export const metadata: Metadata | null = {}
```
However, the trade-off loss is big compared to the win, and it can
easily be replaced by importing the actual type — which is rational. We
should carefully reconsider the support details and revisit the
improvement. It could be a combination of semantic suggestion/warning to
add type and auto-importing.
As the first step, this PR removes the `@typescript/vfs` package and the
metadata plugin features that depend on it.