Skip to content

Commit ac2c0f5

Browse files
committed
Update long description in manifest.json and add version consistency check script
1 parent ea99895 commit ac2c0f5

File tree

3 files changed

+61
-2
lines changed

3 files changed

+61
-2
lines changed

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "Socket",
44
"version": "0.0.9",
55
"description": "Socket MCP server for scanning dependencies",
6-
"long_description": "__Secure your code by default.__\nThe Socket MCP server brings powerful, real-time dependency scanning directly into Claude. Instantly audit packages from npm, PyPI, Cargo, and more—right inside your chats—with zero setup.\nBuilt on the Model Context Protocol (MCP), this extension automatically evaluates packages for:\n:shield: Vulnerabilities and malware\n:link: Supply chain risks\n:test_tube: Code quality and maintenance\n:scales: License compliance\n\nWith a single command, Claude will return detailed security scores (0–100) across five critical dimensions—helping you make informed decisions and avoid risky dependencies before they hit production.",
6+
"long_description": "__Secure your code by default.__\n\nThe Socket MCP server brings powerful, real-time dependency scanning directly into Claude. Instantly audit packages from npm, PyPI, Cargo, and more—right inside your chats—with zero setup.\n\nBuilt on the Model Context Protocol (MCP), this extension automatically evaluates packages for:\n\n- Vulnerabilities and malware\n\n- Supply chain risks\n\n- Code quality and maintenance\n\n- License compliance\n\n\n\nWith a single command, Claude will return detailed security scores (0–100) across five critical dimensions—helping you make informed decisions and avoid risky dependencies before they hit production.",
77
"author": {
88
"name": "Alexandros Kapravelos",
99
"email": "alexandros@socket.dev",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"build:types": "tsc -p tsconfig.declaration.json",
2222
"build:permissions": "chmod +x ./index.js && (chmod +x ./mock-client/*.js 2>/dev/null || true)",
2323
"build-dtx": "run-s build build-dtx:*",
24-
"build-dtx:versions_match": "node scripts/check-versions.js",
24+
"build-dtx:versions_match": "node --experimental-strip-types scripts/check-versions.ts",
2525
"build-dtx:validate": "npx dxt validate ./",
2626
"build-dtx:dtx-pack": "npx dxt pack ./",
2727
"clean": "./scripts/clean.sh",

scripts/check-versions.ts

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/usr/bin/env node
2+
3+
import { readFileSync } from 'fs';
4+
import { fileURLToPath } from 'url';
5+
import { dirname, join } from 'path';
6+
7+
const __filename = fileURLToPath(import.meta.url);
8+
const __dirname = dirname(__filename);
9+
const projectRoot = join(__dirname, '..');
10+
11+
interface PackageJson {
12+
version: string;
13+
[key: string]: any;
14+
}
15+
16+
interface ManifestJson {
17+
version: string;
18+
[key: string]: any;
19+
}
20+
21+
function readJsonFile<T>(filePath: string): T {
22+
try {
23+
const content = readFileSync(filePath, 'utf8');
24+
return JSON.parse(content) as T;
25+
} catch (error) {
26+
console.error(`Error reading ${filePath}:`, (error as Error).message);
27+
process.exit(1);
28+
}
29+
}
30+
31+
function main(): void {
32+
console.log('Checking version consistency between package.json and manifest.json...');
33+
34+
const packageJsonPath = join(projectRoot, 'package.json');
35+
const manifestJsonPath = join(projectRoot, 'manifest.json');
36+
37+
const packageJson = readJsonFile<PackageJson>(packageJsonPath);
38+
const manifestJson = readJsonFile<ManifestJson>(manifestJsonPath);
39+
40+
const packageVersion = packageJson.version;
41+
const manifestVersion = manifestJson.version;
42+
43+
console.log(`package.json version: ${packageVersion}`);
44+
console.log(`manifest.json version: ${manifestVersion}`);
45+
46+
if (packageVersion === manifestVersion) {
47+
console.log('✅ Versions match!');
48+
process.exit(0);
49+
} else {
50+
console.error('❌ Version mismatch detected!');
51+
console.error(`Expected both files to have the same version, but found:`);
52+
console.error(` package.json: ${packageVersion}`);
53+
console.error(` manifest.json: ${manifestVersion}`);
54+
console.error('Please update both files to have matching versions.');
55+
process.exit(1);
56+
}
57+
}
58+
59+
main();

0 commit comments

Comments
 (0)