🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

axe-puppeteer

Package Overview
Dependencies
Maintainers
5
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axe-puppeteer - npm Package Compare versions

Comparing version

to
1.1.0-canary.a1fdb6e1

8

.github/PULL_REQUEST_TEMPLATE.md
<< Describe the changes >>
Closes issue:
Closes issue: #<< ticket number >>

@@ -8,5 +8,5 @@ ## Reviewer checks

**Required fields, to be filled out by PR reviewer(s)**
- [ ] Follows the commit message policy, appropriate for next version
- [ ] Has documentation updated, a DU ticket, or requires no documentation change
- [ ] Includes new tests, or was unnecessary
- [ ] Code is reviewed for security by: << Name here >>
- [ ] Code is reviewed for accessibility
- [ ] Code is reviewed for security

@@ -1,16 +0,21 @@

# [1.0.0](http://dequelabs/axe-puppeteer/compare/v0.1.0...v1.0.0) (2019-01-23)
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
### Bug Fixes
## [1.1.0](https://github.com/dequelabs/axe-puppeteer/compare/v0.1.0...v1.1.0) (2020-04-03)
* **package-lock:** do not point at a private registry ([bf94ba5](http://dequelabs/axe-puppeteer/commits/bf94ba5))
* compile to es2015 to support older nodes ([21b2ed2](http://dequelabs/axe-puppeteer/commits/21b2ed2))
* do not depend on `puppeteer-core` ([c3f0ec9](http://dequelabs/axe-puppeteer/commits/c3f0ec9))
### Features
- update axe-core to v3.3.1 ([#28](https://github.com/dequelabs/axe-puppeteer/issues/28)) ([8ffaefb](https://github.com/dequelabs/axe-puppeteer/commit/8ffaefb118205e9753bb8079681ebecc9cef9507))
### Features
# [1.0.0](http://dequelabs/axe-puppeteer/compare/v0.1.0...v1.0.0) (2019-01-23)
* Initial implementation ([#2](http://dequelabs/axe-puppeteer/issues/2)) ([ee39774](http://dequelabs/axe-puppeteer/commits/ee39774))
### Bug Fixes
- **package-lock:** do not point at a private registry ([bf94ba5](http://dequelabs/axe-puppeteer/commits/bf94ba5))
- compile to es2015 to support older nodes ([21b2ed2](http://dequelabs/axe-puppeteer/commits/21b2ed2))
- do not depend on `puppeteer-core` ([c3f0ec9](http://dequelabs/axe-puppeteer/commits/c3f0ec9))
### Features
- Initial implementation ([#2](http://dequelabs/axe-puppeteer/issues/2)) ([ee39774](http://dequelabs/axe-puppeteer/commits/ee39774))
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -8,0 +9,0 @@ });

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());

@@ -18,6 +19,8 @@ });

analyze(callback) {
const _super = name => super[name];
const _super = Object.create(null, {
analyze: { get: () => super.analyze }
});
return __awaiter(this, void 0, void 0, function* () {
try {
return yield _super("analyze").call(this, callback);
return yield _super.analyze.call(this, callback);
}

@@ -24,0 +27,0 @@ finally {

{
"name": "axe-puppeteer",
"version": "1.0.0",
"version": "1.1.0-canary.a1fdb6e1",
"description": "Provides a chainable axe API for Puppeteer and automatically injects into all frames",
"repository": {
"type": "git",
"url": "https://github.com/dequelabs/axe-puppeteer.git"
},
"main": "dist/index.js",

@@ -21,5 +25,5 @@ "typings": "dist/index.d.ts",

"@types/mocha": "^5.2.5",
"@types/node": "^10.12.10",
"@types/node": "^12.7.5",
"@types/puppeteer": "^1.10.0",
"@types/sinon": "^5.0.7",
"@types/sinon": "^7.0.13",
"@types/test-listen": "^1.1.0",

@@ -29,11 +33,11 @@ "chai": "^4.2.0",

"husky": "^1.2.0",
"lint-staged": "^8.0.5",
"lint-staged": "^9.2.5",
"mocha": "^5.2.0",
"nyc": "^13.1.0",
"nyc": "^14.1.1",
"prettier": "^1.15.2",
"puppeteer": "^1.10.0",
"sinon": "^7.1.1",
"sinon": "^7.3.2",
"source-map-support": "^0.5.9",
"test-listen": "^1.1.0",
"ts-node": "^7.0.1",
"ts-node": "^8.3.0",
"tslint": "^5.11.0",

@@ -46,6 +50,6 @@ "tslint-config-prettier": "^1.16.0",

"dependencies": {
"axe-core": "^3.1.2"
"axe-core": "^3.5.3"
},
"peerDependencies": {
"puppeteer": "^1.10.0"
"puppeteer": "^1.10.0 || ^2.0.0"
},

@@ -98,2 +102,2 @@ "engines": {

}
}
}

@@ -6,3 +6,3 @@ # axe-puppeteer

[![License](https://img.shields.io/npm/l/axe-puppeteer.svg)](LICENSE)
[![CircleCI Build](https://circleci.com/gh/dequelabs/axe-puppeteer/tree/master.svg?style=svg)](https://circleci.com/gh/dequelabs/axe-puppeteer/tree/master)
[![CircleCI Build](https://circleci.com/gh/dequelabs/axe-puppeteer.svg?style=svg)](https://circleci.com/gh/dequelabs/axe-puppeteer)

@@ -30,13 +30,13 @@ Provides a chainable axe API for Puppeteer and automatically injects into all frames.

;(async () => {
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.setBypassCSP(true)
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.setBypassCSP(true)
await page.goto('https://dequeuniversity.com/demo/mars/')
await page.goto('https://dequeuniversity.com/demo/mars/')
const results = await new AxePuppeteer(page).analyze()
console.log(results)
const results = await new AxePuppeteer(page).analyze()
console.log(results)
await page.close()
await browser.close()
await page.close()
await browser.close()
})()

@@ -65,11 +65,11 @@ ```

;(async () => {
const browser = await puppeteer.launch()
const axeBuilder = await loadPage(
browser,
'https://dequeuniversity.com/demo/mars/'
)
const results = await axeBuilder.analyze()
console.log(results)
const browser = await puppeteer.launch()
const axeBuilder = await loadPage(
browser,
'https://dequeuniversity.com/demo/mars/'
)
const results = await axeBuilder.analyze()
console.log(results)
await browser.close()
await browser.close()
})()

@@ -76,0 +76,0 @@ ```

import * as Axe from 'axe-core'
import { Browser, Frame, Page } from 'puppeteer'
import { Browser, Frame, JSONObject, Page } from 'puppeteer'
import { pageIsLoaded, runAxe } from './browser'

@@ -229,5 +229,5 @@ import { AnalyzeCB } from './types'

runAxe,
this.config,
context,
this.axeOptions
this.config as JSONObject,
context as JSONObject,
this.axeOptions as JSONObject
)

@@ -234,0 +234,0 @@

@@ -73,6 +73,5 @@ import Axe from 'axe-core'

const url = this.fixtureFileURL('index.html')
const results = await (await loadPage(
this.browser,
url
)).analyze()
const results = await (
await loadPage(this.browser, url)
).analyze()

@@ -101,6 +100,5 @@ expect(results).to.exist

const url = this.fixtureFileURL('index.html')
const results = await (await loadPage(
this.browser,
url
)).analyze()
const results = await (
await loadPage(this.browser, url)
).analyze()

@@ -306,2 +304,27 @@ expect(results).to.exist

// See #58
describe('excluded with an array of strings', () => {
it('properly sets context.exclude', async function() {
const expected = ['.foo', '.bar', '.baz', '.qux']
const axeSource = `
window.axe = {
configure(){},
run({ exclude }){
return Promise.resolve({ exclude })
}
}
`
await this.page.goto(this.fixtureFileURL('context.html'))
const axePip = new AxePuppeteer(this.page, axeSource)
.include('.include')
.exclude(['.foo', '.bar', '.baz', '.qux'])
const { exclude: actual } = (await axePip.analyze()) as any
assert.deepEqual(actual[0], expected)
})
})
describe('with only include', function() {

@@ -308,0 +331,0 @@ it('adds .include to context', async function() {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet