New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@qualweb/earl-reporter

Package Overview
Dependencies
Maintainers
3
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@qualweb/earl-reporter - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

38

dist/index.js

@@ -11,2 +11,36 @@ 'use strict';

const best_practices_reporter_1 = __importDefault(require("./lib/best-practices.reporter"));
const context = {
'@context': {
'@vocab': 'http://www.w3.org/ns/earl#',
'earl': 'http://www.w3.org/ns/earl#',
'WCAG20': 'http://www.w3.org/TR/WCAG20/#',
'WCAG21': 'http://www.w3.org/TR/WCAG21/#',
'dct': 'http://purl.org/dc/terms/',
'sch': 'https://schema.org/',
'doap': 'http://usefulinc.com/ns/doap#',
'foaf': 'http://xmlns.com/foaf/0.1/',
'WebPage': 'sch:WebPage',
'url': 'dct:source',
'source': 'dct:source',
'redirectedTo': 'dct:source',
'assertions': {
'@reverse': 'subject'
},
'assertedBy': {
'@type': '@id'
},
'outcome': {
'@type': '@id'
},
'mode': {
'@type': '@id'
},
'pointer': {
'@type': 'ptr:CSSSelectorPointer'
},
'title': {
'@type': 'dct:title'
}
}
};
async function generateEARLAssertions(report, date) {

@@ -48,3 +82,3 @@ switch (report.type) {

const earlReport = {
'@context': 'https://act-rules.github.io/earl-context.json',
'@context': context,
'@graph': new Array()

@@ -98,3 +132,3 @@ };

const aggregatedReport = {
'@context': 'https://act-rules.github.io/earl-context.json',
'@context': context,
'@graph': new Array()

@@ -101,0 +135,0 @@ };

6

package.json
{
"name": "@qualweb/earl-reporter",
"version": "0.2.1",
"version": "0.2.2",
"description": "Qualweb earl reporter",

@@ -28,5 +28,5 @@ "main": "dist/index.js",

"devDependencies": {
"@qualweb/types": "^0.3.1",
"@qualweb/types": "^0.3.2",
"@types/lodash.clonedeep": "^4.5.6",
"@types/node": "^12.11.1",
"@types/node": "^12.12.25",
"chai": "^4.2.0",

@@ -33,0 +33,0 @@ "mocha": "^6.2.1",

@@ -7,3 +7,4 @@ 'use strict';

Report,
EarlReport,
EarlReport,
EarlContext,
TestSubject,

@@ -20,2 +21,37 @@ Assertor,

const context: EarlContext = {
'@context': {
'@vocab': 'http://www.w3.org/ns/earl#',
'earl': 'http://www.w3.org/ns/earl#',
'WCAG20': 'http://www.w3.org/TR/WCAG20/#',
'WCAG21': 'http://www.w3.org/TR/WCAG21/#',
'dct': 'http://purl.org/dc/terms/',
'sch': 'https://schema.org/',
'doap': 'http://usefulinc.com/ns/doap#',
'foaf': 'http://xmlns.com/foaf/0.1/',
'WebPage': 'sch:WebPage',
'url': 'dct:source',
'source': 'dct:source',
'redirectedTo': 'dct:source',
'assertions': {
'@reverse': 'subject'
},
'assertedBy': {
'@type': '@id'
},
'outcome': {
'@type': '@id'
},
'mode': {
'@type': '@id'
},
'pointer': {
'@type': 'ptr:CSSSelectorPointer'
},
'title': {
'@type': 'dct:title'
}
}
};
async function generateEARLAssertions(report: Report, date?: string): Promise<Assertion[]> {

@@ -58,3 +94,3 @@ switch(report.type) {

const earlReport: EarlReport = {
'@context': 'https://act-rules.github.io/earl-context.json',
'@context': context,
'@graph': new Array<TestSubject>()

@@ -115,3 +151,3 @@ };

const aggregatedReport: EarlReport = {
'@context': 'https://act-rules.github.io/earl-context.json',
'@context': context,
'@graph': new Array<TestSubject>()

@@ -118,0 +154,0 @@ };

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc