How g-plane/tiny-package-manager works
Tiny Package Manager is a teaching-oriented JavaScript dependency installer. Its principal workflow starts at the CLI, reads the project manifest and lock, resolves dependency versions and conflicts, writes an updated lock and manifest, then downloads and extracts packages into node_modules. The README also highlights flattening and adding packages through the CLI; unsupported lifecycle scripts and binary symlinking are explicitly unfinished. Edges are limited to relationships visible in the excerpts or README.
Main entry points: index.ts Install workflow · install.ts Tarball installer · lock.ts Lock management · list.ts Dependency collection
Components 13
CLI and orchestration
- CLI commands
src/cli.ts - Install workflow
src/index.ts
Dependency planning
- Dependency collection
src/list.ts - Registry resolver
src/resolve.ts
Project state
- Lock management
src/lock.ts - Project manifest
- tiny-pm.yml
- Key sorting
src/utils.ts
Package installation
- Tarball installer
src/install.ts - node_modules
- Progress display
src/log.ts
Other components
- Developer
- Package registry
Connections 16
- Developer → CLI commands: runs
README.md - CLI commands → Install workflow: dispatches
src/cli.ts - Install workflow → Project manifest: reads and updates
src/index.ts - Install workflow → Lock management: reads and writes
src/index.ts - Install workflow → Dependency collection: collects dependencies
src/index.ts - Dependency collection → Lock management: looks up and records
src/list.ts - Dependency collection → Registry resolver: fetches manifests
src/list.ts - Registry resolver → Package registry: requests metadata
src/resolve.ts - Lock management → tiny-pm.yml: reads and writes
src/lock.ts - Install workflow → Tarball installer: installs packages
src/index.ts - Tarball installer → Package registry: downloads tarballs
src/install.ts - Tarball installer → node_modules: extracts packages
src/install.ts - Install workflow → Progress display: prepares progress
src/index.ts - Tarball installer → Progress display: ticks progress
src/install.ts - Lock management → Key sorting: sorts lock keys
src/lock.ts - Install workflow → Key sorting: sorts manifest keys
src/index.ts