perf: optimize app startup and background lifecycles

This commit is contained in:
inman
2026-08-19 00:56:15 +08:00
parent 31332f6d76
commit 927e13349b
121 changed files with 4359 additions and 1400 deletions

View File

@@ -49,7 +49,7 @@ describe('project release builder', () => {
expect(release.contract.source_digest).toBe(createHash('sha256').update(await readFile(release.sourceArchive.path)).digest('hex'));
expect(release.contract.built_archive_digest).toBe(createHash('sha256').update(release.builtArchive.bytes).digest('hex'));
expect(runElectronNodeMock.mock.calls[0][0].args).toEqual([
'npm-cli.js', 'ci', '--ignore-scripts', '--no-audit', '--no-fund',
'npm-cli.js', 'ci', '--ignore-scripts', '--no-audit', '--no-fund', '--prefer-offline', '--progress=false',
'--userconfig', expect.stringMatching(/empty-npmrc$/), '--cache', expect.stringMatching(/npm-cache$/),
]);
await rm(release.distRoot, { recursive: true, force: true });