Registry / devops / vscode-universal-bundler

vscode-universal-bundler

JSON →
library0.1.3jsnpmunverified

The `vscode-universal-bundler` package, currently at version 0.1.3, provides a utility for macOS developers to merge separate x64 (Intel) and arm64 (Apple Silicon) Electron application builds into a single Universal macOS application. This allows a single distributed binary to run natively on both architectures, which was particularly important during the transition period to Apple Silicon. While it served a specific niche, the package's own README strongly advises users to "Prefer the official `@electron/universal` package." This explicitly indicates that `vscode-universal-bundler` is now deprecated and is no longer the recommended or actively maintained solution for creating universal Electron applications, which typically receive more frequent updates and support from the Electron project. Its low version number also suggests limited feature stability and a lack of ongoing development.

npm install vscode-universal-bundler
INSTALL
IMPORT
SIG · VSCODE-UNIVERSAL-B
V
vscode-universal-bundler
devopsjavascriptv0.1.3
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

makeUniversalApp
import { makeUniversalApp } from 'vscode-universal-bundler';
const makeUniversalApp = require('vscode-universal-bundler');
This package primarily supports ESM imports; CommonJS `require` might lead to undefined errors in modern Node.js environments. The API is inferred based on its successor.
makeUniversalApp (async)
import { makeUniversalApp } from 'vscode-universal-bundler'; async function bundle() { await makeUniversalApp({ /* ... */ }); }
The bundling process is asynchronous and returns a Promise, requiring `await` within an `async` context.

This quickstart demonstrates how to use `makeUniversalApp` to combine x64 and arm64 Electron builds into a single universal macOS application, including creating dummy app structures for a runnable example.

import { makeUniversalApp } from 'vscode-universal-bundler'; import * as path from 'path'; import * as fs from 'fs'; // Dummy paths for demonstration. In a real scenario, these would be your built Electron apps. const x64AppPath = path.resolve(__dirname, 'electron-app-x64/YourApp.app'); const arm64AppPath = path.resolve(__dirname, 'electron-app-arm64/YourApp.app'); const outputPath = path.resolve(__dirname, 'build/YourApp.app'); async function createUniversalApplication() { console.log('Starting universal application bundling...'); // Ensure dummy directories exist for a runnable example fs.mkdirSync(path.dirname(x64AppPath), { recursive: true }); fs.mkdirSync(path.dirname(arm64AppPath), { recursive: true }); fs.writeFileSync(path.join(x64AppPath, 'Contents/Info.plist'), '<plist>...</plist>'); // Mimic an app bundle fs.writeFileSync(path.join(arm64AppPath, 'Contents/Info.plist'), '<plist>...</plist>'); try { await makeUniversalApp({ x64AppPath: x64AppPath, arm64AppPath: arm64AppPath, outputPath: outputPath }); console.log(`Universal application successfully created at: ${outputPath}`); } catch (error) { console.error('Failed to create universal application:', error); } } createUniversalApplication();
Debug
Known issues
deprecatedThis package is explicitly deprecated by its own README, which advises users to "Prefer the official `@electron/universal` package." It is not actively maintained and may have unpatched bugs or security vulnerabilities.
fix
Migrate to `@electron/universal` for creating Universal macOS applications. It offers similar functionality with ongoing maintenance and support from the Electron team.
affects: >=0.0.1
gotchaThe package is at a very low version (0.1.3), indicating it was likely an early experiment or a quickly superseded solution. Expect limited features, potential instability, and lack of comprehensive documentation or community support.
fix
Avoid using this package for new projects. For existing projects, plan for migration to `@electron/universal` to ensure long-term stability and access to new features.
affects: 0.1.3
gotchaRequires Node.js version 16.4 or higher. Using an older Node.js version will result in errors.
fix
Ensure your development environment uses Node.js v16.4 or newer. You can manage Node.js versions with `nvm` (Node Version Manager) or `volta`.
affects: <=0.1.3
Errors
Common errors & fixes
ReferenceError: makeUniversalApp is not defined
Attempting to import `makeUniversalApp` using CommonJS `require` syntax in an ESM-only context or with an incorrect named import.
fix
Ensure you are using ES module `import { makeUniversalApp } from 'vscode-universal-bundler';` syntax. If TypeScript is used, ensure `moduleResolution` is set appropriately in `tsconfig.json`.
Error: Universal build failed: Cannot merge native modules (e.g., 'ffmpeg-static') as they are not built for both x64 and arm64 architectures.
When creating a universal Electron application, native Node.js modules (like `ffmpeg-static`) must have binaries compiled for both x64 and arm64 architectures. If they are only built for one, the universal merging process can fail or result in a non-functional application on one architecture.
fix
Before running the universal bundler, ensure all native modules are rebuilt for both `x64` and `arm64` architectures using tools like `electron-rebuild` or by manually rebuilding with specific `--arch` flags. For example: `npm rebuild your-native-module --runtime=electron --target=20.0.0 --arch=x64` and then for `--arch=arm64`.
Error: ENOENT: no such file or directory, stat '/path/to/electron-app-x64/YourApp.app'
One or both of the specified x64 or arm64 Electron application paths do not exist or are incorrect. The bundler cannot find the input applications.
fix
Verify that `x64AppPath` and `arm64AppPath` in your configuration point to valid, existing Electron application bundles (e.g., `YourApp.app` directories) built for their respective architectures. Use absolute paths to avoid ambiguity.
Upgrade
Version history
0.1.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
vscode-universal-bundler — npm install vscode-universal-bundler · libregistry