Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
75lb committed Aug 25, 2024
1 parent d5df7f3 commit b074349
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [12, 14, 16, 18, 20, 22]
node-version: [20, 22]

steps:
- uses: actions/checkout@v4
Expand All @@ -26,4 +26,5 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm test
- run: npm i -g @75lb/nature
- run: npm run test:ci
14 changes: 6 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
/**
* @module dmd
*/

const path = require('path')
const Cache = require('cache-point')
const DmdOptions = require('./lib/dmd-options')
Expand All @@ -20,10 +16,12 @@ async function dmd (templateData, options) {
if (skipCache(options)) {
return generate(templateData, options)
} else {
return dmd.cache.read([templateData, options, dmdVersion])
.catch(function () {
return generate(templateData, options)
})
try {
return dmd.cache.read([templateData, options, dmdVersion])
} catch (err) {
/* cache miss */
return generate(templateData, options)
}
}
}

Expand Down

0 comments on commit b074349

Please sign in to comment.