Socket
Socket
Sign inDemoInstall

app-builder-lib

Package Overview
Dependencies
272
Maintainers
2
Versions
213
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 24.13.4-alpha.0 to 25.0.0-alpha.1

out/util/rebuild/rebuild.d.ts

5

out/configuration.d.ts

@@ -125,2 +125,7 @@ import { Arch } from "builder-util";

/**
* Use `legacy` app-builder binary for installing native dependencies, or @electron/rebuild in `sequential` or `parallel` compilation modes.
* @default legacy
*/
readonly nativeRebuilder?: "legacy" | "sequential" | "parallel" | null;
/**
* The build number. Maps to the `--iteration` flag for builds using FPM on Linux.

@@ -127,0 +132,0 @@ * If not defined, then it will fallback to `BUILD_NUMBER` or `TRAVIS_BUILD_NUMBER` or `APPVEYOR_BUILD_NUMBER` or `CIRCLE_BUILD_NUM` or `BUILD_BUILDNUMBER` or `CI_PIPELINE_IID` env.

12

out/electron/electronVersion.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.computeElectronVersion = exports.getElectronPackage = exports.getElectronVersionFromInstalled = exports.getElectronVersion = void 0;
const search_module_1 = require("@electron/rebuild/lib/search-module");
const builder_util_1 = require("builder-util");

@@ -57,4 +58,11 @@ const builder_util_runtime_1 = require("builder-util-runtime");

}
const metadata = await (0, read_config_file_1.orNullIfFileNotExist)((0, fs_extra_1.readJson)(path.join(projectDir, "package.json")));
const dependency = metadata ? findFromPackageMetadata(metadata) : null;
const potentialRootDirs = [projectDir, await (0, search_module_1.getProjectRootPath)(projectDir)];
let dependency = null;
for await (const dir of potentialRootDirs) {
const metadata = await (0, read_config_file_1.orNullIfFileNotExist)((0, fs_extra_1.readJson)(path.join(dir, "package.json")));
dependency = metadata ? findFromPackageMetadata(metadata) : null;
if (dependency) {
break;
}
}
if ((dependency === null || dependency === void 0 ? void 0 : dependency.name) === "electron-nightly") {

@@ -61,0 +69,0 @@ builder_util_1.log.info("You are using a nightly version of electron, be warned that those builds are highly unstable.");

2

out/util/packageMetadata.js

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

if (devDependencies != null && ("electron-rebuild" in devDependencies || "@electron/rebuild" in devDependencies)) {
builder_util_1.log.info('@electron/rebuild not required if you use electron-builder, please consider to remove excess dependency from devDependencies\n\nTo ensure your native dependencies are always matched electron version, simply add script `"postinstall": "electron-builder install-app-deps" to your `package.json`');
builder_util_1.log.info('@electron/rebuild already used by electron-builder, please consider to remove excess dependency from devDependencies\n\nTo ensure your native dependencies are always matched electron version, simply add script `"postinstall": "electron-builder install-app-deps" to your `package.json`');
}

@@ -66,0 +66,0 @@ if (errors.length > 0) {

@@ -8,2 +8,4 @@ "use strict";

const path = require("path");
const search_module_1 = require("@electron/rebuild/lib/search-module");
const rebuild_1 = require("./rebuild/rebuild");
const appBuilder_1 = require("./appBuilder");

@@ -24,6 +26,6 @@ async function installOrRebuild(config, appDir, options, forceInstall = false) {

if (forceInstall || !isDependenciesInstalled) {
await installDependencies(appDir, effectiveOptions);
await installDependencies(config, appDir, effectiveOptions);
}
else {
await rebuild(appDir, effectiveOptions);
await rebuild(config, appDir, effectiveOptions);
}

@@ -75,3 +77,3 @@ }

}
function installDependencies(appDir, options) {
async function installDependencies(config, appDir, options) {
const platform = options.platform || process.platform;

@@ -103,6 +105,9 @@ const arch = options.arch || process.arch;

}
return (0, builder_util_1.spawn)(execPath, execArgs, {
await (0, builder_util_1.spawn)(execPath, execArgs, {
cwd: appDir,
env: getGypEnv(options.frameworkInfo, platform, arch, options.buildFromSource === true),
});
// Some native dependencies no longer use `install` hook for building their native module, (yarn 3+ removed implicit link of `install` and `rebuild` steps)
// https://github.com/electron-userland/electron-builder/issues/8024
return rebuild(config, appDir, options);
}

@@ -141,3 +146,3 @@ async function nodeGypRebuild(platform, arch, frameworkInfo) {

/** @internal */
async function rebuild(appDir, options) {
async function rebuild(config, appDir, options) {
const configuration = {

@@ -152,6 +157,29 @@ dependencies: await options.productionDeps.value,

};
const env = getGypEnv(options.frameworkInfo, configuration.platform, configuration.arch, options.buildFromSource === true);
await (0, appBuilder_1.executeAppBuilderAndWriteJson)(["rebuild-node-modules"], configuration, { env, cwd: appDir });
if ([undefined, null, "legacy"].includes(config.nativeRebuilder)) {
const env = getGypEnv(options.frameworkInfo, configuration.platform, configuration.arch, options.buildFromSource === true);
return (0, appBuilder_1.executeAppBuilderAndWriteJson)(["rebuild-node-modules"], configuration, { env, cwd: appDir });
}
const { frameworkInfo: { version: electronVersion }, } = options;
const { arch, buildFromSource } = configuration;
const logInfo = {
electronVersion,
arch,
buildFromSource,
appDir: builder_util_1.log.filePath(appDir) || "./",
};
builder_util_1.log.info(logInfo, "executing @electron/rebuild");
const rebuildOptions = {
buildPath: appDir,
electronVersion,
arch,
debug: builder_util_1.log.isDebugEnabled,
projectRootPath: await (0, search_module_1.getProjectRootPath)(appDir),
mode: config.nativeRebuilder,
};
if (buildFromSource) {
rebuildOptions.prebuildTagPrefix = "totally-not-a-real-prefix-to-force-rebuild";
}
return (0, rebuild_1.rebuild)(rebuildOptions);
}
exports.rebuild = rebuild;
//# sourceMappingURL=yarn.js.map

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

export declare const PACKAGE_VERSION = "24.13.4-alpha.0";
export declare const PACKAGE_VERSION = "25.0.0-alpha.1";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PACKAGE_VERSION = void 0;
exports.PACKAGE_VERSION = "24.13.4-alpha.0";
exports.PACKAGE_VERSION = "25.0.0-alpha.1";
//# sourceMappingURL=version.js.map
{
"name": "app-builder-lib",
"description": "electron-builder lib",
"version": "24.13.4-alpha.0",
"version": "25.0.0-alpha.1",
"main": "out/index.js",

@@ -52,2 +52,3 @@ "files": [

"@electron/osx-sign": "1.0.5",
"@electron/rebuild": "3.6.0",
"@electron/universal": "1.5.1",

@@ -74,5 +75,5 @@ "@malept/flatpak-bundler": "^0.4.0",

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

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

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

@@ -115,0 +116,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 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