RepoFold

Package Configuration

This page documents the configuration surfaces defined in the Express package.json file, including runtime dependencies, development scripts, Node.js version requirements, and publishing conventions.

Node.js Version Requirement

Express requires Node.js >= 18. This constraint is declared in the engines field of package.json and is enforced by the npm package manager during installation. The CI workflows reflect this requirement by testing against Node.js versions 18 through 26 in the main test matrix .github/workflows/ci.yml:27-28.

A separate legacy CI workflow tests Node.js versions 16 and 17, which are no longer supported by the main CI pipeline .github/workflows/legacy.yml:16-17.

Runtime Dependencies

Express declares the following runtime dependencies in package.json. These packages are installed automatically when a consumer runs npm install express.

DependencyPurpose
acceptsContent negotiation (Accept header parsing)
body-parserHTTP request body parsing
content-dispositionContent-Disposition header parsing
content-typeContent-Type header parsing
cookieCookie parsing and serialization
cookie-signatureCookie signing and verification
debugDebug logging utility
depdDeprecation warning utility
encodeurlURL encoding
escape-htmlHTML entity escaping
etagHTTP ETag generation
finalhandlerFinal request handler for error responses
freshHTTP freshness checking (If-None-Match / If-Modified-Since)
http-errorsHTTP error object creation
merge-descriptorsProperty descriptor merging
mime-typesMIME type lookup
on-finishedHTTP request/response completion callback
onceOne-time function execution wrapper
parseurlURL parsing with caching
proxy-addrProxy address detection and trust configuration

These dependencies cover Express's core responsibilities: request parsing, response formatting, error handling, security (cookie signing, HTML escaping), and network utilities.

Development Scripts

The scripts section of package.json provides the following commands for local development and CI:

ScriptCommandPurpose
lint(defined in package.json)Run the linter to check code style and quality
lint:fix(defined in package.json)Run the linter and automatically fix issues
test(defined in package.json)Run the test suite
test-ci(defined in package.json)Run tests in CI mode (typically with coverage)
test-cov(defined in package.json)Run tests with code coverage reporting
test-tap(defined in package.json)Run tests with TAP output format

The CI workflows use npm run lint for the lint job and npm run test-ci for the test jobs .github/workflows/ci.yml:18-19.github/workflows/ci.yml:47-48.

Package Manager

Express uses npm (or any compatible package manager) for dependency management. The CI workflows install dependencies with npm install and configure the npm log level to error to reduce verbosity during CI runs .github/workflows/ci.yml:37-39.

Publishing

The package.json does not include a publishConfig or files field in the provided material. Express follows standard npm publishing conventions:

  • The package is published to the npm registry under the name express.
  • The main entry point is index.js (as indicated by the top-level file listing).
  • The version field follows semantic versioning.

No custom publish scripts or pre-publish hooks are defined in the provided material.

CI Workflow Integration

The package configuration directly influences the CI workflows:

  1. Dependency installation: All CI workflows run npm install (or npm install --ignore-scripts --include=dev for the lint job) to install dependencies .github/workflows/ci.yml:16-17.github/workflows/ci.yml:41-42.

  2. Test execution: The test-ci script is used in CI instead of test, allowing CI-specific behavior (e.g., different reporter output) .github/workflows/ci.yml:47-48.

  3. Linting: The lint script is executed in a dedicated lint job that runs on the latest LTS Node.js version .github/workflows/ci.yml:18-19.

  4. Coverage: Test coverage artifacts (lcov.info files) are uploaded and merged across all test matrix entries, then reported to Coveralls .github/workflows/ci.yml:50-70.

Generated from commit ae6dd37