Socket
Socket
Sign inDemoInstall

gulp-sri

Package Overview
Dependencies
64
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.3.1

.travis.yml

2

index.js

@@ -31,3 +31,3 @@ 'use strict';

algorithms: options.algorithms
}, file.contents.toString());
}, file.contents);
}

@@ -34,0 +34,0 @@

{
"name": "gulp-sri",
"description": "SRI integrety hash generator for gulp. Based on gulp-buster.",
"version": "0.3.0",
"version": "0.3.1",
"author": {

@@ -6,0 +6,0 @@ "name": "Matthew Conlen",

# [gulp](https://github.com/gulpjs/gulp/)-sri
[![npm version](http://img.shields.io/npm/v/gulp-sri.svg)](https://npmjs.org/package/gulp-sri)
[![Build Status](https://travis-ci.org/mathisonian/gulp-sri.svg?branch=master)](https://travis-ci.org/mathisonian/gulp-sri)

@@ -4,0 +5,0 @@ [SubResource Integrity](http://www.w3.org/TR/SRI/) hashes generator for gulp. Code heavily borrowed from [gulp-buster](https://github.com/UltCombo/gulp-buster).

@@ -7,3 +7,7 @@ 'use strict';

fileContentStr = 'foo',
file2ContentStr = 'bar',
file2ContentStr = [ // Transparent.gif
0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x01, 0x00, 0x01, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x01, 0x00, 0x00, 0x02, 0x01, 0x44, 0x00, 0x3b
],
file = new gutil.File({

@@ -199,2 +203,10 @@ cwd: 'C:/users/ult/',

it('should correctly generate the hash for a binary file', function(done) {
var stream = bust({ algorithms: ['sha256'] });
stream.on('data', function(newFile) {
JSON.parse(newFile.contents.toString())[file2BustPath].should.be.exactly('sha256-7xlVrnV8i5ZsgySDUDMb06MPZYztEfOH+OvwWrM2hik=');
done();
});
stream.end(file2);
});
});

@@ -201,0 +213,0 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc