fix(wrangler): match D1 compound END case-insensitively - #15091
fix(wrangler): match D1 compound END case-insensitively#15091HaoChiBao wants to merge 2 commits into
Conversation
BEGIN/CASE already use the i flag; lowercase end; left the splitter inside a trigger body and broke statement boundaries.
|
|
Codeowners approval required for this PR:
Show detailed file reviewers
|
| */ | ||
| function isCompoundStatementEnd(str: string) { | ||
| return /\sEND[;\s]$/.test(str); | ||
| return /\sEND[;\s]$/i.test(str); |
There was a problem hiding this comment.
🟡 Bug fix to a published package ships without a changeset, so users never get the release note
The behavior fix to D1 statement splitting (/\sEND[;\s]$/i at packages/wrangler/src/d1/splitter.ts:169) is added without any accompanying changeset entry, so the fix will not trigger a release or appear in the changelog.
Impact: Users won't see the fix documented and it may not be published.
Repository rule requiring changesets for published package changes
AGENTS.md states "All changes to published packages require a changeset" and CONTRIBUTING.md requires a changeset for every non-trivial change. The PR touches packages/wrangler/src/d1/splitter.ts (a published package's source) but .changeset/ only contains README.md, config.json, and an unrelated dependabot-update-15072.md. A patch changeset for wrangler describing the user-facing fix should be added.
Prompt for agents
Add a patch changeset for the wrangler package describing this user-facing bug fix: D1 SQL files using a lowercase 'end;' to close a compound statement (e.g. triggers) were previously split incorrectly. Follow .changeset/README.md rules: no conventional-commit prefix in the title, focus on user impact, no h1/h2/h3 headers.
Was this helpful? React with 👍 or 👎 to provide feedback.
Keep the case-insensitive END regression in its own test case.
petebacondarwin
left a comment
There was a problem hiding this comment.
Thanks for this. Please add a changeset as is described in our Contributing guidelines.
|
This seems to duplicate #15094 , which I already approved and only needs minor tweaks. To avoid duplication of work: please follow that PR, and only re-open this PR if that one stalls and gets closed. |
Summary
isCompoundStatementStartalready matchesBEGIN/CASEcase-insensitively, butisCompoundStatementEndrequired uppercaseEND.end;left the splitter inside a compound statement and broke statement boundaries (e.g. triggers + following SQL).end.Test plan
end;packages/wranglerd1 splitter tests