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.
auto-type-dep
Advanced tools
a command to automatically fill up the @types corresponding to the dependency when you install a dependency
在平时用TypeScript
开发项目时,如果我们安装一个包的同时没有把改包对应的@types
装上的话,在导入的时候编辑器会发出警告,如果用npm
或者yarn
同时安装的话,又会安装在dependencies
下面,逼死强迫症的节奏啊,所以就有了auto-type-dep
,一键安装某个包和它的@types
,分别安装在dependencies
和devDependencies
下面,使用起来也非常简单。
auto-type-dep
会自动从全局的.npmrc
中读取配置的镜像, 默认使用淘宝npm
源来安装依赖。
[sudo] npm install auto-type-dep -g
把auto-type-dep
安装成全局模块
auto-type-dep add <pkg1>[@version] <pkg2>[@version] <pkg3>[@version] [option]
安装(多个)npm包
安装相应的模块以及@types
,如果在没有指定-n
的情况下,判断项目中有没有yarn.lock
文件,如果存在,就使用yarn
安装,否则使用npm
安装
@x.y.z可以指定具体版本号, 否则默认安装最新版本
参数 | 简写 | 作用 |
---|---|---|
--npm | -n | 指定用npm 进行安装 |
--yarn | -y | 指定用yarn 进行安装 |
--js | -js | 指定当前项目是一个javascript 项目,不需要安装对应的@types |
auto-type-dep remove <pkg1> <pkg2> <pkg3>
卸载(多个)npm包
卸载相应的模块以及@types
,首先会判断项目中有没有yarn.lock
文件,如果存在,就使用 yarn
卸载,否则使用npm
卸载
FAQs
a command to automatically fill up the @types corresponding to the dependency when you install a dependency
We found that auto-type-dep 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.