mirror of
https://gh-proxy.org/https://github.com/klinsmaya/workdsh.git
synced 2026-11-09 01:47:06 +08:00
16 lines
930 B
JavaScript
16 lines
930 B
JavaScript
import assert from 'node:assert/strict';
|
|
import { readFileSync } from 'node:fs';
|
|
const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
|
|
const lock = readFileSync(new URL('../pnpm-lock.yaml', import.meta.url), 'utf8');
|
|
const expected = '0.1.6-alpha.1';
|
|
const entries = [...lock.matchAll(/^ '?(@deepseek-ai\/dsh[^@\s']*)@([^\s:'(]+)(?:[^\n]*):$/gm)];
|
|
assert.ok(entries.length > 0, 'DSH lockfile entries must exist');
|
|
for (const [, name, version] of entries) {
|
|
assert.equal(version, expected, `${name} version mismatch`);
|
|
assert.equal(pkg.pnpm.overrides[name], expected, `${name} missing exact override`);
|
|
}
|
|
const cordis = [...lock.matchAll(/^ '?@deepseek-ai\/cordis@([^\s:'(]+)(?:[^\n]*):$/gm)];
|
|
assert.ok(cordis.length > 0);
|
|
assert.deepEqual([...new Set(cordis.map(m => m[1]))], ['4.0.2']);
|
|
console.log(`PASS: ${entries.length} DSH lock entries pinned to ${expected}; Cordis 4.0.2 only`);
|