Skip to content

build: update bundled TS version to match upstream Angular #1906

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 1 commit into from
Aug 8, 2023
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
@@ -1,7 +1,7 @@
# Input hashes for repository rule npm_translate_lock(name = "npm", pnpm_lock = "//:pnpm-lock.yaml").
# This file should be checked into version control along with the pnpm-lock.yaml file.
.npmrc=974837034
pnpm-lock.yaml=-26836337
yarn.lock=74121384
package.json=427861855
pnpm-lock.yaml=1590878777
yarn.lock=-1773039860
package.json=1344827076
pnpm-workspace.yaml=1711114604
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ rules_js_dependencies()

http_archive(
name = "aspect_rules_ts",
sha256 = "02480b6a1cd12516edf364e678412e9da10445fe3f1070c014ac75e922c969ea",
strip_prefix = "rules_ts-1.3.1",
url = "https://github.com/aspect-build/rules_ts/releases/download/v1.3.1/rules_ts-v1.3.1.tar.gz",
sha256 = "4c3f34fff9f96ffc9c26635d8235a32a23a6797324486c7d23c1dfa477e8b451",
strip_prefix = "rules_ts-1.4.5",
url = "https://github.com/aspect-build/rules_ts/releases/download/v1.4.5/rules_ts-v1.4.5.tar.gz",
)

load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
},
"dependencies": {
"@angular/language-service": "16.1.4",
"typescript": "4.8.2",
"typescript": "5.1.3",
"vscode-html-languageservice": "^4.2.5",
"vscode-jsonrpc": "6.0.0",
"vscode-languageclient": "7.0.0",
Expand Down
44 changes: 22 additions & 22 deletions pnpm-lock.yaml

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

17 changes: 5 additions & 12 deletions server/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export class Session {
}

private enableLanguageServiceForProject(project: ts.server.Project): void {
const {projectName} = project;
const projectName = project.getProjectName();
if (project.isClosed()) {
this.info(`Cannot enable language service for closed project ${projectName}.`);
return;
Expand Down Expand Up @@ -463,7 +463,7 @@ export class Session {
return;
}
project.disableLanguageService(
`Disabling language service for ${project.projectName} because ${reason}.`);
`Disabling language service for ${project.getProjectName()} because ${reason}.`);
}


Expand Down Expand Up @@ -1072,7 +1072,8 @@ export class Session {
}
if (project.isClosed()) {
scriptInfo.detachFromProject(project);
this.logger.info(`Failed to get language service for closed project ${project.projectName}.`);
this.logger.info(
`Failed to get language service for closed project ${project.getProjectName()}.`);
return null;
}
const languageService = project.getLanguageService();
Expand Down Expand Up @@ -1241,7 +1242,7 @@ export class Session {
* @returns main declaration file in `@angular/core`.
*/
private findAngularCore(project: ts.server.Project): string|null {
const {projectName} = project;
const projectName = project.getProjectName();
if (!project.languageServiceEnabled) {
this.info(
`Language service is already disabled for ${projectName}. ` +
Expand All @@ -1262,14 +1263,6 @@ export class Session {
}
}

function toArray<T>(it: ts.Iterator<T>): T[] {
const results: T[] = [];
for (let itResult = it.next(); !itResult.done; itResult = it.next()) {
results.push(itResult.value);
}
return results;
}

function isAngularCore(path: string): boolean {
return isExternalAngularCore(path) || isInternalAngularCore(path);
}
Expand Down
2 changes: 1 addition & 1 deletion server/src/version_provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import url from 'url';

import {NodeModule, resolve, Version} from '../../common/resolver';

const MIN_TS_VERSION = '4.8';
const MIN_TS_VERSION = '5.0';
const MIN_NG_VERSION = '15.0';
const TSSERVERLIB = 'typescript/lib/tsserverlibrary';

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7396,10 +7396,10 @@ typed-rest-client@^1.8.4:
tunnel "0.0.6"
underscore "^1.12.1"

typescript@4.8.2:
version "4.8.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790"
integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==
typescript@5.1.3:
version "5.1.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.3.tgz#8d84219244a6b40b6fb2b33cc1c062f715b9e826"
integrity sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==

typescript@~4.6.3:
version "4.6.4"
Expand Down