Skip to content

Commit 10ab94f

Browse files
committed
chore(release): bump version to 2.10.0
Update version and changelog for unified DLX metadata schema release.
1 parent be7bfa6 commit 10ab94f

3 files changed

Lines changed: 38 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.10.0](https://github.com/SocketDev/socket-lib/releases/tag/v2.10.0) - 2025-10-30
9+
10+
### Added
11+
12+
- **Unified DLX metadata schema**: Standardized `.dlx-metadata.json` format across TypeScript and C++ implementations
13+
- Exported `DlxMetadata` interface as canonical schema reference
14+
- Core fields: `version`, `cache_key`, `timestamp`, `checksum`, `checksum_algorithm`, `platform`, `arch`, `size`, `source`
15+
- Support for `source` tracking (download vs decompression origin)
16+
- Reserved `extra` field for implementation-specific data
17+
- Comprehensive documentation with examples for both download and decompression use cases
18+
19+
### Changed
20+
21+
- **DLX binary metadata structure**: Updated `writeMetadata()` to use unified schema with additional fields
22+
- Now includes `cache_key` (first 16 chars of SHA-512 hash)
23+
- Added `size` field for cached binary size
24+
- Added `checksum_algorithm` field (currently "sha256")
25+
- Restructured to use `source.type` and `source.url` for origin tracking
26+
- Maintains backward compatibility in `listDlxCache()` reader
27+
828
## [2.9.1](https://github.com/SocketDev/socket-lib/releases/tag/v2.9.1) - 2025-10-30
929

1030
### Added

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@socketsecurity/lib",
3-
"version": "2.9.1",
3+
"version": "2.10.0",
44
"license": "MIT",
55
"description": "Core utilities and infrastructure for Socket.dev security tools",
66
"keywords": [

src/dlx-binary.ts

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,13 @@ export async function dlxBinary(
424424

425425
// Get file size for metadata.
426426
const stats = await fs.stat(binaryPath)
427-
await writeMetadata(cacheEntryDir, cacheKey, url, computedChecksum || '', stats.size)
427+
await writeMetadata(
428+
cacheEntryDir,
429+
cacheKey,
430+
url,
431+
computedChecksum || '',
432+
stats.size,
433+
)
428434
}
429435

430436
// Execute the binary.
@@ -533,7 +539,13 @@ export async function downloadBinary(
533539

534540
// Get file size for metadata.
535541
const stats = await fs.stat(binaryPath)
536-
await writeMetadata(cacheEntryDir, cacheKey, url, computedChecksum || '', stats.size)
542+
await writeMetadata(
543+
cacheEntryDir,
544+
cacheKey,
545+
url,
546+
computedChecksum || '',
547+
stats.size,
548+
)
537549
downloaded = true
538550
}
539551

@@ -642,11 +654,10 @@ export async function listDlxCache(): Promise<
642654
const metaObj = metadata as Record<string, unknown>
643655

644656
// Get URL from unified schema (source.url) or legacy schema (url).
657+
// Allow empty URL for backward compatibility with partial metadata.
645658
const source = metaObj['source'] as Record<string, unknown> | undefined
646-
const url = (source?.['url'] as string) || (metaObj['url'] as string) || ''
647-
if (!url) {
648-
continue
649-
}
659+
const url =
660+
(source?.['url'] as string) || (metaObj['url'] as string) || ''
650661

651662
// Find the binary file in the directory.
652663
// eslint-disable-next-line no-await-in-loop

0 commit comments

Comments
 (0)