Repository navigation
v7.0.0
Features
- Decode and encode crosshair codes from the CS2 30/09/2026 update (1.41.8.8).
⚠️ Breaking changes
-
versionis replaced byformat, a string discriminant named<container>-v<version byte>:
'legacy-v1' | 'legacy-v3' | 'legacy-v4' | 'cs2-v1'. -
The crosshair interfaces are renamed after their format:
v6.0.0 v7.0.0 formatCrosshairV1CrosshairLegacyV1legacy-v1CrosshairV3CrosshairLegacyV3legacy-v3CrosshairV4CrosshairLegacyV4legacy-v4- CrosshairV1cs2-v1[!WARNING]
CrosshairV1still exists but it now describes thecs2-v1crosshair. Code importing it keeps
compiling while meaning something else, rename it toCrosshairLegacyV1. -
encodeCrosshairthrowsInvalidCrosshairShareCodeon an unknownformat. In v6.0.0 an object
with noversionwas silently encoded as a V4 code.
Migration
- import { decodeCrosshairShareCode, type CrosshairV1 } from 'csgo-sharecode';
+ import { decodeCrosshairShareCode, type CrosshairLegacyV1 } from 'csgo-sharecode';
- const crosshair: CrosshairV1 = { version: 1, ... };
+ const crosshair: CrosshairLegacyV1 = { format: 'legacy-v1', ... };