Skip to content

refactor(language-server): drop duplicate isAngularCore helpers in se…#68907

Open
erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:refactor-dedupe-angular-core-helpers
Open

refactor(language-server): drop duplicate isAngularCore helpers in se…#68907
erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:refactor-dedupe-angular-core-helpers

Conversation

@erkamyaman
Copy link
Copy Markdown
Contributor

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.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

vscode-ng-language-service/server/src/session.ts declares three local helpers (isAngularCore, isExternalAngularCore, isInternalAngularCore) that are byte-for-byte identical to the exported versions in vscode-ng-language-service/server/src/utils.ts. Only isAngularCore is referenced inside session.ts; the other two exist solely to support that local copy. handlers/template_info.ts already consumes the utils version, so the project ships two copies of the same logic.

What is the new behavior?

session.ts imports isAngularCore from ./utils and the three local helpers are removed. Behavior is unchanged. The server unit tests (//vscode-ng-language-service/server/src/tests:test) and the LSP integration suite (//vscode-ng-language-service/integration/lsp:test) both pass.

Does this PR introduce a breaking change?

  • Yes
  • No

…ssion

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.
@pullapprove pullapprove Bot requested a review from JeanMeche May 24, 2026 16:58
@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release labels May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants