fix(project-service): avoid discarded tsserver logs - #12748
JoshuaKGoldberg merged 5 commits into
Conversation
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
|
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. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
View your CI Pipeline Execution ↗ for commit ab8997d
☁️ Nx Cloud last updated this comment at |
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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
left a comment
There was a problem hiding this comment.
LGTM! I do want to see what @StyleShit says as the original review too.
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
…nused-tsserver-logs
ab8997d
d2d07eb
into
typescript-eslint:main

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 asloggingEnabled(), while the existing event handler remains independent.The project-service tests cover both disabled logging and an enabled tsserver namespace.
Fixes #12746.
💖