Skip to content

Consider reducing number of dependencies #29

@mcullan

Description

@mcullan

Currently, if you bun add ordapi in a fresh, minimal typescript project, it ends up installing 118 different dependencies. To the extent possible, it would be nice to reduce this number.

I wrote a script that can check all of this in one go. It's attached to this issue. It's currently saved as check_deps.sh.txt right now because github won't let me attach a .sh file, so rename it if you download it.

check_deps.sh.txt

./check_deps.sh -y ordapi@0.0.6 --log logfile.txt

With these arguments, the script:

  1. Creates a new directory named ordapi_{version}_{timestamp} or, if no version specified, just ordapi_{timestamp}.
  2. Runs bun init -y in that directory to create a minimal bun project.
  3. Installs base dependencies.
  4. Runs bun add ordapi@{version} or bun add ordapi to install specified or latest version of ordapi. This says it installs 118 packages as of version 0.0.6.
  5. Prints out dependencies from ordapi -- it seems to count 98 of these currently, I don't know why it doesn't name all 118.
  6. Cleans up the test directory ordapi_{timestamp}

Here is the current output with ordapi@0.0.6

=== Checking dependencies for ordapi ===

📁 Creating test directory...
✓ Created and entered ordapi_20250213_102543

🎯 Initializing new Bun project...
Done! A package.json file was saved in the current directory.
 + index.ts
 + .gitignore
 + tsconfig.json (for editor autocomplete)
 + README.md

To get started, run:
  bun run index.ts
✓ Created package.json

📦 Installing base dependencies...
bun install v1.2.0 (b0c5a765)

Checked 6 installs across 7 packages (no changes) [2.00ms]
✓ Installed base dependencies

🎯 Installing ordapi...
bun add v1.2.0 (b0c5a765)
Resolving dependencies
Resolved, downloaded and extracted [200]
Saved lockfile

installed ordapi@0.0.6

118 packages installed [1020.00ms]
✓ Installed ordapi

=== Results ===
📊 Dependencies breakdown:
   • Regular packages:       91
   • Scope directories (@something):        7
   • Packages inside scopes (@something/*):        0
   • Total visible packages: 98
   • Total packages reported by Bun: N/A

📂 Dependencies list (      91 regular +        7 scoped):
@eslint
@eslint-community
@humanfs
@humanwhocodes
@nodelib
@types
@typescript-eslint
acorn
acorn-jsx
ajv
ansi-styles
argparse
balanced-match
brace-expansion
braces
bun-types
callsites
chalk
color-convert
color-name
concat-map
cross-spawn
debug
deep-is
escape-string-regexp
eslint
eslint-scope
eslint-visitor-keys
espree
esquery
esrecurse
estraverse
esutils
fast-deep-equal
fast-glob
fast-json-stable-stringify
fast-levenshtein
fastq
file-entry-cache
fill-range
find-up
flat-cache
flatted
glob-parent
globals
graphemer
has-flag
ignore
import-fresh
imurmurhash
is-extglob
is-glob
is-number
isexe
js-yaml
json-buffer
json-schema-traverse
json-stable-stringify-without-jsonify
keyv
levn
locate-path
lodash.merge
merge2
micromatch
minimatch
ms
natural-compare
optionator
ordapi
p-limit
p-locate
parent-module
path-exists
path-key
picomatch
prelude-ls
punycode
queue-microtask
resolve-from
reusify
run-parallel
semver
shebang-command
shebang-regex
strip-json-comments
supports-color
to-regex-range
ts-api-utils
type-check
typescript
typescript-eslint
undici-types
uri-js
which
word-wrap
yocto-queue
zod
✓ Cleaned up test directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions