Fix sparse Fern shard aggregate barrel generation - #5
Open
createsomethingtoday wants to merge 2 commits into
Open
createsomethingtoday wants to merge 2 commits into
createsomethingtoday wants to merge 2 commits into
Conversation
Create aggregate parent directories when a shard has no files in them, and cover resource/core/aggregate absence with regression fixtures. Co-Authored-By: Paperclip <noreply@paperclip.ing>
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.
Problem
Sparse Fern TypeScript shards can omit
api/resourcesor other aggregate directories. The merge script writes aggregate barrel files into those directories without creating their parents, so otherwise successful generation ends withENOENTforsdk/api/resources/index.ts. The SDK map emitter also writes an extra blank line at the end ofsdk-operation-types.ts, making a raw generated artifact failgit diff --check.Change
sdk-operation-types.tsby removing the trailing empty line from the source emitter. No generated file was edited.Verification
pnpm --filter @cloudflare/forge-sdk-ts test— 21 passing tests.pnpm --filter @cloudflare/forge-sdk-ts typecheck:scriptsand changed-file format checks — pass.1c1c2dcf2c21cdcb840de0ad727a03c159995b22318568f3245781081caa6faf); full output directory diff was empty.git diff --checkon the source branch — pass. The generated operation-types file now ends with a single newline.These changes do not alter generated method selection, response typing, or runtime request behavior.