mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): Pick up release version and date from package.json (no-changelog) (#13666)
This commit is contained in:
committed by
GitHub
parent
9ba9443460
commit
093cc982b8
@@ -9,9 +9,6 @@ export class GenericConfig {
|
||||
@Env('N8N_RELEASE_TYPE')
|
||||
releaseChannel: 'stable' | 'beta' | 'nightly' | 'dev' = 'dev';
|
||||
|
||||
@Env('N8N_RELEASE_DATE')
|
||||
releaseDate?: Date;
|
||||
|
||||
/** Grace period (in seconds) to wait for components to shut down before process exit. */
|
||||
@Env('N8N_GRACEFUL_SHUTDOWN_TIMEOUT')
|
||||
gracefulShutdownTimeout: number = 30;
|
||||
|
||||
@@ -10,14 +10,6 @@ export class SentryConfig {
|
||||
@Env('N8N_FRONTEND_SENTRY_DSN')
|
||||
frontendDsn: string = '';
|
||||
|
||||
/**
|
||||
* Version of the n8n instance
|
||||
*
|
||||
* @example '1.73.0'
|
||||
*/
|
||||
@Env('N8N_VERSION')
|
||||
n8nVersion: string = '';
|
||||
|
||||
/**
|
||||
* Environment of the n8n instance.
|
||||
*
|
||||
|
||||
@@ -243,7 +243,6 @@ describe('GlobalConfig', () => {
|
||||
sentry: {
|
||||
backendDsn: '',
|
||||
frontendDsn: '',
|
||||
n8nVersion: '',
|
||||
environment: '',
|
||||
deploymentName: '',
|
||||
},
|
||||
@@ -326,7 +325,6 @@ describe('GlobalConfig', () => {
|
||||
DB_LOGGING_MAX_EXECUTION_TIME: '0',
|
||||
N8N_METRICS: 'TRUE',
|
||||
N8N_TEMPLATES_ENABLED: '0',
|
||||
N8N_RELEASE_DATE: '2025-02-17T13:54:15Z',
|
||||
};
|
||||
const config = Container.get(GlobalConfig);
|
||||
expect(structuredClone(config)).toEqual({
|
||||
@@ -358,10 +356,6 @@ describe('GlobalConfig', () => {
|
||||
...defaultConfig.templates,
|
||||
enabled: false,
|
||||
},
|
||||
generic: {
|
||||
...defaultConfig.generic,
|
||||
releaseDate: new Date('2025-02-17T13:54:15.000Z'),
|
||||
},
|
||||
});
|
||||
expect(mockFs.readFileSync).not.toHaveBeenCalled();
|
||||
});
|
||||
@@ -397,15 +391,4 @@ describe('GlobalConfig', () => {
|
||||
'Invalid number value for DB_LOGGING_MAX_EXECUTION_TIME: abcd',
|
||||
);
|
||||
});
|
||||
|
||||
it('should handle invalid timestamps', () => {
|
||||
process.env = {
|
||||
N8N_RELEASE_DATE: 'abcd',
|
||||
};
|
||||
const config = Container.get(GlobalConfig);
|
||||
expect(config.generic.releaseDate).toBeUndefined();
|
||||
expect(consoleWarnMock).toHaveBeenCalledWith(
|
||||
'Invalid timestamp value for N8N_RELEASE_DATE: abcd',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user