Skip to content

Update deps and fix new lints #57870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 21, 2024
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
236 changes: 118 additions & 118 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,31 +41,31 @@
"devDependencies": {
"@esfx/canceltoken": "^1.0.0",
"@octokit/rest": "^20.0.2",
"@types/chai": "^4.3.12",
"@types/chai": "^4.3.14",
"@types/microsoft__typescript-etw": "^0.1.3",
"@types/minimist": "^1.2.5",
"@types/mocha": "^10.0.6",
"@types/ms": "^0.7.34",
"@types/node": "latest",
"@types/source-map-support": "^0.5.10",
"@types/which": "^3.0.3",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"@typescript-eslint/utils": "^7.1.1",
"azure-devops-node-api": "^12.4.0",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"@typescript-eslint/utils": "^7.3.1",
"azure-devops-node-api": "^12.5.0",
"c8": "^9.1.0",
"chai": "^4.4.1",
"chalk": "^4.1.2",
"chokidar": "^3.6.0",
"diff": "^5.2.0",
"dprint": "^0.45.0",
"esbuild": "^0.20.1",
"esbuild": "^0.20.2",
"eslint": "^8.57.0",
"eslint-formatter-autolinkable-stylish": "^1.3.0",
"eslint-plugin-local": "^4.2.1",
"eslint-plugin-no-null": "^1.0.2",
"eslint-plugin-simple-import-sort": "^12.0.0",
"fast-xml-parser": "^4.3.5",
"fast-xml-parser": "^4.3.6",
"glob": "^10.3.10",
"hereby": "^1.8.9",
"jsonc-parser": "^3.2.1",
Expand All @@ -77,7 +77,7 @@
"playwright": "^1.42.1",
"source-map-support": "^0.5.21",
"tslib": "^2.6.2",
"typescript": "^5.4.2",
"typescript": "^5.4.3",
"which": "^3.0.1"
},
"overrides": {
Expand Down
1 change: 0 additions & 1 deletion src/compiler/commandLineParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3514,7 +3514,6 @@ export function convertJsonOption(
convertJsonOption(opt.element, value, basePath, errors, propertyAssignment, valueExpression, sourceFile);
}
else if (!isString(opt.type)) {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
return convertJsonOptionOfCustomType(opt as CommandLineOptionOfCustomType, value as string, errors, valueExpression, sourceFile);
}
const validatedValue = validateJsonOptionValue(opt, value, errors, valueExpression, sourceFile);
Expand Down
3 changes: 1 addition & 2 deletions src/harness/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import {
identity,
ImplementationLocation,
InlayHint,
InlayHintKind,
InteractiveRefactorArguments,
isString,
JSDocTagInfo,
Expand Down Expand Up @@ -777,7 +776,7 @@ export class SessionClient implements LanguageService {
return ({
...item,
position: this.lineOffsetToPosition(file, position),
kind: item.kind as InlayHintKind,
kind: item.kind,
displayParts: displayParts?.map(({ text, span }) => ({
text,
span: span && {
Expand Down
5 changes: 2 additions & 3 deletions src/server/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import {
CompletionEntryData,
CompletionEntryDetails,
CompletionInfo,
CompletionTriggerKind,
computeLineAndCharacterOfPosition,
computeLineStarts,
concatenate,
Expand Down Expand Up @@ -2309,7 +2308,7 @@ export class Session<TMessage = string> implements EventSender {
{
...convertUserPreferences(this.getPreferences(file)),
triggerCharacter: args.triggerCharacter,
triggerKind: args.triggerKind as CompletionTriggerKind | undefined,
triggerKind: args.triggerKind,
includeExternalModuleExports: args.includeExternalModuleExports,
includeInsertTextCompletions: args.includeInsertTextCompletions,
},
Expand Down Expand Up @@ -2802,7 +2801,7 @@ export class Session<TMessage = string> implements EventSender {
const changes = project.getLanguageService().organizeImports(
{
fileName: file,
mode: args.mode as OrganizeImportsMode | undefined ?? (args.skipDestructiveCodeActions ? OrganizeImportsMode.SortAndCombine : undefined),
mode: args.mode ?? (args.skipDestructiveCodeActions ? OrganizeImportsMode.SortAndCombine : undefined),
type: "file",
},
this.getFormatOptions(file),
Expand Down
6 changes: 3 additions & 3 deletions src/services/organizeImports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ function detectNamedImportOrganizationBySort(originalGroups: readonly ImportDecl
}
}
for (const key of typesToTest) {
const typeOrder = key as OrganizeImportsTypeOrder;
const typeOrder = key;
if (currDiff[typeOrder] < bestDiff[typeOrder]) {
bestDiff[typeOrder] = currDiff[typeOrder];
bestComparer[typeOrder] = curComparer;
Expand All @@ -759,9 +759,9 @@ function detectNamedImportOrganizationBySort(originalGroups: readonly ImportDecl
}

outer: for (const bestKey of typesToTest) {
const bestTypeOrder = bestKey as OrganizeImportsTypeOrder;
const bestTypeOrder = bestKey;
for (const testKey of typesToTest) {
const testTypeOrder = testKey as OrganizeImportsTypeOrder;
const testTypeOrder = testKey;
if (bestDiff[testTypeOrder] < bestDiff[bestTypeOrder]) continue outer;
}
return { namedImportComparer: bestComparer[bestTypeOrder], typeOrder: bestTypeOrder, isSorted: bestDiff[bestTypeOrder] === 0 };
Expand Down
2 changes: 1 addition & 1 deletion src/testRunner/unittests/tsserver/externalProjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ describe("unittests:: tsserver:: externalProjects", () => {
arguments: {
knownProjects: knownProjects.map(p => p.info!),
},
}).response as ts.server.protocol.ProjectFilesWithDiagnostics[];
});

externalProject.rootFiles.length = 1;
openExternalProjectsForSession([externalProject], session);
Expand Down
4 changes: 2 additions & 2 deletions src/testRunner/unittests/tsserver/navTo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ describe("unittests:: tsserver:: navigate-to for javascript project", () => {
session.executeCommandSeq<ts.server.protocol.NavtoRequest>({
command: ts.server.protocol.CommandTypes.Navto,
arguments: { searchValue: "Document", file: file1.path, projectFileName: configFile.path },
}).response as ts.server.protocol.NavtoItem[];
});

session.executeCommandSeq<ts.server.protocol.NavtoRequest>({
command: ts.server.protocol.CommandTypes.Navto,
arguments: { searchValue: "foo", file: file1.path, projectFileName: configFile.path },
}).response as ts.server.protocol.NavtoItem[];
});
baselineTsserverLogs("navTo", "should not include type symbols", session);
});

Expand Down
4 changes: 2 additions & 2 deletions src/testRunner/unittests/tsserver/projectReferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ export function bar() {}`,
session.executeCommandSeq<ts.server.protocol.ReferencesRequest>({
command: ts.server.protocol.CommandTypes.References,
arguments: protocolFileLocationFromSubstring(main, "foo", { index: 1 }),
}).response as ts.server.protocol.ReferencesResponseBody;
});

closeFilesForSession([main, dummyFilePath], session);

Expand All @@ -1090,7 +1090,7 @@ export function bar() {}`,
session.executeCommandSeq<ts.server.protocol.ReferencesRequest>({
command: ts.server.protocol.CommandTypes.References,
arguments: protocolFileLocationFromSubstring(fileResolvingToMainDts, "foo"),
}).response as ts.server.protocol.ReferencesResponseBody;
});
baselineTsserverLogs("projectReferences", input.scenario, session);
}

Expand Down
2 changes: 1 addition & 1 deletion src/testRunner/unittests/tsserver/skipLibCheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe("unittests:: tsserver:: with skipLibCheck", () => {
session.executeCommandSeq<ts.server.protocol.SemanticDiagnosticsSyncRequest>({
command: ts.server.protocol.CommandTypes.SemanticDiagnosticsSync,
arguments: { file: jsFile.path },
}).response as ts.server.protocol.Diagnostic[];
});
baselineTsserverLogs("skipLibCheck", "reports semantic error in configured project with tscheck", session);
});

Expand Down