![New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions](https://cdn.sanity.io/images/cgdhsj6q/production/86e6ebdea652d20da070ebbda20134b839972db7-1024x1024.webp?w=800&fit=max&auto=format)
Security News
New axobject-query Maintainer Faces Backlash Over Controversial Decision to Support Legacy Node.js Versions
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
4b82
Advanced tools
Readme
ps. 4B82 is the first four symbols of the hash value for the GIT empty-tree "tree 0\0" 4b825dc642cb6eb9a060e54bf8d69288fbee4904
The goal of this project is to allow a straightforward and robust way to establish abstract, provably immutable sequences of digital events.
Currently existing methods for attaining this rely on highly specialized software, are computationally demanding, or both.
We have decided to use GIT’s architectural framework as the core implementing this functionality because of its versatility, robustness, strong safeguards against corruption, as well as its self-evidential flexibility.
Strict linearity was achieved by leveraging hash functionality typical to all git-like solutions while eschewing branching functionality, and was done in a manner that minimizes unnecessary (for our purposes) overhead of typical git object behaviors (but does not compromise the formal integrity of the git structures involved).
Read more about 4b82 Continuity Trustcenter Framework at 4b82.com
Initialize an empty git repository:
mkdir git-repo && cd git-repo git init cd ..
Create the new node.js project:
mkdir 4b82-server && cd 4b82-server npm init
Add 4b82 code from npm:
npm install 4b82 --save
Now, you can use 4b82 functions and make your own 4b82 server.
Note: all callback functions are function (err, result)
or function (err)
. if an error occurs then err
object will be passed to callback function. Otherwise, err
object is null
and result
object will be passed to the callback function (if result is exists).
First, it is necessary to initialize the application.
During initialization, it is necessary to pass a configuration object
. Currently, this object is simple and includes a git
field. This field is an object with the path
field which stores the path to the GIT repository. For example:
{ git: { path: 'path-to-git' } }
function init (conf)
Arguments | Description |
---|---|
conf | Configuration object (see above) |
Before you make any changes to the GIT-repository, you must obtain an exclusive access to GIT-repository at the application level.
Important: please, do not forget to call releaseAccess()
and to release exclusive access to the repository at the end of the operation.
Important: exclusive access is provided only at the application logic level, not the system level.
function getAccess (callback)
Arguments | Description |
---|---|
callback (err) | Callback function that calls immediately after receiving the exclusive access to the GIT repository |
function releaseAccess ()
Arguments | Description |
---|---|
none | Releases the exclusive access to the GIT repository |
function addCommit (message, author, committer, callback)
Arguments | Description |
---|---|
message | Commit message |
author | Commit author |
committer | Committer (your system) |
callback (err, commit) | Callback function that receives commit object after adding or error |
function getRecentCommit (callback)
Arguments | Description |
---|---|
callback (err, commit) | Callback function that receives commit object after adding or error. If there is no commits, null is returned. |
function getCommit (hash, callback)
Arguments | Description |
---|---|
hash | The hash value for the desired commit |
callback (err, commit) | Callback function that receives commit object after adding or error. If there is no commits, null is returned. |
function prettyPrint (commit)
- show information about commit
Arguments | Description |
---|---|
commit | Commit object returned by addCommit , getRecentCommit or getCommit functions |
A simple application that adds commit to our fresh 4b82 git repository:
var _4b82 = require('4b82'); var config = { git: { path: '~/git-path/' } // Path to git repository } // Initialize 4b82 _4b82.init(config, function (err) { if (err) return console.error(err); // Get exclusive access to GIT _4b82.getAccess(function () { // Add commit _4b82.addCommit('test commit', 'me <me@localhost>', 'me <me@localhost>', function (err, commit) { if (err) { _4b82.releaseAccess(); return console.error(err); } // Print commit data _4b82.prettyPrint(commit); // Release access _4b82.releaseAccess(); }); }); });
When you run this application it adds new commit to 4b82 git repository and prints the commit hash
, data
and deflated bytes
.
To get specific commit use getCommit
function:
// Initialize 4b82 _4b82.init(config, function (err) { if (err) return console.error(err); // Get commit data _4b82.getCommit(hash, function (err, commit) { if (err) return console.error(err); // Print commit data _4b82.prettyPrint(commit); }) });
This function returns commit object (with tag field).
commit
contains whole git commit data, you can parse it for author, committer, e.t.c.
tag
field uses for backward navigation (read more about backward navigation).
That's all.
FAQs
4b82 Continuity Trustcenter Framework
The npm package 4b82 receives a total of 6 weekly downloads. As such, 4b82 popularity was classified as not popular.
We found that 4b82 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.
Security News
Results from the 2023 State of JavaScript Survey highlight key trends, including Vite's dominance, rising TypeScript adoption, and the enduring popularity of React. Discover more insights on developer preferences and technology usage.
Security News
The US Justice Department has penalized two consulting firms $11.3 million for failing to meet cybersecurity requirements on federally funded projects, emphasizing strict enforcement to protect sensitive government data.