Skip to content

Commit b249f91

Browse files
committed
Attempt to fix zod import for ipc module
Configure vitest to inline zod dependency and update zod wrapper to ES module format. Note: ipc.test.ts still fails with 'Cannot read properties of undefined (reading object)'. This appears to be a vitest/zod integration issue that needs further investigation. Current test status: - 5 test suites passing (187 tests) - 1 test suite failing (ipc.test.ts - zod import issue)
1 parent 4da6ffe commit b249f91

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.config/vitest.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default defineConfig({
7070
hookTimeout: 10_000,
7171
server: {
7272
deps: {
73-
inline: isCoverageEnabled ? [/@socketsecurity\/lib/] : [],
73+
inline: isCoverageEnabled ? [/@socketsecurity\/lib/, 'zod'] : ['zod'],
7474
},
7575
},
7676
coverage: {

src/external/zod.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
module.exports = require('zod')
1+
export { z } from 'zod'
2+
export * from 'zod'

0 commit comments

Comments
 (0)