
Research
/Security News
10 npm Typosquatted Packages Deploy Multi-Stage Credential Harvester
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.
@gitee/icons-react
Advanced tools
基于 @gitee/icons 提供的 IconifyIcon 数据生成的 React 组件库。
请参考 examples/nextjs
yarn add @gitee/icons-react
由于 @gitee/icons-react 暴露的是 JSX 代码,所以需要配置编译工具对其进行转译。
rules: [
{
test: /\.[tj]sx?$/,
exclude: {
or: [/node_modules/, /bower_components/],
not: [/node_modules\/@gitee\/icons-react/],
},
use: ["babel-loader"],
},
// other rules...
];
const withTM = require("next-transpile-modules")(["@gitee/icons-react"]);
module.exports = withTM({
reactStrictMode: true,
});
import { IconApp } from "@gitee/icons-react";
function AComponent() {
return (
<div>
<IconApp width={24} color="#909aaa" />
</div>
);
}
import {
IconProjectTypeKanban,
IconProjectTypeScrum,
IconProjectTypeStandard,
} from "@gitee/icons-react";
function IconProjectType(name) {
switch (name) {
case "project-type-kanban":
return <IconProjectTypeKanban width={24} />;
case "project-type-scrum":
return <IconProjectTypeScrum width={24} />;
case "project-type-standard":
return <IconProjectTypeStandard width={24} />;
default:
return null;
}
}
function AComponent() {
return (
<div>
{[
"project-type-kanban",
"project-type-scrum",
"project-type-standard",
].map((name) => (
<IconProjectType name={name} />
))}
</div>
);
}
不推荐使用下面的方法批量引入(无法 Tree-Shaking),而使用按需引入。
import Icon from "@gitee/icons-react/dist/icon";
function AComponent() {
return (
<div>
{[
"project-type-kanban",
"project-type-scrum",
"project-type-standard",
].map((name) => (
<Icon key={name} name={name} width={24} />
))}
</div>
);
}
import Icon, { iconNames } from "@gitee/icons-react/dist/icon";
function AComponent() {
return (
<div>
{iconNames.map((name) => (
<Icon key={name} name={name} width={24} />
))}
</div>
);
}
yarn workspace,安装依赖请直接在顶层目录执行 yarn@gitee/icons 依赖,由于使用了 Turborepo, 在顶层目录执行 yarn build --filter=@gitee/icons 即可yarn build 生成新的组件和类型文件。FAQs
Gitee Icons React component
We found that @gitee/icons-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers 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 researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.