chore: replace shortid with nanoid and modernize dependencies#383
Merged
chore: replace shortid with nanoid and modernize dependencies#383
Conversation
- shortid (deprecated) → nanoid@3 across 10 page files; VARCHAR(50) id columns accommodate nanoid's 21-char URL-safe output without schema changes - body-parser (deprecated) → express.json() / express.urlencoded() built-ins - json2csv v5 → @json2csv/plainjs (official successor package) - remove bluebird (unused dependency) - remove redirect-https (unused dependency; type declaration removed too) https://claude.ai/code/session_01XjQhFY22UkjDR9sBhbWWd4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR modernizes the project's dependencies and updates the codebase to use more modern alternatives. The main changes involve replacing the deprecated
shortidlibrary withnanoid, updating the CSV parsing library, and removing unnecessary middleware packages in favor of Express built-ins.Key Changes
shortid.generate()withnanoid()across 9 files (series, teams, admin_groups, banned_players, divisions, players, playoffSeries, registration, roles, and seasons)json2csvv5 to@json2csv/plainjsv7 with new API (Parserclass instead ofparsefunction)body-parsermiddleware with Express built-inexpress.json()andexpress.urlencoded()methodsredirect-httpsandjson2csv(no longer needed with updated packages)shortidand@types/shortidbody-parserand@types/body-parserbluebirdand@types/bluebirdredirect-httpsjson2csv@json2csv/plainjs(modern CSV parser)nanoid(lightweight ID generator)Implementation Details
nanoid()is called without arguments, using default configuration (21-character URL-friendly IDs)Parserclass constructor pattern with field configurationnanoid()syntaxhttps://claude.ai/code/session_01XjQhFY22UkjDR9sBhbWWd4