Skip to content

fix(project-service): avoid discarded tsserver logs - #12748

Merged
JoshuaKGoldberg merged 5 commits into
typescript-eslint:mainfrom
barry166:fix/12746-disable-unused-tsserver-logs
Sep 5, 2026
Merged

JoshuaKGoldberg merged 5 commits into
typescript-eslint:mainfrom
barry166:fix/12746-disable-unused-tsserver-logs

Conversation

@barry166

Copy link
Copy Markdown
Contributor

PR Checklist

Overview

Avoid asking tsserver to build log messages when none of its error, info, or performance debug namespaces are enabled. hasLevel() now uses the same enabled check as loggingEnabled(), while the existing event handler remains independent.

The project-service tests cover both disabled logging and an enabled tsserver namespace.

Fixes #12746.

💖

Gate TypeScript server log levels on the same debug namespaces used by
the logger's enabled check so disabled logging avoids formatting messages.

Constraint: Preserve the existing independent tsserver event handler.
Confidence: high
Scope-risk: narrow
Tested: 20 focused project-service tests, ESLint, and TypeScript spec typecheck
Not-tested: End-to-end Flint benchmark reproduction
@typescript-eslint

Copy link
Copy Markdown
Contributor

Thanks for the PR, @barry166!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

@netlify

netlify Bot commented Aug 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit ab8997d
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/6a9c622a3cbb210008ca9769
😎 Deploy Preview https://deploy-preview-12748--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🟢 up 1 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 90 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the package: project-service Issues related to @typescript-eslint/project-service label Aug 23, 2026
@nx-cloud

nx-cloud Bot commented Aug 23, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit ab8997d

Command Status Duration Result
nx test scope-manager -u ✅ Succeeded 2s View ↗
nx run scope-manager:clean-fixtures ✅ Succeeded <1s View ↗
nx run types:build ✅ Succeeded 1s View ↗
nx test eslint-plugin-internal --coverage=false ✅ Succeeded 3s View ↗
nx test typescript-estree --coverage=false ✅ Succeeded 1s View ↗
nx run-many -t lint --projects=eslint-plugin --... ✅ Succeeded 44s View ↗
nx run-many -t typecheck ✅ Succeeded 1m 7s View ↗
nx test ast-spec -u ✅ Succeeded 3s View ↗
Additional runs (42) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2026-09-05 18:46:30 UTC

@codecov

codecov Bot commented Aug 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.56%. Comparing base (4586535) to head (ab8997d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12748      +/-   ##
==========================================
- Coverage   95.00%   90.56%   -4.44%     
==========================================
  Files         227      523     +296     
  Lines       11621    17058    +5437     
  Branches     3861     5293    +1432     
==========================================
+ Hits        11040    15448    +4408     
- Misses        250      960     +710     
- Partials      331      650     +319     
Flag Coverage Δ
unittest 90.56% <100.00%> (-4.44%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ckages/project-service/src/createProjectService.ts 97.43% <100.00%> (ø)

... and 295 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread packages/project-service/src/createProjectService.ts Outdated
Comment thread packages/project-service/src/createProjectService.ts Outdated
@github-actions github-actions Bot added the awaiting response Issues waiting for a reply from the OP or another party label Aug 26, 2026
Apply the maintainer-requested simplification by passing the logging predicate directly to both logger hooks and relocating the explanatory comment beside its definition.\n\nConstraint: Preserve dynamic debug namespace evaluation on each logger call.\nConfidence: high\nScope-risk: narrow\nTested: project-service 24 tests; project-service lint; project-service typecheck; targeted Prettier; git diff --check.

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I do want to see what @StyleShit says as the original review too.

@JoshuaKGoldberg JoshuaKGoldberg added the 1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge label Aug 30, 2026
@github-actions github-actions Bot removed the awaiting response Issues waiting for a reply from the OP or another party label Aug 30, 2026
StyleShit
StyleShit previously approved these changes Sep 2, 2026
@StyleShit
StyleShit enabled auto-merge (squash) September 2, 2026 13:22
JoshuaKGoldberg and others added 2 commits September 5, 2026 14:38
pnpm 12.1.0 resolved the website's direct @docusaurus/plugin-content-blog
and @docusaurus/plugin-pwa dependencies to a different peer variant than
the ones used by @docusaurus/preset-classic, creating two instances of
@docusaurus/core and @docusaurus/theme-common. The duplicate React
contexts made every blog/docs page fail SSG with ReactContextError.

Deduped with pnpm 12.3.4, which collapses the peer variants back to one.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RV2LWuw8ieoifS6gDZuBcQ
@JoshuaKGoldberg
JoshuaKGoldberg dismissed stale reviews from StyleShit and themself via ab8997d September 5, 2026 18:40
@JoshuaKGoldberg
JoshuaKGoldberg merged commit d2d07eb into typescript-eslint:main Sep 5, 2026
65 of 66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 approval >=1 team member has approved this PR; we're now leaving it open for more reviews before we merge package: project-service Issues related to @typescript-eslint/project-service

Projects

None yet

Development

Successfully merging this pull request may close these issues.

⚡️ Performance: tsserver builds log messages that are always discarded

3 participants