![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
acquit-ignore
Advanced tools
Acquit plugin for removing lines of code from output
By default, acquit-ignore
will attach a transform to acquit
that removes any code in a block that's between
'// acquit:ignore:start' and '// acquit:ignore:end'.
const acquit = require('acquit');
require('acquit-ignore')();
var contents = [
'describe(\'test\', function() {',
' it(\'works\', function(done) {',
' // acquit:ignore:start',
' setup();',
' // acquit:ignore:end',
' var x = 1;',
' // acquit:ignore:start',
' assert.equal(x, 1);',
' // acquit:ignore:end',
'',
' setTimeout(function() {',
' assert.equal(x, 2);',
' // acquit:ignore:start',
' done();',
' // acquit:ignore:end',
' }, 0);',
' ++x;',
' });',
'});'
].join('\n');
const blocks = acquit.parse(contents);
assert.equal(blocks.length, 1);
assert.equal(blocks[0].blocks[0].contents, 'works');
const expectedCode = [
'var x = 1;',
'',
'setTimeout(function() {',
' assert.equal(x, 2);',
'}, 0);',
'++x;',
].join('\n');
assert.equal(blocks[0].blocks[0].code, expectedCode);
Don't like 'acquit:ignore:start' and 'acquit:ignore:end'? Set your own by setting the 'start' and 'end' options.
const acquit = require('acquit');
require('acquit-ignore')({
start: '// bacon',
end: '// eggs'
});
const contents = [
'describe(\'test\', function() {',
' it(\'works\', function(done) {',
' var x = 1;',
' // acquit:ignore:start',
' assert.equal(x, 1);',
' // acquit:ignore:end',
'',
' setTimeout(function() {',
' assert.equal(x, 2);',
' // bacon',
' done();',
' // eggs',
' }, 0);',
' ++x;',
' });',
'});'
].join('\n');
const blocks = acquit.parse(contents);
assert.equal(blocks.length, 1);
assert.equal(blocks[0].blocks[0].contents, 'works');
const expectedCode = [
'var x = 1;',
'// acquit:ignore:start',
'assert.equal(x, 1);',
'// acquit:ignore:end',
'',
'setTimeout(function() {',
' assert.equal(x, 2);',
'}, 0);',
'++x;'
].join('\n');
assert.equal(blocks[0].blocks[0].code, expectedCode);
By default, acquit-ignore attaches itself to the acquit singleton. However, you can also attach it to an acquit instance.
const instance = require('acquit')();
require('acquit-ignore')(instance, {
start: '// bacon',
end: '// eggs'
});
const contents = [
'describe(\'test\', function() {',
' it(\'works\', function(done) {',
' var x = 1;',
' // bacon',
' assert.equal(x, 1);',
' // eggs',
'',
' setTimeout(function() {',
' assert.equal(x, 2);',
' // bacon',
' done();',
' // eggs',
' }, 0);',
' ++x;',
' });',
'});'
].join('\n');
const blocks = instance.parse(contents);
assert.equal(blocks.length, 1);
assert.equal(blocks[0].blocks[0].contents, 'works');
const expectedCode = [
'var x = 1;',
'',
'setTimeout(function() {',
' assert.equal(x, 2);',
'}, 0);',
'++x;'
].join('\n');
assert.equal(blocks[0].blocks[0].code, expectedCode);
FAQs
Acquit plugin for removing lines of code from output
The npm package acquit-ignore receives a total of 104 weekly downloads. As such, acquit-ignore popularity was classified as not popular.
We found that acquit-ignore 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.