From c52101ea8ed4e7ed1c549b615902fa23a93e7de4 Mon Sep 17 00:00:00 2001 From: Andras Date: Mon, 11 Feb 2019 18:38:13 -0500 Subject: [PATCH] do not depend on top-level indirection files, access exported classes as qcache. --- index.js | 8 ++++---- test/test-qcache.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/index.js b/index.js index 7079ca9..8b304e7 100644 --- a/index.js +++ b/index.js @@ -3,7 +3,7 @@ * Licensed under the Apache License, Version 2.0 */ -var qcache = require('./qcache'); +var qcache = require('./lib/qcache'); // TODO: deprecate top-level default class module.exports = function(opt) { return new qcache.TtlCache(opt) }; @@ -11,9 +11,9 @@ module.exports = function(opt) { return new qcache.TtlCache(opt) }; // TODO: deprecate TimeoutCache alias module.exports.TimeoutCache = qcache.TimeoutCache; -module.exports.TtlCache = require('./ttlcache'); +module.exports.TtlCache = require('./lib/qcache').TtlCache; module.exports.LruCache1 = require('./lib/lrucache'); -module.exports.LruCache2 = require('./lrucache'); +module.exports.LruCache2 = require('./lib/lrucache2'); module.exports.LruCache = module.exports.LruCache2; -module.exports.MultiValueCache = require('./mvcache'); +module.exports.MultiValueCache = require('./lib/mvcache'); module.exports.MvcCache = module.exports.MultiValueCache; diff --git a/test/test-qcache.js b/test/test-qcache.js index 295d710..48b44c4 100644 --- a/test/test-qcache.js +++ b/test/test-qcache.js @@ -16,13 +16,13 @@ module.exports = { 'TtlCache': { 'index should export TtlCache': function(t) { - var qcache = require('../index'); + var qcache = require('../'); t.ok(new qcache() instanceof TtlCache); t.done(); }, 'ttlcache should export TtlCache': function(t) { - var qcache = require('../ttlcache'); + var qcache = require('../').TtlCache; t.ok(new qcache() instanceof TtlCache); t.done(); },