Repository navigation
ref(scraps): Isolate CodeBlock and Prism in their own entry point - #129522
Merged
Merged
Conversation
Keep syntax styles with the component and load grammar dependencies in order from the installed package. Expose rendering and language helpers without app aliases. Refs DE-1740
Contributor
Publish CodeBlock at its own codeBlock entry point while keeping the code barrel limited to InlineCode. Keep packed-consumer checks local.
# Conflicts: # static/packages/scraps/package.json
natemoo-re
marked this pull request as ready for review
November 3, 2026 16:13
nsdeschenes
approved these changes
Nov 3, 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.
CodeBlock and its Prism loader now ship from
@sentry/scraps/codeBlock, with scoped syntax styles for installed consumers.@sentry/scraps/codeexports only InlineCode and its styles, so inline rendering does not load Prism. App callers, Markdown highlighting, and stories use the appropriate public entry point.The dynamic grammar loader resolves from the published package and loads dependencies before the dependent grammar. Local packed-consumer checks verify TSX with JSX and TypeScript dependencies, unsupported-language handling, SSR, public declarations, and importing InlineCode without loading Prism. Focused package tests (8), affected app tests (49), type checking, lint, full knip, and packing pass. Packed-consumer scripts are local verification only.
Review focus: verify the separate entry graphs keep Prism out of InlineCode imports, syntax styles stay scoped, and dependent grammars load in order. This unlocks Markdown (DE-1741), then Chat (DE-1744).
closes DE-1740
Unchanged