
Security News
OpenCode User Hit with Hostile Backlash After Reporting Free AI Loophole
An OpenCode user faced harassment after reporting a free AI usage loophole, drawing a bitter backlash in a GitHub thread that has since been deleted.
Provides utilities for reading and writing Subunit streams with Node.js, targeting Node versions 0.10 (pre-packaged on Ubuntu Trusty) and higher.
npm install --save subunit-js
Subunit packets are represented in JavaScript like so:
{
timestamp: <Date>,
testId: <string>,
tags: <string[]>,
mime: <string>,
fileContent: <Buffer>,
fileName: <string>,
routingCode: <string>,
status: <string>
_packet: {
length: <number>
flags: {
testId: <boolean>,
routeCode: <boolean>,
timestamp: <boolean>,
runnable: <boolean>,
tags: <boolean>,
mimeType: <boolean,
eof: <boolean>,
fileContent: <boolean>
}
}
}
Note that true entries in _packet.flags generally imply an associated field
of the same name, except for runnable and eof. All fields (except _packet)
are optional and, when read, will be undefined if not included in the original
bytes. The status field is a bit special in that it
SubunitToObjectStreamSubunitToObjectStream is a transform stream that accepts Subunit bytes and
outputs objects as described above. To read a file testrepository.subunit:
var fs = require('fs');
var subunit = require('subunit-js');
fs.createReadStream('testrepository.subunit')
.pipe(new subunit.SubunitToObjectStream())
.on('data', function(packet) {
console.log(packet);
});
ObjectToSubunitStreamThe ObjectToSubunitStream is also a transform stream, but it accepts objects
as formatted above and outputs Subunit-compatible bytes.
A few notes:
status field will be looked up automatically based on its
string value (e.g. success, skip, fail, etc)_packet are ignored, except for flags.runnable and flags.eof.
These flag masks will automatically be added based on the defined values in
the packet object.As an example, this code:
var fs = require('fs');
var subunit = require('./index.js');
var stream = subunit.ObjectToSubunitStream();
stream.pipe(fs.createWriteStream('./test1.subunit'));
stream.write({
testId: 'TestyMcTestface',
status: 'success',
timestamp: new Date(),
_packet: {
flags: { runnable: true }
}
});
... is equivalent to this (save for timestamps and thus the CRC):
subunit-output --success TestyMcTestface
The streams are mostly idempotent, so they can be chained together (and perhaps mutated along the way). However, note the following:
fs.createReadStream('testrepository.subunit')
.pipe(new subunit.SubunitToObjectStream())
.on('data', function(d) {
console.log('<-', d.timestamp);
})
.pipe(new subunit.ObjectToSubunitStream())
.pipe(new subunit.SubunitToObjectStream())
.on('data', function(d) {
console.log('->', d.timestamp);
});
If you run this code, you might notice timestamps change (though the result
should otherwise be bit-identical). Since JavaScript Date values don't have
nanosecond resolution, timestamp values will be rounded down to the nearest
millisecond when read initially. This generally isn't noticeable, but may lead
to some unexpected trouble in some situations.
FAQs
Subunit stream I/O for Node
The npm package subunit-js receives a total of 0 weekly downloads. As such, subunit-js popularity was classified as not popular.
We found that subunit-js 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.

Security News
An OpenCode user faced harassment after reporting a free AI usage loophole, drawing a bitter backlash in a GitHub thread that has since been deleted.

Threat Research
/Security News
319 browser extensions installed by 13.4 million users hijack searches, capture queries, and collect referral payments from Yahoo and Bing.

Threat Research
Malicious Firefox extensions mimic Phantom, Jupiter, and Bitget wallets to steal recovery phrases and private keys, with one fetching its payload remotely.