Socket
Socket
Sign inDemoInstall

app-builder-lib

Package Overview
Dependencies
273
Maintainers
2
Versions
214
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 25.0.0-alpha.2 to 25.0.0-alpha.3

53

out/asar/asarUtil.js

@@ -34,6 +34,12 @@ "use strict";

const unpackedFileIndexMap = new Map();
for (const fileSet of fileSets) {
const orderedFileSets = [
// Write dependencies first to minimize offset changes to asar header
...fileSets.slice(1),
// Finish with the app files that change most often
fileSets[0],
].map(orderFileSet);
for (const fileSet of orderedFileSets) {
unpackedFileIndexMap.set(fileSet, await this.createPackageFromFiles(fileSet, packager.info));
}
await this.writeAsarFile(fileSets, unpackedFileIndexMap);
await this.writeAsarFile(orderedFileSets, unpackedFileIndexMap);
}

@@ -242,2 +248,45 @@ async createPackageFromFiles(fileSet, packager) {

}
function orderFileSet(fileSet) {
const sortedFileEntries = Array.from(fileSet.files.entries());
sortedFileEntries.sort(([, a], [, b]) => {
if (a === b) {
return 0;
}
// Place addons last because their signature change
const isAAddon = a.endsWith(".node");
const isBAddon = b.endsWith(".node");
if (isAAddon && !isBAddon) {
return 1;
}
if (isBAddon && !isAAddon) {
return -1;
}
// Otherwise order by name
return a < b ? -1 : 1;
});
let transformedFiles;
if (fileSet.transformedFiles) {
transformedFiles = new Map();
const indexMap = new Map();
for (const [newIndex, [oldIndex]] of sortedFileEntries.entries()) {
indexMap.set(oldIndex, newIndex);
}
for (const [oldIndex, value] of fileSet.transformedFiles) {
const newIndex = indexMap.get(oldIndex);
if (newIndex === undefined) {
const file = fileSet.files[oldIndex];
throw new Error(`Internal error: ${file} was lost while ordering asar`);
}
transformedFiles.set(newIndex, value);
}
}
const { src, destination, metadata } = fileSet;
return {
src,
destination,
metadata,
files: sortedFileEntries.map(([, file]) => file),
transformedFiles,
};
}
//# sourceMappingURL=asarUtil.js.map

2

out/version.d.ts

@@ -1,1 +0,1 @@

export declare const PACKAGE_VERSION = "25.0.0-alpha.2";
export declare const PACKAGE_VERSION = "25.0.0-alpha.3";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PACKAGE_VERSION = void 0;
exports.PACKAGE_VERSION = "25.0.0-alpha.2";
exports.PACKAGE_VERSION = "25.0.0-alpha.3";
//# sourceMappingURL=version.js.map

@@ -237,3 +237,3 @@ "use strict";

"FileDescription",
appInfo.productName,
appInfo.description || appInfo.productName,
"--set-version-string",

@@ -240,0 +240,0 @@ "ProductName",

{
"name": "app-builder-lib",
"description": "electron-builder lib",
"version": "25.0.0-alpha.2",
"version": "25.0.0-alpha.3",
"main": "out/index.js",

@@ -74,5 +74,5 @@ "files": [

"temp-file": "^3.4.0",
"builder-util": "25.0.0-alpha.1",
"builder-util-runtime": "9.2.5-alpha.1",
"electron-publish": "25.0.0-alpha.1"
"builder-util": "25.0.0-alpha.3",
"builder-util-runtime": "9.2.5-alpha.2",
"electron-publish": "25.0.0-alpha.3"
},

@@ -107,8 +107,8 @@ "///": "babel in devDependencies for proton tests",

"@types/tar": "^6.1.3",
"electron-builder-squirrel-windows": "25.0.0-alpha.2",
"dmg-builder": "25.0.0-alpha.2"
"dmg-builder": "25.0.0-alpha.3",
"electron-builder-squirrel-windows": "25.0.0-alpha.3"
},
"peerDependencies": {
"dmg-builder": "25.0.0-alpha.2",
"electron-builder-squirrel-windows": "25.0.0-alpha.2"
"electron-builder-squirrel-windows": "25.0.0-alpha.3",
"dmg-builder": "25.0.0-alpha.3"
},

@@ -115,0 +115,0 @@ "//": "electron-builder-squirrel-windows and dmg-builder added as dev dep for tests (as otherwise `require` doesn't work using Yarn 2)",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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