antonycourtney / tad

A desktop application for viewing and analyzing tabular data
http://tadviewer.com
MIT License
3.18k stars 118 forks source link

use --ci param with lerna bootstrap #290

Closed jraymakers closed 1 week ago

jraymakers commented 1 week ago

When lerna bootstrap --hoist runs, it (by default) writes updates to package-lock.json. This is undesirable when running this as part of an automated build process, either locally or in CI. Adding the --ci option prevents these writes.

Note that lerna bootstrap --hoist still modifies package.json while running, reverting those changes when it's done. This is mildly weird, but tolerable.

With the use of the --ci option, the package-lock.json now reflects only those dependencies explicitly listed in package.json, not the hoisted dependencies that get dynamically added by lerna bootstrap --hoist. That's why package-lock.json was changed (and significantly shortened) in this PR.

This implies that the hoisted packages do not respect a lockfile. This is true, whether or not the --ci flag is used, because of the dynamic modification of package.json. Not respecting a lockfile is undesirable, but I don't know a way to avoid it.

Also in this change: Added two new build scripts to build just a subset of the packages, specifically the "base" packages (reltab & aggtree) and the "component" package (tadviewer). This is useful for consumers that don't want all of the drivers, or the apps.

I also added an alternate bootstrap command that avoids bootstrapping the drivers or the app. (I tried to avoid bootstrapping tadweb-app and tadweb-server, too, but for some reason was unable to ignore these.)