Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
base-create-monorepo
Advanced tools
Utility for npm init create-* scripts for monorepos.
Based on base-create
but for monorepos.
lerna
..gitignore
.Note: If you want different options for different sub-packages, use base-create
directly.
With an initializer package create-custom-babel-monorepo
to create a monorepo project my-app
with two nested packages my-first-package
and my-second-package
,
pass a comma-delimited list of package names to the command after the project name:
$ npm init custom-babel-monorepo my-app my-first-package,my-second-package
Or if you wanted an npm scope @my-org
on your package names (@my-org/my-app
, @my-org/my-first-package
, and @my-org/my-second-package
),
pass the org as an argument after the project name but before the package names:
$ npm init custom-babel-monorepo my-app @my-org my-first-package,my-second-package
Here is example source of such an initializer.
Options at the root apply to the root package,
and eachPackage
defines options to apply to all sub-packages:
#!/usr/bin/env node
const createMonorepo = require("base-create-monorepo");
createMonorepo({
package: {
scripts: {
start: "lerna run start",
build: "lerna run build",
"build:watch": "lerna run --parallel build:watch",
},
},
eachPackage: {
dependencies: ["@babel/runtime"],
devDependencies: [
"@babel/core",
"@babel/cli",
"@babel/node",
"@babel/preset-env",
"@babel/preset-typescript",
"@babel/plugin-transform-runtime",
"typescript",
],
package: {
scripts: {
start: "node .",
build: "babel -x .ts,.tsx src --out-dir dist",
"build:watch": "npm run build -- --watch",
},
},
files: ["src/index.ts"],
},
files: [
{
path: "babel.config.json",
contents: {
presets: ["@babel/preset-env", "@babel/preset-typescript"],
plugins: ["@babel/plugin-transform-runtime"],
},
},
],
});
FAQs
Utility for npm init create-* scripts for monorepos.
We found that base-create-monorepo 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.