Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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([
Expand Down Expand Up @@ -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();
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.';
Expand Down Expand Up @@ -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 '';
}
Comment thread
GoodDayForSurf marked this conversation as resolved.
},

Expand Down Expand Up @@ -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);
}
};

Expand Down
4 changes: 0 additions & 4 deletions packages/devextreme/license/devextreme-license.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`),
Expand Down Expand Up @@ -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}`));
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/devextreme/license/messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 '';
Comment thread
GoodDayForSurf marked this conversation as resolved.
},

warningCodeByType: (type) => WARNING_CODES[type] || WARNING_CODES.general,
Expand All @@ -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}`,
});
Expand Down
Loading