|
1 | | -const fs = require('node:fs'); |
2 | | -const path = require('node:path'); |
3 | | -const csv2json = require('csvtojson'); |
4 | | -const pLimit = require('p-limit'); |
5 | | -const cliProgress = require('cli-progress'); |
6 | | -const camelCase = require('camelcase'); |
7 | | -const dayjs = require('dayjs'); |
8 | | -const customParseFormat = require('dayjs/plugin/customParseFormat'); |
9 | | -const duration = require('dayjs/plugin/duration'); |
10 | | -const relativeTime = require('dayjs/plugin/relativeTime'); |
11 | | -const utc = require('dayjs/plugin/utc'); |
| 1 | +import fs from 'node:fs'; |
| 2 | +import path from 'node:path'; |
| 3 | +import camelCase from 'camelcase'; |
| 4 | +import cliProgress from 'cli-progress'; |
| 5 | +import csv2json from 'csvtojson'; |
| 6 | +import dayjs from 'dayjs'; |
| 7 | +import customParseFormat from 'dayjs/plugin/customParseFormat.js'; |
| 8 | +import duration from 'dayjs/plugin/duration.js'; |
| 9 | +import relativeTime from 'dayjs/plugin/relativeTime.js'; |
| 10 | +import utc from 'dayjs/plugin/utc.js'; |
| 11 | +import pLimit from 'p-limit'; |
| 12 | + |
12 | 13 | dayjs.extend(utc); |
13 | 14 | dayjs.extend(customParseFormat); |
14 | 15 | dayjs.extend(duration); |
15 | 16 | dayjs.extend(relativeTime); |
16 | 17 |
|
17 | | -const dbManager = require('./Database'); |
18 | | -const { findBestMatch, isDateAfter } = require('./helpers'); |
19 | | -const packageJson = require('../package.json'); |
| 18 | +import packageJson from '../package.json' with { type: 'json' }; |
| 19 | +import * as dbManager from './Database.js'; |
| 20 | +import { findBestMatch, isDateAfter } from './helpers.js'; |
20 | 21 |
|
21 | 22 | class MBNDSynchronizer { |
22 | 23 | constructor(options) { |
@@ -670,4 +671,4 @@ class MBNDSynchronizer { |
670 | 671 | }; |
671 | 672 | } |
672 | 673 |
|
673 | | -exports.MBNDSynchronizer = MBNDSynchronizer; |
| 674 | +export { MBNDSynchronizer }; |
0 commit comments