fix: seed command#55
Merged
Merged
Conversation
Collaborator
Author
Merge activity
|
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.

TL;DR
pack-bundle.mjsnow auto-discovers and packs all example bundles at once, and theseedscript runs it automatically before seeding.What changed?
pack-bundle.mjscan now operate without asourceDirargument. When none is provided, it discovers every folder underexamples/that contains atangent.yamland packs each one into a.ziparchive. Passing an explicitsourceDirstill packs only that single folder.OUTPUT_DIRcan be overridden via thePACK_BUNDLE_OUTPUT_DIRenvironment variable.seedscript inpackage.jsonnow runspack-bundle.mjsfirst, ensuring all example bundles are freshly packed before the seed operation runs.How to test?
pnpm seedand verify that.ziparchives are generated for allexamples/<name>/folders containing atangent.yamlbefore the seed completes.node scripts/pack-bundle.mjsdirectly with no arguments and confirm all discoverable bundles are packed.node scripts/pack-bundle.mjs examples/tangle-ossand confirm only that single bundle is packed, matching previous behavior.Why make this change?
Previously,
pack-bundle.mjsonly packed a single hardcoded bundle (examples/tangle-oss), requiring manual invocation for any additional bundles. This change removes that limitation so all example bundles stay in sync automatically, and wires the packing step intoseedso the two operations can't fall out of sync.