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
185 stars 20 forks source link

[Discussion] Consider ESM-only for v5? #47

Closed jcbhmr closed 6 months ago

jcbhmr commented 1 year ago

Popular opensource guru sindresorhus has done this https://github.com/sindresorhus/meta/discussions/15 https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

I think that this is a good step to avoid the dual package hazard: #37

jcbhmr commented 1 year ago

@mesqueeb I've been working on various things all-at-once in the https://github.com/mesqueeb/is-what/tree/jcbhmr branch. Just thought I'd let you know. 😊 I hope to be able to break that branch into multiple "feature-ish" PRs to be considered somewhat independently.

https://github.com/mesqueeb/is-what/tree/jcbhmr does these things:

  1. [x] Split index.ts into multiple files
  2. [x] Add a bunch of documentation for some of the functions (still have more to do)
  3. [x] Remove useless "isMap() detects if the value is a Map" comments
  4. [x] Remove redundant JSDoc @param declarations (already typed by TS)
  5. [x] Remove dist/ from source control
  6. [x] Automate deployments to https://deno.land/x/is_what via tags on a separate build branch #53
  7. [x] Improve separation of concerns with publishing workflows #40
  8. [x] Add a docs preview action to give a .zip of what would be deployed
  9. [x] Add more tests (a LOT more tests)
  10. [x] OPINION/OPTIONAL: Reset to default Prettier configuration. Defaults are good. I like defaults.
  11. [x] Put prettier in package.json (before I eventually removed it and used the defaults)
  12. [x] Add a JSDoc prettier plugin #45
  13. [x] Add a JSDoc package.json plugin #45
  14. [x] Add TSX as a dev dep #44
  15. [x] Use node --test and node:test for test running #44
  16. [x] Add a prettier pre-format hook
  17. [x] DISCOURAGE local npm publish by removing the np helper #40
  18. [x] Use plain tsc instead of rollup #44
  19. [x] ONLY provide .js (no .cjs) for ESM-only package #47 #37
  20. [x] Revamp readme to shift docs to the docs website (it's shorter)
  21. [x] Improve readme with images
  22. [x] Remove .github/FUNDING.yml with the expectation that it will be moved to mesqueeb/.github

any probably more stuff to come! Bear in mind that this https://github.com/mesqueeb/is-what/tree/jcbhmr WILL NOT BE MERGED INTO MAIN but instead is my "playground" 🪀 that I want to show off and get feedback on 😊

mesqueeb commented 1 year ago

Don't run too fast because it'll be harder to communicate about how we feel about each change 😅

Discussion regarding to the last post's todos can be continued here: https://github.com/mesqueeb/is-what/pull/57 → Do you want me to address each of your todos with my opinion?

Discussion regarding to the ESM only can be continued here: https://github.com/mesqueeb/is-what/pull/55