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

asar

Package Overview
Dependencies
Maintainers
8
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asar - npm Package Compare versions

Comparing version 0.12.3 to 0.12.4

LICENSE.md

6

CHANGELOG.md
# 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 @@

25

lib/asar.js

@@ -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({

2

package.json

@@ -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

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