- Bump Node.js to version 18. This change is necessary as Node.js v16 will reach end-of-life on 2023-09-11. It also ensure compatibility with dependencies requiring minimum of Node.js v18, such as `vite`, `@vitejs`plugin-legacy` and `icon-gen`. - Bump `setup-node` action to v4. - Recommend using the `nvm` tool for managing Node.js versions in the documentation. - Update documentation to point to code reference for required Node.js version. This removes duplication of information, and keeps the code as single source of truth for required Node.js version. - Refactor code to adopt the `node:` protocol for Node API imports as per Node.js 18 standards. This change addresses ambiguities and aligns with Node.js best practices (nodejs/node#38343). Currently, there is no ESLint rule to enforce this protocol, as noted in import-js/eslint-plugin-import#2717. - Replace `cross-fetch` dependency with the native Node.js fetch API introduced in Node.js 18. Adjust type casting for async iterable read streams to align with the latest Node.js APIs, based on discussions in DefinitelyTyped/DefinitelyTyped#65542.
14 lines
637 B
TypeScript
14 lines
637 B
TypeScript
import { join } from 'node:path';
|
|
import distDirs from '@/../dist-dirs.json' assert { type: 'json' };
|
|
|
|
export const DESKTOP_BUILD_COMMAND = [
|
|
'npm run electron:prebuild',
|
|
'npm run check:verify-build-artifacts -- --electron-unbundled',
|
|
'npm run electron:build -- --publish never',
|
|
'npm run check:verify-build-artifacts -- --electron-bundled',
|
|
].join(' && ');
|
|
export const PROJECT_DIR = process.cwd();
|
|
export const DESKTOP_DIST_PATH = join(PROJECT_DIR, distDirs.electronBundled);
|
|
export const APP_EXECUTION_DURATION_IN_SECONDS = 60; // Long enough for CI runners
|
|
export const SCREENSHOT_PATH = join(PROJECT_DIR, 'screenshot.png');
|