Skip to content

Commit

Permalink
Add support for typescript 5.2 in lit-analyzer tests (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
paglobal authored Oct 11, 2023
1 parent 9659154 commit 79e8593
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
21 changes: 21 additions & 0 deletions packages/lit-analyzer/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/lit-analyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@
"cli.js"
],
"dependencies": {
"@vscode/web-custom-data": "^0.4.2",
"chalk": "^2.4.2",
"didyoumean2": "4.1.0",
"fast-glob": "^3.2.11",
"parse5": "5.1.0",
"ts-simple-type": "~2.0.0-next.0",
"vscode-css-languageservice": "4.3.0",
"vscode-html-languageservice": "3.1.0",
"@vscode/web-custom-data": "^0.4.2",
"web-component-analyzer": "^2.0.0-next.5"
},
"devDependencies": {
Expand All @@ -106,6 +106,7 @@
"typescript-4.8": "npm:typescript@~4.8.2",
"typescript-5.0": "npm:typescript@~5.0.4",
"typescript-5.1": "npm:typescript@~5.1.0",
"typescript-5.2": "npm:typescript@~5.2.0",
"wireit": "^0.9.5"
},
"ava": {
Expand Down
5 changes: 3 additions & 2 deletions packages/lit-analyzer/src/test/helpers/ts-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import { setTypescriptModule } from "../../lib/analyze/ts-module.js";

type TestFunction = (title: string, implementation: Implementation) => void;

const TS_MODULES_ALL = ["current", "4.8", "5.0", "5.1"] as const;
const TS_MODULES_ALL = ["current", "4.8", "5.0", "5.1", "5.2"] as const;

type TsModuleKind = typeof TS_MODULES_ALL[number];

const TS_MODULES_DEFAULT: TsModuleKind[] = ["current", "4.8", "5.0", "5.1"];
const TS_MODULES_DEFAULT: TsModuleKind[] = ["current", "4.8", "5.0", "5.1", "5.2"];

/**
* Returns the name of the module to require for a specific ts module kind
Expand All @@ -21,6 +21,7 @@ function getTsModuleNameWithKind(kind: TsModuleKind | undefined): string {
case "4.8":
case "5.0":
case "5.1":
case "5.2":
return `typescript-${kind}`;
case "current":
case undefined:
Expand Down

0 comments on commit 79e8593

Please sign in to comment.