diff --git a/packages/devextreme/js/__internal/core/license/license_validation.test.ts b/packages/devextreme/js/__internal/core/license/license_validation.test.ts index 05dfa1ed8c2e..310c260a311f 100644 --- a/packages/devextreme/js/__internal/core/license/license_validation.test.ts +++ b/packages/devextreme/js/__internal/core/license/license_validation.test.ts @@ -406,7 +406,7 @@ describe('license check', () => { ])('License verification warning should be logged if license is corrupted/invalid [%#]', ({ token, version }) => { validateLicense(token, version); expect(consoleWarnSpy).toHaveBeenCalledTimes(2); - expect(consoleWarnSpy).toHaveBeenCalledWith(expect.stringContaining('License key verification has failed')); + expect(consoleWarnSpy).toHaveBeenCalledWith(expect.stringContaining('W0021')); }); test.each([ @@ -497,7 +497,7 @@ describe('DevExpress license check', () => { const token = 'LCPtherestofthekey'; validateLicense(token, '25.1.3'); expect(consoleWarnSpy).toHaveBeenCalledTimes(2); - expect(consoleWarnSpy).toHaveBeenCalledWith(expect.stringContaining('License key verification has failed')); + expect(consoleWarnSpy).toHaveBeenCalledWith(expect.stringContaining('W0021')); expect(trialPanelSpy).toHaveBeenCalled(); }); }); diff --git a/packages/devextreme/js/__internal/core/license/license_warnings.ts b/packages/devextreme/js/__internal/core/license/license_warnings.ts index 29475f3d3cb0..41b07218d155 100644 --- a/packages/devextreme/js/__internal/core/license/license_warnings.ts +++ b/packages/devextreme/js/__internal/core/license/license_warnings.ts @@ -5,7 +5,7 @@ export const TEMPLATES = Object.freeze({ let warningDescription = ''; switch (code) { case 'W0019': - warningDescription = 'DevExtreme: You are using a trial (evaluation) version of DevExtreme.'; + warningDescription = 'DevExtreme: You are using a trial (evaluation) version.'; break; case 'W0020': warningDescription = 'DevExtreme: License Key Has Expired.'; @@ -40,7 +40,7 @@ export const TEMPLATES = Object.freeze({ case 'incompatibleVersion': return `Incompatible DevExpress license key version (v${keyVersion}). Download and register an updated DevExpress license key (v${requiredVersion}+). Clear npm/IDE/NuGet cache and rebuild your project (https://devexpress.com/DX1002).`; default: - return 'License key verification has failed.'; + return ''; } }, @@ -70,10 +70,12 @@ export function logLicenseWarning( const pushToLastGroup = (...items: string[]): void => { const lastGroup = warnings[warnings.length - 1]; + const notEmptyItems = items.filter((item) => !!item); + if (lastGroup.length === 1) { - lastGroup.push('', ...items); + lastGroup.push('', ...notEmptyItems); } else { - lastGroup.push(...items); + lastGroup.push(...notEmptyItems); } }; diff --git a/packages/devextreme/license/devextreme-license.js b/packages/devextreme/license/devextreme-license.js index 8b900783b3f7..6acd64aee4d7 100644 --- a/packages/devextreme/license/devextreme-license.js +++ b/packages/devextreme/license/devextreme-license.js @@ -184,7 +184,6 @@ function main() { if(lcx && lcx.trimStart().startsWith('ewog')) { logStderr( prefixed(`${TEMPLATES.warningPrefix(1000)} ${TEMPLATES.purchaseLicense}`), - TEMPLATES.keyVerificationFailed(), TEMPLATES.oldDevExtremeKey(currentVersion), TEMPLATES.keyWasFound(source.type, source.path), prefixed(`${TEMPLATES.warningPrefix(1001)} ${TEMPLATES.installationInstructions}`), @@ -217,9 +216,6 @@ function main() { prefixed(`${TEMPLATES.warningPrefix(code)} ${TEMPLATES.keyVerificationFailed(warning.type, warning.keyVersion, warning.currentVersion)}`), ); } else { - lines.push( - TEMPLATES.keyVerificationFailed(warning.type, warning.keyVersion, warning.currentVersion), - ); lines.push(prefixed(`${TEMPLATES.warningPrefix(code)} ${TEMPLATES.installationInstructions}`)); } } diff --git a/packages/devextreme/license/messages.js b/packages/devextreme/license/messages.js index e744a560dae8..63788fd3f69b 100644 --- a/packages/devextreme/license/messages.js +++ b/packages/devextreme/license/messages.js @@ -55,7 +55,7 @@ const TEMPLATES = Object.freeze({ 'Clear npm/IDE/NuGet cache and rebuild your project (https://devexpress.com/DX1002).', ].join(' '); } - return 'License key verification has failed.'; + return ''; }, warningCodeByType: (type) => WARNING_CODES[type] || WARNING_CODES.general, @@ -74,7 +74,7 @@ const TEMPLATES = Object.freeze({ ].join(' '), oldDevExtremeKey: (version) => - `A DevExtreme key (v25_2 or earlier) has been detected. Use DevExpress license key (v${version}+) instead.`, + `A DevExtreme key (v25.2 or earlier) has been detected. Use DevExpress license key (v${version}+) instead.`, licenseId: (id) => `License ID: ${id}`, });