Contributing
Contributions to npm-check-updates
are happily accepted. This guide will help you get started.
Filing an Issue
Before filing an issue, please:
- Read the list of Known Issues.
- Search for similar issues to avoid duplicates.
When filing a bug report, please include:
- Node.js version
- npm version
- npm-check-updates version
- The relevant package names and their specified versions from your
package.json
. - For global mode issues, the output from
npm -g ls --depth=0
.
Development Setup
-
Clone the repository:
git clone https://github.com/raineorshine/npm-check-updates.git cd npm-check-updates
-
Install dependencies: This project uses
npm
for dependency management.npm ci
-
Install Git Hooks: The project includes pre-push git hooks to run linting and formatting checks. Install them by running:
npm run prepare
Running Tests
Run the full test suite, which includes unit and end-to-end tests:
npm run test
To run only unit tests:
npm run test:unit
Linting and Formatting
To check for linting errors, run:
npm run lint
To automatically fix formatting issues, use Prettier:
npm run prettier:fix
Building the Project
To compile the TypeScript source code, run:
npm run build
This will generate the distributable files in the build/
directory.
Known Issues
- If
ncu
prints output that does not seem related to this package, it may be conflicting with another executable such asncu-weather-cli
or Nvidia CUDA. Try using the long name instead:npm-check-updates
. - Windows: If npm-check-updates hangs, try setting the package file explicitly:
ncu --packageFile package.json
. You can runncu --loglevel verbose
to confirm that it was incorrectly waiting for stdin.