aurelia / testing

Simplifies the testing of UI components by providing an elegant, fluent interface for arranging test setups along with a number of runtime debug/test helpers.
MIT License
40 stars 27 forks source link

chore(everything): refactor to TypeScript build #76

Closed mjwwit closed 6 years ago

mjwwit commented 6 years ago

Closes #72, possible breaking changes for TypeScript users

EisenbergEffect commented 6 years ago

Well, that was fast! 🥇 @jdanyow Can you do a review of the TS project setup? @mjwwit Just to confirm, besides improving the typings themselves, this doesn't include any breaking changes to the js API or behavior does it?

mjwwit commented 6 years ago

I like fast. And no, no API changes have been made.

mjwwit commented 6 years ago

@jdanyow @EisenbergEffect I'm willing to refactor more of Aurelia's codebase to TypeScript, but I want to know if this is the way to go.

EisenbergEffect commented 6 years ago

We'd love to have your assistance in this. @jdanyow Can you review and provide feedback? @mjwwit is interested in helping us convert more to TypeScript and wants to have your sign-off that this is the right way.

mjwwit commented 6 years ago

As the PR has been merged I take it this is the way to go. Are there any projects you'd like me to migrate first, or should I just start with whatever I like? Will we be working in typescript-port branches in other projects as well? If so, can you create these branches so I can submit PRs?

EisenbergEffect commented 6 years ago

I think it would be best to start with some small ones for which there might be high return on investment. What about doing the event-aggregator next? I think the APIs could be made nicer for TypeScript users providing good value there. Let's go one at a time and see how it goes. Thoughts?

mjwwit commented 6 years ago

Works for me. I'll do event-aggregator next then. Can you create a branch there?

EisenbergEffect commented 6 years ago

Here you go!

https://github.com/aurelia/event-aggregator/tree/typescript-port

gheoan commented 6 years ago

@mjwwit It would be nice if the PRs could be made more incremental with multiple commits, so that each commit can be reviewed individually. There could be a commit where the files are renamed to the ts extension, one were the missing types are added and so on.

@EisenbergEffect I would like to help convert the route-recognizer library to typescript too. There is a bit of code there which is missing types and I think I already have a local branch which adds the missing types. What do you think?

mjwwit commented 6 years ago

@gheoan Splitting it up doesn't make sense to me, as the parts don't work/compile/build by themselves. How would it help the reviewing process? In the end its the same changes... I'd love to explain the process of migrating if that's what you're looking for.

Either way, this is getting way off topic for this PR, maybe it's a good idea to continue migration talk on Discourse.

gheoan commented 6 years ago

@mjwwit With a single commit the github diff interface only shows that the whole src/aurelia-testing.js file was removed and that src/aurelia-testing.ts was added. This makes it hard to spot changes to the code itself such that the import declarations were changed in aurelia-testing.ts. Commits should be as small as possible, so that the commit can be reverted or tracked down in the history. However, do not feel obligated to do this as it is only a recommendation.

Thank you for working on typescript conversion and sorry for the offtopic.

EisenbergEffect commented 6 years ago

I think this worked out well enough for us. We were able to review and glad to have the contributions from @mjwwit.