Skip to content

Commit

Permalink
hotfix: patch util.isDate for node 23
Browse files Browse the repository at this point in the history
  • Loading branch information
trgwii committed Dec 2, 2024
1 parent f1437bb commit d1b686a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
// @ts-check
'use strict';

// NeDB on life support, util.isDate is removed in node 23.x, monkeypatch it
// eslint-disable-next-line global-require
if (!('isDate' in require('util'))) {
// eslint-disable-next-line global-require
require('util').isDate = require('util').types.isDate;
}

process.chdir(__dirname);
require('ts-node').register({ transpileOnly: true });

Expand Down

0 comments on commit d1b686a

Please sign in to comment.