nodejs-packaging/test
Jan Staněk e24e7dff07
nodejs.prov: find namespaced bundled dependencies
The previous behaviour assumed that in a bundled package path,
there is always `node_modules` directory on each other spot – i.e.:

npm/node_modules/<dep1>/node_modules/<subdep>
    ^                   ^

With namespaced bundled packages, this is no longer necessary the truth:

npm/node_modules/@nmcli/<dep1>/node_modules/…
    ^                   ! – expected node_modules

---

The previous implementation considered any directory not named
`node_modules` as a package directory, and tried to process it as such.
Among other things, it pruned the list of subdirectories to be processed
to just another `node_modules` subdir, if that existed.
With namespaced packages, this pruning in essence happened too soon,
and so they were skipped altogether.

With this patch applied, only directories that directly contain
the `package.json` file are processed as package directories,
meaning that the walk should correctly descend into namespaces
(even nested ones, if they appear).

Resolves: rhbz#2029904
2022-01-20 12:24:09 +01:00
..
bundled Make dist-git the upstream repo 2020-09-18 15:50:14 -04:00
bundled_namespace nodejs.prov: find namespaced bundled dependencies 2022-01-20 12:24:09 +01:00
unbundled Make dist-git the upstream repo 2020-09-18 15:50:14 -04:00
run nodejs.prov: find namespaced bundled dependencies 2022-01-20 12:24:09 +01:00