Feat: es modules (#139)
* All file imports change from commonjs to es-module * Improved plex error responses back from api * Converted viewHistory to es module * Es-module requires file extension, updated all imports * Fix esmodule not having __dirname defined in scope * Replace dynamic-require with fs readFileSync * Short message service module function is exported as default * Resolved lint issues & ignore import/extension rule until typescript * All tests file imports changed from commonjs to es-module * Import json fixtures with new helper
This commit was merged in pull request #139.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const configuration = require("../../../config/configuration").getInstance();
|
||||
const TMDB = require("../../../tmdb/tmdb");
|
||||
import TMDB from "../../../tmdb/tmdb.js";
|
||||
import Configuration from "../../../config/configuration.js";
|
||||
|
||||
const configuration = Configuration.getInstance();
|
||||
const tmdb = new TMDB(configuration.get("tmdb", "apiKey"));
|
||||
|
||||
// there should be a translate function from query params to
|
||||
@@ -65,7 +66,7 @@ const popularShows = (req, res) =>
|
||||
const topRatedShows = (req, res) =>
|
||||
fetchTmdbList(req, res, "miscTopRatedTvs", "show");
|
||||
|
||||
module.exports = {
|
||||
export default {
|
||||
nowPlayingMovies,
|
||||
popularMovies,
|
||||
topRatedMovies,
|
||||
|
||||
Reference in New Issue
Block a user