Menu

Post image 1
Post image 2
1 / 2
0

Handling Midnight SDK Breaking Changes: A Developer's Upgrade Playbook

DEV Community·Harrie·21 days ago
#JmfizXyI
Reading 0:00
15s threshold

You run npm update on a Friday afternoon. Tests were passing that morning. Now your terminal looks like this: CompactError: Version mismatch Expected circuit artifact version: 4.1.0 Found: 3.8.2 Contract: ./managed/counter/contract/index.cjs Enter fullscreen mode Exit fullscreen mode Nothing is actually wrong with your .compact source files. You just have stale compiled artifacts sitting in managed/ from before the upgrade, and the runtime now refuses to load them. Breaking changes on Midnight split into two categories: TypeScript API renames and Compact compiler artifact incompatibility. Once you know which you're dealing with, the fix is usually fast. What changed in the v3.x to v4.x migration Package consolidation The biggest structural change was flattening six individual packages into one barrel export.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More