New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

browserify-commit-sha

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

browserify-commit-sha - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

14

index.js
var through = require('through')
var GIT_VERSION = require('exec-sync')('git rev-parse HEAD')
var GIT_VERSION = require('child_process').execSync('git rev-parse HEAD')

@@ -15,8 +15,8 @@

var notification = '\n'+[
'/**',
'* ',
'* latest commit: ' + GIT_VERSION,
'* created at: ' + new Date(),
'* ',
'**/',
'',
'',
'global.__BROWSERIFY_META_DATA__GIT_VERSION = "' + GIT_VERSION + '";',
'global.__BROWSERIFY_META_DATA__CREATED_AT = "' + new Date() + '";',
'',
'',
].join('\n')+'\n\n'

@@ -23,0 +23,0 @@ stream.queue(notification)

{
"name": "browserify-commit-sha",
"version": "0.0.3",
"version": "0.1.0",
"description": "browserify transform for appending lastest git commit sha",

@@ -16,5 +16,10 @@ "main": "index.js",

"author": "kumavis",
"contributors": [{
"name": "blackbing"
}],
"contributors": [
{
"name": "blackbing"
},
{
"name": "deathcap"
}
],
"repository": {

@@ -24,8 +29,10 @@ "type": "git",

},
"engines": {
"node": "0.12.x"
},
"license": "MIT",
"devDependencies": {},
"dependencies": {
"through": "^2.3.4",
"exec-sync": "~0.1.6"
"through": "^2.3.4"
}
}

@@ -13,9 +13,9 @@ browserify-commit-sha

/**
*
* latest commit: c6541cbdf842e204fd2a958a28e83ba7be42f3c9
* created at: Sun Feb 15 2015 17:18:10 GMT-0500 (PET)
*
**/
global.__BROWSERIFY_META_DATA__GIT_VERSION = "c6541cbdf842e204fd2a958a28e83ba7be42f3c9";
global.__BROWSERIFY_META_DATA__CREATED_AT = "Sun Feb 15 2015 17:18:10 GMT-0500 (PET)";
'use strict';

@@ -31,3 +31,3 @@

Its a bit of a hack, but it works alright.
You'll most likely want to do this another way,
such that it survives minification
Requires node 0.12+ for execSync.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc