v1.19.2 — Stale Cache Fix, ESM Resolution, Screenshot Optimization
Fixed
- Stale variables after writes —
figma_get_variableswithrefreshCache: truenow fetches live data from the Plugin API instead of reading a stale UI snapshot. All 11 variable write operations now invalidate the cache on success. Fixed hardcodedcached: trueflag. (Thanks to @muloka.) - ESM package root resolution —
serverVersionreported"0.0.0"in ESM runtime (npx) because__dirnameis undefined. Now resolved viaimport.meta.url. Fixes Desktop Bridge plugin rejecting the server. (Thanks to @nick-inkeep. Closes #38, #39.) - Unhandled rejection crash in
withTimeout()— cleanup branch could cause an unhandled rejection that crashes the Node.js process. (Thanks to @klgral.)
Changed
- AI-optimized screenshot defaults —
figma_capture_screenshotnow defaults to PNG at 1x (was 2x) with automatic scale capping at 1568px. Adds content-awareformatAdvice. 61–95% payload reduction, fully backwards compatible. (Thanks to @klgral.)
Added
- 171 new tests across 8 core modules. (Thanks to @klgral.)
- PAT scope documentation with troubleshooting for common 403 errors. (Thanks to @arevlo-flow.)
Full Changelog: v1.19.1...v1.19.2