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

Alternatives to the old createProgram? #4618

Open
ilteoood opened this issue Jul 27, 2024 · 4 comments
Open

Alternatives to the old createProgram? #4618

ilteoood opened this issue Jul 27, 2024 · 4 comments
Labels
question Further information is requested

Comments

@ilteoood
Copy link

Vue - Official extension or vue-tsc version

2.0.0

VSCode version

Vue version

TypeScript version

=5.0.0

System Info

No response

Steps to reproduce

Try to use the createProgram API, available in version 1.

What is expected?

On module federation, we used to use the createProgram API of vue-tsc in order to create a TypeScript program to generate the federated modules: https://github.com/module-federation/core/blob/main/packages/native-federation-typescript/src/lib/typeScriptCompiler.ts#L108.
As I can see in this PR: #3795, the API has been removed without a clear alternative to invoke the compiler programmatically.

I don't want to invoke the CLI to do basic operations I was doing before without any issue. Is there an alternative route I can take, or is there a chance to bring back the old API?

What is actually happening?

Can't programmatically create a vue-tsc program anymore

Link to minimal reproduction

No response

Any additional comments?

No response

@so1ve
Copy link
Member

so1ve commented Jul 28, 2024

@ilteoood
Copy link
Author

@so1ve if I got it correctly, the function that should cover my scenario is the getLanguagePlugins, isn't it?

@so1ve
Copy link
Member

so1ve commented Jul 29, 2024

Perhaps no? I'm not familiar with volar.js but I guess you may use proxyCreateProgram and getLanguagePlugins together?

@Sysix
Copy link

Sysix commented Jul 31, 2024

I have the same problem. I have a rule for betterer similar to its native typescript rule

prepareVueTsc doesn't feel right. When vue-tsc is changing we need maybe update the script again. Would love to see createProgram back.

@KermanX KermanX added question Further information is requested and removed pending triage labels Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants