
Research
/Security News
Laravel Lang Compromised with RCE Backdoor Across 700+ Versions
Laravel Lang packages were compromised with an RCE backdoor across hundreds of versions, exposing cloud, CI/CD, and developer secrets.
@git-diff-view/core
Advanced tools
Core diff engine for git diff processing with syntax highlighting
npm install @git-diff-view/core
# or
pnpm add @git-diff-view/core
# or
yarn add @git-diff-view/core
import { DiffFile } from "@git-diff-view/core";
// Create diff file instance
const file = new DiffFile(
oldFileName,
oldContent,
newFileName,
newContent,
hunks, // git diff hunks
oldFileLang, // e.g., "typescript"
newFileLang
);
// Initialize theme (optional, default: light)
file.initTheme('dark');
// Initialize diff data
file.init();
// Build view data
file.buildSplitDiffLines(); // For split view
file.buildUnifiedDiffLines(); // For unified view
// For more control over initialization
file.initRaw(); // Parse git diff
file.initSyntax(); // Apply syntax highlighting (optional)
file.buildSplitDiffLines();
file.buildUnifiedDiffLines();
Process diff data in a separate thread or server for better performance:
// Worker/Server side - generate bundle
const file = new DiffFile(/* ... */);
file.initTheme('dark');
file.init();
file.buildSplitDiffLines();
file.buildUnifiedDiffLines();
const bundle = file.getBundle();
// Send bundle to main thread/client
// Main thread/Client side - reconstruct
import { DiffFile } from "@git-diff-view/core";
const mergedFile = DiffFile.createInstance(data, bundle);
// Use with UI components
<DiffView diffFile={mergedFile} />
new DiffFile(
oldFileName: string,
oldContent: string,
newFileName: string,
newContent: string,
hunks: string[],
oldFileLang?: string,
newFileLang?: string
)
| Method | Description |
|---|---|
initTheme(theme) | Set theme ('light' or 'dark') |
init() | Initialize diff data (calls initRaw + initSyntax) |
initRaw() | Parse git diff without syntax highlighting |
initSyntax() | Apply syntax highlighting |
buildSplitDiffLines() | Generate split view data |
buildUnifiedDiffLines() | Generate unified view data |
getBundle() | Export data for transfer |
| Method | Description |
|---|---|
createInstance(data, bundle) | Reconstruct DiffFile from bundle |
MIT © MrWangJustToDo
FAQs
@git-diff-view/core
The npm package @git-diff-view/core receives a total of 129,488 weekly downloads. As such, @git-diff-view/core popularity was classified as popular.
We found that @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 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
Laravel Lang packages were compromised with an RCE backdoor across hundreds of versions, exposing cloud, CI/CD, and developer secrets.

Security News
Socket found a malicious postinstall hook across 700+ GitHub repos, including PHP packages on Packagist and Node.js project repositories.

Security News
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain