Comparing version 0.12.3 to 0.12.4
# Changes By Version | ||
## 0.12.4 - 2016-12-28 | ||
### Fixed | ||
- Unpack glob patterns containing `{}` characters not working properly (#99) | ||
## 0.12.3 - 2016-08-29 | ||
@@ -4,0 +10,0 @@ |
@@ -22,4 +22,18 @@ (function() { | ||
isUnpackDir = function(path, pattern) { | ||
return path.indexOf(pattern) === 0 || minimatch(path, pattern); | ||
isUnpackDir = function(path, pattern, unpackDirs) { | ||
var dir, i, len; | ||
if (path.indexOf(pattern) === 0 || minimatch(path, pattern)) { | ||
if (unpackDirs.indexOf(path) === -1) { | ||
unpackDirs.push(path); | ||
} | ||
return true; | ||
} else { | ||
for (i = 0, len = unpackDirs.length; i < len; i++) { | ||
dir = unpackDirs[i]; | ||
if (path.indexOf(dir) === 0) { | ||
return true; | ||
} | ||
} | ||
return false; | ||
} | ||
}; | ||
@@ -59,3 +73,3 @@ | ||
module.exports.createPackageFromFiles = function(src, dest, filenames, metadata, options, callback) { | ||
var file, filenamesSorted, files, filesystem, handleFile, i, insertsDone, j, k, l, len, len1, len2, len3, missing, names, next, ordering, orderingFiles, pathComponent, pathComponents, str, total; | ||
var file, filenamesSorted, files, filesystem, handleFile, i, insertsDone, j, k, l, len, len1, len2, len3, missing, names, next, ordering, orderingFiles, pathComponent, pathComponents, str, total, unpackDirs; | ||
if (metadata == null) { | ||
@@ -66,2 +80,3 @@ metadata = {}; | ||
files = []; | ||
unpackDirs = []; | ||
if (options.ordering) { | ||
@@ -130,3 +145,3 @@ orderingFiles = fs.readFileSync(options.ordering).toString().split('\n').map(function(line) { | ||
case 'directory': | ||
shouldUnpack = options.unpackDir ? isUnpackDir(path.relative(src, filename), options.unpackDir) : false; | ||
shouldUnpack = options.unpackDir ? isUnpackDir(path.relative(src, filename), options.unpackDir, unpackDirs) : false; | ||
filesystem.insertDirectory(filename, shouldUnpack); | ||
@@ -143,3 +158,3 @@ break; | ||
dirName = path.relative(src, path.dirname(filename)); | ||
shouldUnpack = isUnpackDir(dirName, options.unpackDir); | ||
shouldUnpack = isUnpackDir(dirName, options.unpackDir, unpackDirs); | ||
} | ||
@@ -146,0 +161,0 @@ files.push({ |
@@ -5,3 +5,3 @@ { | ||
"description": "Creating Electron app packages", | ||
"version": "0.12.3", | ||
"version": "0.12.4", | ||
"bin": { | ||
@@ -8,0 +8,0 @@ "asar": "bin/asar" |
@@ -99,3 +99,3 @@ # asar - Electron Archive | ||
Please note that there is currently *no* error handling provided! | ||
Please note that there is currently **no** error handling provided! | ||
@@ -102,0 +102,0 @@ ### Transform |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30164
597