Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@apexdevtools/git-ops
Advanced tools
Library to do git operations to find changed files in a given git repository
Library to do git operations to find changed files in a given git repository.
Minimum git
version of 2.20.0
must already be installed on the host machine.
To build run
pnpm install
pnpm build
Jest unit tests can be run with
pnpm test
Prerequisite: The head mus tbe set on the repo otherwise any functions using default branch will fail
npm i @apexdevtools/git-ops
Getting changed files using the default branch in that repo given a ref. This finds the default branch in the repo using git symbolic-ref 'refs/remotes/origin/HEAD'
so the HEAD
must be set.
The output of the command is same as running git diff branchName...ref
combined with git status
.
Note: files with the status of deleted (D
) and ignored (!
) will not be included in the change set.
getDefaultBranchDiffByRef
Works out changed files using the default branch in that repo given a ref.
This find the default branch in the repo using git symbolic-ref 'refs/remotes/origin/HEAD'
so the HEAD
must be set. The output of the command is same as running git diff branchName...ref
combined with git status
.
Files with the status of deleted (D
) and ignored (!
) will not be included in the change set.
getDefaultBranchDiffByRef(repoDir: string, ref: string): Promise<Set<string>>
getDefaultBranchDiff
This command is same as calling getDefaultBranchDiffByRef(repoRootDir, 'HEAD')
.
getDefaultBranchDiff(repoDir: string): Promise<Set<string>>
getDiffRange
Works out the diff between a given range. Equivalent to git diff ref1...ref2
getDiffRange(dir: string, fromRef: string, toRef: string): Promise<Set<string>>
getLocalChanges
Get the local changes that not have been committed. Equivalent to git status
Files with the status of deleted (D
) and ignored (!
) will not be included in the change set
getLocalChanges(dir: string): Promise<Set<string>>
FAQs
Library to do git operations to find changed files in a given git repository
We found that @apexdevtools/git-ops demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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 uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.