Skip to content

Commit 2f56361

Browse files
authored
(chore) bump ts (#1158)
#1156
1 parent 692cb61 commit 2f56361

File tree

9 files changed

+23
-21
lines changed

9 files changed

+23
-21
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"lint": "prettier --check . && eslint \"packages/**/*.{ts,js}\""
1717
},
1818
"dependencies": {
19-
"typescript": "^4.3.2"
19+
"typescript": "^4.4.3"
2020
},
2121
"devDependencies": {
2222
"@sveltejs/eslint-config": "github:sveltejs/eslint-config#v5.2.0",

packages/language-server/src/plugins/svelte/SvelteDocument.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ function wrapPreprocessors(preprocessors: PreprocessorGroup | PreprocessorGroup[
410410
wrappedPreprocessor.script = async (args: any) => {
411411
try {
412412
return await preprocessor.script!(args);
413-
} catch (e) {
413+
} catch (e: any) {
414414
e.__source = TranspileErrorSource.Script;
415415
throw e;
416416
}
@@ -421,7 +421,7 @@ function wrapPreprocessors(preprocessors: PreprocessorGroup | PreprocessorGroup[
421421
wrappedPreprocessor.style = async (args: any) => {
422422
try {
423423
return await preprocessor.style!(args);
424-
} catch (e) {
424+
} catch (e: any) {
425425
e.__source = TranspileErrorSource.Style;
426426
throw e;
427427
}
@@ -451,7 +451,7 @@ async function transpile(
451451
processedScripts.push(res);
452452
}
453453
return res;
454-
} catch (e) {
454+
} catch (e: any) {
455455
e.__source = TranspileErrorSource.Script;
456456
throw e;
457457
}
@@ -466,7 +466,7 @@ async function transpile(
466466
processedStyles.push(res);
467467
}
468468
return res;
469-
} catch (e) {
469+
} catch (e: any) {
470470
e.__source = TranspileErrorSource.Style;
471471
throw e;
472472
}

packages/language-server/src/plugins/typescript/DocumentSnapshot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function preprocessSvelteFile(document: Document, options: SvelteSnapshotOptions
184184
nrPrependedLines = 1;
185185
}
186186
}
187-
} catch (e) {
187+
} catch (e: any) {
188188
// Error start/end logic is different and has different offsets for line, so we need to convert that
189189
const start: Position = {
190190
line: e.start?.line - 1 ?? 0,

packages/language-server/test/plugins/typescript/features/CompletionProvider.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ describe('CompletionProviderImpl', () => {
7575
label: 'b',
7676
insertText: undefined,
7777
kind: CompletionItemKind.Method,
78-
sortText: '1',
78+
sortText: '11',
7979
commitCharacters: ['.', ',', '('],
8080
preselect: undefined,
8181
textEdit: undefined
@@ -101,7 +101,7 @@ describe('CompletionProviderImpl', () => {
101101
label: 'b',
102102
insertText: undefined,
103103
kind: CompletionItemKind.Field,
104-
sortText: '1',
104+
sortText: '11',
105105
commitCharacters: ['.', ',', '('],
106106
preselect: undefined,
107107
textEdit: undefined
@@ -406,7 +406,7 @@ describe('CompletionProviderImpl', () => {
406406
line: 0
407407
},
408408
replacementSpan: undefined,
409-
sortText: '1',
409+
sortText: '11',
410410
source: undefined,
411411
sourceDisplay: undefined,
412412
uri: fileNameToAbsoluteUri(filename)
@@ -1035,7 +1035,7 @@ describe('CompletionProviderImpl', () => {
10351035
label: 'blubb',
10361036
insertText: 'import { blubb } from "../definitions";',
10371037
kind: CompletionItemKind.Function,
1038-
sortText: '1',
1038+
sortText: '11',
10391039
commitCharacters: ['.', ',', '('],
10401040
preselect: undefined,
10411041
textEdit: {
@@ -1091,7 +1091,7 @@ describe('CompletionProviderImpl', () => {
10911091
label: 'toString',
10921092
insertText: '?.toString',
10931093
kind: CompletionItemKind.Method,
1094-
sortText: '1',
1094+
sortText: '11',
10951095
commitCharacters: ['.', ',', '('],
10961096
preselect: undefined,
10971097
textEdit: {

packages/language-server/test/plugins/typescript/features/DiagnosticsProvider.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ describe('DiagnosticsProvider', () => {
322322
code: 2345,
323323
message:
324324
"Argument of type 'HTMLDivElement' is not assignable to parameter of type 'SVGElement & { getTotalLength(): number; }'.\n " +
325-
"Type 'HTMLDivElement' is missing the following properties from type 'SVGElement': ownerSVGElement, viewportElement, correspondingElement, correspondingUseElement",
325+
"Type 'HTMLDivElement' is missing the following properties from type 'SVGElement': ownerSVGElement, viewportElement",
326326
range: {
327327
end: {
328328
character: 19,
@@ -341,7 +341,7 @@ describe('DiagnosticsProvider', () => {
341341
code: 2345,
342342
message:
343343
"Argument of type 'HTMLParagraphElement' is not assignable to parameter of type 'HTMLInputElement'.\n " +
344-
"Type 'HTMLParagraphElement' is missing the following properties from type 'HTMLInputElement': accept, alt, autocomplete, checked, and 48 more.",
344+
"Type 'HTMLParagraphElement' is missing the following properties from type 'HTMLInputElement': accept, alt, autocomplete, capture, and 51 more.",
345345
range: {
346346
end: {
347347
character: 12,
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script>
2-
const asd = 1;
3-
asd.bla;
2+
function a() {
3+
return null;
4+
}
5+
a().b;
46
</script>

packages/svelte-check/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async function getDiagnostics(
9191
result.hintCount
9292
);
9393
return result;
94-
} catch (err) {
94+
} catch (err: any) {
9595
writer.failure(err);
9696
return null;
9797
}

packages/svelte2tsx/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"svelte": "~3.38.2",
3838
"tiny-glob": "^0.2.6",
3939
"tslib": "^1.10.0",
40-
"typescript": "^4.3.2"
40+
"typescript": "^4.4.3"
4141
},
4242
"peerDependencies": {
4343
"svelte": "^3.24",

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2593,10 +2593,10 @@ type-fest@^0.8.1:
25932593
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
25942594
integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
25952595

2596-
typescript@*, typescript@^4.3.2:
2597-
version "4.3.2"
2598-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.2.tgz#399ab18aac45802d6f2498de5054fcbbe716a805"
2599-
integrity sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==
2596+
typescript@*,typescript@^4.4.3:
2597+
version "4.4.3"
2598+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324"
2599+
integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==
26002600

26012601
unist-util-stringify-position@^2.0.0:
26022602
version "2.0.3"

0 commit comments

Comments
 (0)