mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 20:13:07 +00:00
Merge pull request #3498 from MiniDigger/feature/package-versions
Print package versions on startup
This commit is contained in:
commit
8a224809dd
3 changed files with 5 additions and 2 deletions
|
@ -97,8 +97,10 @@ function loadPackages() {
|
|||
return;
|
||||
}
|
||||
|
||||
const version = packageInfo.version;
|
||||
packageInfo = packageInfo.thelounge;
|
||||
packageInfo.packageName = packageName;
|
||||
packageInfo.version = version;
|
||||
|
||||
packageMap.set(packageName, packageFile);
|
||||
|
||||
|
@ -116,7 +118,7 @@ function loadPackages() {
|
|||
packageFile.onServerStart(packageApis(packageInfo));
|
||||
}
|
||||
|
||||
log.info(`Package ${colors.bold(packageName)} loaded`);
|
||||
log.info(`Package ${colors.bold(packageName)} ${colors.green("v" + version)} loaded`);
|
||||
});
|
||||
|
||||
if (anyPlugins) {
|
||||
|
|
1
test/fixtures/.thelounge/packages/node_modules/thelounge-package-foo/package.json
generated
vendored
1
test/fixtures/.thelounge/packages/node_modules/thelounge-package-foo/package.json
generated
vendored
|
@ -2,6 +2,7 @@
|
|||
"name": "thelounge-package-foo",
|
||||
"private": true,
|
||||
"main": "index.js",
|
||||
"version": "dummy",
|
||||
"thelounge": {
|
||||
"type": "package"
|
||||
},
|
||||
|
|
|
@ -53,7 +53,7 @@ describe("packages", function() {
|
|||
packages.loadPackages();
|
||||
|
||||
expect(stdout).to.deep.equal(
|
||||
"Package thelounge-package-foo loaded\nThere are packages using the experimental plugin API. Be aware that this API is not yet stable and may change in future The Lounge releases.\n"
|
||||
"Package thelounge-package-foo vdummy loaded\nThere are packages using the experimental plugin API. Be aware that this API is not yet stable and may change in future The Lounge releases.\n"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue