Skip to content

Commit e949f78

Browse files
committed
fix: patch @socketsecurity/sdk@2.0.1 to correct type definition paths
The SDK package.json incorrectly references index.d.mts and testing.d.mts but the actual files are index.d.ts and testing.d.ts. This patch corrects the types field to point to the correct .d.ts files. Note: This fixes the "could not find declaration file" errors, but there are still type export issues with SDK v2.0.1 that need to be addressed. Socket CLI uses SocketSdkSuccessResult and other types that are not being properly exported from the SDK index despite being defined in types.d.ts.
1 parent adb119c commit e949f78

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@
245245
"lodash@4.17.21": "patches/lodash@4.17.21.patch",
246246
"string_decoder@0.10.31": "patches/string_decoder@0.10.31.patch",
247247
"ink@6.3.1": "patches/ink@6.3.1.patch",
248-
"yoga-layout": "patches/yoga-layout.patch"
248+
"yoga-layout": "patches/yoga-layout.patch",
249+
"@socketsecurity/sdk@2.0.1": "patches/@socketsecurity__sdk@2.0.1.patch"
249250
}
250251
},
251252
"typeCoverage": {
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/package.json b/package.json
2+
index 688b25c1592929648b7e81fe1e78f64bff0251d0..9a7398d204525d8b3c4bd5c8558c1f179325ec97 100644
3+
--- a/package.json
4+
+++ b/package.json
5+
@@ -15,14 +15,14 @@
6+
},
7+
"type": "module",
8+
"main": "./dist/index.mjs",
9+
- "types": "./dist/index.d.mts",
10+
+ "types": "./dist/index.d.ts",
11+
"exports": {
12+
".": {
13+
- "types": "./dist/index.d.mts",
14+
+ "types": "./dist/index.d.ts",
15+
"default": "./dist/index.mjs"
16+
},
17+
"./testing": {
18+
- "types": "./dist/testing.d.mts",
19+
+ "types": "./dist/testing.d.ts",
20+
"default": "./dist/testing.mjs"
21+
},
22+
"./types/api-helpers": "./types/api-helpers.d.ts",

pnpm-lock.yaml

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)