
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
grunt-git-ref-changed-files
Advanced tools
Detects which files have changed between two git refs.
Detects which files have changed between two git refs.
If you haven't used grunt before, be sure to check out the Getting Started guide.
From the same directory as your project's Gruntfile and package.json, install this plugin with the following command:
npm install grunt-git-ref-changed-files
Once that's done, add this line to your project's Gruntfile:
grunt.loadNpmTasks('grunt-git-ref-changed-files');
Inside your Gruntfile.js
file add a section named refChangedFiles
. This section specifies the
options to detect which files have changed between two refs (from/to) and a regular expression to filter them.
It will query which files have changed since the specified from/to parameter using git by running:
git log {ref}..{ref} --name-only --pretty=format:
Finally it will filter the changed files by applying the regexp option to every item. The result of the filtered files changed will be stored in a grunt config item called refChangedFiles.
Example to detect if static files where modified since v.100 tag:
refChangedFiles: {
dist: {
options: {
from: 'v.100', // optional: default is HEAD^
to: 'HEAD', // optional: default is HEAD
regexp: /public\/lib\/js/, // optional: default is /.*/
},
src: 'repoFolder'
}
}
Then you can access to the filtered changed files using:
grunt.config.get('refChangedFiles');
Copyright (c) 2013 Juan Pablo Garcia Licensed under the MIT license.
FAQs
Detects which files have changed between two git refs.
We found that grunt-git-ref-changed-files demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.