Registry / serialization / bplist

bplist

JSON →
library1.1jsnpmunverified

The `bplist` package, currently at version `0.0.4`, provides functionality for parsing and creating binary property lists (bplists). It serves as a convenience wrapper around two other modules: `bplist-parser` for reading bplist data and `bplist-creator` for generating it. This package was last published in 2012, and its dependencies, `bplist-parser` (last updated 2016) and `bplist-creator` (last updated 2013), are also largely unmaintained. Due to its age and lack of updates, it operates exclusively with CommonJS (`require`) syntax and does not offer native ESM support or TypeScript type definitions. Given its long period without maintenance, it is not recommended for new projects, especially those with security considerations or requiring modern JavaScript features.

npm install bplist
INSTALL
IMPORT
SIG · BPLIST
B
bplist
serializationjavascriptv1.1
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.

bplist
const bplist = require('bplist');
import bplist from 'bplist';
This package is CommonJS-only due to its age (2012). ESM `import` will not work directly.
create
const bplist = require('bplist'); bplist.create(...);
const { create } = require('bplist');
The module exports a single object containing `create` and `parseBuffer`. Destructuring is not supported.
parseBuffer
const bplist = require('bplist'); bplist.parseBuffer(...);
import { parseBuffer } from 'bplist';
The module exports a single object containing `create` and `parseBuffer`. Named ESM imports or CJS destructuring are not supported.

Demonstrates how to use `bplist` to both create a binary plist buffer from a JavaScript object and parse a binary plist buffer back into an object, highlighting its CommonJS usage.

const bplist = require('bplist'); const fs = require('fs'); // For saving/loading example, not a direct dependency of bplist // 1. Create a binary plist from a JavaScript object const originalData = { applicationName: 'My Awesome App', version: '1.0.0', features: ['notifications', 'offline-mode'], settings: { darkMode: true, fontSize: 14 }, timestamp: new Date() }; console.log('Original JavaScript Object:', originalData); let binaryPlistBuffer; try { // bplist.create returns a Buffer binaryPlistBuffer = bplist.create(originalData); console.log('Created Binary Plist Buffer (first 20 bytes):', binaryPlistBuffer.toString('hex', 0, 20), '...'); // Optionally, save to a file for inspection // fs.writeFileSync('example.bplist', binaryPlistBuffer); // console.log('Saved to example.bplist'); } catch (error) { console.error('Error creating bplist:', error); process.exit(1); } // 2. Parse a binary plist buffer back into a JavaScript object if (binaryPlistBuffer) { bplist.parseBuffer(binaryPlistBuffer, (err, result) => { if (err) { console.error('Error parsing bplist buffer:', err); return; } // bplist.parseBuffer returns an array of objects console.log('Parsed JavaScript Object:', result[0]); console.log('Verification: Does originalData match parsed result?', JSON.stringify(originalData) === JSON.stringify(result[0])); }); }
Debug
Known issues
gotchaThis package has been abandoned since 2012 and receives no updates, posing significant security risks and incompatibility issues with modern Node.js or browser environments.
fix
Consider using actively maintained alternatives for binary plist parsing/creation, or fork and maintain the package yourself with caution.
affects: >=0.0.1
gotchaThe package is exclusively CommonJS (`require`) and does not offer native ESM support. Using it in a pure ESM project will require a CommonJS wrapper or specific bundler configuration.
fix
For ESM projects, use dynamic `import()` or configure your bundler (e.g., Webpack, Rollup) to handle CJS interop, or set `"type": "commonjs"` in your `package.json` for Node.js environments.
affects: >=0.0.1
gotchaThere are no TypeScript type definitions available for this package. This means you will either need to write your own declaration files or use it with `any` types, reducing type safety.
fix
Create a `declarations.d.ts` file in your project with `declare module 'bplist';` or more specific type definitions if you intend to use it extensively with TypeScript.
affects: >=0.0.1
gotchaThe core functionalities are provided by `bplist-parser` (last updated 2016) and `bplist-creator` (last updated 2013), both of which are also unmaintained and may contain their own vulnerabilities or outdated implementations.
fix
Thoroughly audit the source code of both `bplist-parser` and `bplist-creator` if using this package in a sensitive environment, or seek modern alternatives.
affects: >=0.0.1
gotchaAs a `0.0.4` release from 2012, the API stability was likely never fully guaranteed. It should be treated as experimental or proof-of-concept code rather than production-ready.
fix
Avoid using this package for new, mission-critical applications where API stability and long-term support are required.
affects: >=0.0.1
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module ... not supported. Instead change the require of ... to a dynamic import()
Attempting to use `require('bplist')` in a Node.js project where `package.json` specifies `"type": "module"` (ESM context).
fix
Change your project's `package.json` to `"type": "commonjs"` or use a dynamic import: `import('bplist').then(bplist => bplist.create(...))`.
TypeError: bplist.create is not a function
Incorrectly destructuring the CommonJS module import, or attempting to use `create` directly after an improper import.
fix
Ensure you import the entire module object using `const bplist = require('bplist');` and then access methods like `bplist.create(...)`.
Could not find a declaration file for module 'bplist'. '.../node_modules/bplist/index.js' implicitly has an 'any' type.
Using `bplist` in a TypeScript project without available type definitions.
fix
Create a declaration file (e.g., `src/types/bplist.d.ts`) with `declare module 'bplist';` or more specific type definitions if known, to avoid implicit any errors.
Upgrade
Version history
1.1latest on npm
Audit
Dependencies
bplist-parserrequiredProvides core binary plist parsing functionality.
bplist-creatorrequiredProvides core binary plist creation functionality.
Agent activity
14 hits · last 30 days
node
12
Amazon
1
OpenAI (training)
1
Resources
bplist — npm install bplist · libregistry