fix(telemetry): fix commands importing buildCommand directly from @stricli/core#275
Merged
fix(telemetry): fix commands importing buildCommand directly from @stricli/core#275
Conversation
…ricli/core trace/list, trace/view, log/view, and api.ts were importing buildCommand directly from @stricli/core, bypassing the telemetry wrapper in lib/command.ts that captures flag and arg context for Sentry. Switch all four to the local wrapper. Adds a prominent comment in command.ts documenting this requirement. help.ts is intentionally left on @stricli/core since it also needs `run` and has no meaningful flags to capture.
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛
Internal Changes 🔧
🤖 This preview updates automatically when you update the PR. |
Contributor
Codecov Results 📊✅ Patch coverage is 100.00%. Project has 3585 uncovered lines. Files with missing lines (69)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 74.61% 74.61% —%
==========================================
Files 115 115 —
Lines 14120 14120 —
Branches 0 0 —
==========================================
+ Hits 10535 10535 —
- Misses 3585 3585 —
- Partials 0 0 —Generated by Codecov Action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
trace/list,trace/view,log/view, andapi.tswere importingbuildCommanddirectly from@stricli/core, silently bypassing the telemetry wrapper insrc/lib/command.tsthat captures flag and arg context as Sentry tags.Changes
../../lib/command.js(or../lib/command.js)command.tsdocumenting the requirement and the exception forhelp.tsNot changed
help.tsis intentionally left on@stricli/core— it also importsrunfrom there, and the help command has no meaningful flags to capture for telemetry.Notes
A Biome
noRestrictedImportslint rule to enforce this statically was investigated but the rule is not available in the version of Biome used here. The JSDoc comment incommand.tsserves as the documented convention instead.