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

broccoli-caching-writer

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-caching-writer - npm Package Compare versions

Comparing version 2.3.0 to 2.3.1

5

CHANGELOG.md
## master
## 2.3.1
* [REVERT] listFiles and listEntries output is now lexicographically sorted (by related path)
ember-cli uses concat inputFiles instead of headerFiles for files which much be ordered
## 2.3.0

@@ -4,0 +9,0 @@

15

index.js

@@ -218,16 +218,3 @@ 'use strict';

}
return listEntries(this._lastKeys, []).sort(function (a, b) {
var pathA = a.relativePath;
var pathB = b.relativePath;
if (pathA === pathB) {
return 0;
} else if (pathA < pathB) {
return -1;
} else {
return 1;
}
}
);
return listEntries(this._lastKeys, []);
};

@@ -234,0 +221,0 @@

{
"name": "broccoli-caching-writer",
"version": "2.3.0",
"version": "2.3.1",
"description": "Broccoli plugin that allows simple caching (while still allowing N:N) based on the input tree hash.",

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

@@ -59,6 +59,6 @@ # Broccoli Caching Writer

## `plugin.listFiles`
list files matched, helpful as it allows us avoid a second glob, lexicographically sorted by relativePath.
list files matched, helpful as it allows us avoid a second glob
## `plugin.listEntries`
list entries (stat objects) of files matched, helpful when further FS information is required on rebuild, lexicographically sorted by relativePath.
list entries (stat objects) of files matched, helpful when further FS information is required on rebuild.

@@ -65,0 +65,0 @@ ## ZOMG!!! TESTS?!?!!?

@@ -285,16 +285,11 @@ 'use strict';

describe('listFiles', function() {
function getListFilesFor(options, sourcePaths) {
var listFiles;
var listFiles;
if (arguments.length < 2) {
sourcePaths = [sourcePath];
}
setupCachingWriter(sourcePaths, options, function() {
function getListFilesFor(options) {
setupCachingWriter([sourcePath], options, function() {
var writer = this;
listFiles = this.listFiles().map(function(fullPath) {
return path.basename(fullPath);
listFiles = this.listFiles().map(function(p) {
return path.relative(writer.inputPaths[0], p);
});
});
return expectRebuild().then(function() {

@@ -327,28 +322,12 @@ return listFiles;

});
it('returns a sorted array', function() {
return expect(getListFilesFor(
{}, [sourcePath, secondaryPath]
)).to.eventually.deep.equal([
'bar.js',
'core.js',
'foo-baz.js',
'foo.js',
'main.js',
]);
});
});
describe('listEntries', function() {
function getListEntriesFor(options, sourcePaths) {
var listEntries;
var listEntries;
if (arguments.length < 2) {
sourcePaths = [sourcePath];
}
setupCachingWriter(sourcePaths, options, function() {
function getListEntriesFor(options) {
setupCachingWriter([sourcePath], options, function() {
var writer = this;
listEntries = this.listEntries().map(function(entry) {
return path.basename(entry.fullPath);
listEntries = this.listEntries().map(function(p) {
return path.relative(writer.inputPaths[0], p.fullPath);
});

@@ -384,15 +363,2 @@ });

});
it('returns a sorted array', function() {
return expect(getListEntriesFor(
{}, [sourcePath, secondaryPath]
)).to.eventually.deep.equal([
'bar.js',
'core.js',
'foo-baz.js',
'foo.js',
'main.js',
]);
});
});

@@ -399,0 +365,0 @@ });

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