Skip to content

Commit 79d046c

Browse files
committed
chore: normalize package.json property order across all packages
Standardize property order in all package.json files for consistency. Changes: - Add scripts/normalize-package-json.mjs to automate normalization - Reorder properties according to standard order: name, version, description, private, license, main, bin, type, exports, files, os, cpu, scripts, dependencies, devDependencies, peerDependencies, optionalDependencies, engines, repository, author, homepage, bugs, keywords, publishConfig, ... - Run 'npm pkg fix' on all packages to apply npm's own fixes - 12 packages normalized, 13 packages fixed Standard order improves: - Readability: Important metadata appears first - Consistency: All packages follow same structure - Maintainability: Easier to spot differences in diffs
1 parent 36a72b4 commit 79d046c

File tree

13 files changed

+293
-128
lines changed

13 files changed

+293
-128
lines changed

packages/build-infra/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "build-infra",
33
"version": "1.0.0",
44
"description": "Shared build infrastructure utilities for Socket CLI",
5-
"type": "module",
65
"private": true,
6+
"type": "module",
77
"exports": {
88
"./lib/esbuild-helpers": "./lib/esbuild-helpers.mjs",
99
"./lib/esbuild-plugin-dead-code-elimination": "./lib/esbuild-plugin-dead-code-elimination.mjs",
@@ -13,18 +13,18 @@
1313
"./lib/setup-helpers": "./lib/setup-helpers.mjs",
1414
"./lib/unicode-property-escape-transform": "./lib/unicode-property-escape-transform.mjs"
1515
},
16+
"dependencies": {
17+
"@babel/parser": "catalog:",
18+
"@babel/traverse": "catalog:",
19+
"@socketsecurity/lib": "catalog:",
20+
"magic-string": "catalog:"
21+
},
1622
"externalTools": {
1723
"cmake": "3.30.5",
1824
"emsdk": "3.1.69",
1925
"gh": "2.62.0",
2026
"ninja": "1.12.1",
2127
"python": "3.10.18",
2228
"rust": "1.82.0"
23-
},
24-
"dependencies": {
25-
"@babel/parser": "catalog:",
26-
"@babel/traverse": "catalog:",
27-
"@socketsecurity/lib": "catalog:",
28-
"magic-string": "catalog:"
2929
}
3030
}

packages/cli-with-sentry/package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,7 @@
33
"version": "2.1.0",
44
"description": "Socket CLI with Sentry telemetry for enhanced error reporting",
55
"private": true,
6-
"homepage": "https://github.com/SocketDev/socket-cli",
76
"license": "MIT",
8-
"repository": {
9-
"type": "git",
10-
"url": "git+https://github.com/SocketDev/socket-cli.git",
11-
"directory": "packages/cli-with-sentry"
12-
},
13-
"author": {
14-
"name": "Socket Inc",
15-
"email": "eng@socket.dev",
16-
"url": "https://socket.dev"
17-
},
187
"bin": {
198
"socket": "bin/cli.js",
209
"socket-npm": "bin/npm-cli.js",
@@ -39,16 +28,6 @@
3928
"test:watch": "vitest",
4029
"verify": "node scripts/verify-package.mjs"
4130
},
42-
"keywords": [
43-
"socket",
44-
"security",
45-
"cli",
46-
"sentry",
47-
"telemetry"
48-
],
49-
"engines": {
50-
"node": ">=18"
51-
},
5231
"dependencies": {
5332
"@socketsecurity/cli": "workspace:*",
5433
"@sentry/node": "catalog:"
@@ -57,6 +36,27 @@
5736
"@sentry/node": "catalog:",
5837
"esbuild": "catalog:"
5938
},
39+
"engines": {
40+
"node": ">=18"
41+
},
42+
"repository": {
43+
"type": "git",
44+
"url": "git+https://github.com/SocketDev/socket-cli.git",
45+
"directory": "packages/cli-with-sentry"
46+
},
47+
"author": {
48+
"name": "Socket Inc",
49+
"email": "eng@socket.dev",
50+
"url": "https://socket.dev"
51+
},
52+
"homepage": "https://github.com/SocketDev/socket-cli",
53+
"keywords": [
54+
"socket",
55+
"security",
56+
"cli",
57+
"sentry",
58+
"telemetry"
59+
],
6060
"publishConfig": {
6161
"access": "public",
6262
"registry": "https://registry.npmjs.org/"

packages/cli/package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,20 @@
33
"version": "0.0.0-copied-from-packages-socket",
44
"description": "CLI for Socket.dev",
55
"private": true,
6-
"homepage": "https://github.com/SocketDev/socket-cli",
76
"license": "MIT",
8-
"repository": {
9-
"type": "git",
10-
"url": "git+https://github.com/SocketDev/socket-cli.git"
11-
},
12-
"author": {
13-
"name": "Socket Inc",
14-
"email": "eng@socket.dev",
15-
"url": "https://socket.dev"
16-
},
177
"bin": {
188
"socket": "dist/index.js",
199
"socket-npm": "dist/index.js",
2010
"socket-npx": "dist/index.js"
2111
},
12+
"files": [
13+
"CHANGELOG.md",
14+
"LICENSE",
15+
"data/**",
16+
"dist/**",
17+
"logo-dark.png",
18+
"logo-light.png"
19+
],
2220
"scripts": {
2321
"build": "node --max-old-space-size=8192 --import=./scripts/load.mjs scripts/build.mjs",
2422
"build:force": "node --max-old-space-size=8192 --import=./scripts/load.mjs scripts/build.mjs --force",
@@ -131,6 +129,16 @@
131129
"node": ">=24.10.0",
132130
"pnpm": ">=10.22.0"
133131
},
132+
"repository": {
133+
"type": "git",
134+
"url": "git+https://github.com/SocketDev/socket-cli.git"
135+
},
136+
"author": {
137+
"name": "Socket Inc",
138+
"email": "eng@socket.dev",
139+
"url": "https://socket.dev"
140+
},
141+
"homepage": "https://github.com/SocketDev/socket-cli",
134142
"externalTools": {
135143
"@coana-tech/cli": {
136144
"description": "Coana CLI for static analysis and reachability detection",
@@ -163,14 +171,6 @@
163171
"version": "2.0.4"
164172
}
165173
},
166-
"files": [
167-
"CHANGELOG.md",
168-
"LICENSE",
169-
"data/**",
170-
"dist/**",
171-
"logo-dark.png",
172-
"logo-light.png"
173-
],
174174
"lint-staged": {
175175
"*.{cjs,cts,js,json,md,mjs,mts,ts}": [
176176
"biome check --write --unsafe --no-errors-on-unmatched --files-ignore-unknown=true --colors=off"

packages/socket/package.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,9 @@
33
"version": "2.1.0",
44
"description": "Socket CLI for Socket.dev",
55
"private": true,
6-
"homepage": "https://github.com/SocketDev/socket-cli",
76
"license": "MIT",
8-
"repository": {
9-
"type": "git",
10-
"url": "git+https://github.com/SocketDev/socket-cli.git"
11-
},
12-
"author": {
13-
"name": "Socket Inc",
14-
"email": "eng@socket.dev",
15-
"url": "https://socket.dev"
16-
},
17-
"engines": {
18-
"node": ">=24.10.0",
19-
"pnpm": ">=10.22.0"
7+
"bin": {
8+
"socket": "dist/bootstrap.js"
209
},
2110
"files": [
2211
"CHANGELOG.md",
@@ -25,6 +14,18 @@
2514
"logo-dark.png",
2615
"logo-light.png"
2716
],
17+
"scripts": {
18+
"build": "node scripts/build.mjs",
19+
"test": "vitest run",
20+
"test:coverage": "vitest run --coverage",
21+
"test:watch": "vitest",
22+
"verify": "pnpm run build && node scripts/verify-package.mjs"
23+
},
24+
"devDependencies": {
25+
"@socketsecurity/lib": "catalog:",
26+
"build-infra": "workspace:*",
27+
"esbuild": "catalog:"
28+
},
2829
"optionalDependencies": {
2930
"@socketbin/cli-alpine-arm64": "0.0.0-replaced-by-provenance",
3031
"@socketbin/cli-alpine-x64": "0.0.0-replaced-by-provenance",
@@ -35,19 +36,18 @@
3536
"@socketbin/cli-win32-arm64": "0.0.0-replaced-by-provenance",
3637
"@socketbin/cli-win32-x64": "0.0.0-replaced-by-provenance"
3738
},
38-
"scripts": {
39-
"build": "node scripts/build.mjs",
40-
"test": "vitest run",
41-
"test:coverage": "vitest run --coverage",
42-
"test:watch": "vitest",
43-
"verify": "pnpm run build && node scripts/verify-package.mjs"
39+
"engines": {
40+
"node": ">=24.10.0",
41+
"pnpm": ">=10.22.0"
4442
},
45-
"bin": {
46-
"socket": "./dist/bootstrap.js"
43+
"repository": {
44+
"type": "git",
45+
"url": "git+https://github.com/SocketDev/socket-cli.git"
4746
},
48-
"devDependencies": {
49-
"@socketsecurity/lib": "catalog:",
50-
"build-infra": "workspace:*",
51-
"esbuild": "catalog:"
52-
}
47+
"author": {
48+
"name": "Socket Inc",
49+
"email": "eng@socket.dev",
50+
"url": "https://socket.dev"
51+
},
52+
"homepage": "https://github.com/SocketDev/socket-cli"
5353
}

packages/socketbin-cli-darwin-arm64/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
"description": "Socket CLI binary",
55
"private": true,
66
"license": "MIT",
7-
"repository": {
8-
"type": "git",
9-
"url": "git+https://github.com/SocketDev/socket-cli.git"
10-
},
117
"bin": {
128
"socket": "bin/socket"
139
},
10+
"files": [
11+
"bin/socket"
12+
],
1413
"os": [
1514
"darwin"
1615
],
1716
"cpu": [
1817
"arm64"
1918
],
20-
"files": [
21-
"bin/socket"
22-
],
19+
"repository": {
20+
"type": "git",
21+
"url": "git+https://github.com/SocketDev/socket-cli.git"
22+
},
2323
"publishConfig": {
2424
"access": "public"
2525
}

packages/socketbin-cli-darwin-x64/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
"description": "Socket CLI binary",
55
"private": true,
66
"license": "MIT",
7-
"repository": {
8-
"type": "git",
9-
"url": "git+https://github.com/SocketDev/socket-cli.git"
10-
},
117
"bin": {
128
"socket": "bin/socket"
139
},
10+
"files": [
11+
"bin/socket"
12+
],
1413
"os": [
1514
"darwin"
1615
],
1716
"cpu": [
1817
"x64"
1918
],
20-
"files": [
21-
"bin/socket"
22-
],
19+
"repository": {
20+
"type": "git",
21+
"url": "git+https://github.com/SocketDev/socket-cli.git"
22+
},
2323
"publishConfig": {
2424
"access": "public"
2525
}

packages/socketbin-cli-linux-arm64/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
"description": "Socket CLI binary",
55
"private": true,
66
"license": "MIT",
7-
"repository": {
8-
"type": "git",
9-
"url": "git+https://github.com/SocketDev/socket-cli.git"
10-
},
117
"bin": {
128
"socket": "bin/socket"
139
},
10+
"files": [
11+
"bin/socket"
12+
],
1413
"os": [
1514
"linux"
1615
],
1716
"cpu": [
1817
"arm64"
1918
],
20-
"files": [
21-
"bin/socket"
22-
],
19+
"repository": {
20+
"type": "git",
21+
"url": "git+https://github.com/SocketDev/socket-cli.git"
22+
},
2323
"publishConfig": {
2424
"access": "public"
2525
}

packages/socketbin-cli-linux-musl-arm64/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
"description": "Socket CLI binary (musl libc - for Alpine Linux and musl-based systems)",
55
"private": true,
66
"license": "MIT",
7-
"repository": {
8-
"type": "git",
9-
"url": "git+https://github.com/SocketDev/socket-cli.git"
10-
},
117
"bin": {
128
"socket": "bin/socket"
139
},
10+
"files": [
11+
"bin/socket"
12+
],
1413
"os": [
1514
"linux"
1615
],
1716
"cpu": [
1817
"arm64"
1918
],
20-
"files": [
21-
"bin/socket"
22-
],
19+
"repository": {
20+
"type": "git",
21+
"url": "git+https://github.com/SocketDev/socket-cli.git"
22+
},
2323
"publishConfig": {
2424
"access": "public"
2525
}

packages/socketbin-cli-linux-musl-x64/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
"description": "Socket CLI binary (musl libc - for Alpine Linux and musl-based systems)",
55
"private": true,
66
"license": "MIT",
7-
"repository": {
8-
"type": "git",
9-
"url": "git+https://github.com/SocketDev/socket-cli.git"
10-
},
117
"bin": {
128
"socket": "bin/socket"
139
},
10+
"files": [
11+
"bin/socket"
12+
],
1413
"os": [
1514
"linux"
1615
],
1716
"cpu": [
1817
"x64"
1918
],
20-
"files": [
21-
"bin/socket"
22-
],
19+
"repository": {
20+
"type": "git",
21+
"url": "git+https://github.com/SocketDev/socket-cli.git"
22+
},
2323
"publishConfig": {
2424
"access": "public"
2525
}

0 commit comments

Comments
 (0)