Skip to content

General improvements #88

@Uzlopak

Description

@Uzlopak

I am affected by the security warning for the npm package csvtojson. So i am looking for a maintained alternative. Btw. Is this package by any chance api compatible with csvtojson?

I saw some older PRs open, so I provided some low key useful PRs to see if this package is maintained.

First: thank you for merging.

Second: i would like to propose some changes:

  • consider using vitest or some other lightweight test framework. Jest is heavy and usually slow. Vitest afaik supports node 18+ i think. If supporting older node versions is mandatory than maybe using directly the assert module of nodejs or maybe even some browserify assert replacement is enough?

  • add jsdoc for more typings

  • if you add jsdoc for typings, you could put all the code into one file. By doing so, you can generate typings with typescript automatically.

  • use of some awesome eslint plugins, like sonarjs eslint plugin for static analysis or eslint-plugin-n for node specific lint rules

  • lastly maybe let claude, chatgpt and/or copilot have a look at it. Jsdoc and having all the code into one file should also improve the AI result.

  • maybe benchmark with tinybench (which is integrated in vitest)

  • investigate for potential performance bottlenecks with the benchmarks, use node clinik and all those tools

because these are not 2 minute changes, i wanted to propose these suggestions. Test engine is not so important for me, but i personally hate it, that jest is sooo slow. Also jest makes it hard to debug.

I think half of the suggestions implemented would improve this package significantly. If you agree on some of the topics, i could invest time and provide the PRs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions