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 thedebian/tests/test_modulesdirectory intonode_modules. giving main character energy, honestly. π«Άlink_external_modulesβ links the Debian modules that are listed indebian/nodejs/extlinksintonode_modules, and copies the modules listed indebian/nodejs/extcopiesintonode_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 intonode_modulesβ except for themainmodule, obviously.mainis above that. πlink_build_modulesβ links the modules sitting in thedebian/build_modulesdirectory intonode_modules. we love a dedicated folder. πΈclean_test_modulesβ drops the links thatlink_test_modulescreated. spring cleaning but make it slay. π§clean_external_modulesβ drops the links/copies thatlink_external_modulescreated. bye bestie, we won't miss you πclean_internal_modulesβ drops the links thatlink_internal_modulescreated. undoing her own work, iconic honestly. πclean_build_modulesβ drops the links thatlink_build_modulescreated. tidy up, periodt. β¨lnβ link the given Debian module intonode_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 themainmodule. πmodules_listβ print the NPM names of the components, again without themainmodule. π¦pjsonβ reads thepackage.jsonorpackage.yamlof 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 themainmodule. just that. simple queen behaviour. πpackages_listβ print the list of binary packages fromdebian/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 AND LICENSE π
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
- ubuntu stonking: dh-nodejs 0.17.8 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms