From 16e0bca5703c5c21bb97f6f47852baca9b747bf8 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 28 May 2021 12:17:48 -0400 Subject: [PATCH] fix: improper use of filename extensions --- install/web.js | 2 +- src/install.js | 2 +- src/meta/configs.js | 2 +- test/flags.js | 6 +++--- test/mocks/databasemock.js | 2 +- test/translator.js | 2 +- test/utils.js | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/install/web.js b/install/web.js index 5c5d3d2d8c..2d9e310890 100644 --- a/install/web.js +++ b/install/web.js @@ -127,7 +127,7 @@ function welcome(req, res) { }; }); - const defaults = require('./data/defaults'); + const defaults = require('./data/defaults.json'); res.render('install/index', { url: nconf.get('url') || (`${req.protocol}://${req.get('host')}`), diff --git a/src/install.js b/src/install.js index 10eb9a93ce..c94e80d32c 100644 --- a/src/install.js +++ b/src/install.js @@ -11,7 +11,7 @@ const util = require('util'); const promptGet = util.promisify((schema, callback) => prompt.get(schema, callback)); -const utils = require('./utils.js'); +const utils = require('./utils'); const install = module.exports; const questions = {}; diff --git a/src/meta/configs.js b/src/meta/configs.js index 237597f5fa..be0e1eebcc 100644 --- a/src/meta/configs.js +++ b/src/meta/configs.js @@ -12,7 +12,7 @@ const plugins = require('../plugins'); const utils = require('../utils'); const Meta = require('./index'); const cacheBuster = require('./cacheBuster'); -const defaults = require('../../install/data/defaults'); +const defaults = require('../../install/data/defaults.json'); const Configs = module.exports; diff --git a/test/flags.js b/test/flags.js index ab41ebd473..575f4139a0 100644 --- a/test/flags.js +++ b/test/flags.js @@ -447,7 +447,7 @@ describe('Flags', () => { }); it('should rescind notification if flag is resolved', async () => { - const SocketFlags = require('../src/socket.io/flags.js'); + const SocketFlags = require('../src/socket.io/flags'); const result = await Topics.post({ cid: category.cid, uid: uid3, @@ -551,7 +551,7 @@ describe('Flags', () => { }); it('should not error if user blocked target', (done) => { - const SocketFlags = require('../src/socket.io/flags.js'); + const SocketFlags = require('../src/socket.io/flags'); let reporterUid; let reporteeUid; async.waterfall([ @@ -694,7 +694,7 @@ describe('Flags', () => { }); describe('(websockets)', () => { - const SocketFlags = require('../src/socket.io/flags.js'); + const SocketFlags = require('../src/socket.io/flags'); let pid; let tid; before((done) => { diff --git a/test/mocks/databasemock.js b/test/mocks/databasemock.js index 392fad7e55..911398b708 100644 --- a/test/mocks/databasemock.js +++ b/test/mocks/databasemock.js @@ -17,7 +17,7 @@ global.env = process.env.NODE_ENV || 'production'; const winston = require('winston'); -const packageInfo = require('../../package'); +const packageInfo = require('../../package.json'); winston.add(new winston.transports.Console({ format: winston.format.combine( diff --git a/test/translator.js b/test/translator.js index 962a1ba41b..c5479ed7e8 100644 --- a/test/translator.js +++ b/test/translator.js @@ -2,7 +2,7 @@ const assert = require('assert'); -const shim = require('../public/src/modules/translator.js'); +const shim = require('../public/src/modules/translator'); const { Translator } = shim; const db = require('./mocks/databasemock'); diff --git a/test/utils.js b/test/utils.js index cb764c214b..b9806ca4c8 100644 --- a/test/utils.js +++ b/test/utils.js @@ -3,7 +3,7 @@ const assert = require('assert'); const { JSDOM } = require('jsdom'); -const utils = require('../public/src/utils.js'); +const utils = require('../public/src/utils'); const slugify = require('../src/slugify'); const db = require('./mocks/databasemock');