Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
jest-changed-files
Advanced tools
The jest-changed-files npm package is a utility that allows you to determine which files have changed in a git or hg (Mercurial) repository. It is often used in testing environments, particularly with Jest, to identify which tests need to be run based on the changes made to the codebase.
Getting changed files from a Git repository
This feature allows you to get a list of files that have changed since the last commit in a Git repository. The 'lastCommit' option specifies that only changes from the last commit should be considered.
const { getChangedFilesForRoots } = require('jest-changed-files');
(async () => {
const changedFiles = await getChangedFilesForRoots(['./'], { lastCommit: true });
console.log(changedFiles.changedFiles);
})();
Getting changed files from a Mercurial repository
This feature is similar to the previous one but is used for Mercurial repositories. The 'withAncestor' option can be used to find changes that have occurred since the last common ancestor of the current head and the default branch.
const { getChangedFilesForRoots } = require('jest-changed-files');
(async () => {
const changedFiles = await getChangedFilesForRoots(['./'], { withAncestor: true });
console.log(changedFiles.changedFiles);
})();
The git-diff-apply package provides functionality to apply the changes between two commits, branches, or tags. It is similar to jest-changed-files in that it deals with changes in a repository, but it focuses on applying changes rather than just listing them.
node-diff3 is a package for three-way file merging. It compares the differences between files, which can be related to the functionality of jest-changed-files, but it goes further by attempting to merge these differences automatically.
simple-git is a light-weight interface for running git commands in any node.js application. It can be used to get a list of changed files, similar to jest-changed-files, but it also provides a full range of commands to manage Git repositories programmatically.
FAQs
A module used internally by Jest to check which files have changed since you last committed in git or hg.
The npm package jest-changed-files receives a total of 14,248,930 weekly downloads. As such, jest-changed-files popularity was classified as popular.
We found that jest-changed-files demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.