Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exploring a next version #27

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Exploring a next version #27

wants to merge 3 commits into from

Conversation

GuillaumeRochat
Copy link
Owner

@GuillaumeRochat GuillaumeRochat commented May 26, 2024

This is a branch where I will do some exploration mostly for fun and but also to see how things could be different/better. The changes could lead to a new major version if it seems appropriate.

Things to keep in mind for decisions are :

  • No dependencies.
  • Minimal devDependencies.
  • Smallest bundle possible.
  • Fast validations.

I have a few things I want to try out :

  • Reduce the dev dependencies to a minimum (see commit c6ecdf7)
  • Check how to build ESM and CSJ versions from the typescript code (see commit 32ff9e1)
  • Refactor the tests to be in a table format so we reduce the risk of forgetting some tests.
  • Add some benchmark to see how quick it currently runs (and if we add more features, how much they impact this).
  • Add some features (see open Issues).

Contributions to this branch are welcomed, but before doing something, please add a comment to this PR so we avoid doubling the efforts.

To try to reduce the node_modules and dependencies to a minimum, I figured I could rely on simply running the tests
with the node built in test runner. This means that aside from typescript, we have no dependency.

One upside of this method is that we use the built version of the lib and do not need any typescript processor to
run the tests. This is fine because :
- this project is very small and simple
- the tests do not need to be typed
- the build step is quick enough to be built before each test run

This also moves the file in the root. Since there are only two files, why bother with a src directory?

It also gets rid of the linter. This is because :
- I don't think tslint is supported anymore
- I already have a default prettier running in my text editor
- I didn't feel like adding eslint in the project with some configs
- The project is small so manual linting is still doable
I'm not sure if this is the right way to do this in 2024, but this seems to work. I tested the output with:

`npx publint`

and it seems to be working.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant