PKGJS-UTILS(1p)

πŸ’– PKGJS-UTILS πŸ’–

okay bestie, welcome to pkgjs-utils β€” the Nodejs package utilities page from the User Contributed Perl Documentation section of the manual. she's a 1p, she's iconic, and she's about to make your Debian packaging life so much easier. no cap. πŸ¦‹


✨ NAME ✨

pkgjs-utils β€” Nodejs package utilities πŸŽ€


🌸 SYNOPSIS 🌸

  $ cd node-glob
  $ pkgjs-utils main
    # prints: glob
  $ pkgjs-main
    # alias for pkgjs-utils main
  $ pkgjs-utils components_list
    # prints:
    #  globalyzer
    #  globrex
    #  tiny-glob
    #  types-glob
  $ pkgjs-utils modules_list
    # prints:
    #  globalyzer
    #  globrex
    #  tiny-glob
    #  @types/glob
  $ pkgjs-utils pjson .
    # prints: { <package.json content, serialized> }
  $ pkgjs-pjson .
    # alias for pkgjs-utils pjson .
  $ cd ../node-jest
  $ pkgjs-pjson packages/jest-diff
    # prints: { <packages/jest-diff/package.json content, serialized> }
  $ pkgjs-pjson packages/jest-diff version
    # prints: 27.2.5
  $ pkgjs-utils pjson . scripts test
    # prints: jest
  $ pkgjs-utils pjson packages/jest-diff scripts test
  $ pkgjs-utils ln webpack
    # prints: 'webpack linked into node_modules
  $ pkgjs-utils ln @types/node
    # prints: '@types/node' linked into node_modules
  $ pkgjs-ln @types/node
    # same as pkgjs-utils ln @types/node
  $ pkgjs-utils normalize_name @types/node
    # prints: types-node
  $ pkgjs-utils root_components_list (only components installed in nodejs dir)
  $ pkgjs-utils root_modules_list (same with module names)
  $ pkgjs-utils ordered_components_list (components in build order)

like, look at all those little shortcuts. the range? unreal. πŸ”₯


πŸ’… DESCRIPTION πŸ’…

it's a whole lil' collection of commands that read <component>/package.json, and those get overridden by the files in debian/nodejs/<component>/*. that's the whole vibe. ✨

πŸŽ€ Available commands πŸŽ€

  • link_test_modules β€” links up the modules chillin' inside the debian/tests/test_modules directory into node_modules. giving main character energy, honestly. 🫢
  • link_external_modules β€” links the Debian modules that are listed in debian/nodejs/extlinks into node_modules, and copies the modules listed in debian/nodejs/extcopies into node_modules. two jobs, one command, she's doing both flawlessly. πŸ’…
  • link_internal_modules β€” for multi-modules packages (the ones with uscan components and/or lerna/workspace), this links all those modules into node_modules β€” except for the main module, obviously. main is above that. πŸ‘‘
  • link_build_modules β€” links the modules sitting in the debian/build_modules directory into node_modules. we love a dedicated folder. 🌸
  • clean_test_modules β€” drops the links that link_test_modules created. spring cleaning but make it slay. 🧚
  • clean_external_modules β€” drops the links/copies that link_external_modules created. bye bestie, we won't miss you πŸ’€
  • clean_internal_modules β€” drops the links that link_internal_modules created. undoing her own work, iconic honestly. πŸ™ˆ
  • clean_build_modules β€” drops the links that link_build_modules created. tidy up, periodt. ✨
  • ln β€” link the given Debian module into node_modules. πŸ’–

if the -t option is set, she'll also try to link the corresponding typescript declarations. for example:

    $ pkgjs-ln -t glob; pkgjs-ln -t abab

and that creates node_modules/@types/glob and node_modules/abab. look at her go. 🌈

  • components_list β€” print the list of components (directories), leaving out the main module. 🌟
  • modules_list β€” print the NPM names of the components, again without the main module. πŸ¦‹
  • pjson β€” reads the package.json or package.yaml of whatever directory you hand her. if you give her no arguments, she just prints the serialized JSON content. if you do give arguments, she tries to follow those keys. like so:
    $ pkgjs-pjson packages/foo scripts run

which writes out the content of the subkey run of the key scripts. nesting unlocked πŸ”“

  • main β€” print the NPM name of the main module. just that. simple queen behaviour. πŸ’œ
  • packages_list β€” print the list of binary packages from debian/control. πŸ“¦βœ¨
  • normalize_name β€” convert a NPM module name into a Debian compatible name. examples, bestie:
    $ pkgjs-utils normalize_name @types/glob
    type-glob
    $ pkgjs-utils normalize_name @types/babel__type
    types-babel-type
    $ pkgjs-utils normalize_name require_optional
    require-optional

(yes, @types/glob becomes type-glob β€” singular β€” that's literally what it says, look, don't ask me, I just work here πŸ’€)

  • -h --help β€” help. because everyone needs a lil guidance sometimes. 🫢
  • -v --version β€” version. so you know exactly which queen you're dealing with. πŸ‘‘

🌟 AUTHOR 🌟

Yadd <yadd@debian.org> β€” absolute legend, no notes. 🫢


Copyright (C) Yadd <yadd@debian.org>

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. . On Debian systems, the complete text of version 2 of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2

fr fr, it's GPL-2-or-later, so respect the license bestie πŸ’–

and that's the whole page!! 🌈 this beauty was brought to you by perl v5.40.1, dated 2026-08-17, and filed under PKGJS-UTILS(1p). go forth and link your modules, mwah πŸ’‹βœ¨πŸŽ€

πŸ“¦ where this page comes from