mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-24 14:34:21 +00:00
f09609fb8f
* refactor: replace `better-sqlite3` with `node:sqlite` * test: fix test Co-authored-by: Copilot <copilot@github.com> * fix: drop unused expose * fix(cache): defer node sqlite import (#43107) --------- Co-authored-by: Copilot <copilot@github.com> Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
36 lines
695 B
TypeScript
36 lines
695 B
TypeScript
import { createRequire } from 'node:module';
|
|
|
|
const require = createRequire(import.meta.url);
|
|
|
|
export const pkg =
|
|
require('../package.json') as typeof import('../package.json');
|
|
|
|
/**
|
|
* return's re2
|
|
*/
|
|
export function re2(): RegExpConstructor {
|
|
return require('re2');
|
|
}
|
|
|
|
/**
|
|
* return's prettier
|
|
*/
|
|
export function prettier(): typeof import('prettier') {
|
|
return require('prettier');
|
|
}
|
|
|
|
/**
|
|
* return's openpgp
|
|
*/
|
|
export async function openpgp(): Promise<typeof import('openpgp')> {
|
|
return await import('openpgp');
|
|
}
|
|
|
|
/**
|
|
* return's bunyan
|
|
*/
|
|
export function bunyan(): typeof import('bunyan') {
|
|
// use `require` to allow opentelemetry instrumentation
|
|
return require('bunyan');
|
|
}
|