mesqueeb / is-what

JS type check (TypeScript supported) functions like `isPlainObject() isArray()` etc. A simple & small integration.
https://mesqueeb.github.io/is-what/
MIT License
170 stars 18 forks source link

Use tsc and target ESM only #55

Closed jcbhmr closed 1 year ago

jcbhmr commented 1 year ago

This is a BREAKING CHANGE and would necessitate a version bump.

This PR would...

mesqueeb commented 1 year ago

I do like the notion of this PR seeing how much less setup the build step has. It's way cleaner in many ways than what I currently have.

However, before I can merge this i'll need to try and publish a beta version on NPM and double check against https://arethetypeswrong.github.io/?p=is-what If the types are correct then I'd be happy to implement this PR and major upgrade is-what to require node v16.

PS: a reason that I love having the dist folder in the git repo for small util packages like these is that it's really clear to see the exact changes that a build step change brings. That's the reason, and I believe another reason was for DENO, but it's been so long I can't remember fully.

jcbhmr commented 1 year ago

it's really clear to see the exact changes that a build step change brings.

Ideally you wouldn't have to care at all! 🤣 I think that GitHub Actions Artifacts are great for this. You can npm pack and upload the .tag.gz for each commit and BOOM! 💥 you can see everything that you'd ever want as a little preview! But that's overkill in most cases since you can just click this:

image

and open in Codespaces in about 20s 😉

But I do understand that you like co-locating build and source code. A good compromise might be the Artifact thing or some kind of "bundle size checker" or similar?

jcbhmr commented 1 year ago

@mesqueeb You can use npm pack .tar.gz output:

image

Looks good! 👍 Targetting ESM only means Node.js v12+. Node.js LTS is 16 which Ends in 3 months and 1 week (11 Sep 2023) https://endoflife.date/nodejs

jcbhmr commented 1 year ago

Closing in favor of stacking a PR on top of #74