Skip to content

Conversation

@vlakoff
Copy link
Contributor

@vlakoff vlakoff commented Nov 22, 2025

Summary

A small follow-up to #206.

Moves the Node.js dependency Pixelmatch from dependencies to devDependencies in package.json.

Why

  • Pixelmatch is only used in unit tests, not in production code.
  • With this change, it still installs on npm install, but is skipped when running npm install --production.
  • Improves self-documentation of the project by making it clear that Pixelmatch is a dev-only dependency.

Refs

From this answer on Stack Overflow:

  • devDependencies are:

    • also installed on npm install on a directory that contains package.json, unless you pass the --production flag, or if the NODE_ENV=production environment variable is set
    • not installed on npm install "$package" on any other directory, unless you give it the --dev option.
    • are not installed transitively.

Pixelmatch is only used in unit tests, so it should be listed under devDependencies.

This change ensures:
- It still installs with `npm install`, but is skipped with `npm install --production`.
- The package.json is more self-documented, clearly indicating Pixelmatch is a dev-only dependency.
@codecov
Copy link

codecov bot commented Nov 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.81%. Comparing base (2edcbd5) to head (d141655).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #216   +/-   ##
=========================================
  Coverage     70.81%   70.81%           
  Complexity      994      994           
=========================================
  Files            49       49           
  Lines          3169     3169           
=========================================
  Hits           2244     2244           
  Misses          925      925           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@DASPRiD DASPRiD merged commit c2fe9b3 into Bacon:main Nov 22, 2025
9 checks passed
@vlakoff vlakoff deleted the build/pixelmatch branch November 24, 2025 22:25
vlakoff added a commit to vlakoff/BaconQrCode that referenced this pull request Nov 27, 2025
Fixes an oversight in follow-up to Bacon#216, which moved Pixelmatch from dependencies to devDependencies.
@vlakoff
Copy link
Contributor Author

vlakoff commented Nov 27, 2025

Follow-up PR, fixing an oversight: #219.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants