Skip to content

Commit b4f3602

Browse files
authored
build(deps): Bumped to latest Typescript (#2156)
* build(deps): Bumped to latest Typescript - Fixed some type errors that were introduced by the new version of Typescript. - Fixed some SCSS linting errors that were introduced by the new version of the SCSS linter.
1 parent 5af7534 commit b4f3602

10 files changed

Lines changed: 689 additions & 531 deletions

File tree

package-lock.json

Lines changed: 549 additions & 462 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@
6464
"@custom-elements-manifest/analyzer": "^0.11.0",
6565
"@igniteui/material-icons-extended": "^3.1.0",
6666
"@open-wc/testing": "^4.0.0",
67-
"@storybook/addon-a11y": "^10.3.0",
68-
"@storybook/addon-docs": "^10.3.0",
69-
"@storybook/addon-links": "^10.3.0",
70-
"@storybook/web-components-vite": "^10.3.0",
67+
"@storybook/addon-a11y": "^10.3.3",
68+
"@storybook/addon-docs": "^10.3.3",
69+
"@storybook/addon-links": "^10.3.3",
70+
"@storybook/web-components-vite": "^10.3.3",
7171
"@types/mocha": "^10.0.10",
7272
"@web/dev-server-esbuild": "^1.0.5",
7373
"@web/test-runner": "^0.20.2",
@@ -93,21 +93,21 @@
9393
"rimraf": "^6.1.3",
9494
"sass-embedded": "~1.93.3",
9595
"sinon": "^21.0.3",
96-
"storybook": "^10.3.0",
97-
"stylelint": "^17.4.0",
96+
"storybook": "^10.3.3",
97+
"stylelint": "^17.5.0",
9898
"stylelint-config-standard-scss": "^17.0.0",
9999
"stylelint-prettier": "^5.0.3",
100100
"stylelint-scss": "^7.0.0",
101101
"ts-lit-plugin": "^2.0.2",
102102
"tslib": "^2.8.1",
103-
"typedoc": "~0.28.17",
103+
"typedoc": "~0.28.18",
104104
"typedoc-plugin-localization": "^3.1.0",
105-
"typescript": "^5.9.3",
106-
"vite": "^8.0.1"
105+
"typescript": "^6.0.2",
106+
"vite": "^8.0.2"
107107
},
108108
"peerDependencies": {
109109
"dompurify": "^3.3.3",
110-
"marked": "^17.0.4",
110+
"marked": "^17.0.5",
111111
"marked-shiki": "^1.2.1",
112112
"shiki": "^4.0.2"
113113
},
@@ -129,6 +129,9 @@
129129
},
130130
"customElements": "custom-elements.json",
131131
"overrides": {
132-
"storybook": "$storybook"
132+
"storybook": "$storybook",
133+
"madge": {
134+
"typescript": "$typescript"
135+
}
133136
}
134137
}

scripts/build.mjs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,26 @@ const RELEASE_FILES = [
2626
];
2727

2828
async function runTask(tag, cmd) {
29-
const frames = [' ', '. ', '.. ', '...'];
29+
const frames = ['', '', '', ''];
3030
let frame = 0;
3131

32-
const writeProgress = (dots) =>
33-
report.stdout.info(`\r[${tag}] Processing${dots}`);
32+
const writeProgress = (progress) =>
33+
report.stdout.plain(`\r${report.format.magentaBright(progress)} ${tag}`);
3434

3535
writeProgress(frames[0]);
3636
const timer = setInterval(() => {
3737
frame = (frame + 1) % frames.length;
3838
writeProgress(frames[frame]);
39-
}, 300);
39+
}, 120);
4040

4141
try {
4242
await cmd();
4343
clearInterval(timer);
4444
report.stdout.clearLine();
45-
report.success(`[${tag}] Done!`);
45+
report.stdout.plain(report.format.greenBright(`[${tag}] ✔\n`));
4646
} catch (e) {
4747
clearInterval(timer);
48-
report.error(`[${tag}] Failed with: ${e.stderr || e.message}`);
48+
report.error(`\n[${tag}] ✖\n${e.stderr || e.message}`);
4949
process.exit(1);
5050
}
5151
}

scripts/report.mjs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,24 @@ export default {
1717
success: (s) => stdout.write(styleText('green', s)),
1818
warn: (s) => stdout.write(styleText('yellow', s)),
1919
info: (s) => stdout.write(styleText('cyan', s)),
20+
plain: (s) => stdout.write(s),
21+
},
22+
format: {
23+
black: (s) => styleText('black', s),
24+
red: (s) => styleText('red', s),
25+
green: (s) => styleText('green', s),
26+
yellow: (s) => styleText('yellow', s),
27+
blue: (s) => styleText('blue', s),
28+
magenta: (s) => styleText('magenta', s),
29+
cyan: (s) => styleText('cyan', s),
30+
white: (s) => styleText('white', s),
31+
gray: (s) => styleText('gray', s),
32+
redBright: (s) => styleText('redBright', s),
33+
greenBright: (s) => styleText('greenBright', s),
34+
yellowBright: (s) => styleText('yellowBright', s),
35+
blueBright: (s) => styleText('blueBright', s),
36+
magentaBright: (s) => styleText('magentaBright', s),
37+
cyanBright: (s) => styleText('cyanBright', s),
38+
whiteBright: (s) => styleText('whiteBright', s),
2039
},
2140
};

src/components/common/controllers/key-bindings.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('Key bindings controller', () => {
3737
constructor() {
3838
super();
3939
addKeybindings(this, {
40-
skip: () => this.hidden,
40+
skip: () => !!this.hidden,
4141
})
4242
.setActivateHandler(this.handleKeyboardEvent)
4343
.set('a', this.handleKeyboardEvent, { triggers: ['keydown'] })

src/components/common/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ export function bindIf<T>(assertion: unknown, value: T): NonNullable<T> {
595595
: (nothing as NonNullable<T>);
596596
}
597597

598-
let pool: Uint8Array;
598+
let pool: Uint8Array<ArrayBuffer>;
599599
let poolOffset: number;
600600
const urlAlphabet =
601601
'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';

src/components/highlight/service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function* matchText(
2525
for (const node of nodes) {
2626
if (node.textContent) {
2727
for (const match of node.textContent.matchAll(regexp)) {
28-
const [[start, end]] = match.indices!;
28+
const [start, end] = match.indices![0]!;
2929
yield { node, indices: [start, end] } satisfies Match;
3030
}
3131
}

src/components/input/themes/shared/input.material.scss

Lines changed: 76 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ input:placeholder-shown + [part='notch'] [part='label'],
157157
}
158158
}
159159

160-
161160
:host([readonly]:not([outlined]):focus-within) {
162161
:not([part~='filled']) {
163162
input:has(:not(:placeholder-shown)) + [part='notch'] [part='label'] {
@@ -217,13 +216,27 @@ input:placeholder-shown + [part='notch'] [part='label'],
217216
}
218217
}
219218

220-
:host(:not([outlined],[type='search'],[aria-haspopup='dialog'],[role='combobox'])[readonly]) {
219+
:host(
220+
:not(
221+
[outlined],
222+
[type='search'],
223+
[aria-haspopup='dialog'],
224+
[role='combobox']
225+
)[readonly]
226+
) {
221227
[part~='container'] {
222228
background: var-get($theme, 'box-background-focus');
223229
}
224230
}
225231

226-
:host(:not([outlined],[type='search'],[aria-haspopup='dialog'],[role='combobox'])[readonly]:hover) {
232+
:host(
233+
:not(
234+
[outlined],
235+
[type='search'],
236+
[aria-haspopup='dialog'],
237+
[role='combobox']
238+
)[readonly]:hover
239+
) {
227240
[part~='container'] {
228241
background: var-get($theme, 'box-background-focus');
229242
border-bottom-color: var-get($theme, 'idle-bottom-line-color');
@@ -246,7 +259,13 @@ input:placeholder-shown + [part='notch'] [part='label'],
246259
}
247260

248261
:host(:not([outlined]):focus-within),
249-
:host(:not([outlined],[aria-haspopup='dialog'],[role='combobox'])[readonly]:focus-within) {
262+
:host(
263+
:not(
264+
[outlined],
265+
[aria-haspopup='dialog'],
266+
[role='combobox']
267+
)[readonly]:focus-within
268+
) {
250269
[part~='container'] {
251270
background: var-get($theme, 'box-background-focus');
252271
border-bottom-color: var-get($theme, 'focused-bottom-line-color');
@@ -259,18 +278,26 @@ input:placeholder-shown + [part='notch'] [part='label'],
259278
}
260279
}
261280

262-
:host(:not([outlined],[aria-haspopup='dialog'],[role='combobox'])[readonly]:focus-within) {
281+
:host(
282+
:not(
283+
[outlined],
284+
[aria-haspopup='dialog'],
285+
[role='combobox']
286+
)[readonly]:focus-within
287+
) {
263288
[part='label'] {
264289
@include type-style('caption');
265290

266291
translate: 0 -73%;
267292
}
268293
}
269294

270-
:host(:not([outlined],[disabled],[readonly]):state(ig-invalid)),
271-
:host(:not([outlined],[disabled],[readonly]):state(ig-invalid):focus-within),
272-
:host(:not([disabled],[outlined])[role='combobox']:state(ig-invalid)),
273-
:host(:not([disabled],[outlined])[role='combobox']:state(ig-invalid):focus-within) {
295+
:host(:not([outlined], [disabled], [readonly]):state(ig-invalid)),
296+
:host(:not([outlined], [disabled], [readonly]):state(ig-invalid):focus-within),
297+
:host(:not([disabled], [outlined])[role='combobox']:state(ig-invalid)),
298+
:host(
299+
:not([disabled], [outlined])[role='combobox']:state(ig-invalid):focus-within
300+
) {
274301
[part~='container'] {
275302
border-color: var-get($theme, 'error-secondary-color');
276303

@@ -332,6 +359,10 @@ input:placeholder-shown + [part='notch'] [part='label'],
332359
padding-top: pad-block(rem(20px));
333360
padding-bottom: pad-block(rem(6px));
334361
}
362+
363+
[part='notch'] {
364+
border: none;
365+
}
335366
}
336367

337368
:host([outlined][type='search']:focus-within) {
@@ -434,7 +465,9 @@ input:placeholder-shown + [part='notch'] [part='label'],
434465
}
435466
}
436467

437-
:host(:not([aria-haspopup='dialog'],[role='combobox'])[outlined][readonly]:hover) {
468+
:host(
469+
:not([aria-haspopup='dialog'], [role='combobox'])[outlined][readonly]:hover
470+
) {
438471
[part='notch'],
439472
[part='start'],
440473
[part='end'],
@@ -447,7 +480,12 @@ input:placeholder-shown + [part='notch'] [part='label'],
447480
}
448481
}
449482

450-
:host(:not([aria-haspopup='dialog'],[role='combobox'])[outlined][readonly]:focus-within) {
483+
:host(
484+
:not(
485+
[aria-haspopup='dialog'],
486+
[role='combobox']
487+
)[outlined][readonly]:focus-within
488+
) {
451489
[part='notch'],
452490
[part='start'],
453491
[part='end'],
@@ -460,7 +498,9 @@ input:placeholder-shown + [part='notch'] [part='label'],
460498
}
461499
}
462500

463-
:host(:not(:state(ig-invalid),[type='search'])[readonly][outlined]:focus-within) {
501+
:host(
502+
:not(:state(ig-invalid), [type='search'])[readonly][outlined]:focus-within
503+
) {
464504
:not([part~='filled']) {
465505
input:has(:not(:placeholder-shown)) + [part='notch'] [part='label'] {
466506
translate: 0;
@@ -542,7 +582,13 @@ input:placeholder-shown + [part='notch'] [part='label'],
542582
}
543583
}
544584

545-
:host(:not([type='search'],[aria-haspopup='dialog'],[role='combobox'])[outlined]:focus-within) {
585+
:host(
586+
:not(
587+
[type='search'],
588+
[aria-haspopup='dialog'],
589+
[role='combobox']
590+
)[outlined]:focus-within
591+
) {
546592
[part='notch'] {
547593
border: {
548594
width: $active-border-width;
@@ -570,10 +616,14 @@ input:placeholder-shown + [part='notch'] [part='label'],
570616
}
571617
}
572618

573-
:host(:not([type='search'],[readonly])[outlined]:state(ig-invalid)),
574-
:host(:not([type='search'],[readonly])[outlined]:state(ig-invalid):focus-within),
619+
:host(:not([type='search'], [readonly])[outlined]:state(ig-invalid)),
620+
:host(
621+
:not([type='search'], [readonly])[outlined]:state(ig-invalid):focus-within
622+
),
575623
:host(:not([disabled])[role='combobox'][outlined]:state(ig-invalid)),
576-
:host(:not([disabled])[role='combobox'][outlined]:state(ig-invalid):focus-within) {
624+
:host(
625+
:not([disabled])[role='combobox'][outlined]:state(ig-invalid):focus-within
626+
) {
577627
[part='start'],
578628
[part='notch'],
579629
[part='filler'],
@@ -587,8 +637,10 @@ input:placeholder-shown + [part='notch'] [part='label'],
587637
}
588638
}
589639

590-
:host(:not([disabled])[role='combobox'][outlined]:state(ig-invalid):focus-within) {
591-
:not([part~='filled']) {
640+
:host(
641+
:not([disabled])[role='combobox'][outlined]:state(ig-invalid):focus-within
642+
) {
643+
:not([part~='filled']) {
592644
input:not(:placeholder-shown) + [part='notch'] {
593645
border-width: $active-border-width;
594646
}
@@ -603,7 +655,11 @@ input:placeholder-shown + [part='notch'] [part='label'],
603655
}
604656

605657
:host(:not([disabled], [readonly])[role='combobox'][outlined]:focus-within),
606-
:host(:not([disabled], [readonly])[role='combobox'][outlined]:state(ig-invalid):focus-within) {
658+
:host(
659+
:not([disabled], [readonly])[role='combobox'][outlined]:state(
660+
ig-invalid
661+
):focus-within
662+
) {
607663
:not([part~='filled']) {
608664
input:not(:placeholder-shown) + [part='notch'] {
609665
border-top: $idle-border-width solid transparent;
@@ -615,8 +671,7 @@ input:placeholder-shown + [part='notch'] [part='label'],
615671
}
616672
}
617673

618-
619-
:host(:not([disabled],[readonly]):state(ig-invalid)),
674+
:host(:not([disabled], [readonly]):state(ig-invalid)),
620675
:host(:not([disabled])[role='combobox']:state(ig-invalid)) {
621676
[part='label'] {
622677
color: var-get($theme, 'error-secondary-color');
@@ -642,12 +697,6 @@ input:placeholder-shown + [part='notch'] [part='label'],
642697
}
643698
}
644699

645-
:host([type='search'][outlined]) {
646-
[part='notch'] {
647-
border: none;
648-
}
649-
}
650-
651700
:host(:disabled),
652701
:host([disabled]) {
653702
[part~='input'],

0 commit comments

Comments
 (0)