
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
@unmonorepo/pkg
Advanced tools
Monorepo is great, but when it comes to serverless, the node_modules directory needs to be as small as possible, and there should be no soft links.
It is difficult/impossible for the usual package managers to separately install condensed node_modules for a given package.json (--production)
What @unmonorepo/pkg does is relatively simple: install the specified package.json in the user cache directory, and then copy the resulting node_modules to the specified location.
npm i -g @unmonorepo/pkg
# or
yarn global add @unmonorepo/pkg
# or just exec
npx @unmonorepo/pkg
Then just run
# all parameters are optional, see unmonorepo/pkg --help
unmonorepo-pkg --source=./package.json --dist=./dist --command="npm install --omit=dev --prefer-offline --no-audit --no-fund"
@unmonorepo/pkg will grab dependencies in ./package.json and run npm install --omit=dev --prefer-offline --no-audit --no-fund to install all dependencies, then copy node_modules to ./dist
Or programmatically:
const { installPkg, installPkgSync } from "@unmonorepo/pkg"
// just see its type def
installPkg({
cwd,
source: argv.source,
dist: argv.dist,
command: argv.command,
cacheDir: argv.cacheDir,
outputJson: argv.outputJson,
})
Source package.json dependencies should not contain any workspace (monorepo modules), you should use webpack (or other javascript bundler) to pack your source code, or just use a script to process workspace dependency files.
FAQs
install production node modules for specify monorepo workspace
The npm package @unmonorepo/pkg receives a total of 35 weekly downloads. As such, @unmonorepo/pkg popularity was classified as not popular.
We found that @unmonorepo/pkg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.