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

feat(babel-typescript) transpile typescript code using babel #162

Closed
wants to merge 1 commit into from

Conversation

yohodopo
Copy link
Contributor

No description provided.

@yohodopo yohodopo force-pushed the feat/babel-typescript branch from bbf78a4 to 7a4967f Compare February 15, 2019 08:59
@yohodopo
Copy link
Contributor Author

@eddyerburgh , as discussed in #161 , I've made changes to use babel for transpiling typescript

@eddyerburgh
Copy link
Member

Since babel-jest requires users to have babel-typescript in their babel options, I think we should too.

In other words, can you make it so that ts code is compiled by babel. We could remove all the custom typescript-transformer code, and just use the babel-jest transformer to compile.

We'll need to tell users that they should add the correct plugins for compiling their TypeScript code.

@leipert
Copy link

leipert commented Feb 28, 2019

@eddyerburgh / @yohodopo I would be looking forward to help with this and get it into a new beta quickly. Is there anything I could do to help speeding this up?

"@vue/component-compiler-utils": "^2.4.0",
"babel-jest": "24.1.0",
Copy link

Choose a reason for hiding this comment

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

@yohodopo / @eddyerburgh Is there a reason why we pin this to 24.1.0? Should this maybe be a peer dependency and/or also point to a version range with ^?

@@ -30,10 +30,8 @@
"license": "MIT",
"devDependencies": {
"@babel/core": "^7.2.2",
"@babel/preset-env": "^7.2.3",
"@vue/test-utils": "^1.0.0-beta.25",
"babel-core": "^7.0.0-bridge.0",
Copy link

Choose a reason for hiding this comment

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

@yohodopo / @eddyerburgh Also updating to babel-jest@24 should enable us to remove the dependency on the babel-core bridge, as babel-jest supports babel@7 now

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess it's is because of our dependency on ts-jest. Now that ts-jest v24.0.0 is released, we no longer need this.

@yohodopo
Copy link
Contributor Author

yohodopo commented Mar 6, 2019

@leipert , the biggest challenge I see here is that we cannot completely ignore typescript compilers as most of the engineers are still using ts-jest to transform their typescript code. So we might have to keep our code open for both the approaches.

What I'm saying is we could add a check here to check from the jest config if the users are using ts-jest or babel-jest to transform typescript files and do the same conditionally here.

Please let me know if you have any questions

@eddyerburgh
Copy link
Member

Sorry for the silence @yohodopo , I've been busy.

I think that's a good idea to check for ts-jest support. Are you still free to add that to this PR?

@lmiller1990
Copy link
Member

lmiller1990 commented May 1, 2020

I accomplished something similar here: #239

Which also gives optional compile-time errors. Is there any benefit to going with babel?

Either way, I'm trying to clean up this repo and get us back on track - hasn't seen much attention in the last 12 months.

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.

4 participants