Skip to content

chore: disable vitest interopDefault, remove dotenvx#1207

Merged
John-David Dalton (jdalton) merged 4 commits intomainfrom
chore/vitest-interop-remove-dotenvx
Apr 16, 2026
Merged

chore: disable vitest interopDefault, remove dotenvx#1207
John-David Dalton (jdalton) merged 4 commits intomainfrom
chore/vitest-interop-remove-dotenvx

Conversation

@jdalton
Copy link
Copy Markdown
Contributor

@jdalton John-David Dalton (jdalton) commented Apr 15, 2026

Summary

  • Set deps.interopDefault: false in all 6 vitest configs so vitest matches Node's native ESM-CJS interop behavior (no auto-unwrapping of .default)
  • Remove @dotenvx/dotenvx from devDependencies and workspace catalog — only used in pre-commit hook
  • Simplify pre-commit hook: inline SOCKET_CLI_NO_API_TOKEN=1 directly instead of loading via dotenvx

Test plan

  • pnpm test passes with interopDefault: false
  • Pre-commit hook works without dotenvx

Note

Medium Risk
Changing Vitest interop behavior can surface import/require mismatches and break tests that relied on default-export unwrapping. Tooling cleanups are low risk but may affect local pre-commit behavior.

Overview
Sets deps.interopDefault: false across all Vitest configs (base, isolated, root, and CLI unit/integration/e2e) so tests use Node-like ESM/CJS import semantics (no automatic .default unwrapping).

Removes @dotenvx/dotenvx from the workspace (including lockfile/catalog) and simplifies the Husky pre-commit hook to run staged tests with SOCKET_CLI_NO_API_TOKEN=1 directly. Also deletes the disabled .github/dependabot.yml file.

Reviewed by Cursor Bugbot for commit ffe3325. Configure here.

Set deps.interopDefault: false in all vitest configs for native
CJS resolution matching Node runtime behavior.
Remove dotenvx from pre-commit hook, workspace catalog, and
devDependencies. Inline SOCKET_CLI_NO_API_TOKEN=1 directly.
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is ON. A cloud agent has been kicked off to fix the reported issue.

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit ffe3325. Configure here.

Comment thread pnpm-workspace.yaml
billxinli

This comment was marked as resolved.

@jdalton
Copy link
Copy Markdown
Contributor Author

Resolved issue

@jdalton John-David Dalton (jdalton) merged commit a01b649 into main Apr 16, 2026
13 checks passed
@jdalton John-David Dalton (jdalton) deleted the chore/vitest-interop-remove-dotenvx branch April 16, 2026 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants