App maintainer advice, soliciting. & Npm install [--production] & post-install cleanups

I would probably tag this with npmjs / nodejs / yarn or maintainers / meta if available.

Expressed indirectly in other places, I would like to collect recommendations and gotchas for app maintainers, common ways to improve the quality and usability of a package (and, hopefully also thereby make it easier to enlist help from others). Their ongoing contributions make yunohost possible, so it would be wonderful to limit their burden and help.

It seems like some of my comments, or discoveries here from others, might wind up in a PR to update Writing app scripts | Yunohost Documentation.

Disk usage of installs stands out, especially dependencies and non-production dependencies of packaged applications.

Production installs from node package managers (yarn, npm, bun, …)

yarn install --production[=true|false]
Yarn will not install any package listed in devDependencies if the NODE_ENV environment variable is set to production . Use this flag to instruct Yarn to ignore NODE_ENV and take its production-or-not status from this flag instead.

From yarn install cli docs from a quick search checking about production installs.

It looks like @ericg made this improvement to uptime-kuma some months ago. Thank you! Blaming uptime-kuma_ynh/scripts/install at 16db9f75cef03a3f49a6a9abae1fa09e7ddfac39 · YunoHost-Apps/uptime-kuma_ynh · GitHub

Excess node versions

Minor versions likely extraneous too, 3 major versions, 9 distinct minor versions, and

Not sure which cab be removed, what might too strictly depend on it.

9 unnecessary patch version of node (major.minor.patch)


Other common issues?

What are other maintenance burdens for users? What are other complex aspects of ynh package setup, that should receive special care from assisting maintainers?

1 Like

Based on this advice, it seems like setting NODE_ENV=production is something I should add it docs, or contribute to the ynh_* runner scripts.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.