Skip to content

Handle Edge Wrangler JSONC drift during setup - #24

Merged
Bartek532 merged 6 commits into
mainfrom
fix/edge-jsonc
Sep 25, 2026
Merged

Bartek532 merged 6 commits into
mainfrom
fix/edge-jsonc

Conversation

@Bartek532

@Bartek532 Bartek532 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Parse valid Wrangler JSONC, including comments and trailing commas, with jsonc-parser.
  • Apply targeted edits that preserve existing comments and layout.
  • If Wrangler JSONC is invalid or its bindings have an unexpected shape, log the problem and leave the file unchanged while project setup continues.
  • Skip local D1 setup in that case and tell the user to review wrangler.jsonc and run pnpm db:setup afterward.
  • Cover valid configuration, invalid JSONC, and changed binding shapes with the shared Node test runner from PR Warn on template JSON drift and test app removal #23. No separate test framework is added.
  • Add one patch changeset for the unreleased Core provider mapping, template drift handling, and Edge JSONC fixes.

Verification

  • pnpm run test (7 passed, including 3 Wrangler cases)
  • tsc --noEmit
  • eslint
  • prettier --check "**/*.{ts,tsx,mdx}"
  • tsdown production build
  • changeset status (@turbostarter/cli patch)

@Bartek532 Bartek532 changed the title Fix Edge Wrangler JSONC setup Handle Edge Wrangler JSONC drift during setup Sep 25, 2026
@Bartek532
Bartek532 merged commit c2b20b4 into main Sep 25, 2026
4 checks passed
@Bartek532
Bartek532 deleted the fix/edge-jsonc branch September 25, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant