Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
git-repo-version
Advanced tools
Generates a version string based on the version specified in your package.json and the sha revision of the current commit branch.
Generates a version string based on the version specified in your package.json
and the sha revision of
the current commit/branch.
Typically you will only need to install this as a devDependency as follows
npm install --save-dev git-repo-version
This plugin automatically exports a function that when called calculates return the version string with a sha of the given length (defaults to 8). You can also specify second parameter to include commit date in the output { includeDate: true }
.
var getVersion = require('git-repo-version');
getVersion(); // "1.5.0+a1b2c3d4"
getVersion({ shaLength: 10 }); // "1.5.0+a1b2c3d4e5"
getVersion({ shaLength: 10, includeDate: true }); // "1.5.0+a1b2c3d4e5 2016-10-24T18:26:53.000Z"
getVersion({ shaLength: 0, includeDate: true }); // "1.5.0 2016-10-24T18:26:53.000Z"
The way this function works is:
package.json
, it will use that version number and append
the SHA of the current commit at the end (p.e. 1.5.0-beta.1+pre.a1b2c3d4
)package.json
, it will use the name of the current
branch and append the SHA (p.e. develp.a1b2c3d4
)DETACHED_HEAD
instead (p.e DETACHED_HEAD.1a2b3c4d
)Simply run npm test
FAQs
Generates a version string based on the version specified in your package.json and the sha revision of the current commit branch.
The npm package git-repo-version receives a total of 18,942 weekly downloads. As such, git-repo-version popularity was classified as popular.
We found that git-repo-version 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.