Registry / devops / vizion

vizion

JSON →
library0.1.7jsnpmunverified

Vizion is a JavaScript library providing a unified interface for interacting with local Git, Subversion, and Mercurial repositories. It allows developers to analyze repository metadata (e.g., branch, revision, remotes), check local repository status against remotes, and perform operations such as updating to the latest commit, reverting to a specific revision, or navigating commit history. The current stable version, 2.2.1, was released in October 2014. The project appears to be largely unmaintained, with its last commit to master in September 2017. It uses an asynchronous callback-based API and targets Node.js environments. Its primary differentiator is its multi-VCS support, but users should be aware of potential compatibility issues with newer Node.js versions, modern VCS features, or its lack of active development and security patches.

npm install vizion
INSTALL
IMPORT
SIG · VIZION
V
vizion
devopsjavascriptv0.1.7
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.

vizion
const vizion = require('vizion');
import vizion from 'vizion';
The library primarily uses CommonJS `require` syntax and exports a single object. Direct ESM imports like `import vizion from 'vizion'` will not work without a CommonJS wrapper.
vizion.analyze
vizion.analyze({ folder: '/tmp/repo' }, callback);
import { analyze } from 'vizion';
Individual functions are exposed as methods on the `vizion` object, not as named exports from the module root. Direct destructuring imports will fail.
Callback patterns
vizion.someMethod(options, function(err, data) { /* handle error and data */ });
await vizion.someMethod(options);
Vizion's API is exclusively callback-based. There are no built-in Promise-returning versions of its methods, so `async/await` cannot be used directly without promisifying the functions.

This quickstart demonstrates how to use `vizion.analyze` to retrieve metadata from a local repository and `vizion.isUpToDate` to check its status, assuming a valid VCS (Git, SVN, or Mercurial) repository exists at the specified path. It includes a basic setup for a temporary folder, though actual VCS initialization is omitted and left to the user.

const vizion = require('vizion'); const path = require('path'); const fs = require('fs'); // Create a dummy Git repository for demonstration const testFolder = path.join(__dirname, 'test_repo_' + Date.now()); fs.mkdirSync(testFolder, { recursive: true }); console.log(`Created test folder: ${testFolder}`); // Placeholder for actual Git initialization. // In a real scenario, you'd run 'git init' and make some commits here. // For vizion to work, the folder must be a valid VCS repo. // Example: Grab metadata for a repository (replace with an actual repo path) vizion.analyze({ folder: testFolder // In a real app, this would be a real Git/SVN/HG repo path }, function(err, meta) { if (err) { console.error('Error analyzing repository:', err.message); console.error('Ensure Git/SVN/HG is installed and the folder is a valid repository.'); // Clean up dummy folder if there was an error or not a real repo fs.rmSync(testFolder, { recursive: true, force: true }); return; } console.log('Repository metadata:', JSON.stringify(meta, null, 2)); /** * Expected meta structure if it's a valid repo: * { * type : 'git', * branch : 'main', * revision : '...', etc. * } */ // Example: Check if up to date vizion.isUpToDate({ folder: testFolder }, function(err, updateMeta) { if (err) { console.error('Error checking update status:', err.message); return; } console.log('Is up to date:', updateMeta.is_up_to_date); // Clean up the dummy folder after demo fs.rmSync(testFolder, { recursive: true, force: true }); console.log(`Cleaned up test folder: ${testFolder}`); }); });
Debug
Known issues
breakingThe `vizion` library has not been actively maintained since 2017, with its last release in 2014. It may have significant compatibility issues with modern Node.js versions (e.g., v16, v18, v20+) and contemporary version control system features or command-line outputs, potentially leading to unexpected errors or incorrect metadata parsing.
fix
Consider using alternative, actively maintained libraries for repository interaction. If `vizion` must be used, thorough testing with your specific Node.js and VCS versions is required, potentially involving runtime polyfills or modifications.
affects: >=2.0
gotchaVizion relies on system-installed version control tools (Git, SVN, Mercurial). If these tools are not available in the system's PATH, or if the specified folder is not a valid repository, `vizion` operations will fail with `Error: spawn <vcs-command> ENOENT`.
fix
Ensure that the necessary VCS tools (e.g., `git`, `svn`, `hg`) are installed on the system where the Node.js application is running and are accessible via the system's PATH environment variable. Verify that the `folder` option points to an actual, initialized repository.
affects: >=1.0
gotchaThe library exclusively uses a Node.js-style callback API (`function(err, data) { ... }`). It does not provide Promise-based interfaces, making it challenging to integrate directly with modern `async/await` patterns without manual promisification, leading to potential 'callback hell' in complex flows.
fix
To use `vizion` with Promises or `async/await`, you will need to manually promisify its methods using a utility like `util.promisify` (for Node.js's built-in promisify) or a third-party library.
affects: >=1.0
breakingThe package specifies `"engines": {"node": ">=4.0"}`. While this is a minimum requirement, it signals that the library was developed for very old Node.js runtimes. It may contain deprecated Node.js API usages or exhibit unexpected behavior in newer Node.js versions, which have stricter module resolution, event loop behavior, and API changes.
fix
If encountering issues, try running the application with an older, compatible Node.js version (e.g., Node.js v4, v6, or v8) in a testing environment to confirm the library's intended behavior. For production, consider migrating to a newer library or carefully isolating `vizion` calls.
affects: >=2.0
breakingBeing unmaintained, `vizion` will not receive security updates. This means that if vulnerabilities are discovered in the library itself or in its interaction with the underlying VCS tools, these will not be patched, potentially exposing applications to security risks.
fix
Users are advised to conduct thorough security reviews if integrating `vizion` into critical systems. The most robust solution is to migrate to an actively maintained alternative that regularly receives security patches.
affects: >=2.0
Errors
Common errors & fixes
Error: spawn git ENOENT
The Git executable (or svn/hg) is not found in the system's PATH, or the specified folder is not a valid repository.
fix
Install the necessary VCS client (Git, Subversion, or Mercurial) on your system and ensure its executable directory is added to the system's PATH. Verify that the `folder` option provided to `vizion` methods points to a properly initialized and accessible repository.
TypeError: Cannot read properties of undefined (reading 'analyze')
Attempting to use `vizion.analyze` (or other methods) before the `vizion` object has been correctly imported/required, or trying to destructure functions from the module root.
fix
Ensure you are using `const vizion = require('vizion');` to import the module and then calling methods directly on the `vizion` object, e.g., `vizion.analyze(...)`. Do not use `import { analyze } from 'vizion';` as the library does not provide named exports.
(node:XXXX) UnhandledPromiseRejectionWarning: TypeError: vizion.analyze is not a function
This warning typically occurs when trying to use a CJS module with a default export in an ESM context via `import vizion from 'vizion';` and then attempting to access properties, or when attempting to `await` a callback-based function.
fix
For CommonJS, use `const vizion = require('vizion');`. If using ESM, you might need to use `import * as vizion from 'vizion';` or manually wrap the `require` call in a dynamic import or a utility. Remember that `vizion` methods are callback-based, so `await` cannot be used directly without promisifying them first.
Upgrade
Version history
0.1.7latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
vizion — npm install vizion · libregistry