Skip to content

Commit

Permalink
fix(cli-repl): add more indirect driver deps to startup snapshot (#1882)
Browse files Browse the repository at this point in the history
Add `bindings` and `ipv6-normalize` since they are always used when
loading the driver/`devtools-connect`, but not loaded immediately
when the driver is also loaded.
  • Loading branch information
addaleax authored Mar 25, 2024
1 parent c4db376 commit c473794
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/cli-repl/.depcheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ ignores:
- '@mongodb-js/saslprep'
- socks
- emphasize
- ipv6-normalize
- bindings
ignore-patterns:
- .eslintrc.js
2 changes: 2 additions & 0 deletions packages/cli-repl/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ if ((v8 as any)?.startupSnapshot?.isBuildingSnapshot?.()) {
require('@mongodb-js/saslprep'); // Driver dependency
require('socks'); // Driver dependency
require('emphasize'); // Dependency of pretty-repl
require('ipv6-normalize'); // Dependency of devtools-connect via os-dns-native
require('bindings'); // Used by various native dependencies but not a native dep itself

{
const console = require('console');
Expand Down

0 comments on commit c473794

Please sign in to comment.