From cdef559c900e41a83b47cb59c33a74e1ab43aeed Mon Sep 17 00:00:00 2001 From: Lloyd Brookes Date: Sun, 25 Aug 2024 23:15:44 +0100 Subject: [PATCH] fix CI --- index.js | 6 ++++-- test/ddata/children.js | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 28c79cd..64c1401 100644 --- a/index.js +++ b/index.js @@ -3,6 +3,7 @@ const Cache = require('cache-point') const DmdOptions = require('./lib/dmd-options') const dmdVersion = require('./package').version const FileSet = require('file-set') +const os = require('os') /** * Transforms doclet data into markdown documentation. @@ -17,7 +18,8 @@ async function dmd (templateData, options) { return generate(templateData, options) } else { try { - return dmd.cache.read([templateData, options, dmdVersion]) + const result = await dmd.cache.read([templateData, options, dmdVersion]) + return result } catch (err) { /* cache miss */ return generate(templateData, options) @@ -25,7 +27,7 @@ async function dmd (templateData, options) { } } -dmd.cache = new Cache({ dir: path.join(require('os').tmpdir(), 'dmd') }) +dmd.cache = new Cache({ dir: path.join(os.tmpdir(), 'dmd') }) async function generate (templateData, options) { const fs = require('fs') diff --git a/test/ddata/children.js b/test/ddata/children.js index 557b2af..219f519 100644 --- a/test/ddata/children.js +++ b/test/ddata/children.js @@ -27,4 +27,3 @@ test.set('_children', function () { }) module.exports = { test, only, skip } -