![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.
@acot/core
Advanced tools
Changelog
0.0.17-canary.2 (2022-05-06)
Note: Version bump only for package acot
Readme
This module is a low layer of acot.
Install via npm:
$ npm install --save @acot/core
The following is an example of using the @acot/acot-preset-wcag preset package. Learn @acot/core
from how to use Simple and Advanced respectively.
In the simple example, it depends on the following package.
$ npm install --save puppeteer
The following is an example of specifying all audited pages and their configuration.
import { Acot, PresetLoader } from '@acot/core';
const cwd = process.cwd();
(async () => {
const loader = new PresetLoader(cwd);
const acot = new Acot({
parallel: 4,
origin: 'http://localhost:8000',
presets: [loader.load('@acot/wcag')],
cwd,
});
acot.add('/', {
rules: {
'@acot/wcag/page-has-title': ['error', null],
'@acot/wcag/page-has-valid-lang': ['warn', null],
},
});
const summary = await acot.audit();
console.log('errorCount: %f', summary.errorCount);
console.log('warningCount: %f', summary.warningCount);
console.log('passCount: %f', summary.passCount);
})();
In the advanced example, the following package is used.
The following is an example of performing an audit according to the configuration file (acot.config.js
).
import { loadConfig, ConfigRouter } from '@acot/config';
import { findChrome } from '@acot/find-chrome';
import { Acot } from '@acot/core';
const cwd = process.cwd();
(async () => {
const config = await loadConfig('.', { cwd });
const router = new ConfigRouter(config);
const acot = new Acot({
parallel: 4,
origin: 'http://localhost:8000',
presets: config.presets ?? [],
launchOptions: {
executablePath: (await findChrome())!.executablePath,
},
cwd,
});
config.paths?.forEach((path) => {
const entry = router.resolve(path);
acot.add(path, {
rules: entry.rules,
presets: entry.presets,
headers: entry.headers,
});
});
const summary = await acot.audit();
console.log('errorCount: %f', summary.errorCount);
console.log('warningCount: %f', summary.warningCount);
console.log('passCount: %f', summary.passCount);
})();
FAQs
More accessible web, all over the world.
The npm package @acot/core receives a total of 291 weekly downloads. As such, @acot/core popularity was classified as not popular.
We found that @acot/core 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.