Hi Andrew,
Thanks for the review!
On 2026-10-12 10:31, [email protected] wrote:
1. Installed package has no Node.js entry point, so
`require('cssfilter')` fails
- Files: `debian/node-cssfilter.install`, `package.json`,
`test/test_css.js`, `debian/tests/pkg-js/test`
- Evidence: `debian/node-cssfilter.install` contains `dist
usr/share/nodejs/cssfilter`; package.json has `"main": "lib/index.js"`;
the upstream tests start with `var filterCSS = require('../');` and
`require('../lib/parser')`; `debian/tests/pkg-js/test` runs `mocha -t
5000 -R spec`.
- Problem: Installing only dist/ puts a browserify UMD bundle (whose
top-level IIFE never assigns `module.exports`) and its minified copy
into /usr/share/nodejs/cssfilter/, with no package.json and no lib/.
Debian Node.js resolves `require('cssfilter')` to
/usr/share/nodejs/cssfilter/ and needs a package.json "main" (=>
lib/index.js) or an index.js there, neither of which is installed, so
the module is not loadable by any Node consumer
— the package's only purpose. The pkg-js autopkgtest compounds this:
its tests use source-tree-relative requires and `mocha`/`node-should`
are only listed in Build-Depends-Indep with no `debian/tests/control`
(or `debian/tests/pkg-js/control`) declaring them as test Depends, so
the test cannot run against the installed package.
- Fix: Install the loadable module (e.g. `lib
usr/share/nodejs/cssfilter` plus package.json) in
`debian/node-cssfilter.install`, moving the browser bundle (if wanted
at all) to /usr/share/javascript or similar, and declare the test
dependencies via `debian/tests/control` (`Depends: node-mocha,
node-should`) so the autopkgtest
I'm confused. The package includes package.json and autopkgtest test
works, it picks up the test dependencies from Build-Depends-Indep. The
pkg-js runner creates a temporary directory, links lib/ and package.json
from /usr/share/nodejs/cssfilter, and copies only the tests from the
source tree into it.
$ dpkg -L node-cssfilter
/.
/usr
/usr/share
/usr/share/doc
/usr/share/doc/node-cssfilter
/usr/share/doc/node-cssfilter/README.md
/usr/share/doc/node-cssfilter/changelog.Debian.gz
/usr/share/doc/node-cssfilter/copyright
/usr/share/nodejs
/usr/share/nodejs/cssfilter
/usr/share/nodejs/cssfilter/dist
/usr/share/nodejs/cssfilter/dist/cssfilter.js
/usr/share/nodejs/cssfilter/dist/cssfilter.min.js
/usr/share/nodejs/cssfilter/lib
/usr/share/nodejs/cssfilter/lib/css.js
/usr/share/nodejs/cssfilter/lib/default.js
/usr/share/nodejs/cssfilter/lib/index.js
/usr/share/nodejs/cssfilter/lib/parser.js
/usr/share/nodejs/cssfilter/lib/util.js
/usr/share/nodejs/cssfilter/package.json
$
2. Standards-Version 4.7.4 predates the current policy
- Files: `debian/control`
- Evidence: `Standards-Version: 4.7.4`; current Debian Policy is
4.7.4.1 (2026-03-31).
- Problem: A brand-new package should declare the current
Standards-Version (Policy §4.1).
- Fix: Bump to 4.7.4.1 after checking the A10.2 upgrading-checklist
entry for anything affecting the package.
Thanks. I'll fix this.
3. uscan finds only upstream versions older than the packaged one
- Files: `debian/watch`
- Evidence: upstream `0.0.10`, packaged `0.0.11`
- Problem: The newest version uscan finds with `debian/watch` is older
than the version in `debian/changelog`, so the watch file does not find
the packaged release: it may look in the wrong place, or the versions
may need mangling to compare.
- Fix: Check where `debian/watch` looks and how it mangles versions.
Upstream forgot to tag `0.0.11`.
Cheers,
Edward