Skip to content

fix(typegen): quote batch parameter delimiters and document planSpawn as the shared entry point - #234

Merged
spydon merged 1 commit into
mainfrom
lukasklingsbo/typegen-cmd-delimiters
Sep 28, 2026
Merged

spydon merged 1 commit into
mainfrom
lukasklingsbo/typegen-cmd-delimiters

Conversation

@spydon

@spydon spydon commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #231, from a review of that pull request after it merged.

What changed

  • quoteForCmd also quotes tokens holding ,, ; or =. cmd.exe treats them as parameter delimiters when a script reads %1..%9, so a .cmd shim forwarding %1 %2 would have seen --output=a,b as three parameters. Flutter's dart.bat forwards %*, so nothing the registry spawns today is affected; the export advertises a generic contract, and this closes the gap. One test covers it.
  • planSpawn's documentation states that it throws for a token that cannot be quoted, which feat(typegen): export the Windows command-line pieces so every host quotes alike #231 made true without saying so.
  • The README points a host that can call it at planSpawn, the one export that also carries the /d /s /c wrapper and the ComSpec lookup, and presents resolveWindowsCommand, isWindowsScript and quoteForCmd as the pieces for a host that has to assemble the line itself, such as the Supabase CLI's Effect-based one.
  • tsconfig.consumer.json drops the explicit noEmit. @tsconfig/bun already sets it, so the consumer check never emitted JavaScript and the claim in feat(typegen): export the Windows command-line pieces so every host quotes alike #231's second commit was wrong.

Checks

bun test (55 passing), check-types, check-types:consumer, format-and-lint and knip pass. check-types:consumer still emits nothing with the noEmit line removed.

… as the shared entry point

quoteForCmd also quotes , ; and =, which cmd.exe treats as parameter
delimiters when a script reads %1..%9, and planSpawn's documentation
states that it throws for a token that cannot be quoted. The README
points other hosts at planSpawn, the one export that also carries the
/d /s /c wrapper and the ComSpec lookup.

The explicit noEmit in tsconfig.consumer.json goes away: @tsconfig/bun
already sets it, so the consumer check never emitted JavaScript and the
previous commit's claim about that was wrong.
@spydon
spydon requested a review from a team as a code owner September 28, 2026 11:37
@coderabbitai

coderabbitai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 39 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: da1ebc9a-ad0c-4315-9cd3-91e5fc206233

📥 Commits

Reviewing files that changed from the base of the PR and between 8b5fcbf and 7d37d35.

📒 Files selected for processing (4)
  • packages/typegen/README.md
  • packages/typegen/src/node-host.ts
  • packages/typegen/test/node-host.test.ts
  • packages/typegen/tsconfig.consumer.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@spydon
spydon merged commit 28e251d into main Sep 28, 2026
4 checks passed
@spydon
spydon deleted the lukasklingsbo/typegen-cmd-delimiters branch September 28, 2026 12:13
spydon added a commit that referenced this pull request Sep 28, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.2.1](typegen/v0.2.0...typegen/v0.2.1)
(2026-09-28)


### Bug Fixes

* **typegen:** generators emit the final newline themselves, registry
passes it through ([#233](#233))
([9bf2dc8](9bf2dc8))
* **typegen:** quote batch parameter delimiters and document planSpawn
as the shared entry point
([#234](#234))
([28e251d](28e251d))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: supabase-releaser[bot] <223506987+supabase-releaser[bot]@users.noreply.github.com>
Co-authored-by: Lukas Klingsbo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants