Migrate codebase to TypeScript #115
Comments
|
I'm keen to have a go at this! |
|
But I might approach it a bit differently as I use envalid in the browser a lot. I'd like it to be:
|
|
That's a separate discussion from migrating to TS - ideally a TS migration should have no logic changes |
|
Yeah, you're right, I snowballed a few different discussions in there. |
|
That said, would love a PR migrating to TS and an issue discussing potential changes |
|
What's your opinion on using |
|
Up to @af, but if it helps us get up and running we can always rip it out later |
|
This sounds great! I agree with SimenB that we should limit the breaking changes as part of the conversion. Ideally the conversion could happen without requiring a major version bump. Personally I agree the lib should be strict by default, but we should move that to a separate discussion. On the dependencies side, this lib was never initially intended for browser usage, so it's not optimized for that case dependency-wise. According to bundlephobia something like 50% of the bundle size comes from the |
|
Hey again! So, it was easier for me to start from scratch and add things gradually than to get it working here so it resulted in a new repo as you can see here: https://github.com/KATT/envsafe Which then also led me to change some things to how I'd like it What I'm "missing" right now is:
How do you think we should proceed? I have a feeling like the changes are too major for you to want it in as it is, so maybe we keep it as two sister projects? |
|
I'm very happy to pass this back into envalid and burn that project if you like it, but I don't know if you like the changes, want to do a major version, etc. |
|
TBH I like the changes for the most part. I'm not sure how much people use those missing features but the only things I would miss personally are:
I'll take a closer look this weekend but I'm intrigued by the idea of this being a v7. Curious if any of those features are a "dealbreaker" for anyone. |
|
Great to hear! I'd prefer to have one-package-to-rule-them-all rather than adding more fragmentation.
Other notable changes:
Removed:
|
|
Update: I finally had some time to check this out over this last weekend. Thanks @KATT, looks great and while I think overall it's a big step forward, to reduce churn for existing users I think we should roll the changes into the existing API. My WIP isn't in a reviewable state yet, but hopefully will be in a couple of days. Wanted to get feedback on the following plan though: Major changes I think we should incorporate:
However I don't want to do a full rewrite of the API; the churn would probably be too annoying for existing users. That means:
|
|
Sounds like good plan! I'm happy to take a look at your WIP whenever. |
|
@KATT Just pushed up a WIP PR, would love your feedback |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

I was a little slow jumping on the TS bandwagon but I'm a full convert now. I would like to convert the full codebase to TS sometime in the near future, but haven't had the time to do so yet. Creating this as a tracking issue and advertising the intent, in case someone wants to do this before I get around to it :)
The text was updated successfully, but these errors were encountered: