Repository navigation
ref(toolkit-core): Use the published @sentry/search-syntax package - #1689
Merged
Merged
Conversation
Replace the vendored copy of Sentry's search grammar, its compiled parser, the structural TokenConverter, and the copied search-syntax fixtures with @sentry/search-syntax 1.0.0, published from getsentry/sentry static/packages/search-syntax (getsentry/sentry#128514). toolkit-core's search-query and MCP's search-events utils import the parser and token enums from the package directly, and the toolkit-core ./search-syntax export is removed. The grammar's tests, including the shared fixtures/search-syntax cases, now live with the package. The root generate:parsers script, its pre-commit task, its check:generated path, and the oxlint/oxfmt ignores for the deleted files are removed. The CLI still compiles its own org-project-target grammar with scripts/generate-parsers.mjs. Refs #1533 Co-Authored-By: Burak Yigit Kaya <126780+BYK@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
BYK
approved these changes
Oct 27, 2026
This branch was successfully deployed
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.
@sentry/search-syntax@1.0.0is now on npm, published from getsentry/sentrystatic/packages/search-syntax(getsentry/sentry#128514). This drops toolkit's vendored copy of the grammar and parser and uses the package instead, so the CLI, MCP and the Sentry frontend all run one grammar.What changes
packages/toolkit-core/grammar/, the committed compiled parser insrc/generated/,src/search-syntax.ts(the structuralTokenConverter), its tests, and the copiedtest/fixtures/search-syntaxcases. The package'sparser.spec.tsis the port of those tests and runs the shared fixtures in getsentry/sentry.toolkit-core/src/search-query.tsand MCP'ssearch-events/utils.tsimportparseSearchand the token types from@sentry/search-syntax/parser, andToken/TermOperator/FilterTypefrom@sentry/search-syntax/tokens. The@sentry/toolkit-core/search-syntaxexport is removed; those two files were its only users.@sentry/search-syntaxto the pnpm catalog (^1.0.0) as a dependency of toolkit-core and mcp-core.1.0.0is inminimumReleaseAgeExcludebecause it was published today, like the other first-party@sentry/*entries.generate:parsersscript, its pre-commit task, thecheck:generatedpath fortoolkit-core/src/generated, and the oxlint/oxfmt ignores for the deleted files. The CLI still compiles its ownorg-project-targetgrammar withscripts/generate-parsers.mjs.The package's API matches what toolkit had: the parser was ported from toolkit-core, with the #1534 size-filter fix. One type-level difference is that the token constants are TS enums instead of
as constobjects. Their runtime string values are unchanged.Checks (local)
tsccleantsconly reports the existing@sentry/mcp-server-mocksresolution errors from the unbuilt mocks packagetsdownbuilds pass, and both ESM and CJS outputs of mcp-server bundle the packagesearch-query,issue,log,span,trace,replay,eventanderrorspass.explore.test.tscan't load here becausesdk.generated.jsdoesn't build in this sandbox, so CI is the real check for it.search-query.ts, which is how the CLI builds, resolves the package and rewriteslevel:error OR level:warningtolevel:[error,warning]pnpm install --frozen-lockfile,check:generated, oxlint and oxfmt passRefs #1533
via @BYK.
--
View Junior Session [Sentry]