Commit 507cd47
authored
⚡ Add explicit type field to all SDK clients (#175)
## Summary
Adds the `type` field to all SDK clients that send screenshot image
data. This completes the performance optimization from #174 by ensuring
all clients benefit from O(1) type detection on the server.
## Changes
| SDK | File | Type Sent |
|-----|------|-----------|
| Full SDK | `src/sdk/index.js` | `type: 'base64'` |
| Vitest | `clients/vitest/src/setup.js` | `type: 'file-path'` |
| Ruby | `clients/ruby/lib/vizzly.rb` | `type: 'base64'` |
| Swift | `clients/swift/.../VizzlyClient.swift` | `type: 'base64'` |
**No changes needed:**
- **Core client** (`src/client/index.js`) - Already updated in #174
- **Static-site** - Uses core client SDK
- **Storybook** - Uses core client SDK
- **Ember** - Different architecture (sends selector, server takes
screenshot)
## Packages to Release
After merging, the following packages need new releases:
| Package | Registry | Notes |
|---------|----------|-------|
| `@vizzly-testing/cli` | npm | Main CLI package |
| `@vizzly-testing/vitest` | npm | Vitest plugin |
| `vizzly` | RubyGems | Ruby gem |
| `Vizzly` | Swift Package Manager | Swift package |
## Test Plan
- [x] All 1751 tests pass
- [x] Backwards compatible (server falls back to detection if `type`
missing)1 parent 235dd65 commit 507cd47
File tree
5 files changed
+10
-4
lines changed- clients
- ruby
- lib
- test
- swift/Sources/Vizzly
- vitest/src
- src/sdk
5 files changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
255 | 256 | | |
256 | 257 | | |
257 | 258 | | |
| |||
0 commit comments