136 Commits

Author SHA1 Message Date
Kam 2b17b2db88 refactor(language-server): drop duplicate isAngularCore helpers in session
session.ts defined isAngularCore, isExternalAngularCore, and
isInternalAngularCore as byte-identical copies of the already-exported
versions in utils.ts. Only isAngularCore was used locally; the other
two were dead. handlers/template_info.ts already imports the utils
version. Remove the duplicates and import isAngularCore from utils.

(cherry picked from commit d808866f89)
2026-05-27 10:52:54 -07:00
Alan Agius 2232a62bb2 fix(dev-infra): draft GitHub release to support immutable releases
Update the release tool to create the GitHub release in a draft state initially and publish it only after the extension asset (.vsix) has been successfully uploaded.

GitHub shifted towards immutable releases. If a release is published instantly upon creation,the assets will not be able to be uploaded.

(cherry picked from commit 26f4ed5056)
2026-05-27 10:50:26 -07:00
Andrew Scott 525e1605a6 release: bump VSCode extension version to 21.2.4 2026-05-22 14:25:49 -07:00
Andrew Scott 4a41831326 fix(vscode-extension): disable language server in untrusted workspaces
Restrict untrusted workspace support to limited mode. Skip launching the language client and registering commands in restricted mode, and only start them once workspace trust has been explicitly granted.
2026-05-22 13:08:32 -07:00
Andrew Scott 6d8b156b45 fix(vscode-extension): restrict jsdoc markdown trust and harden document opening
Restrict JSDoc hover links to the custom openJSDocLink command and implement document
opening using safe workspace APIs.
2026-05-22 10:08:44 -07:00
Andrew Scott 82cf38ad95 fix(vscode-extension): prompt for confirmation before loading workspace tsdk
Harden the typescript.tsdk and js/ts.tsdk.path settings loading
in the VS Code extension client.

This change hardens tsdk loading by:
1. Ignoring workspace-level tsdk paths in untrusted workspaces.
2. Prompting the user for explicit confirmation before loading a
   workspace-level tsdk path in trusted workspaces, and saving the
   approval state in a secure, local workspaceState.
2026-05-22 10:05:07 -07:00
Andrew Scott 711f873e31 refactor(vscode-extension): Remove effectively dead code
Since bundled path is at the start of probe locations, it's always going to be found first.
Workspace versions will never be used. getProbeLocations is effectively dead and confusing code.

(cherry picked from commit d8c871ef80)
2026-05-22 09:58:27 -07:00
Andrew Scott b40b67cdc1 fix(vscode-extension): Look for tsdk override in the new js/ts.tsdk.path setting
recent versions of vscode use js/ts.tsdk.path rather than typescript.tsdk

relates to #68423
2026-04-29 13:32:02 -07:00
Angular Robot 810fb7382f build: update cross-repo angular dependencies
See associated pull request for more information.
2026-04-17 14:34:29 -07:00
Angular Robot 4b2008d0f2 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-27 14:00:33 +01:00
Andrew Scott a9ca90fc11 refactor: fix types extraction for private (#67898)
fixes types extraction for private entrypoint of language service

PR Close #67898
2026-03-26 21:32:20 +00:00
Andrew Scott a6c49e0ea9 refactor(language-service): Export template target from API
allows template target to be used in other tooling

(cherry picked from commit eecfa4c909)
2026-03-25 13:07:47 -07:00
Angular Robot 4d2a9394c3 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-03-19 16:03:49 -07:00
Andrew Scott a7e3d764e5 release: bump VSCode extension version to 21.2.3 (#67629) 2026-03-11 14:09:57 -07:00
Alan Agius adda6c5c10 build: update aspect_rules_js to 3.0.2
This updates the major version of `aspect_rules_js`.
2026-03-11 13:35:26 -07:00
Andrew Scott 05476ea21b release: bump VSCode extension version to 21.2.2 (#67449) 2026-03-04 12:40:40 -08:00
Kristiyan Kostadinov da57d1af73 build: use TypeScript 5.9 for patch builds
Partially rolls back to using TypeScript 5.9 for the builds on the patch branch, because we bundle our TypeScript version with the language service which can introduce unexpected breakages for users.

Note that we still allow users to install TypeScript 6.
2026-03-04 07:59:23 -08:00
Joey Perrott 661e800302 release: bump VSCode extension version to 21.2.1 2026-02-25 15:34:03 -08:00
Angular Robot e437980659 build: update cross-repo angular dependencies
See associated pull request for more information.

Closes #67275 as a pr takeover
2026-02-25 10:26:00 -08:00
Angular Robot a25f74238e build: update jasmine dependencies to v6.1.0
See associated pull request for more information.
2026-02-25 07:57:47 -08:00
Matthieu Riegler 787cd875b0 refactor(vscode-extension): Add support for exhaustive type check in the syntax
`@default never` will be considered a keyword on its own.

(cherry picked from commit db11e74b3d)
2026-02-24 19:23:50 +00:00
kbrilla d2137928e8 perf(language-service): use lightweight project warmup for Angular analysis
avoid per-file semantic diagnostics work when warming up a newly loaded project.
add ensureProjectAnalyzed() to the language-service API and use it from the server startup path.
implement warmup through public compiler API access with existing perf tracing, and add legacy test coverage for the new warmup flow.

(cherry picked from commit 39f62fa408)
2026-02-20 02:11:06 +00:00
Andrew Scott 7f33cbeb6c release: bump VSCode extension version to 21.2.0 (#67134) 2026-02-18 15:48:34 -08:00
Andrew Scott dd630ef955 build: update version target to prep for 21.2.0 release for vscode extension (#67132)
build: update version target to prep for 21.2.0 release for vscode extension
2026-02-18 15:14:45 -08:00
Kristiyan Kostadinov 81cabc1477 feat(core): add support for TypeScript 6
Updates the project to support TypeScript 6 and accounts for some of the breakages.
2026-02-17 08:40:38 -08:00
Matthieu Riegler 4f8d3995f0 fix(vscode-extension): Highlight function calls with optional chaining
eg: `foo?.()` should be highlighted as `foo()`.

fixes #65513
2026-02-10 09:42:03 -08:00
Angular Robot 11767cabe4 build: update Jasmine to 6.0.0
Jasmine enables `forbidDuplicateNames: true` by default. So we also need to desambiguate duplicate spec names.
2026-02-09 12:15:57 -08:00
Shuaib Hasan Akib 0c6604f478 refactor(common): update copyright to Google LLC
Replaces outdated Google Inc copyright headers with Google LLC to align with current licensing standards.
2026-02-09 07:51:36 -08:00
kbrilla 8c21866f49 feat(language-service): add linked editing ranges for HTML tag synchronization
This feature enables synchronized editing of opening and closing HTML tag pairs
in Angular inline templates. When the cursor is on an element tag name, editing
it will automatically update the corresponding tag.

Implementation:
- Add getLinkedEditingRangeAtPosition method to NgLanguageService interface
- Implement linked editing range detection for opening and closing tags
- Handle edge cases: self-closing elements, void elements, cursor detection
- Export through ts_plugin wrapper to override TypeScript JSX-only implementation
- For external HTML templates, VS Code built-in HTML support handles linked editing
2026-02-04 15:45:27 -08:00
Matthieu Riegler 01ed57f297 fix(vscode-extension): support highlighting for class bindings with brackets
Tailwind classes can often be quite complex strings. This change adds supports for classes with backets.

fixes #66818
2026-02-04 15:45:04 -08:00
Charles Lyding 496967e7b1 feat(language-service): add JSON schema for angularCompilerOptions
This commit introduces a JSON schema for angularCompilerOptions in the
Angular Language Service extension. It provides validation and autocompletion
for Angular-specific options in tsconfig.json files.
2026-01-30 14:20:25 -08:00
Andrew Scott 8a7cbd4668 fix(language-service): Detect local project version on creation
This updates the language service to use the detected version of angular
core in the given project on load rather than the minimum detected
version in the workspace
2026-01-26 23:51:31 +00:00
Angular Robot 3e7808b39f build: update cross-repo angular dependencies
See associated pull request for more information.

Closes #66702 as a pr takeover
2026-01-26 23:51:05 +00:00
Andrew Scott 6fb39d9b62 feat(language-server): Support client-side file watching via onDidChangeWatchedFiles
This implements `onDidChangedWatchedFiles` in the language server, which
allows the client to communicate changes to files rather than having the
server create system file/directory watchers.

This option is enabled in the extension via the
`angular.server.useClientSideFileWatcher` setting.
When enabled, the extension registers a FileSystemWatcher for .ts, .html, and package.json files and forwards events to the server. The server completely disables its internal native file watchers (via a new 'ServerHost' implementation that stubs watchFile/watchDirectory).

This is significantly more performant and reliable than native watching for several reasons:
- Deduplication: VS Code already watches the workspace. Piggybacking on these events prevents the server from duplicating thousands of file watchers.
- OS Limits: Since the server opens zero watcher handles, it is impossible to hit OS limits (ENOSPC), no matter how large the repo is.
- Optimization: VS Code's watcher uses highly optimized native implementations (like Parcel Watcher in Rust/C++) which handle recursive directory watching far better than Node.js's 'fs.watch'.
- Debouncing: The client aggregates extremely frequent file events (e.g., during 'git checkout'), reducing the flood of processing requests to the server.

This option was tested in one very large internal project and observed
~10-50x improvement of initialization times.

fixes #66543
2026-01-23 19:52:37 +00:00
kbrilla 5d6e534d8b build(language-service): upgrade LSP library to v9.0.1 (LSP 3.17)
Upgrade vscode-languageserver from 7.0.0 to 9.0.1 and related packages:
- vscode-jsonrpc: 6.0.0 → 8.2.0
- vscode-languageclient: 7.0.0 → 9.0.1
- vscode-languageserver-protocol: 3.16.0 → 3.17.5

This upgrade is required for LSP 3.17 features like Inlay Hints.

Breaking changes addressed:
- LanguageClient.start() now returns Promise<void> (no longer Disposable)
- LanguageClient.onReady() removed, await start() directly
- protocol2CodeConverter methods now return Promises (asWorkspaceEdit, asRanges)
- SignatureHelp.activeParameter: null → undefined
2026-01-22 19:55:53 +00:00
Andrew Scott 405fa59375 docs: release notes for the vscode extension 21.1.1 release (#66715) 2026-01-22 10:44:12 -08:00
Andrew Scott 1cf1370568 refactor(language-server): split session into separate handlers
Breaks up the large session.ts file into separate handlers and consolidates the code related to completions in the server into the handler file
2026-01-20 10:22:12 -08:00
Kristiyan Kostadinov d9c980a958 build: initial test of TypeScript 6
Resolves some initial test failures after updating to TypeScript 6.
2026-01-15 13:41:01 -08:00
Angular Robot 230e16d3a5 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-14 08:23:05 -08:00
Alan Agius 95e8c2fdee build: remove tsx dependency and update release script to use node directly
Node.js can run typescript directly.
2026-01-14 07:56:38 -08:00
Andrew Scott 227acddd3a build: Update vscode release script
- Ensure there is a GITHUB_TOKEN environment variable at the start so we can push the release
- More robust handling for finding releaser's fork if it's not 'origin'
2026-01-13 13:08:26 -08:00
Andrew Scott 029685bd93 build: update cherrypick changelog to stash
there are often some formatting/newline changes caused by other steps. just stash anything
2026-01-13 11:20:16 -08:00
Kristiyan Kostadinov b95753eb7d fix(vscode-extension): add syntax highlighting for arrow functions
Updates the syntax definition to handle arrow functions. The definition is largely based on TypeScript's own syntax highlighting since it's quite complex.
2026-01-13 11:09:26 -08:00
Kristiyan Kostadinov c70a6a6ecc fix(vscode-extension): add syntax highlighting for spread/rest expressions
Updates the syntax definition to include spread/rest expressions.
2026-01-13 11:09:26 -08:00
Andrew Scott e45f8afdab docs: release notes for the vscode extension 21.1.0 release 2026-01-13 11:09:05 -08:00
Andrew Scott 69da6390b1 build: improve changelog generation and tag fetching in release script
- Fetch tags explicitly to ensure local availability.
- Implement `getPreviousTag` to reliably determine the base for changelog generation, falling back to the latest `vsix-*` tag if the specific previous version tag is missing.
- Filter changelog commits by subject to exclude duplicates (e.g. cherry-picks) that are already present in the previous release history but have different hashes.
2026-01-12 16:06:35 -08:00
Andrew Scott 78755771e1 build: fix changelog generation for last rev
updates changelog generation to work when releasing the first final
version.
2026-01-12 14:53:20 -08:00
Andrew Scott e34365cfd5 build: use tsx for release script
I otherwise get Unknown file extension ".mts". using tsx fixes it for me
2026-01-12 14:41:14 -08:00
Andrew Scott ebc90c26f5 feat(language-server): Add completions and hover info for inline styles
This adds completions for inline styles, using the SCSS language service

resolves #65489
2026-01-12 13:40:37 -08:00
Andrew Scott 573aadef7e feat(language-server): Add quick info for inline styles
This adds quick info to the langauge server for inline styles using the
scss language service.
2026-01-12 13:40:37 -08:00