Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-revision-webpack-plugin

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-revision-webpack-plugin - npm Package Compare versions

Comparing version 2.5.1 to 3.0.0

8

lib/build-file.js

@@ -6,4 +6,4 @@ var runGitCommand = require('./helpers/run-git-command')

compiler.plugin('compilation', function (compilation) {
compilation.plugin('optimize-tree', function (chunks, modules, callback) {
compiler.hooks.compilation.tap('compilation', (compilation) => {
compilation.hooks.optimizeTree.tapAsync('optimize-tree', (chunks, modules, callback) => {
runGitCommand(gitWorkTree, command, function (err, res) {

@@ -17,3 +17,3 @@ if (err) { return callback(err) }

compilation.mainTemplate.plugin('asset-path', function (path) {
compilation.mainTemplate.hooks.assetPath.tap('asset-path', (path) => {
return path.replace(replacePattern, data)

@@ -23,3 +23,3 @@ })

compiler.plugin('emit', function (compilation, callback) {
compiler.hooks.emit.tapAsync('emit', (compilation, callback) => {
compilation.assets[asset] = {

@@ -26,0 +26,0 @@ source: function () {

@@ -34,4 +34,4 @@ /* global describe, beforeEach, it */

new GitRevisionPlugin({
gitWorkTree: targetProject,
branch: true
branch: true,
gitWorkTree: targetProject
})

@@ -74,5 +74,5 @@ ]

var versionPath = path.join(targetBuild, 'main-master-v1.0.0-1-g9a15b3b.js')
var mainJs = fs.readFileSync(versionPath)
var expectedPublicPath = '__webpack_require__.p = "http://cdn.com/assets/master/v1.0.0-1-g9a15b3b/9a15b3ba1f8c347f9db94bcfde9630ed4fdeb1b2";'
var mainJs = fs.readFileSync(versionPath, 'utf8')
var expectedPublicPath = 'r.p="http://cdn.com/assets/master/v1.0.0-1-g9a15b3b/9a15b3ba1f8c347f9db94bcfde9630ed4fdeb1b2"'

@@ -157,5 +157,5 @@ expect(mainJs.indexOf(expectedPublicPath) !== -1).to.eql(true)

var versionPath = path.join(targetBuild, 'main-master-v2.0.0-beta.js')
var mainJs = fs.readFileSync(versionPath)
var mainJs = fs.readFileSync(versionPath, 'utf8')
var expectedPublicPath = '__webpack_require__.p = "http://cdn.com/assets/master/v2.0.0-beta/9a15b3ba1f8c347f9db94bcfde9630ed4fdeb1b2";'
var expectedPublicPath = 'r.p="http://cdn.com/assets/master/v2.0.0-beta/9a15b3ba1f8c347f9db94bcfde9630ed4fdeb1b2"'

@@ -162,0 +162,0 @@ expect(mainJs.indexOf(expectedPublicPath) !== -1).to.eql(true)

{
"name": "git-revision-webpack-plugin",
"version": "2.5.1",
"version": "3.0.0",
"description": "Simple webpack plugin that generates VERSION and COMMITHASH files during build",

@@ -12,2 +12,6 @@ "main": "lib/index.js",

},
"engines": {
"node": ">=8.0.0",
"npm": ">=5.0.0"
},
"files": [

@@ -34,11 +38,11 @@ "lib"

"devDependencies": {
"chai": "^3.5.0",
"file-loader": "^0.8.5",
"fs-extra": "^0.30.0",
"mocha": "^2.4.5",
"rewire": "^2.5.2",
"sinon": "^1.17.5",
"standard": "^6.0.5",
"webpack": "^1.13.0"
"chai": "^4.1.2",
"file-loader": "^1.1.11",
"fs-extra": "^5.0.0",
"mocha": "^5.0.4",
"rewire": "^3.0.2",
"sinon": "^4.4.8",
"standard": "^11.0.1",
"webpack": "^4.1.1"
}
}
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