fix(catalog): extract catalog from bundles with $-prefixed vars - #22
Merged
Conversation
command-code 1.40.1 minifies provider constants as $R="vercel-ai-gateway"; the \b boundary in extractStringBindings never fires before "$", so the provider alias was captured as "R" (or skipped) and evaluating the model catalog threw $R is not defined. Use lookbehind/lookahead boundaries that honor "$" names. Also normalize catalog-break titles when npm metadata returns a "v"-prefixed version, and treat chore(scope) commits that touch product files as patch releases so models.json syncs keep publishing.
Contributor
|
🎉 This PR is included in version 0.7.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
Problem
command-code@1.40.1 changed its minified bundle shape: provider/spec constants are now declared as
$R="vercel-ai-gateway"-style$-prefixed variables.extractStringBindingsused\bword-boundary regexes, and\bnever fires before$(not a word char) — the alias was parsed asR(or dropped), so evaluating the model catalog threw$R is not defined→Could not evaluate model catalog.Every Catalog sync run since 1.40.1 shipped failed at this step (runs #24/#23/#22), which also spammed "the repository has disabled issues" while the catalog-break issue path fell over.
Changes
src/catalog.ts:extractStringBindingsregexes use explicit lookbehind/lookahead boundaries so$R="..."binds correctly (66→67 models; addsclaude-fable-5-1).src/catalog-break.ts: normalizev-prefixed version in break-issue titles.scripts/analyze-release-scope.ts: treatchore(scope)commits that touch product files as patch releases (keepschore(catalog)sync commits shipping; scope-lesschorestays inert).Verified: full real-bundle extraction succeeds (
67 entries),bun run checkgreen (154 tests).Issues are now enabled on the repo, so the automation's catalog-break issue flow works going forward.