thelounge/src/command-line
Reto Brunner c5fcc5d72f install: allow installation of local packages
It may not be desirable to host all plugins on npm, allow for local packages to
be installed given a package name with a `file:` prefix.

This is still more restrictive than what yarn would support but allows us to still
verify the thelounge compatibility by reading the package.json file.

`yarn add` messes up with local filepaths and generates a lockfile that is
"outdated" as far as any other yarn commands go, which makes them error out.

For some reason `yarn install` fixes that and hence we run that after an install.
Here's the diff of yarn.lock between the broken state after `yarn add file:$path`
and `yarn install`
	--- yarn.lock.2.afterAdd	2021-06-02 00:10:52.365134018 +0200
	+++ yarn.lock.3.afterinstall	2021-06-02 00:13:27.122760442 +0200
	@@ -2194,7 +2194,7 @@
	     safe-buffer "^5.1.2"
	     yallist "^3.0.3"

	-thelounge-plugin-shortcuts@/home/reto/sourcecode/thelounge-plugin-shortcuts:
	+"thelounge-plugin-shortcuts@file:../../sourcecode/thelounge-plugin-shortcuts":
	   version "1.0.12"
	   dependencies:
	     thelounge "4.2.0"

The only thing it does is switch an absolute path to a relative one for whatever
reason.
2021-06-05 13:01:55 +02:00
..
users Make add and reset CLI commands scriptable 2020-10-07 09:00:00 +03:00
index.js Replace all uses of fs-extra with native methods 2020-03-22 20:42:16 +02:00
install.js install: allow installation of local packages 2021-06-05 13:01:55 +02:00
outdated.js Add check for outdated packages, and show on the help screen. 2019-07-19 13:33:09 +01:00
start.js Replace all uses of fs-extra with native methods 2020-03-22 20:42:16 +02:00
uninstall.js Run format after updating to prettier 2.0 2020-03-21 22:55:36 +02:00
upgrade.js Run format after updating to prettier 2.0 2020-03-21 22:55:36 +02:00
utils.js Fix up commander changes 2020-03-15 14:00:02 +02:00