fix(core): Pick up release version and date from package.json (no-changelog) (#13666)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-03-04 11:35:07 +01:00
committed by GitHub
parent 9ba9443460
commit 093cc982b8
10 changed files with 37 additions and 60 deletions

View File

@@ -114,9 +114,8 @@ export const MOCK_PACKAGE: InstalledPackages[] = [
export function simulateOutdatedInstanceOnce(versionName = MOCK_01110_N8N_VERSION.name) {
const baseUrl = Container.get(GlobalConfig).versionNotifications.endpoint + '/';
jest
.spyOn(constants, 'getN8nPackageJson')
.mockReturnValueOnce({ name: 'n8n', version: versionName });
// @ts-expect-error readonly export
constants.N8N_VERSION = versionName;
nock(baseUrl).get(versionName).reply(200, [MOCK_01110_N8N_VERSION, MOCK_09990_N8N_VERSION]);
}
@@ -124,9 +123,8 @@ export function simulateOutdatedInstanceOnce(versionName = MOCK_01110_N8N_VERSIO
export function simulateUpToDateInstance(versionName = MOCK_09990_N8N_VERSION.name) {
const baseUrl = Container.get(GlobalConfig).versionNotifications.endpoint + '/';
jest
.spyOn(constants, 'getN8nPackageJson')
.mockReturnValueOnce({ name: 'n8n', version: versionName });
// @ts-expect-error readonly export
constants.N8N_VERSION = versionName;
nock(baseUrl).persist().get(versionName).reply(200, [MOCK_09990_N8N_VERSION]);
}