formBuilder icon indicating copy to clipboard operation
formBuilder copied to clipboard

TypeScript Migration

Open Jojoshua opened this issue 2 years ago • 1 comments

  • Move codebase to TypeScript
  • Update tooling & migrate to webpack 5
  • Refactor large modules

The src/js folder doesn't do anything except make it easier to merge changes until this gets merged. Should be deleted after merge

Jojoshua avatar Mar 23 '22 21:03 Jojoshua

Hi, this merge looks really interesting. What's the progress? Good enough for now & Safe enough to try?

jorgeuos avatar Sep 06 '22 11:09 jorgeuos

@jorgeuos yes, given its size i appreciate all the testing it can get

kevinchappell avatar Aug 20 '23 06:08 kevinchappell

@kevinchappell @Jojoshua The size of this PR makes it very hard to provide any comprehensive review and there is a lot of code churn with commented out lines and lines changed with style changes without functionality changes. I suggest we break up this PR into multiple reviewable PRs.

  • Webpack 5 update
  • Typescript
  • Refactoring (where appropriate)

This will also help in tracking regressions.

I've started building upon the work done by Jojoshua for the webpack 5 update to start with if this is an approach you would like to take

lucasnetau avatar Aug 21 '23 04:08 lucasnetau

@kevinchappell @Jojoshua The size of this PR makes it very hard to provide any comprehensive review and there is a lot of code churn with commented out lines and lines changed with style changes without functionality changes. I suggest we break up this PR into multiple reviewable PRs.

  • Webpack 5 update
  • Typescript
  • Refactoring (where appropriate)

This will also help in tracking regressions.

I've started building upon the work done by Jojoshua for the webpack 5 update to start with if this is an approach you would like to take

Atm I don't have much time to help more with this, but from what I remember it was fairly solid. IMO the best use of time/effort would be baselining v4 with this and address fixes as needed...especially if automated tests are coming soon.

Jojoshua avatar Aug 21 '23 05:08 Jojoshua

IMO the best use of time/effort would be baselining v4 with this and address fixes as needed...especially if automated tests are coming soon.

I agree and will prepare a v4. Today got hung up on updating old deployment scripts but a v4 with typescript will be coming soon thanks to @Jojoshua. Lots of great work there.

kevinchappell avatar Aug 21 '23 05:08 kevinchappell

OK, I did create this pull request https://github.com/kevinchappell/formBuilder/pull/1393 with the webpack 5 update extracted out, plus a fix for the compression plugin and the disallowed import of named exports from json files in webpack5 in the mean time.

lucasnetau avatar Aug 21 '23 05:08 lucasnetau

Is this still being planned for v4 and is there some kinda planned date we can expect a v4 release?

instagibb avatar Oct 19 '23 23:10 instagibb

FormBuilder uses Semantic Versioning, There is no roadmap to a version 4 as we do not have any backwards incompatible changes planned, however should they come along then a major version bump will occur.

Conversion to TypeScript is not currently planned. Parts of this PR have already been extracted and applied, for example Webpack is now version 5. With the additional Jest automated tested patches, JSDocs have been improved throughout in the codebase and many edge cases and in some cases bugs have been rectified.

lucasnetau avatar Oct 20 '23 00:10 lucasnetau

Thanks. But your comment fails to address the previous discussion in this PR... I mean as little as 2 months ago the Owner was talking about preparing a v4 with this as a baseline. I was simply querying whether it was still planned.

Don't get me wrong though I am thankful for the maintenance that is happening.

instagibb avatar Oct 20 '23 01:10 instagibb

@kevinchappell can add his own comments in, however no version 4 is planned until there is a BC break. There isn't any plan to merge this PR so no version 4 from here.

PR as it stands is not planned to be merged for a few reasons

  • The PR isn't complete, there is still hanging questions and changes to demos that need reverting
  • Loss of Git blame history between the js and ts file conversion (A major issue for the small gain we get from TS)
  • Catch 22 of lack of automated testing to validate this PR meant we needed to get that in place first, however the bug fixing and refactoring that has come along with the automated testing means this PR is out of date.

Some of the refactoring that Jojoshua did may be useful to apply on the JS side.

lucasnetau avatar Oct 20 '23 01:10 lucasnetau

All fair points and cheers for the honesty. Thanks again

instagibb avatar Oct 20 '23 01:10 instagibb