From 51684f7a2a2611cff5ca2ce0f0844c63208a09bc Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Mon, 19 Feb 2018 20:43:53 +0200 Subject: [PATCH] Switch default home location to `~/.thelounge` and remove support of `.lounge_home` --- .thelounge_home | 2 +- src/command-line/utils.js | 20 ++----------------- test/fixtures/.gitignore | 4 ++-- .../{.lounge => .thelounge}/config.js | 0 .../thelounge-package-foo/index.js | 0 .../thelounge-package-foo/package.json | 0 .../packages/package.json | 0 .../{.lounge => .thelounge}/vapid.json | 0 test/fixtures/env.js | 2 +- 9 files changed, 6 insertions(+), 22 deletions(-) rename test/fixtures/{.lounge => .thelounge}/config.js (100%) rename test/fixtures/{.lounge => .thelounge}/packages/node_modules/thelounge-package-foo/index.js (100%) rename test/fixtures/{.lounge => .thelounge}/packages/node_modules/thelounge-package-foo/package.json (100%) rename test/fixtures/{.lounge => .thelounge}/packages/package.json (100%) rename test/fixtures/{.lounge => .thelounge}/vapid.json (100%) diff --git a/.thelounge_home b/.thelounge_home index 86428c50..88044472 100644 --- a/.thelounge_home +++ b/.thelounge_home @@ -1 +1 @@ -~/.lounge +~/.thelounge diff --git a/src/command-line/utils.js b/src/command-line/utils.js index 6f838bab..608c59b5 100644 --- a/src/command-line/utils.js +++ b/src/command-line/utils.js @@ -25,28 +25,12 @@ class Utils { return home; } - let distConfig; - - // TODO: Remove this section when releasing The Lounge v3 - const deprecatedDistConfig = path.resolve(path.join( + const distConfig = path.resolve(path.join( __dirname, "..", "..", - ".lounge_home" + ".thelounge_home" )); - if (fs.existsSync(deprecatedDistConfig)) { - log.warn(`${colors.green(".lounge_home")} is ${colors.bold.red("deprecated")} and will be ignored as of The Lounge v3.`); - log.warn(`Use ${colors.green(".thelounge_home")} instead.`); - - distConfig = deprecatedDistConfig; - } else { - distConfig = path.resolve(path.join( - __dirname, - "..", - "..", - ".thelounge_home" - )); - } home = fs.readFileSync(distConfig, "utf-8").trim(); diff --git a/test/fixtures/.gitignore b/test/fixtures/.gitignore index 03ed0764..d23abb24 100644 --- a/test/fixtures/.gitignore +++ b/test/fixtures/.gitignore @@ -1,5 +1,5 @@ # Files that may be generated by tests -.lounge/storage/ +.thelounge/storage/ # Fixtures contain fake packages, stored in a fake node_modules folder -!.lounge/packages/node_modules/ +!.thelounge/packages/node_modules/ diff --git a/test/fixtures/.lounge/config.js b/test/fixtures/.thelounge/config.js similarity index 100% rename from test/fixtures/.lounge/config.js rename to test/fixtures/.thelounge/config.js diff --git a/test/fixtures/.lounge/packages/node_modules/thelounge-package-foo/index.js b/test/fixtures/.thelounge/packages/node_modules/thelounge-package-foo/index.js similarity index 100% rename from test/fixtures/.lounge/packages/node_modules/thelounge-package-foo/index.js rename to test/fixtures/.thelounge/packages/node_modules/thelounge-package-foo/index.js diff --git a/test/fixtures/.lounge/packages/node_modules/thelounge-package-foo/package.json b/test/fixtures/.thelounge/packages/node_modules/thelounge-package-foo/package.json similarity index 100% rename from test/fixtures/.lounge/packages/node_modules/thelounge-package-foo/package.json rename to test/fixtures/.thelounge/packages/node_modules/thelounge-package-foo/package.json diff --git a/test/fixtures/.lounge/packages/package.json b/test/fixtures/.thelounge/packages/package.json similarity index 100% rename from test/fixtures/.lounge/packages/package.json rename to test/fixtures/.thelounge/packages/package.json diff --git a/test/fixtures/.lounge/vapid.json b/test/fixtures/.thelounge/vapid.json similarity index 100% rename from test/fixtures/.lounge/vapid.json rename to test/fixtures/.thelounge/vapid.json diff --git a/test/fixtures/env.js b/test/fixtures/env.js index 88f41e9c..d0af6cf2 100644 --- a/test/fixtures/env.js +++ b/test/fixtures/env.js @@ -2,5 +2,5 @@ global.log = require("../../src/log.js"); -const home = require("path").join(__dirname, ".lounge"); +const home = require("path").join(__dirname, ".thelounge"); require("../../src/helper").setHome(home);