Skip to content

Convert dependencies to peer dependencies #477

@rahulkarajgikar

Description

@rahulkarajgikar

sorted largest dependencies in dexto/core:

[ 10:56PM ]  [ karaj@MacBook-Pro:/tmp/core-standalone ]
 $ du -sh /tmp/core-standalone/node_modules/* | sort -hr
 23M	/tmp/core-standalone/node_modules/tiktoken
 19M	/tmp/core-standalone/node_modules/zod-to-json-schema
 12M	/tmp/core-standalone/node_modules/openai
6.5M	/tmp/core-standalone/node_modules/@ai-sdk
5.1M	/tmp/core-standalone/node_modules/@dexto
5.0M	/tmp/core-standalone/node_modules/zod
4.3M	/tmp/core-standalone/node_modules/@modelcontextprotocol
3.4M	/tmp/core-standalone/node_modules/@anthropic-ai
2.8M	/tmp/core-standalone/node_modules/@opentelemetry
2.7M	/tmp/core-standalone/node_modules/ai
2.3M	/tmp/core-standalone/node_modules/ajv
1.2M	/tmp/core-standalone/node_modules/yaml
1.1M	/tmp/core-standalone/node_modules/async
844K	/tmp/core-standalone/node_modules/lru-cache
624K	/tmp/core-standalone/node_modules/glob
584K	/tmp/core-standalone/node_modules/minimatch
556K	/tmp/core-standalone/node_modules/path-scurry
408K	/tmp/core-standalone/node_modules/type-fest
396K	/tmp/core-standalone/node_modules/iconv-lite
352K	/tmp/core-standalone/node_modules/winston
316K	/tmp/core-standalone/node_modules/minipass
316K	/tmp/core-standalone/node_modules/jackspeak
308K	/tmp/core-standalone/node_modules/qs
252K	/tmp/core-standalone/node_modules/logform
240K	/tmp/core-standalone/node_modules/wrap-ansi-cjs
236K	/tmp/core-standalone/node_modules/mime-db
232K	/tmp/core-standalone/node_modules/fast-uri
212K	/tmp/core-standalone/node_modules/express
200K	/tmp/core-standalone/node_modules/object-inspect
188K	/tmp/core-standalone/node_modules/@isaacs
180K	/tmp/core-standalone/node_modules/readable-stream
176K	/tmp/core-standalone/node_modules/eventsource
168K	/tmp/core-standalone/node_modules/foreground-child
164K	/tmp/core-standalone/node_modules/signal-exit
164K	/tmp/core-standalone/node_modules/fecha
156K	/tmp/core-standalone/node_modules/math-intrinsics
144K	/tmp/core-standalone/node_modules/ansi-align
140K	/tmp/core-standalone/node_modules/express-rate-limit
140K	/tmp/core-standalone/node_modules/emoji-regex
124K	/tmp/core-standalone/node_modules/string-width-cjs
116K	/tmp/core-standalone/node_modules/eventsource-parser
112K	/tmp/core-standalone/node_modules/@vercel
108K	/tmp/core-standalone/node_modules/dotenv
100K	/tmp/core-standalone/node_modules/winston-transport
 96K	/tmp/core-standalone/node_modules/@dabh
 96K	/tmp/core-standalone/node_modules/@colors
 88K	/tmp/core-standalone/node_modules/es-errors
 88K	/tmp/core-standalone/node_modules/ajv-formats
 84K	/tmp/core-standalone/node_modules/call-bind-apply-helpers
 72K	/tmp/core-standalone/node_modules/has-symbols
 72K	/tmp/core-standalone/node_modules/chalk
 72K	/tmp/core-standalone/node_modules/@so-ric
 68K	/tmp/core-standalone/node_modules/path-to-regexp
 68K	/tmp/core-standalone/node_modules/package-json-from-dist
 68K	/tmp/core-standalone/node_modules/get-intrinsic
 68K	/tmp/core-standalone/node_modules/function-bind
 64K	/tmp/core-standalone/node_modules/router
 64K	/tmp/core-standalone/node_modules/es-object-atoms
 64K	/tmp/core-standalone/node_modules/color-convert
 60K	/tmp/core-standalone/node_modules/safer-buffer
 60K	/tmp/core-standalone/node_modules/get-proto
 60K	/tmp/core-standalone/node_modules/dunder-proto
 60K	/tmp/core-standalone/node_modules/debug
 60K	/tmp/core-standalone/node_modules/body-parser
 56K	/tmp/core-standalone/node_modules/side-channel
 56K	/tmp/core-standalone/node_modules/send
 56K	/tmp/core-standalone/node_modules/json-schema-traverse
 56K	/tmp/core-standalone/node_modules/ipaddr.js
 52K	/tmp/core-standalone/node_modules/side-channel-list
 52K	/tmp/core-standalone/node_modules/safe-stable-stringify
 48K	/tmp/core-standalone/node_modules/triple-beam
 48K	/tmp/core-standalone/node_modules/side-channel-weakmap
 48K	/tmp/core-standalone/node_modules/side-channel-map
 48K	/tmp/core-standalone/node_modules/negotiator
 48K	/tmp/core-standalone/node_modules/gopd
 48K	/tmp/core-standalone/node_modules/call-bound
 44K	/tmp/core-standalone/node_modules/safe-buffer
 44K	/tmp/core-standalone/node_modules/nanoid
 44K	/tmp/core-standalone/node_modules/fast-deep-equal
 44K	/tmp/core-standalone/node_modules/es-define-property
 40K	/tmp/core-standalone/node_modules/strip-ansi-cjs
 40K	/tmp/core-standalone/node_modules/pkce-challenge
 40K	/tmp/core-standalone/node_modules/mime-types
 40K	/tmp/core-standalone/node_modules/hasown
 40K	/tmp/core-standalone/node_modules/depd
 40K	/tmp/core-standalone/node_modules/cross-spawn
 40K	/tmp/core-standalone/node_modules/color
 40K	/tmp/core-standalone/node_modules/@standard-schema
 36K	/tmp/core-standalone/node_modules/serve-static
 36K	/tmp/core-standalone/node_modules/json-schema
 36K	/tmp/core-standalone/node_modules/isexe
 36K	/tmp/core-standalone/node_modules/cors
 36K	/tmp/core-standalone/node_modules/boxen
 32K	/tmp/core-standalone/node_modules/type-is
 32K	/tmp/core-standalone/node_modules/finalhandler
 32K	/tmp/core-standalone/node_modules/cookie
 32K	/tmp/core-standalone/node_modules/content-disposition
 32K	/tmp/core-standalone/node_modules/ansi-styles
 32K	/tmp/core-standalone/node_modules/accepts
 28K	/tmp/core-standalone/node_modules/raw-body
 28K	/tmp/core-standalone/node_modules/proxy-addr
 28K	/tmp/core-standalone/node_modules/on-finished
 28K	/tmp/core-standalone/node_modules/http-errors
 28K	/tmp/core-standalone/node_modules/fn.name
 24K	/tmp/core-standalone/node_modules/wrap-ansi
 24K	/tmp/core-standalone/node_modules/which
 24K	/tmp/core-standalone/node_modules/util-deprecate
 24K	/tmp/core-standalone/node_modules/string_decoder
 24K	/tmp/core-standalone/node_modules/statuses
 24K	/tmp/core-standalone/node_modules/stack-trace
 24K	/tmp/core-standalone/node_modules/setprototypeof
 24K	/tmp/core-standalone/node_modules/kuler
 24K	/tmp/core-standalone/node_modules/is-promise
 24K	/tmp/core-standalone/node_modules/etag
 24K	/tmp/core-standalone/node_modules/enabled
 24K	/tmp/core-standalone/node_modules/content-type
 24K	/tmp/core-standalone/node_modules/color-string
 24K	/tmp/core-standalone/node_modules/cli-boxes
 24K	/tmp/core-standalone/node_modules/bytes
 20K	/tmp/core-standalone/node_modules/widest-line
 20K	/tmp/core-standalone/node_modules/vary
 20K	/tmp/core-standalone/node_modules/unpipe
 20K	/tmp/core-standalone/node_modules/toidentifier
 20K	/tmp/core-standalone/node_modules/text-hex
 20K	/tmp/core-standalone/node_modules/strip-ansi
 20K	/tmp/core-standalone/node_modules/string-width
 20K	/tmp/core-standalone/node_modules/shebang-regex
 20K	/tmp/core-standalone/node_modules/range-parser
 20K	/tmp/core-standalone/node_modules/path-key
 20K	/tmp/core-standalone/node_modules/parseurl
 20K	/tmp/core-standalone/node_modules/one-time
 20K	/tmp/core-standalone/node_modules/merge-descriptors
 20K	/tmp/core-standalone/node_modules/media-typer
 20K	/tmp/core-standalone/node_modules/is-stream
 20K	/tmp/core-standalone/node_modules/is-fullwidth-code-point
 20K	/tmp/core-standalone/node_modules/inherits
 20K	/tmp/core-standalone/node_modules/fresh
 20K	/tmp/core-standalone/node_modules/forwarded
 20K	/tmp/core-standalone/node_modules/eastasianwidth
 20K	/tmp/core-standalone/node_modules/cookie-signature
 20K	/tmp/core-standalone/node_modules/color-name
 20K	/tmp/core-standalone/node_modules/camelcase
 20K	/tmp/core-standalone/node_modules/ansi-regex
 16K	/tmp/core-standalone/node_modules/wrappy
 16K	/tmp/core-standalone/node_modules/shebang-command
 16K	/tmp/core-standalone/node_modules/require-from-string
 16K	/tmp/core-standalone/node_modules/once
 16K	/tmp/core-standalone/node_modules/object-assign
 16K	/tmp/core-standalone/node_modules/ms
 16K	/tmp/core-standalone/node_modules/escape-html
 16K	/tmp/core-standalone/node_modules/encodeurl
 16K	/tmp/core-standalone/node_modules/ee-first
 16K	/tmp/core-standalone/node_modules/@types

idea is to make as many of these peerdependencies as possible to trim dexto/core node_modules size

Core would declare peer dependencies and use dynamic imports, packages consuming core would provide these packages.

similar PR: #475

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions