Skip to content

Instantly share code, notes, and snippets.

@jonchurch
Last active September 18, 2023 14:54
Show Gist options
  • Save jonchurch/637aa1e601141cc27361b353852b164b to your computer and use it in GitHub Desktop.
Save jonchurch/637aa1e601141cc27361b353852b164b to your computer and use it in GitHub Desktop.
Lodash Short Term Maintenance Plan

Lodash Short Term Maintenance Plan

Clean up, clean up

Everybody, everywhere.

Clean up, clean up

Everybody do your share.

~ Barney the Dinosaur

Goals

  1. Get master branch to a state where it can be cloned and successfully run all tests
  2. Ensure Github Actions workflows run tests on; PR opened, PR updated, push to master branch
  3. Clear the way for contributions to Lodash v5
  4. Document breaking changes that have already been merged to master, evaluate if they should be rolled back
  5. Explore if the v4 release can be released without breaking changes from a fixed up master branch
  6. Modernize master branch to 2023 package maintenance standards (debateable what that means 😂)

Non-Goals

  1. Release v5
  2. Break v4
  3. Open PRs that are impossible to review rigorously due to volume of changes

Step 0: Decide on Master Branch Direction

Due to breaking changes already in master, decide whether it will serve as the base for a new major release or a fix-up of v4. This will inform all subsequent steps.

Examples of breaking commits are (in order of earliest to latest):

Step 1: Complete the rename of test files

There was a migration of tests from QUnit to Mocha. It entailed liberating the monolithic test file into suites focused per module. Current state of master has that work in flux. All tests appear to be migrated, but are not being run by the npm test command due to the test pattern used.

In my fork's branch jonchurch/js-tests I have already done the rename in addition to leaving TODOs on all failing tests. But that's a PR that combines both file renames and code changes, and it would be much easier to review a PR which is purely renames (despite using git mv, github still shows deletions for the files)

I run this command from the test dir to do the move:

for file in *.js; do [[ $file != *.test.js ]] && mv "$file" "${file%.js}.test.js"; done

Step 2: Lint Fixes

There are still files that haven't been updated to the latest prettier styling for master.

That's simple enough, but is a useless diff, so let's get it out of the way first.

While we are at it, we need to npm i -d eslint-plugin-mocha.

It's silly, but let's update the npm run style script to be called npm run lint to better match widely accepted conventions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment