trezy / next-safe

https://trezy.gitbook.io/next-safe/
BSD 3-Clause "New" or "Revised" License
167 stars 20 forks source link

feat: typescript refactor #50

Closed sambauers closed 1 year ago

sambauers commented 1 year ago

Change summary is under the line below, but the key change is obviously porting the codebase almost entirely to Typescript. This removes the need for a seperate set of type definitions derived from JSDoc, and adds all the typical quality improvements that Typescript brings.

It is key to note that moving to Typescript changes the release process by injecting a build stage. I have tried to adapt the workflows as required, but they are untested at this point. It may be best in any case to somehow release a "canary" branch and version before committing this to main.


BREAKING CHANGE: Existing implementations that rely on former JSDoc-based types or utilise undocumented parts of the API are likely to break.

Summary:

sambauers commented 1 year ago

One potential issue with this PR is that some of my syntax (tabs vs spaces) may not align to current repo practice. I think maybe there is a follow up PR where I can implement Prettier.

UncleClapton commented 1 year ago

Hey @sambauers thank you for undertaking this 🎉

I've been looking things over and everything looks solid! We're planning on adding ESLint & Prettier together in an upcoming PR, so I think we can accept this PR as-is and get everything back in line there.

I'm going to Merge this into a working branch to setup a dev build pipeline to test the new release configuration (thank you for updating our actions as well!)

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 4.0.0-beta.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: