diff --git a/lib/factorioServer/index.js b/lib/factorioServer/index.js index 0dd4c602..b6e175f8 100644 --- a/lib/factorioServer/index.js +++ b/lib/factorioServer/index.js @@ -15,7 +15,6 @@ const child_process = require("child_process"); const path = require("path"); const mkdirp = require("mkdirp"); -const appRootPath = require("app-root-path"); const fileOps = require("lib/fileOps"); diff --git a/lib/factorioServer/index.spec.js b/lib/factorioServer/index.spec.js index 0a63fbcb..1caf2afb 100644 --- a/lib/factorioServer/index.spec.js +++ b/lib/factorioServer/index.spec.js @@ -2,7 +2,6 @@ const assert = require("assert"); const fs = require("fs"); const path = require("path"); -const appRootPath = require("app-root-path"); const parallel = require("mocha.parallel"); const mkdirp = require("mkdirp"); @@ -75,7 +74,7 @@ describe("class factorioServer/index.js", ()=>{ describe(".createMap(mapName.zip)", ()=>{ it("creates a map file as instanceDirectory/saves/map.zip", async function(){ this.timeout(20000); // these test often takes a lot of time in the map creation step (4500 ms on i3 dev system) - let relativePath = __dirname.replace(appRootPath, "").substr(1); + let relativePath = path.relative('.', __dirname); let server = new factorioServer({ instanceDirectory: path.join(relativePath, "_testData_createMap"), instanceName: "Unit testing instance", @@ -93,7 +92,7 @@ describe("class factorioServer/index.js", ()=>{ }); it("supports custom filenames", async function(){ this.timeout(20000); - let relativePath = __dirname.replace(appRootPath, "").substr(1); + let relativePath = path.relative('.', __dirname); let server = new factorioServer({ instanceDirectory: path.join(relativePath, "_testData_createMap_2"), instanceName: "Unit testing instance", diff --git a/package.json b/package.json index 769527c1..a81d6f63 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "author": "Danielv123", "license": "ISC", "dependencies": { - "app-root-path": "^2.0.1", "as-table": "^1.0.31", "averaged-timeseries": "^1.4.0", "base64url": "^3.0.0",