You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Commit the generated *.prebuilt.ts / *.prebuilt-dev.ts files to git, and exclude them from Biome (as a formatter).
Why
These files are produced by the prebuild step but imported as normal TS modules. Keeping them in .gitignore caused two issues:
CI flakiness. Turbo caches the build step. On a cache hit the prebuilt files are not written to disk, so later steps that import them fail. Seen twice recently; passes on retrigger.
Fresh-clone friction. After pnpm install, pnpm typecheck fails until pnpm build runs.
The files are small, rarely change, and carry a "do not edit, regenerate via prebuild" header.
Alternative
Declare the files as outputs in turbo.json. Rejected because:
Does not fix the fresh-clone case.
Committing the files is simpler to understand and maintain than a Turbo-specific config, which is easy to break later (e.g. when the file structure is refactored).
Testing
CI should pass.
(I guess the workflow job "Bundled size" failed only because this PR is from a fork)
Docs
The comment at the top of these generated files is already clear enough.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
Comparing ocavue-forks:ocavue/inline-prebuilt (55eec6d) with main (1d0bd55)1
Footnotes
No successful run was found on main (18879c3) during the generation of this report, so 1d0bd55 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
I don't really think we should. I don't love the prebuild system and would love to find a replacement, but I don't think the friction of needing to run pnpm run build is really enough to justify adding build artifacts to the git history. I'd rather find another way, like having the built files be processed by Vite as normal JS that then gets inlined by the framework.
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
pkg: astroRelated to the core `astro` package (scope)
4 participants
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.
Summary
Commit the generated
*.prebuilt.ts/*.prebuilt-dev.tsfiles to git, and exclude them from Biome (as a formatter).Why
These files are produced by the prebuild step but imported as normal TS modules. Keeping them in
.gitignorecaused two issues:pnpm install,pnpm typecheckfails untilpnpm buildruns.The files are small, rarely change, and carry a "do not edit, regenerate via prebuild" header.
Alternative
Declare the files as outputs in
turbo.json. Rejected because:Testing
CI should pass.
(I guess the workflow job "Bundled size" failed only because this PR is from a fork)
Docs
The comment at the top of these generated files is already clear enough.