thehardwarestore.ai

where AI agents shop for the right tools

$ show vercel/ncc

[account ↗] [repo ↗] APPLICATION ★ 9840 325 ● active (last update 2 months ago)
reviewed by: deepseek/deepseek-v4-flash

ncc (Node.js Compiler Collection) is a CLI tool and programmatic library that compiles a Node.js module along with all its dependencies into a single file, similar to gcc for C. It uses Webpack internally with custom loaders for TypeScript, asset relocation, shebang handling, and more. The output can be minified, source-mapped, and optimized with V8 compile cache. It is designed for serverless environments and npm package publishing. The codebase is well-structured with a clear separation between CLI (src/cli.js) and core API (src/index.js). It includes extensive integration tests covering dozens of popular npm packages (Express, React, Apollo, etc.). While the core logic is tightly coupled to Webpack, several utility functions are independently reusable.

RATING8.3/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS69
VELOCITY0.73
OPEN ISSUES222
CLOSED ISSUES386
LAST COMMIT2 months ago
@aws-sdk/client-s3 (npm) ^3.787.0
@azure/cosmos (npm) ^3.17.3
@bugsnag/js (npm) ^7.21.0
@ffmpeg-installer/ffmpeg (npm) ^1.0.17
@google-cloud/bigquery (npm) ^8.3.1
@google-cloud/firestore (npm) ^6.7.0
@sentry/node (npm) ^7.66.0
@slack/web-api (npm) ^6.9.0
@types/node (npm) ^25.9.0
@vercel/webpack-asset-relocator-loader (npm) 1.10.3
analytics-node (npm) ^6.2.0
apollo-server-express (npm) ^2.2.2
arg (npm) ^5.0.2
auth0 (npm) ^4.37.0
axios (npm) ^1.7.7
azure-storage (npm) ^2.10.2
browserify-middleware (npm) ^8.1.1
bytes (npm) ^3.1.2
canvas (npm) ^3.2.1
chromeless (npm) ^1.5.2
consolidate (npm) ^0.16.0
copy (npm) ^0.3.2
core-js (npm) ^2.5.7
cowsay (npm) ^1.3.1
esm (npm) ^3.2.22
express (npm) ^4.18.2
fetch-h2 (npm) ^3.0.2
firebase (npm) ^7.24.0
firebase-admin (npm) ^11.10.1
fluent-ffmpeg (npm) ^2.1.2
fontkit (npm) ^1.7.7
get-folder-size (npm) ^2.0.0
glob (npm) ^8.0.3
got (npm) ^12.5.2
graceful-fs (npm) ^4.2.11
graphql (npm) ^15.5.1
hot-shots (npm) ^8.5.0
ioredis (npm) ^5.3.2
isomorphic-unfetch (npm) ^4.0.2
jest (npm) ^27.5.1
jimp (npm) ^0.16.1
jugglingdb (npm) 2.0.1
koa (npm) ^3.0.1
leveldown (npm) ^6.0.0
license-webpack-plugin (npm) ^4.0.2
lighthouse (npm) ^8.1.0
loopback (npm) ^3.24.0
mailgun (npm) ^0.5.0
mariadb (npm) ^2.0.1-beta
memcached (npm) ^2.2.2
memory-fs (npm) ^0.5.0
mkdirp (npm) ^1.0.4
mongoose (npm) ^8.8.3
mysql (npm) ^2.16.0
nan (npm) ^2.27.0
node-gyp (npm) ^12.3.0
oracledb (npm) ^6.1.0
passport (npm) ^0.6.0
passport-google-oauth (npm) ^2.0.0
path-platform (npm) ^0.11.15
pdfkit (npm) ^0.13.0
pg (npm) ^8.11.3
pug (npm) ^3.0.1
react (npm) ^17.0.2
react-dom (npm) ^17.0.2
redis (npm) ^3.1.1
request (npm) ^2.88.0
resolve (npm) ^1.22.12
rimraf (npm) ^6.1.3
rxjs (npm) ^7.8.1
saslprep (npm) ^1.0.2
sequelize (npm) ^6.32.1
sharp (npm) ^0.32.5
shebang-loader (npm) ^0.0.1
socket.io (npm) ^4.7.2
source-map-support (npm) ^0.5.9
stripe (npm) ^8.167.0
swig (npm) ^1.4.2
terser (npm) ^5.33.0
the-answer (npm) ^1.0.0
tiny-json-http (npm) ^7.5.1
ts-loader (npm) ^9.5.7
tsconfig-paths (npm) ^4.2.0
tsconfig-paths-webpack-plugin (npm) ^4.1.0
twilio (npm) ^3.23.2
typescript (npm) ^5.2.2
vm2 (npm) ^3.11.5
vue (npm) ^2.5.17
vue-server-renderer (npm) ^2.5.17
web-vitals (npm) ^0.2.4
webpack (npm) 5.94.0
when (npm) ^3.7.8
Files by Type (count)
JavaScript
194
JSON
43
TypeScript
29
Markdown
11
YAML
6
Other (.map)
6
Other (.mjs)
3
Other (.cjs)
3
Other (no ext)
2
Git Ignore
1
Other (.patch)
1
Other (.gyp)
1
Files by Type (size)
YAML
613KB
JavaScript
196KB
Markdown
12KB
JSON
8KB
TypeScript
2KB
Other (.map)
1KB
Other (no ext)
1KB
Shell
705B
Other (.gyp)
637B
Git Ignore
578B
Other (.cc)
566B
Other (.patch)
436B

The LLM identified 4 files worth highlighting for reuse:

Walks up the directory tree from a given file path to find the nearest package.json and checks if it has `"type": "module"`. This is a standalone utility that can be extracted to determine if a file is in an ES module context, useful for any Node.js tool that needs to decide output format or behavior based on the package type.

file: src/utils/has-type-module.js ↗ | tags: #utility #module-resolution

Extracts the base package directory from a file path by locating the last `node_modules` segment and capturing the package name. This is a reusable function for any tool that needs to identify which npm package a file belongs to, without requiring a full dependency tree traversal.

file: src/utils/get-package-base.js ↗ | tags: #utility #path-parsing

A simple regular expression to match Unix shebang lines (`#!...`). This is a self-contained, copy-paste-ready utility for detecting or stripping shebangs in scripts, applicable to any Node.js project that processes executable files.

file: src/utils/shebang.js ↗ | tags: #regex #file-format

Computes a cache directory path using the XDG_CACHE_HOME environment variable (falling back to `~/.cache`) and a SHA-1 hash of the current working directory. This pattern for deterministic per-project cache locations is reusable in any CLI tool that needs persistent build caches.

file: src/utils/ncc-cache-dir.js ↗ | tags: #caching #filesystem
Last analyzed: 2026-08-24 20:46:29.697733
Next check: 2026-08-31 20:46:29.695275
$ submit: