mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-19 07:58:46 +01:00
Remove use of __dirname from main process
This commit is contained in:
@@ -3,32 +3,10 @@
|
||||
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
import type { PackageJsonType } from '../types/packageJson.d.ts';
|
||||
|
||||
const PACKAGE_JSON_PATH = join(__dirname, '..', '..', 'package.json');
|
||||
|
||||
const json: {
|
||||
name: string;
|
||||
version: string;
|
||||
productName: string;
|
||||
build: {
|
||||
appId: string;
|
||||
mac: {
|
||||
releaseInfo: {
|
||||
vendor: {
|
||||
minOSVersion: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
deb: {
|
||||
depends: Array<string>;
|
||||
};
|
||||
files: Array<string | Record<string, unknown>>;
|
||||
};
|
||||
} = JSON.parse(readFileSync(PACKAGE_JSON_PATH, 'utf8'));
|
||||
|
||||
export default json;
|
||||
|
||||
export const { name } = json;
|
||||
export const { version } = json;
|
||||
export const { productName } = json;
|
||||
export const { build } = json;
|
||||
export const packageJson: PackageJsonType = JSON.parse(
|
||||
readFileSync(PACKAGE_JSON_PATH, 'utf8')
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user