concordancejs / concordance

Compare, format, diff and serialize any JavaScript value

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Maintenance

tommy-mitchell opened this issue · comments

commented

The following is a list of internal refactors:

  • Rewrite in TypeScript
  • Move to ESM (#83)
  • Replace the current continuation pattern with generator functions
  • Use newer JS features/syntax, e.g:
    • Object.hasOwn (available from Node.js 16.9) (#83)
    • Some more in this list
  • Remove old code (e.g. function name properties)
  • Add documentation for contributing

Original description

@novemberborn in avajs/ava#1861 (comment), you mention that Concordance is in need of some love. While the issues here are good for tracking enhancements, I think it would be good to track refactor/maintenance items in a single issue.

What are some things you think need improved? Listing them would make it easier for people to pick one and help out.

Some thoughts of my own:

  • Rewrite in ESM, use newer JS features/syntax
  • Add documentation about internals for new contributors

TypeScript would be good, too. There's some very old stuff that is no longer relevant (function name properties if I recall). And there's a continuation pattern that should be replaced by generator functions.

commented

Do you mean adding type definitions, or rewriting in TypeScript?

Rewrite. There’s a lot of complex logic that would benefit from typesafety.

commented

I've updated the issue description with a list, feel free to edit and add items.

Are you wanting to update the code style as well, e.g. with xo, a .editorconfig, etc.?