Skip to content

Conversation

greggman
Copy link
Contributor

In this version of generate.mjs we assume there is a file ./generated/index-temp.d.ts
that was created by calling bikeshed, applying our patches, and calling prettier
in the previous commit. This should give us the diff needed to take our generated file
to the current dist state.

We then generate a current bikeshed-fixup-prettier generated/index-temp.d.ts.
We copy that to generated/index.d.ts and apply the previous patch. If it applies
it should have just the new changes from index.bs

wdty? too brittle?

greggman added 2 commits July 10, 2025 13:28
In this version of generate.mjs we assume there is a file ./generated/index-temp.d.ts
that **was** created by calling bikeshed, applying our patches, and calling prettier
in the previous commit. This should give us the diff needed to take our generated file
to the current dist state.

We then generate a current bikeshed-fixup-prettier generated/index-temp.d.ts.
We copy that to generated/index.d.ts and apply the previous patch. If it applies
it should have just the new changes from index.bs
@greggman greggman requested a review from kainino0x July 10, 2025 21:08
@greggman
Copy link
Contributor Author

thoughts:

I think, if you wanted to add new comments you'd just add them to dist/index.d.ts. They'd get included next time. If the patch doesn't apply you'll get an unchanged generate/index.d.ts like you used to get. You can still compare and update dist/index.d.ts manually. I don't think you need to do anything else. You do need to commit generated/index-temp.d.ts each time.

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.

1 participant