Repository navigation
🐸 Versioned release - #27
Open
adrianbrowning wants to merge 1 commit into
Open
adrianbrowning wants to merge 1 commit into
adrianbrowning wants to merge 1 commit into
Conversation
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 3, 2026 16:50
aa7408c to
9393090
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 4, 2026 07:19
9393090 to
ad0cc75
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 4, 2026 07:53
ad0cc75 to
edfd29d
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 4, 2026 08:17
edfd29d to
4e7e41b
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 4, 2026 08:52
4e7e41b to
fe746bc
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 4, 2026 15:59
fe746bc to
1250b1c
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 4, 2026 16:48
1250b1c to
d4cc59f
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 4, 2026 18:53
d4cc59f to
aa73b8b
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 4, 2026 19:59
aa73b8b to
6f980bd
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 4, 2026 20:02
6f980bd to
3ee98ce
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 4, 2026 21:22
3ee98ce to
277d395
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 6, 2026 08:47
277d395 to
6d2289a
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 6, 2026 08:48
6d2289a to
a574b07
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 6, 2026 10:19
a574b07 to
f89174d
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 6, 2026 11:10
f89174d to
b0fadb5
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 6, 2026 11:27
b0fadb5 to
568ba67
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 6, 2026 12:18
568ba67 to
b5db8fa
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 6, 2026 12:33
b5db8fa to
014728e
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 6, 2026 13:06
014728e to
5190fca
Compare
|
5 tasks
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 6, 2026 13:35
5190fca to
7a1f442
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 6, 2026 13:58
7a1f442 to
5d8cb51
Compare
|
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 6, 2026 15:28
5d8cb51 to
77aa600
Compare
|
mdcode-ts@0.1.0
adrianbrowning
force-pushed
the
bumpy/version-packages
branch
from
October 6, 2026 15:55
77aa600 to
5c4114e
Compare
|
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.
This PR was created and will be kept in sync by bumpy based on your bump files (in
.bumpy/). Merge it when you are ready to release the packages listed below:mdcode-ts0.0.4 → 0.1.0 CHANGELOG.mdextractno longer overwrites pre-existing files that a block describes in (bump file)full. Such targets are skipped with a warning; pass
--forcefor the old behaviour. When anything isskipped the count is reported even under
--quietand the CLI exits with status 2, so a pipelinecannot mistake "wrote nothing" for success.
extractnow splicesregion=blocks in place instead of rewriting the whole file, so surroundingcode and untouched regions survive, and aliased
file=paths pointing at one file resolve to asingle write. Region markers are written and matched in the block language's own comment syntax, so
shell, SQL, CSS and block-comment markers splice instead of being duplicated.
A relative
file=is honoured as written even when it resolves outside--dir(
file=../../shared-tests/where.ts). An absolutefile=is skipped. Generatedblock-N.extnamesfor blocks without
file=always land inside--dir. A skip sets exit status 2 without cutting off--update-sourcemarkdown piped to stdout.A target is left byte-identical rather than spliced when it is a symlink, is not valid UTF-8, has a
region it never closes or names inconsistently, declares a region twice, or when the blocks for one
file mix
region=with whole-file blocks. Two blocks that declare the sameregion=for one fileare refused, whether the file exists or not, rather than keeping only one body. Writes go through a
temp file and
rename, preserving the target's permission bits, so an interrupted write cannottruncate a source file.
Install and import docs now name the published package
mdcode-ts; they previously pointed at aname that resolved to the upstream fork.
extract --update-sourcewritingfile=onto the wrong fence when one fence contained another. (bump file)Behaviour changes: a closing fence may now be indented up to three spaces more than its opener, and a backtick fence whose info string contains a backtick no longer opens a block.
name=identifies a block, must be unique within a document, and every command can select it with-n, --name. Metadata values can now be double-quoted, as infile="getting started.ts", with\"and\\escapes.listshows names, including in--json. Behaviour change: commands andparse()now refuse a document whose metadata has an unterminated quote, an invalid escape, a repeated key, an empty name, or a duplicate name, and throwMetadataErrorlisting each problem by line. (bump file)--jsontolist,extract,update,runanddump: each prints one versioned JSON envelope (version,command,ok,result,errors) with block names, fence lines, per-block outcomes and coded errors, and no colour or progress text.dump --jsonwrites the archive to the required--outand reports its manifest. Behaviour changes:list --jsonprints the envelope instead of one object per line;runexits 1 when a block command fails andupdateexits 1 when afile=read or transformer fails (both exited 0);run --keepprints the working directory after the blocks;extract --update-sourceno longer addsfile=to a block whose file it skipped, and creates no directories for skipped targets;runnow removes its empty.mdcode-tmpdirectory. Library: command functions return structured results and no longer print:update()returns{ source, blocks, errors },list()returns{ blocks },extract()returns{ targets, updatedSource?, errors },run()returns{ workingDir, blocks, errors }anddump()returns{ files, archive }; thequietandjsonoptions are gone. The defaultmdcode()export still returns the markdown string. (bump file)licensefield now says MIT to match the LICENSE file. CLI and library behaviour are unchanged. (bump file)updatenow separates planning from writing. By default, or with--plan, it lists the blocks that would change.--diffprints a unified diff of the markdown,--checkexits 1 with anout_of_syncerror for each block that has drifted from its source (a failedfile=read or transform is reported asread_failedortransform_failed, not as drift),--stdoutprints the updated markdown, and--applyis the only mode that writes the file. A no-op--applyleaves the file untouched.--namecan be repeated on every command, andupdatefails withinvalid_usagewhen no selected block has a given name. EachUpdatedBlocknow carries its resultingcode. Behaviour changes:mdcode update README.mdno longer writes README.md; add--apply.--applyrefuses stdin input; use--stdout. A block whosefile=content matches it apart from the file's final newline is no longer reported aschanged. (bump file)file=must stay inside its base:updateresolves it against the markdown file's directory (the current directory for stdin) or the new--base <dir>,extractagainst--dir, and both refuse absolute paths,..escapes and paths that lead out through a symlink before anything is read or written.dumprefuses entry names that would unpack outside the archive. These refusals use the newunsafe_patherror code.updategains--continue-on-errorto report every failed read or transform and keep going. Behaviour changes:runneeds--allow-shelland fails withinvalid_usagewithout it.updatestops at the firstread_failed,unsafe_pathortransform_failederror, writes nothing and reports only that error, unless--continue-on-erroris given.updateconfinesfile=to the base, sofile=../src/app.jsfromdocs/README.mdnow fails; run with--base .and writefile=src/app.js.extractconfinesfile=to--dir, and an unsafe target aborts the whole extract with exit 1 and nothing written, where a relative path used to be honoured outside--dirand an absolute one was skipped with exit 2.dumprefuses escaping entry names and produces no archive. The default exportmdcode(filePath, transformer, filter?)resolvesfile=against the markdown file's directory instead of the current directory, confines it there, and rejects on the first failed read or transform. (bump file)examples/ci/check-docs-sync.mjs, that checks one or more Markdown documents withupdate --checkand exits 0 when all are in sync, 1 on drift, and 2 when a document could not be checked. The README shows how to run it locally and from GitHub Actions. (bump file)examples/ci/validate-snippets.mjs, that extracts the code blocks markedrunnable=trueinto a temporary workspace, runs your validation command there, names the block that failed, and always removes the workspace. (bump file)docs:checkCI recipe in the README to add mdcode-ts todevDependencies, sonpm ciinstalls themdcodethe script runs. (bump file)mdcode.config.json:updateandextractread documents (paths or globs),sourceRoot,outputRootand default filters with--projector--config <path>, and take several Markdown files. Under--json, both now reportresult.documents, and errors name theirdocument. Needs Node 22.17 or later. (bump file)mdcode validate(andvalidate()), which reports every block thatupdateorextractwould refuse, without writing anything.--for extractchecks extract targets instead of update sources, and--strictrequiresfile=on every selected block. Behaviour changes:extractchecks every target before writing any. Blocks that share a file without each declaring their ownregion=in one language, identical whole-file blocks included, are refused asambiguous_target, and broken markers in an existing target asmalformed_region,duplicate_regionorregion_language_mismatch; nothing is written and it exits 1, where it used to skip that file with exit 2.updaterefuses aregion=its file opens more than once instead of joining the bodies, and reports missing, unclosed or wrongly marked regions asmissing_region,malformed_regionorregion_language_mismatchinstead ofread_failed.update --apply --continue-on-errorno longer writes a document in which a block'sfile=orregion=failed. (bump file)mdcode watchandwatch(). They check documents and the files their blocks read after every change, debounced, and report only the blocks that drifted or failed.--applywrites changes and ignores the change events of its own writes. Watching continues through read and configuration errors, and SIGINT stops it with exit 0. (bump file)transform()andtransformWithFunction(), which printed every block to the console andtransform()read stdin.update({ source, transformer, filter })replacestransformWithFunction()but reads eachfile=first, so a missing file is aread_failederror (thrown, or collected withcontinueOnError); usewalk()to transform without reading files. Addedupdate({ onBlock })to report each block as it finishes, andextract()now throws aninvalid_usageerror forupdateSourcewithignoreAnonymous. (bump file)parse()andupdate()examples now run as written, and code blocks no longer carryfile=paths to files that were never committed, somdcode updateworks on the README itself. Releases now publish only after type check, lint, build, tests, a docs-sync check and the README'srunnable=trueexamples all pass. (bump file)prepublishOnlyor with a GitHub Actions publish job that needs a checks job. (bump file)extractwith several documents now checks all of them before writing anything. Blocks in different documents that write one file follow the same rule as blocks within one document: each needs its ownregion=, in one language. Otherwise they are refused asambiguous_target, each error naming its document, and nothing is written for any document. Previously the first document's version won and the second was skipped, depending on document order. A rule broken in a later document no longer leaves the earlier documents' files written.validate --for extractreports the same cross-document conflicts. (bump file)skills/sync-markdown-code-blocks, managed with TanStack Intent. It teaches coding agents the mdcode workflow: link a block to a file or region, inspect and plan, apply explicitly and verify with--check. It also coversextract,run,dump, transformers, JSON results, and which commands need approval on untrusted Markdown. Runnpx @tanstack/intent installin your project to let your agent find it; see Agent Skills in the README. (bump file)--metaswallowing the Markdown file after it.mdcode list --meta type=example README.mdused to readREADME.mdas a secondkey=value, read stdin instead and report no blocks.--metanow takes one pair per flag; repeat it to require several (-m type=example -m region=main). A value containing=is now kept whole. The README and CLI examples no longer pass directories or several files tolist,runanddump, or globs to--file, which matchesfile=exactly. (bump file)