speced / speced/respec

Consider dropping pluralize library

Open
#3,434 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Low priority refactoring
Dominant language
JavaScript
Stars
806
Forks
434
Avg merge
1d 21h
Merged PRs (30d)
32

Description

We should be able to reduce respec scripts size by at least 10KB if we drop pluralize, and replace it with custom rules that match our needs.

Mainly, it includes hard-coded words that specs are unlikely to use, and the number of those words will only increase for robustness. Words such as:

    ['tornado', 'tornadoes'],
    ['torpedo', 'torpedoes'],
    // Ends with `us`.
    ['genus', 'genera'],
    ['viscus', 'viscera'],
    // Ends with `ma`.
    ['stigma', 'stigmata'],
    ['stoma', 'stomata'],
    ['dogma', 'dogmata'],
    ['lemma', 'lemmata'],
    ['schema', 'schemata'],
    ['anathema', 'anathemata'],
    // Other irregular rules.
    ['ox', 'oxen'],
    ['axe', 'axes'],
    ['die', 'dice'],
    ['yes', 'yeses'],

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by locating the respec scripts that import or call the pluralize library, then inspect how its current rules are used and how script size is measured. Done means the dependency is removed, replacement rules cover the required cases, and the resulting scripts are at least 10KB smaller without changing needed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.