[Pkg-javascript-devel] dependencies for complex Node.js modules: findup-sync

Paolo Greppi paolo.greppi at libpf.com
Tue Nov 1 22:01:39 UTC 2016


Starting a separate thread from
https://lists.alioth.debian.org/pipermail/pkg-javascript-devel/2016-November/014868.html
...

On 01/11/2016 10:56, Pirate Praveen wrote:
> On Tuesday 01 November 2016 03:09 PM, Paolo Greppi wrote:
>> ...
>> It would be helpful to (programmatically) cross-link the info about the
>> existing packages' trackers, the ITPs and the alioth repos in the task
>> page. I could hack a python script to poll the UDD API and a crude grep
>> of the directory listing
>>
>> But I don't how that script would fit in the current infrastructure ...
> 
> This info is already available as npm2deb search <module>.
> 
> https://wiki.debian.org/Javascript/Nodejs/Npm2Deb has more tips like this.

Thanks, very interesting. It's python and definitely a good starting
point for a hack. For example if upstream is interested, there could be
a new CLI option to generate the hierarchical dependencies tree as HTML
with all the links and color-coded fancy:

npm2deb depends-html findup-sync

I'll think about it ... but first I need to understand exactly what
we're doing here.

As it stands now the tree that can be seen for example in the Node.js
grunt task:
https://wiki.debian.org/Javascript/Nodejs/Tasks/grunt
looks much more complete than what 'npm2deb depends grunt' returns.

To generate the tree programmatically, I tried
https://www.npmjs.com/package/npm-remote-ls on findup-sync.

With node 4.6.1 on unstable 'npm-remote-ls findup-sync at 0.4.3' spits out
about 240 modules, see list0.

It reports a (recursive) dependency on grunt (can we actually package
node-findup-sync without grunt ?), if I remove that we're down to 90
modules.

Many of them are repeated: filtering (sed 's/[ └─│├]//g' | sort | uniq)
reduces to 71 (excluding findup-sync itself), see list2.

Still a few are repeated with different version numbers, yanking away
the version info (sed 's/\(.*\)@.*/\1/g' | sort | uniq) reduces the
count to 68, see list3.

Do you reckon this info is relevant to the packaging of node-findup-sync
and to the grunt task ?
-------------- next part --------------
└─ findup-sync at 0.4.3
   ├─ fs-exists-sync at 0.1.0
   ├─ resolve-dir at 0.1.1
   │  ├─ global-modules at 0.2.3
   │  │  ├─ is-windows at 0.2.0
   │  │  └─ global-prefix at 0.1.4
   │  │     ├─ ini at 1.3.4
   │  │     ├─ is-windows at 0.2.0
   │  │     ├─ osenv at 0.1.3
   │  │     │  ├─ os-homedir at 1.0.2
   │  │     │  └─ os-tmpdir at 1.0.2
   │  │     └─ which at 1.2.11
   │  └─ expand-tilde at 1.2.2
   │     └─ os-homedir at 1.0.2
   ├─ is-absolute at 0.2.6
   │  ├─ is-relative at 0.2.1
   │  │  └─ is-unc-path at 0.1.1
   │  │     └─ unc-path-regex at 0.1.2
   │  └─ is-windows at 0.2.0
   ├─ minimist at 1.2.0
   ├─ grunt at 1.0.1
   │  ├─ coffee-script at 1.10.0
   │  ├─ dateformat at 1.0.12
   │  │  ├─ get-stdin at 4.0.1
   │  │  └─ meow at 3.7.0
   │  │     ├─ camelcase-keys at 2.1.0
   │  │     │  ├─ map-obj at 1.0.1
   │  │     │  └─ camelcase at 2.1.1
   │  │     ├─ loud-rejection at 1.6.0
   │  │     │  ├─ currently-unhandled at 0.4.1
   │  │     │  │  └─ array-find-index at 1.0.2
   │  │     │  └─ signal-exit at 3.0.1
   │  │     ├─ map-obj at 1.0.1
   │  │     ├─ decamelize at 1.2.0
   │  │     ├─ minimist at 1.2.0
   │  │     ├─ object-assign at 4.1.0
   │  │     ├─ normalize-package-data at 2.3.5
   │  │     │  ├─ hosted-git-info at 2.1.5
   │  │     │  ├─ is-builtin-module at 1.0.0
   │  │     │  │  └─ builtin-modules at 1.1.1
   │  │     │  ├─ validate-npm-package-license at 3.0.1
   │  │     │  │  ├─ spdx-correct at 1.0.2
   │  │     │  │  │  └─ spdx-license-ids at 1.2.2
   │  │     │  │  └─ spdx-expression-parse at 1.0.4
   │  │     │  └─ semver at 5.3.0
   │  │     ├─ read-pkg-up at 1.0.1
   │  │     │  ├─ read-pkg at 1.1.0
   │  │     │  │  ├─ load-json-file at 1.1.0
   │  │     │  │  │  ├─ parse-json at 2.2.0
   │  │     │  │  │  │  └─ error-ex at 1.3.0
   │  │     │  │  │  │     └─ is-arrayish at 0.2.1
   │  │     │  │  │  ├─ graceful-fs at 4.1.9
   │  │     │  │  │  ├─ strip-bom at 2.0.0
   │  │     │  │  │  │  └─ is-utf8 at 0.2.1
   │  │     │  │  │  ├─ pinkie-promise at 2.0.1
   │  │     │  │  │  └─ pify at 2.3.0
   │  │     │  │  ├─ path-type at 1.1.0
   │  │     │  │  │  ├─ pify at 2.3.0
   │  │     │  │  │  ├─ pinkie-promise at 2.0.1
   │  │     │  │  │  └─ graceful-fs at 4.1.9
   │  │     │  │  └─ normalize-package-data at 2.3.5
   │  │     │  └─ find-up at 1.1.2
   │  │     │     ├─ pinkie-promise at 2.0.1
   │  │     │     │  └─ pinkie at 2.0.4
   │  │     │     └─ path-exists at 2.1.0
   │  │     │        └─ pinkie-promise at 2.0.1
   │  │     ├─ trim-newlines at 1.0.0
   │  │     └─ redent at 1.0.0
   │  │        ├─ indent-string at 2.1.0
   │  │        │  └─ repeating at 2.0.1
   │  │        │     └─ is-finite at 1.0.2
   │  │        │        └─ number-is-nan at 1.0.1
   │  │        └─ strip-indent at 1.0.1
   │  │           └─ get-stdin at 4.0.1
   │  ├─ eventemitter2 at 0.4.14
   │  ├─ exit at 0.1.2
   │  ├─ findup-sync at 0.3.0
   │  │  └─ glob at 5.0.15
   │  │     ├─ inflight at 1.0.6
   │  │     ├─ once at 1.4.0
   │  │     ├─ path-is-absolute at 1.0.1
   │  │     ├─ minimatch at 3.0.3
   │  │     └─ inherits at 2.0.3
   │  ├─ grunt-known-options at 1.1.0
   │  ├─ grunt-cli at 1.2.0
   │  │  ├─ findup-sync at 0.3.0
   │  │  ├─ nopt at 3.0.6
   │  │  ├─ grunt-known-options at 1.1.0
   │  │  └─ resolve at 1.1.7
   │  ├─ grunt-legacy-util at 1.0.0
   │  │  ├─ getobject at 0.1.0
   │  │  ├─ exit at 0.1.2
   │  │  ├─ async at 1.5.2
   │  │  ├─ hooker at 0.2.3
   │  │  ├─ which at 1.2.11
   │  │  │  └─ isexe at 1.1.2
   │  │  ├─ underscore.string at 3.2.3
   │  │  └─ lodash at 4.3.0
   │  ├─ grunt-legacy-log at 1.0.0
   │  │  ├─ colors at 1.1.2
   │  │  ├─ hooker at 0.2.3
   │  │  ├─ grunt-legacy-log-utils at 1.0.0
   │  │  │  ├─ chalk at 1.1.3
   │  │  │  │  ├─ ansi-styles at 2.2.1
   │  │  │  │  ├─ escape-string-regexp at 1.0.5
   │  │  │  │  ├─ has-ansi at 2.0.0
   │  │  │  │  │  └─ ansi-regex at 2.0.0
   │  │  │  │  ├─ supports-color at 2.0.0
   │  │  │  │  └─ strip-ansi at 3.0.1
   │  │  │  │     └─ ansi-regex at 2.0.0
   │  │  │  └─ lodash at 4.3.0
   │  │  ├─ underscore.string at 3.2.3
   │  │  └─ lodash at 3.10.1
   │  ├─ glob at 7.0.6
   │  │  ├─ fs.realpath at 1.0.0
   │  │  ├─ path-is-absolute at 1.0.1
   │  │  ├─ inflight at 1.0.6
   │  │  │  ├─ once at 1.4.0
   │  │  │  └─ wrappy at 1.0.2
   │  │  ├─ minimatch at 3.0.3
   │  │  ├─ inherits at 2.0.3
   │  │  └─ once at 1.4.0
   │  │     └─ wrappy at 1.0.2
   │  ├─ iconv-lite at 0.4.13
   │  ├─ js-yaml at 3.5.5
   │  │  ├─ argparse at 1.0.9
   │  │  │  └─ sprintf-js at 1.0.3
   │  │  └─ esprima at 2.7.3
   │  ├─ minimatch at 3.0.3
   │  │  └─ brace-expansion at 1.1.6
   │  │     ├─ balanced-match at 0.4.2
   │  │     └─ concat-map at 0.0.1
   │  ├─ nopt at 3.0.6
   │  │  └─ abbrev at 1.0.9
   │  ├─ path-is-absolute at 1.0.1
   │  └─ rimraf at 2.2.8
   ├─ normalize-path at 2.0.1
   ├─ grunt-contrib-jshint at 0.12.0
   │  ├─ hooker at 0.2.3
   │  └─ jshint at 2.9.4
   │     ├─ exit at 0.1.2
   │     ├─ cli at 1.0.1
   │     │  ├─ exit at 0.1.2
   │     │  └─ glob at 7.1.1
   │     │     ├─ inflight at 1.0.6
   │     │     ├─ inherits at 2.0.3
   │     │     ├─ fs.realpath at 1.0.0
   │     │     ├─ once at 1.4.0
   │     │     ├─ path-is-absolute at 1.0.1
   │     │     └─ minimatch at 3.0.3
   │     ├─ console-browserify at 1.1.0
   │     │  └─ date-now at 0.1.4
   │     ├─ minimatch at 3.0.3
   │     ├─ shelljs at 0.3.0
   │     ├─ htmlparser2 at 3.8.3
   │     │  ├─ domelementtype at 1.3.0
   │     │  ├─ domhandler at 2.3.0
   │     │  │  └─ domelementtype at 1.3.0
   │     │  ├─ entities at 1.0.0
   │     │  ├─ domutils at 1.5.1
   │     │  │  ├─ domelementtype at 1.3.0
   │     │  │  └─ dom-serializer at 0.1.0
   │     │  │     ├─ domelementtype at 1.1.3
   │     │  │     └─ entities at 1.1.1
   │     │  └─ readable-stream at 1.1.14
   │     │     ├─ core-util-is at 1.0.2
   │     │     ├─ isarray at 0.0.1
   │     │     ├─ string_decoder at 0.10.31
   │     │     └─ inherits at 2.0.3
   │     ├─ strip-json-comments at 1.0.4
   │     └─ lodash at 3.7.0
   ├─ os-homedir at 1.0.2
   ├─ mocha at 2.5.3
   │  ├─ commander at 2.3.0
   │  ├─ debug at 2.2.0
   │  │  └─ ms at 0.7.1
   │  ├─ escape-string-regexp at 1.0.2
   │  ├─ diff at 1.4.0
   │  ├─ mkdirp at 0.5.1
   │  │  └─ minimist at 0.0.8
   │  ├─ supports-color at 1.2.0
   │  ├─ growl at 1.9.2
   │  ├─ to-iso-string at 0.0.2
   │  ├─ glob at 3.2.11
   │  │  ├─ inherits at 2.0.3
   │  │  └─ minimatch at 0.3.0
   │  │     ├─ lru-cache at 2.7.3
   │  │     └─ sigmund at 1.0.1
   │  └─ jade at 0.26.3
   │     ├─ mkdirp at 0.3.0
   │     └─ commander at 0.6.1
   ├─ resolve at 1.1.7
   ├─ is-glob at 2.0.1
   │  └─ is-extglob at 1.0.0
   ├─ detect-file at 0.1.0
   │  └─ fs-exists-sync at 0.1.0
   └─ micromatch at 2.3.11
      ├─ array-unique at 0.2.1
      ├─ arr-diff at 2.0.0
      │  └─ arr-flatten at 1.0.1
      ├─ braces at 1.8.5
      │  ├─ preserve at 0.2.0
      │  ├─ repeat-element at 1.1.2
      │  └─ expand-range at 1.8.2
      │     └─ fill-range at 2.2.3
      │        ├─ isobject at 2.1.0
      │        │  └─ isarray at 1.0.0
      │        ├─ is-number at 2.1.0
      │        │  └─ kind-of at 3.0.4
      │        ├─ randomatic at 1.1.5
      │        │  ├─ is-number at 2.1.0
      │        │  └─ kind-of at 3.0.4
      │        ├─ repeat-element at 1.1.2
      │        └─ repeat-string at 1.6.1
      ├─ expand-brackets at 0.1.5
      │  └─ is-posix-bracket at 0.1.1
      ├─ extglob at 0.3.2
      │  └─ is-extglob at 1.0.0
      ├─ is-extglob at 1.0.0
      ├─ filename-regex at 2.0.0
      ├─ kind-of at 3.0.4
      │  └─ is-buffer at 1.1.4
      ├─ normalize-path at 2.0.1
      ├─ object.omit at 2.0.1
      │  ├─ for-own at 0.1.4
      │  │  └─ for-in at 0.1.6
      │  └─ is-extendable at 0.1.1
      ├─ regex-cache at 0.4.3
      │  ├─ is-equal-shallow at 0.1.3
      │  │  └─ is-primitive at 2.0.0
      │  └─ is-primitive at 2.0.0
      ├─ parse-glob at 3.0.4
      │  ├─ glob-base at 0.3.0
      │  │  ├─ glob-parent at 2.0.0
      │  │  │  └─ is-glob at 2.0.1
      │  │  └─ is-glob at 2.0.1
      │  ├─ is-dotfile at 1.0.2
      │  ├─ is-extglob at 1.0.0
      │  └─ is-glob at 2.0.1
      └─ is-glob at 2.0.1

-------------- next part --------------
└─ findup-sync at 0.4.3
   ├─ fs-exists-sync at 0.1.0
   ├─ resolve-dir at 0.1.1
   │  ├─ global-modules at 0.2.3
   │  │  ├─ is-windows at 0.2.0
   │  │  └─ global-prefix at 0.1.4
   │  │     ├─ ini at 1.3.4
   │  │     ├─ is-windows at 0.2.0
   │  │     ├─ osenv at 0.1.3
   │  │     │  ├─ os-homedir at 1.0.2
   │  │     │  └─ os-tmpdir at 1.0.2
   │  │     └─ which at 1.2.11
   │  └─ expand-tilde at 1.2.2
   │     └─ os-homedir at 1.0.2
   ├─ is-absolute at 0.2.6
   │  ├─ is-relative at 0.2.1
   │  │  └─ is-unc-path at 0.1.1
   │  │     └─ unc-path-regex at 0.1.2
   │  └─ is-windows at 0.2.0
   ├─ minimist at 1.2.0
   ├─ normalize-path at 2.0.1
   ├─ os-homedir at 1.0.2
   ├─ mocha at 2.5.3
   │  ├─ commander at 2.3.0
   │  ├─ debug at 2.2.0
   │  │  └─ ms at 0.7.1
   │  ├─ escape-string-regexp at 1.0.2
   │  ├─ diff at 1.4.0
   │  ├─ mkdirp at 0.5.1
   │  │  └─ minimist at 0.0.8
   │  ├─ supports-color at 1.2.0
   │  ├─ growl at 1.9.2
   │  ├─ to-iso-string at 0.0.2
   │  ├─ glob at 3.2.11
   │  │  ├─ inherits at 2.0.3
   │  │  └─ minimatch at 0.3.0
   │  │     ├─ lru-cache at 2.7.3
   │  │     └─ sigmund at 1.0.1
   │  └─ jade at 0.26.3
   │     ├─ mkdirp at 0.3.0
   │     └─ commander at 0.6.1
   ├─ resolve at 1.1.7
   ├─ is-glob at 2.0.1
   │  └─ is-extglob at 1.0.0
   ├─ detect-file at 0.1.0
   │  └─ fs-exists-sync at 0.1.0
   └─ micromatch at 2.3.11
      ├─ array-unique at 0.2.1
      ├─ arr-diff at 2.0.0
      │  └─ arr-flatten at 1.0.1
      ├─ braces at 1.8.5
      │  ├─ preserve at 0.2.0
      │  ├─ repeat-element at 1.1.2
      │  └─ expand-range at 1.8.2
      │     └─ fill-range at 2.2.3
      │        ├─ isobject at 2.1.0
      │        │  └─ isarray at 1.0.0
      │        ├─ is-number at 2.1.0
      │        │  └─ kind-of at 3.0.4
      │        ├─ randomatic at 1.1.5
      │        │  ├─ is-number at 2.1.0
      │        │  └─ kind-of at 3.0.4
      │        ├─ repeat-element at 1.1.2
      │        └─ repeat-string at 1.6.1
      ├─ expand-brackets at 0.1.5
      │  └─ is-posix-bracket at 0.1.1
      ├─ extglob at 0.3.2
      │  └─ is-extglob at 1.0.0
      ├─ is-extglob at 1.0.0
      ├─ filename-regex at 2.0.0
      ├─ kind-of at 3.0.4
      │  └─ is-buffer at 1.1.4
      ├─ normalize-path at 2.0.1
      ├─ object.omit at 2.0.1
      │  ├─ for-own at 0.1.4
      │  │  └─ for-in at 0.1.6
      │  └─ is-extendable at 0.1.1
      ├─ regex-cache at 0.4.3
      │  ├─ is-equal-shallow at 0.1.3
      │  │  └─ is-primitive at 2.0.0
      │  └─ is-primitive at 2.0.0
      ├─ parse-glob at 3.0.4
      │  ├─ glob-base at 0.3.0
      │  │  ├─ glob-parent at 2.0.0
      │  │  │  └─ is-glob at 2.0.1
      │  │  └─ is-glob at 2.0.1
      │  ├─ is-dotfile at 1.0.2
      │  ├─ is-extglob at 1.0.0
      │  └─ is-glob at 2.0.1
      └─ is-glob at 2.0.1

-------------- next part --------------
array-unique at 0.2.1
arr-diff at 2.0.0
arr-flatten at 1.0.1
braces at 1.8.5
commander at 0.6.1
commander at 2.3.0
debug at 2.2.0
detect-file at 0.1.0
diff at 1.4.0
escape-string-regexp at 1.0.2
expand-brackets at 0.1.5
expand-range at 1.8.2
expand-tilde at 1.2.2
extglob at 0.3.2
filename-regex at 2.0.0
fill-range at 2.2.3
findup-sync at 0.4.3
for-in at 0.1.6
for-own at 0.1.4
fs-exists-sync at 0.1.0
glob at 3.2.11
global-modules at 0.2.3
global-prefix at 0.1.4
glob-base at 0.3.0
glob-parent at 2.0.0
growl at 1.9.2
inherits at 2.0.3
ini at 1.3.4
is-absolute at 0.2.6
isarray at 1.0.0
is-buffer at 1.1.4
is-dotfile at 1.0.2
is-equal-shallow at 0.1.3
is-extendable at 0.1.1
is-extglob at 1.0.0
is-glob at 2.0.1
is-number at 2.1.0
isobject at 2.1.0
is-posix-bracket at 0.1.1
is-primitive at 2.0.0
is-relative at 0.2.1
is-unc-path at 0.1.1
is-windows at 0.2.0
jade at 0.26.3
kind-of at 3.0.4
lru-cache at 2.7.3
micromatch at 2.3.11
minimatch at 0.3.0
minimist at 0.0.8
minimist at 1.2.0
mkdirp at 0.3.0
mkdirp at 0.5.1
mocha at 2.5.3
ms at 0.7.1
normalize-path at 2.0.1
object.omit at 2.0.1
osenv at 0.1.3
os-homedir at 1.0.2
os-tmpdir at 1.0.2
parse-glob at 3.0.4
preserve at 0.2.0
randomatic at 1.1.5
regex-cache at 0.4.3
repeat-element at 1.1.2
repeat-string at 1.6.1
resolve at 1.1.7
resolve-dir at 0.1.1
sigmund at 1.0.1
supports-color at 1.2.0
to-iso-string at 0.0.2
unc-path-regex at 0.1.2
which at 1.2.11
-------------- next part --------------
array-unique
arr-diff
arr-flatten
braces
commander
debug
detect-file
diff
escape-string-regexp
expand-brackets
expand-range
expand-tilde
extglob
filename-regex
fill-range
findup-sync
for-in
for-own
fs-exists-sync
glob
global-modules
global-prefix
glob-base
glob-parent
growl
inherits
ini
is-absolute
isarray
is-buffer
is-dotfile
is-equal-shallow
is-extendable
is-extglob
is-glob
is-number
isobject
is-posix-bracket
is-primitive
is-relative
is-unc-path
is-windows
jade
kind-of
lru-cache
micromatch
minimatch
minimist
mkdirp
mocha
ms
normalize-path
object.omit
osenv
os-homedir
os-tmpdir
parse-glob
preserve
randomatic
regex-cache
repeat-element
repeat-string
resolve
resolve-dir
sigmund
supports-color
to-iso-string
unc-path-regex
which


More information about the Pkg-javascript-devel mailing list