Skip to content

Commit

Permalink
feat: Adjust allowed error codes for detecting node:sqlite (#3900)
Browse files Browse the repository at this point in the history
  • Loading branch information
xconverge authored Dec 1, 2024
1 parent b860c03 commit 64799e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ try {
const SqliteCacheStore = require('./lib/cache/sqlite-cache-store')
module.exports.cacheStores.SqliteCacheStore = SqliteCacheStore
} catch (err) {
if (err.code !== 'ERR_UNKNOWN_BUILTIN_MODULE') {
throw err
}
// Most likely node:sqlite was not present, since SqliteCacheStore is
// optional, don't throw. Don't check specific error codes here because while
// ERR_UNKNOWN_BUILTIN_MODULE is expected, users have seen other codes like
// MODULE_NOT_FOUND
}

module.exports.buildConnector = buildConnector
Expand Down

0 comments on commit 64799e6

Please sign in to comment.