Skip to content

Remove unused dependencies, misc. small fixes #796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 0 commits into from

Conversation

trgwii
Copy link
Member

@trgwii trgwii commented Jan 21, 2025

  • Remove dotenv in favor of --env-file-if-exists=.env (v22.9.0). We can switch to --env-file=.env (v20.6.0), but it will fail to start if .env is missing, or we can restore dotenv for now.
  • Remove cross-env (used only for NODE_ENV=production|development) in favor of a CLI argument --production which is checked in server/env.js and sets process.env.NODE_ENV to production or development if it was not already set.
  • Switch sqlite3 to better-sqlite3, most of the deprecation warnings come from sqlite3, so here's a before / after:
    # before:
    npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
    npm warn deprecated @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
    npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
    npm warn deprecated [email protected]: This package is no longer supported.
    npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
    npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
    npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
    npm warn deprecated [email protected]: This package is no longer supported.
    npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
    npm warn deprecated [email protected]: node-mailer is not maintained
    npm warn deprecated [email protected]: This package is no longer supported.
    
    # after:
    npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and   tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
    npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
    npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported
    (The remaining deprecation warnings all come from geoip-lite).
  • Replaced node-cron with setInterval, it was only being used to call a function every 30 seconds in server/cron.js.
  • Removed node-mailer (unused). nodemailer is used and remains.
  • Replace uuid (only v4 is used) with builtin crypto.randomUUID() (v14.17.0).
  • Require all builtin modules using node: prefix. (support added in v14.18.0)
  • Standardize to double quotes everywhere (No linting / autoformatting added).
  • Remove some unused imports.

@poeti8
Copy link
Member

poeti8 commented Jan 21, 2025

Changing the base to the develop branch since I'd want to test the published Docker image for development before merging into main

@poeti8 poeti8 changed the base branch from main to develop January 21, 2025 09:19
@poeti8 poeti8 closed this Jan 22, 2025
@poeti8
Copy link
Member

poeti8 commented Jan 22, 2025

Got closed accidentally XD

Pushed your commit to develop now, I'll merge into main from there.

Oh by the way, I added back dotenv, --env-file-if-exists=.env is quite new, can't afford to tell everyone to use the latest version of Node.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants