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

gulp-rev-all

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-rev-all - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

test/fixtures/config1/nested/config.js

2

package.json
{
"name": "gulp-rev-all",
"version": "0.8.1",
"version": "0.8.2",
"description": "Static asset revisioning by appending content hash to filenames: unicorn.css => unicorn.098f6bcd.css, also re-writes references in each file to new reved name.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -27,10 +27,11 @@ # [gulp](https://github.com/wearefractal/gulp)-rev-all [![Build Status](https://travis-ci.org/smysnk/gulp-rev-all.png?branch=master)](https://travis-ci.org/smysnk/gulp-rev-all)

## Upgrading to v0.8.0
## Upgrading to v0.8.x
NOTICE: Major breaking changes occured between the last release (v0.7.6) and (v0.8.0) that you should be aware of.
NOTICE: Major breaking changes occured between the last release v0.7.6 and v0.8.0 that you should be aware of.
- It is now required to instantiate a `var revAll = new RevAll()` instance before piping through revAll.revision()
- Reference dependency analysis has been greatly simplified, previous method was way too complex
- No longer requires references to exist physically on disk, can now be piped through, embracing nature of gulp
- New Feature: Ignoring files has changed, `ignore` option has been removed and has been replaced with `dontGlobal, dontRenameFile, dontUpdateReference` which allows for more control and less ambiguity on what is being ignored.
- Bug Fix: Manifset and Version files can be created in the same gulp-rev-all run without issue
- Bug Fix: References without quotes now getting updated (See: #64)
- New Feature: Manifset and Version files can be created in the same gulp-rev-all run without issue
- Bug Fix: References without quotes were not getting updated
- Change: `silent` & `quiet` options, renamed to `debug` to control logging output

@@ -281,3 +282,3 @@

If you set this options to true gulp will no longer emit `gulp-rev-all` log messages.
If you set this options to true, verbose logging will be emitted to console.

@@ -284,0 +285,0 @@ ## Tips

@@ -182,3 +182,3 @@ var gracefulfs = require('graceful-fs');

};
this.log('gulp-rev-all:', 'Found', referenceType, 'reference [', gutil.colors.magenta(reference.path), '] -> [', gutil.colors.green(reference.file.path), ']');
this.log('gulp-rev-all:', 'Found', referenceType, 'reference [', gutil.colors.magenta(reference.path), '] -> [', gutil.colors.green(reference.file.path), '] in [', gutil.colors.blue(fileResolveReferencesIn.revPathOriginal) ,']');

@@ -185,0 +185,0 @@ } else if (fileResolveReferencesIn.revReferences[reference.path].file.revPathOriginal != reference.file.revPathOriginal) {

@@ -34,2 +34,22 @@ var RevAll = require('./index');

it('should not change on consecutive runs with no changes', function (done) {
setup();
streamRevision.on('data', function (file) { });
streamRevision.on('end', function () {
var pathBaseline = files['/css/style.css'].path;
// Re-run the revisioner to re-calculate the filename hash
revisioner.run();
files['/css/style.css'].path.should.equal(pathBaseline);
done();
});
Tool.write_glob_to_stream(base, 'test/fixtures/config1/**', streamRevision);
});
it('should change if child reference changes', function (done) {

@@ -325,4 +345,2 @@

var glob = Path.join(base, 'index.html');
it('should resolve absolute path reference', function (done) {

@@ -495,2 +513,48 @@

describe('nested html', function () {
it('should prioritize relative refereference', function (done) {
setup();
streamRevision.on('data', function () { });
streamRevision.on('end', function () {
var hashRelative = files['/nested/config.js'].revFilename;
var hashAbsolute = files['/config.js'].revFilename;
var contents = String(files['/nested/index.html'].contents);
contents.should.containEql(hashRelative);
contents.should.not.containEql(hashAbsolute);
done();
});
Tool.write_glob_to_stream(base, 'test/fixtures/config1/**', streamRevision);
});
it('should resolve both relative and absolute references correctly', function (done) {
setup();
streamRevision.on('data', function () { });
streamRevision.on('end', function () {
var hashRelative = files['/nested/index.html'].revFilename;
var hashAbsolute = files['/index.html'].revFilename;
var contents = String(files['/nested/index.html'].contents);
contents.should.containEql(hashRelative);
contents.should.containEql(hashAbsolute);
done();
});
Tool.write_glob_to_stream(base, 'test/fixtures/config1/**', streamRevision);
});
});
describe('angularjs view', function () {

@@ -497,0 +561,0 @@

Sorry, the diff of this file is not supported yet

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