
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
@gitee-code/git-diff-view-core
Advanced tools
git diff
for @git-diff-view Component// ==== step1: generate diff view data, this part can be used in the worker/server environment for better performance ==== //
import { DiffFile } from "@git-diff-view/core";
const file = new DiffFile(
data?.oldFile?.fileName || "",
data?.oldFile?.content || "",
data?.newFile?.fileName || "",
data?.newFile?.content || "",
data?.hunks || [],
data?.oldFile?.fileLang || "",
data?.newFile?.fileLang || ""
);
// do the init
file.init();
// or you can use below method to init
file.initRaw();
file.initSyntax(); // if you do not want syntax highlight, you can skip this step
// build the `Split View` data;
file.buildSplitDiffLines();
// build the `Unified View` data;
file.buildUnifiedDiffLines();
// get All the diff data bundle, you can safely to send this data to the client side
const bundle = file.getBundle();
// ==== step2: render the @git-diff-view component ==== //
// merge bundle
const mergeFile = DiffFile.createInstance(data || {}, bundle);
// used for @git-diff-view/react and @git-diff-view/vue
<DiffView diffFile={mergeFile} />
<DiffView :diffFile="mergeFile" />
FAQs
@git-diff-view/core
The npm package @gitee-code/git-diff-view-core receives a total of 1 weekly downloads. As such, @gitee-code/git-diff-view-core popularity was classified as not popular.
We found that @gitee-code/git-diff-view-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.