Repository navigation
fix(ssr): preserve pinned module transport after #3290 #3332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 8 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
fc2ed31
Keep project env fetch credentials authoritative
kojiwakayama c5da86b
Keep same-origin SSR module imports on pinned paths
kojiwakayama aecfdcf
Keep prebundled RSC scripts aligned with pinned module paths
kojiwakayama 20283a9
Separate SSR module pinning transports
kojiwakayama fa31d3b
fix(ssr): canonicalize HTTP module specifiers
kojiwakayama a1227db
fix(mdx): preserve trusted local project identity
kojiwakayama 53e7d2b
fix(ssr): preserve nested protocol-relative URLs
kojiwakayama 64237b2
fix(mdx): validate pinned module path transport
kojiwakayama 5872f71
test(ssr): name local-project loader argument
kojiwakayama 33f6e70
test(modules): remove vacuous fetch assertions
kojiwakayama 26350e5
fix(ssr): harden protocol-relative resolution and address review find…
kwakayama 190f488
test(mdx): migrate remaining loadModuleESM call site to options object
kwakayama d488ddb
Fail closed on malformed pinned module paths
kojiwakayama 32035c2
Preserve MDX loader compatibility while rejecting bad pins
kojiwakayama 0ac8d33
Classify reserved dependency pin paths
kojiwakayama 3296f83
Handle undefined MDX load options
kojiwakayama 02d0801
Keep MDX review coverage colocated
kojiwakayama cff5921
Close remaining MDX review gaps
kojiwakayama 8d21877
Reject nested dependency pin path markers
kojiwakayama 244a57b
Remove obsolete pin encoding helper
kojiwakayama b09a711
Preserve nested project pin paths and refresh RSC bundle
kojiwakayama 5594eee
Preserve ordinary _pins source paths under snapshot wrappers
kojiwakayama ae08709
Reject nested dependency pin path markers
kojiwakayama 80351a6
Keep CI checks deterministic for PR 3332
kojiwakayama 6d3f8b3
Merge main into PR 3332 after request-init helper changes
kojiwakayama 958de92
Fail closed on malformed pinned MDX transport errors
kojiwakayama c2562b3
Integrate pinned SSR follow-up with current main
kojiwakayama ed89012
Preserve poisoned-prefix resolver safety
kojiwakayama 1110818
Honor guarded fetch test boundaries
kojiwakayama 7e451d6
Keep pinned SSR transport current with main
kojiwakayama e1a444c
Stabilize import-map capacity retry coverage
kojiwakayama ae24ffc
Merge origin/main into codex/pr3290-post-merge-fixes
kojiwakayama File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| import "#veryfront/schemas/_test-setup.ts"; | ||
| import { assertEquals } from "#veryfront/testing/assert.ts"; | ||
| import { describe, it } from "#veryfront/testing/bdd.ts"; | ||
| import { createMockAdapter } from "#veryfront/platform/adapters/mock.ts"; | ||
| import { mdxRenderer } from "#veryfront/transforms/mdx/index.ts"; | ||
| import type { LayoutItem } from "#veryfront/types"; | ||
| import { LayoutOrchestrator } from "./layout.ts"; | ||
|
|
||
| describe("rendering/orchestrator/layout", () => { | ||
| it("threads the trusted local-project identity through MDX layout preloading", async () => { | ||
| const originalLoadModuleESM = mdxRenderer.loadModuleESM; | ||
| const mutableRenderer = mdxRenderer as unknown as { | ||
| loadModuleESM: typeof mdxRenderer.loadModuleESM; | ||
| }; | ||
| let observedIsLocalProject: unknown; | ||
| mutableRenderer.loadModuleESM = ((...args: unknown[]) => { | ||
| observedIsLocalProject = args[11]; | ||
| return Promise.resolve({ default: () => null }); | ||
| }) as typeof mdxRenderer.loadModuleESM; | ||
|
|
||
| const orchestrator = new LayoutOrchestrator({ | ||
| projectDir: "/project", | ||
| projectId: "local-project", | ||
| projectSlug: "local-project", | ||
| contentSourceId: "local-main", | ||
| adapter: createMockAdapter(), | ||
| config: { react: { version: "19.1.1" } }, | ||
| mode: "development", | ||
| layoutCollector: {} as never, | ||
| layoutCompiler: {} as never, | ||
| layoutCache: {} as never, | ||
| componentRegistry: {}, | ||
| isLocalProject: true, | ||
| }); | ||
| const layouts = [{ | ||
| kind: "mdx", | ||
| path: "/project/layout.mdx", | ||
| bundle: { compiledCode: "export default function Layout() { return null; }" }, | ||
| }] as LayoutItem[]; | ||
|
|
||
| try { | ||
| const result = await orchestrator.preloadLayoutModules(layouts); | ||
|
|
||
| assertEquals(result.mdxSuccess, 1); | ||
| assertEquals(observedIsLocalProject, true); | ||
| } finally { | ||
| mutableRenderer.loadModuleESM = originalLoadModuleESM; | ||
| } | ||
| }); | ||
| }); | ||
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.