blob: 66f19dc31eb7f12cbcba3747ccacc7ee786e3320 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/* eslint-disable @typescript-eslint/no-require-imports */
// we need `require` for dynamic runtime imports
// https://stackoverflow.com/a/46745166/10109857
/**
* returns renovates package.json
*/
const path = (() => require('path'))();
// need to use dynamic strings so that typescript does not include package.json in dist folder after compilation
const filePath = path.join(__dirname, '..', 'package.json');
const pkg = (() => require(filePath))();
/**
* return's re2
* @returns {RegExpConstructor}
*/
function re2() {
return require('re2');
}
/**
* return's prettier
* @returns {typeof import('prettier')}
*/
function prettier() {
return require('prettier');
}
/**
* return's openpgp
* @returns {typeof import('openpgp')}
*/
function openpgp() {
return require('openpgp');
}
/**
* return's sqlite
* @returns {typeof import('better-sqlite3')}
*/
function sqlite() {
return require('better-sqlite3');
}
module.exports = {
re2,
pkg,
openpgp,
prettier,
sqlite,
};
|