Forward per-format compiler options from setup() - #386
Merged
NullVoxPopuli merged 1 commit intoSep 3, 2026
Merged
Conversation
setupKolay already spreads userland options into the docs service, but setup() picked a fixed set of names and built the compiler options internally, so per-format options (repl-sdk's supported surface — notably a custom owner for rendered snippets) could not be supplied. Add a formatOptions option, keyed by format, whose entries merge over the options kolay configures for each format. An integration test injects a gjs/gmd owner and asserts a rendered snippet resolves getOwner() lookups through it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
|
@adrianbw is attempting to deploy a commit to the universal-ember Team on Vercel. A member of the Team first needs to authorize it. |
NullVoxPopuli
approved these changes
Sep 1, 2026
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.
setupKolayspreads userland options into the docs service, butsetup()picks a fixed set of option names and builds the compiler options internally — so repl-sdk's supported per-format options (gjs,gmd,hbs,md, …) can't be supplied from an app. The one we need is a customownerfor rendered snippets: ember-repl already defaults each format'sownerand spreads user entries over it (gjs: { owner, ...(options.gjs ?? {}) }), so the only missing link is kolay forwarding them.This adds a
formatOptionsoption tosetup()(and thekolay/setuptypes), keyed by format. Entries merge over the options kolay configures for each format:Formats kolay doesn't configure (like
gjs) pass straight through; formd/gmd/hbsthe user's entries win key-by-key over kolay's. The JSDoc steers plugin additions to the existingremarkPlugins/rehypePluginsoptions so kolay's own plugins (frontmatter, link rebasing) aren't accidentally replaced.Testing
Integration test in
markdown-and-gjs-md-app: the application route injects a probe owner viaformatOptions, and a livegjssnippet on a runtime-compiled page assertsgetOwner(this).lookup(...)resolves through it. (The probe page is plain.mdon purpose —.gjs.mdpages compile at build time and never consult the runtime compiler.)All five test-apps pass,
pnpm lintclean.Motivation
Our docs app needs to hand rendered snippets an owner that can answer environment-scoped lookups (the
ember-provide-consume-contextinteraction described in customerio/ember-provide-consume-context#58 — providers register on the snippet island's Environment while consumer reads resolve through the host app's renderer). This passthrough is the supported surface for that kind of customization; discussed with @NullVoxPopuli.🤖 Generated with Claude Code
AI attribution: drafted by Claude Code (Fable 5), directed by @adrianbw; the approach (forwarding per-format options through
setup()) is per NullVoxPopuli's guidance. Tested as described above; reviewed by the author before opening.