Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phantomas V2 - the final merge into the main branch #753

Merged
merged 275 commits into from
Aug 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
275 commits
Select commit Hold shift + click to select a range
f7dd1f5
Set up Travis for Chrome stable
macbre Dec 30, 2018
ab1de07
Improve tests code
macbre Dec 30, 2018
3e5b9e6
Browser: handle PHANTOMAS_CHROMIUM_EXECUTABLE env variable
macbre Dec 30, 2018
84b4473
loader: be compatible with Node.js v8
macbre Dec 30, 2018
81bc6c9
requestsMonitor: all tests now pass
macbre Dec 30, 2018
4a2fdc0
phantomas object will probably go away
macbre Dec 30, 2018
afbab88
vows: v0.8.2
macbre Dec 30, 2018
4da2f27
loader: linting + JSdoc
macbre Dec 30, 2018
004c28f
examples: show offenders
macbre Dec 30, 2018
a5eba26
Fix test/modules/requestsStats-test.js
macbre Dec 30, 2018
82168ef
test/results-test.js: offenders can be objects too
macbre Dec 30, 2018
0931e88
requestsMonitor: handle base64-encoded assets
macbre Dec 30, 2018
c3fb168
Use http-serve (with gzip compression)
macbre Dec 31, 2018
048ea8d
assetsTypes: more tests do pass now
macbre Dec 31, 2018
7b23a46
Inject core/scope.js into the browser
macbre Jan 1, 2019
971cbe5
Browser: handle connection errors within a promise
macbre Jan 1, 2019
081e8be
requestsMonitor: lowercase response headers
macbre Jan 1, 2019
23f889f
Resolve "Protocol error (Runtime.callFunctionOn): Target closed."
macbre Jan 2, 2019
3bd0460
Inject phantomas page scope JS code via page.evaluateOnNewDocument wh…
macbre Jan 6, 2019
79e29fb
domQueries: move page scope code into a separate file and run it via …
macbre Jan 6, 2019
1466493
index.js: expose the function that will pass events from page scope c…
macbre Jan 6, 2019
aa31f8c
Use __phantomas_emit to send messages from page scope code to Node.js…
macbre Jan 6, 2019
a140879
setMetric: pass calls from page scope code + default to zero when no …
macbre Jan 6, 2019
34b4953
browser: pass pageerror event from Puppeteer to phantomas + test case…
macbre Jan 6, 2019
c4a8298
Remove old core/ files that were running in PhantomJS scope
macbre Jan 8, 2019
9baa092
examples: add a short README
macbre Jan 8, 2019
f3443f7
scopeMessage: handle log and addOffender called from page scope code
macbre Jan 8, 2019
d42d891
A separate log label for phantomas.log calls from page scope code
macbre Jan 8, 2019
3163a6f
domMutations: module works again :)
macbre Jan 8, 2019
6ea4cc3
domComplexity: start a refactoring
macbre Jan 8, 2019
a236813
domComplexity: set nodesWithInlineCSS metric
macbre Jan 8, 2019
c6ff68c
documentHeight: refactor the module
macbre Jan 9, 2019
6bf839e
console: add a test case
macbre Jan 9, 2019
43abdfa
localStorageEntries: refactor a module
macbre Jan 9, 2019
bd6ae87
Browser: set phantomas-specific user agent
macbre Jan 11, 2019
dc4231b
jQuery: port the module
macbre Jan 11, 2019
a04766f
events: module ported
macbre Jan 11, 2019
e705c09
ajaxRequest: port the module
macbre Jan 12, 2019
65cefc0
globalVariables: port the module
macbre Jan 12, 2019
3f9b6eb
Scope: expose getParam function + autoload scope.js for modules
macbre Jan 12, 2019
1cec8e0
javaScriptBottlenecks: module ported
macbre Jan 12, 2019
225228d
modules: scope.js is now autoloaded if exists
macbre Jan 12, 2019
4014a97
javaScriptBottlenecks: remove debug console.log() calls
macbre Jan 12, 2019
40c221f
modules: call spyEnabled(false) to avoid incorrect reporting of event…
macbre Jan 12, 2019
b34e084
jQuery: check globalVariables offenders
macbre Jan 12, 2019
fa05081
test: comment out wait-* test - vows hangs because of them
macbre Jan 12, 2019
d6126ce
jquery-multiple: make tests more deterministic
macbre Jan 12, 2019
2bdc644
imagesScaledDown: metric works again
macbre Jan 12, 2019
e96e130
hiddenImages: set metric properly
macbre Jan 12, 2019
67b26ae
lazyLoadableImagesBelowTheFold: works again
macbre Jan 12, 2019
5b9eeb0
Emit "milestone" event + port requestsTo module
macbre Jan 13, 2019
7b8a47e
Cookie: use page.setCookie
macbre Jan 13, 2019
e6c66ba
Bring back --no-externals mode
macbre Jan 14, 2019
26edeaf
Support --allow-domain switch
macbre Jan 14, 2019
14d34c7
Travis: run on Xenial
macbre Jan 14, 2019
fa64733
requestsMonitor: properly set entry.transferedSize when requests inte…
macbre Jan 14, 2019
fe224b1
Add handling of --wait-for-network-idle
macbre Jan 19, 2019
df4b22c
Make js-redirect test pass
macbre Jan 19, 2019
f80363b
timing.html test passed as well
macbre Jan 19, 2019
9178969
Add test case for "headersBiggerThanContent" metric
macbre Jan 19, 2019
af42456
domains: structured offenders
macbre Jan 19, 2019
8215220
Structured offenders for domQueries metrics
macbre Jan 19, 2019
438f37f
nodesWithInlineCSS: structured offender
macbre Jan 19, 2019
500ce11
gzipRequests: structured offender
macbre Jan 19, 2019
ecdfa63
base64Size: add a test case
macbre Jan 19, 2019
154679d
cachingTooShort: add a test case
macbre Jan 19, 2019
4915aa7
Allow modules tests to assert offenders
macbre Jan 19, 2019
a2654a6
browser: add response.getContent() helper
macbre Jan 20, 2019
be4691a
browser.js: log how many bytes where fetched via netrwork
macbre Jan 20, 2019
a1ac85f
Install analyze-css v0.12.7
macbre Jan 20, 2019
8973a2a
Add addToAvgMetric function to Results object
macbre Jan 20, 2019
f9d5b2d
scope: expose addToAvgMetric and querySelectorAll helpers
macbre Jan 20, 2019
0712b40
analyze-css: use a npm module
macbre Jan 20, 2019
118ce1b
analyzeCss: handle inline CSS + all tests now pass
macbre Jan 20, 2019
feb243f
Use eslint instead of jshint
macbre Jan 20, 2019
2d0ec04
Remove scripts/phantomas.js
macbre Jan 20, 2019
5ac5357
eslint: work in progress (55 -> 38 problems)
macbre Jan 20, 2019
2799fea
eslint: work in progress (38 -> 18 problems)
macbre Jan 20, 2019
966ae00
Code linting completed
macbre Jan 21, 2019
452ba02
repaints: remove as there is no window.mozPaintCount in Chrome
macbre Jan 21, 2019
430e3d9
A small test case for promise API
macbre Jan 21, 2019
7cf9cd2
requestsStats: add test cases for smallestResponse and biggestRespons…
macbre Jan 22, 2019
ea85985
Add offenders for "requests" metric - url, response type and size
macbre Jan 22, 2019
11dcf0c
headers: use entry.headersSize
macbre Jan 22, 2019
8d2685f
Promise: reject when not given a string as URL
macbre Jan 22, 2019
2b37372
Update metrics metadata file
macbre Jan 22, 2019
2e5519d
Support timeout option
macbre Jan 22, 2019
175536d
Merge pull request #723 from macbre/imgbot
macbre Jan 22, 2019
837f44a
Add asserts for /jquery-ajax.html
macbre Jan 26, 2019
0a6e6bb
Travis: install Chrome version that is suggested by Puppeteer
macbre Jan 26, 2019
4dcbee8
package.json: add keywords and update js-yaml
macbre Jan 26, 2019
4d2cd71
metadata.json: add testsCovered entry
macbre Jan 26, 2019
4ae4873
Travis: run tests on Node.js LTS version only
macbre Jan 26, 2019
e6e67e2
Cover bodySize and contentLength metrics with tests
macbre Jan 26, 2019
cc19af3
Add test case for "iframesCount" metric
macbre Jan 26, 2019
480239a
/jquery-ajax.html test is flaky
macbre Jan 26, 2019
b833dbe
Revert "Travis: install Chrome version that is suggested by Puppeteer"
macbre Jan 26, 2019
d41e397
Add a test case for "notFound" metric
macbre Jan 26, 2019
1361126
browser.js: improved handling of blocked and "Not found" responses
macbre Jan 26, 2019
8647568
alerts: add a test case
macbre Jan 26, 2019
c5db797
assetsTypes: report size the same way as Chrome's dev tools do (heade…
macbre Jan 26, 2019
b4a0177
Add test case for jsonSize and jsonCount
macbre Jan 26, 2019
e8ac060
/jquery-ajax.html: set "wait-for-network-idle" option
macbre Jan 26, 2019
46b7a46
domMutations: increase test coverage
macbre Jan 26, 2019
7b8aba0
Fix /foo.json asset
macbre Jan 26, 2019
33382a8
Test case for consoleMessages
macbre Jan 26, 2019
2917364
Introduce phantomas.awaitBeforeClose()
macbre Jan 27, 2019
e99ac19
ajax-json.html: improve test stability by using "wait-for-selector" o…
macbre Jan 27, 2019
c9852e2
Remove /wait-for-selector.html tests asset
macbre Jan 27, 2019
35a41ec
Timeout should be provided in seconds, Puppeteer will then get it in …
macbre Jan 27, 2019
2f03bcf
waitForEvent: handle wait-for-event option + test cases
macbre Jan 27, 2019
b925b70
phantomas.awaitBeforeClose: pass page object to the closure
macbre Jan 27, 2019
513d803
Handle post-load-delay option
macbre Jan 27, 2019
0d0f207
Update README files
macbre Jan 27, 2019
d44cb90
Handle page-source option
macbre Jan 27, 2019
ed7a186
Introduce test/integration-test-extra.js + test "page-source" option …
macbre Jan 27, 2019
f1ead3e
Ignore HTML files
macbre Jan 27, 2019
cd186ec
Check the coverage of options tests
macbre Jan 27, 2019
7ef7877
Handle "screenshot" option
macbre Jan 27, 2019
dc2ac35
Add test cases for "screenshot" option
macbre Jan 27, 2019
3b25349
analyzeCss: use phantomas.awaitBeforeClose() to avoid race condition …
macbre Jan 27, 2019
405b53d
Handle "scroll" option + test cases
macbre Jan 28, 2019
c1f8a27
devices: read descriptors from puppeteer/DeviceDescriptors
macbre Feb 1, 2019
e5ea316
lib/index.js: awaitEmit - first rought implementation
macbre Feb 1, 2019
f16bdeb
AwaitEventEmitter: drop-in replacement for EventEmitter
macbre Feb 1, 2019
171d118
Use beforeClose event instead of a custom phantomas.awaitBeforeClose(…
macbre Feb 1, 2019
217425a
devices: add integration test cases
macbre Feb 2, 2019
7bdf51d
jshint: remove code annotations and config from package.json
macbre Feb 2, 2019
89eacbf
har: not all fields are set, but hey - now it works :)
macbre Feb 2, 2019
46db610
/https-fonts.html: add a test case
macbre Feb 2, 2019
f17b04a
Detect brotli compression
macbre Feb 2, 2019
d5494ed
staticAssets: add an integration test
macbre Feb 2, 2019
96554bc
httpAuth: handle HTTP authentication
macbre Feb 2, 2019
33e42c0
Merge pull request #726 from macbre/v2-headless
macbre Feb 2, 2019
ffe5512
init: switch event's arguments order
macbre Feb 2, 2019
6e78b8e
lib: document "core" events
macbre Feb 2, 2019
9174a34
core/modules: milestone and responseEnd event documented
macbre Feb 2, 2019
6dcff7a
jserror: pass variables with an event
macbre Feb 2, 2019
2435974
metadata: add events from core modules
macbre Feb 3, 2019
c3b804a
Add events from /lib files
macbre Feb 3, 2019
5ef561f
metadata: add modules metadata
macbre Feb 3, 2019
e3ed7e6
More modules metadata
macbre Feb 3, 2019
89ba5f9
More module descriptions
macbre Feb 3, 2019
2bfd9f6
Metadata: add extensions
macbre Feb 3, 2019
31831db
Merge pull request #730 from macbre/events-docs
macbre Feb 3, 2019
ca0b606
lib/metadata/generate.js: update docs
macbre Feb 3, 2019
24e9220
Introduce "npm run make-docs" (#729)
macbre Feb 3, 2019
b1b5ac1
events.md: add real-life examples of data passed to events
macbre Feb 3, 2019
d2772ce
Add docs/metrics.md: see #728
macbre Feb 3, 2019
e804637
metrics.md: minor style tweaks
macbre Feb 3, 2019
4ba11a5
metrics.md: add some stats
macbre Feb 3, 2019
91024e7
metrics.md: add offenders examples
macbre Feb 3, 2019
4047c62
Merge pull request #731 from macbre/automate-docs-generation
macbre Feb 3, 2019
655247e
README.md: make this file a bit smaller, refer to /docs
macbre Feb 3, 2019
33ce9ce
README: add npm module usage example
macbre Feb 3, 2019
77eeba6
phantomas: expose getMetric function
macbre Feb 23, 2019
4ba6055
windowPerformance in headless Chrome (resolves #732)
macbre Feb 23, 2019
b35d470
timeToFirstByte: fix setting timeToFirstByte and timeToLastByte
macbre Feb 23, 2019
9e3d32e
Merge pull request #733 from macbre/windowPerformance-issue-732
macbre Feb 23, 2019
f665023
New metric proposal "synchronousXHR"
macbre Feb 23, 2019
1c0d4f7
synchronousXHR: update auto-generate docs and metadata file
macbre Feb 23, 2019
de21572
Merge pull request #734 from macbre/gmetais-sync-xhr
macbre Feb 23, 2019
5d76840
DNS and Connect timings (resolves #477)
macbre Feb 23, 2019
5b1cffe
performanceTiming:: update docs and metadata
macbre Feb 23, 2019
496d122
Merge pull request #735 from macbre/dns-timing
macbre Feb 23, 2019
11439ec
Update dependencies
macbre Feb 23, 2019
80120d5
Install [email protected]
macbre Mar 5, 2019
3be88bb
browser: take encodedDataLength value from "Network.loadingFinished" …
macbre Mar 5, 2019
1892d6d
performanceTimingConnect: test is flaky
macbre Mar 5, 2019
d13a296
responseSize: do not add headersSize to transferedSize
macbre Mar 5, 2019
f942013
Improved handling of HTTP 404 responses
macbre Mar 5, 2019
8fddc21
Improve header size calculation
macbre Mar 5, 2019
a62c16e
test/integration-spec.yaml: comment out headersBiggerThanContent sect…
macbre Mar 5, 2019
cb96ec6
eslint: remove "global" annotations
macbre Mar 5, 2019
3732ade
Merge pull request #736 from macbre/update-dependencies
macbre Mar 5, 2019
50c07cf
puppeteer: use v1.15.0 (HeadlessChrome/75.0.3765.0)
macbre May 1, 2019
ed53b01
Travis | do not use system-wide Chrome binary
macbre May 1, 2019
7fccf36
Merge pull request #742 from macbre/puppeteer-v1.15.0
macbre May 1, 2019
1e29d90
Dockerfile - initial commit
macbre May 3, 2019
a38291a
alpine | use a system-wide chromium binary
macbre May 3, 2019
99cb082
Upgrade js-yaml to resolve security issues
macbre May 3, 2019
ce56cda
Merge pull request #743 from macbre/security-fix
macbre May 3, 2019
d3928d0
puppeteer.launch - catch and log exceptions
macbre May 3, 2019
c55e138
Tell phantomas were Chromium binary is
macbre May 3, 2019
84b9cd6
Docker - run using --no-sandbox (we are already in a isolated namespace)
macbre May 3, 2019
f30db9b
Dockerfile - improved caching of dependencies
macbre May 3, 2019
5f7b71e
Merge remote-tracking branch 'origin/phantomas-v2' into puppeteer-in-…
macbre May 3, 2019
6083d90
build(deps): bump eslint-utils from 1.3.1 to 1.4.3
dependabot[bot] Nov 1, 2019
375d696
Merge pull request #747 from macbre/dependabot/npm_and_yarn/eslint-ut…
macbre Nov 3, 2019
b2fd5fb
build(deps): bump lodash from 4.17.11 to 4.17.15
dependabot[bot] Nov 3, 2019
e5daa9b
Merge pull request #748 from macbre/dependabot/npm_and_yarn/lodash-4.…
macbre Mar 6, 2020
9a06bcc
build(deps): bump acorn from 6.1.0 to 6.4.1
dependabot[bot] Mar 14, 2020
09ba67e
build(deps): bump https-proxy-agent from 2.2.1 to 2.2.4
dependabot[bot] Apr 16, 2020
8ded69e
Merge pull request #750 from macbre/dependabot/npm_and_yarn/acorn-6.4.1
macbre Jun 16, 2020
8ff23a8
Merge pull request #751 from macbre/dependabot/npm_and_yarn/https-pro…
macbre Jun 16, 2020
9be7ee7
build(deps): bump lodash from 4.17.15 to 4.17.19
dependabot[bot] Jul 16, 2020
684a85b
Merge pull request #752 from macbre/dependabot/npm_and_yarn/lodash-4.…
macbre Jul 16, 2020
b6a41bd
Use Puppeteer v3.0.0
macbre Jul 23, 2020
bb0ad12
Use node:14-alpine
macbre Jul 24, 2020
9aaf496
Set up GitHub Actions and Dependabot
macbre Jul 24, 2020
21bf992
Merge remote-tracking branch 'origin/phantomas-v2' into puppeteer-in-…
macbre Jul 24, 2020
1d41f01
chromium-browser with flags
macbre Jul 24, 2020
878eb09
Run chromium-browser --no-sandbox --version when building Docker image
macbre Jul 25, 2020
6541ced
GitHub Actions: build an image
macbre Jul 25, 2020
3bd584a
Get rid of Travis integration
macbre Jul 25, 2020
2f0f4ba
.dockerignore: skip more files
macbre Jul 26, 2020
6f11eaa
Install tini
macbre Jul 26, 2020
e541c22
Dockerfile: paths simplified
macbre Jul 26, 2020
354b03d
Update dependencies
macbre Jul 26, 2020
05e7a16
Run tests inside the Docker container
macbre Jul 26, 2020
1ef5ec0
docker run - the input device is not a TTY
macbre Jul 26, 2020
95a22de
Use the latest puppeteer (v5.2.1)
Jul 27, 2020
b468a09
Install Chrome as provided by puppeteer npm module
Jul 27, 2020
d67e212
Install Chrome binary via npm install (and its dependencies via apt)
Jul 27, 2020
d5c1d7d
dockerimage.yml: tests invocation changed
Jul 27, 2020
1fc182a
run_tests.sh: exit with error when npm test fails
macbre Jul 27, 2020
86ba09c
Bring back .travis.yml
Jul 28, 2020
6206da1
eslint upgraded
Jul 28, 2020
029af50
Upgrade glob and js-yaml
Jul 28, 2020
b001519
Install optimist-config-file to make phantomas "binary" work
Jul 28, 2020
8870640
windowPerformance.js: fix the way window.performance.timing are passe…
Jul 28, 2020
5b5a1b4
bin/phantomas.js: temp change to make it work using more recent Node.…
Jul 28, 2020
b0899ad
run_tests is run inside Docker container where examples/ does not exi…
Jul 28, 2020
4aae364
Merge pull request #744 from macbre/puppeteer-in-docker
macbre Jul 28, 2020
c847816
npm audit fix
Jul 28, 2020
dc50ef1
Merge remote-tracking branch 'origin/devel' into phantomas-v2
Jul 28, 2020
f969faa
build(deps): bump async from 2.6.3 to 3.2.0
dependabot[bot] Jul 29, 2020
8d013bb
build(deps): bump csv-string from 3.2.0 to 4.0.1
dependabot[bot] Jul 29, 2020
46ca303
Merge pull request #754 from macbre/dependabot/npm_and_yarn/async-3.2.0
macbre Jul 29, 2020
c8ff53c
Merge branch 'phantomas-v2' into dependabot/npm_and_yarn/csv-string-4…
macbre Jul 29, 2020
7251b64
Merge pull request #755 from macbre/dependabot/npm_and_yarn/csv-strin…
macbre Jul 29, 2020
e9d2b2c
Add inch-ci.org badge
macbre Jul 30, 2020
60814df
package.json - update project description
macbre Jul 30, 2020
356bb0a
build(deps-dev): bump eslint from 7.5.0 to 7.6.0
dependabot[bot] Aug 3, 2020
ce7606c
Merge pull request #756 from macbre/dependabot/npm_and_yarn/eslint-7.6.0
macbre Aug 3, 2020
03fb4f3
Run tests using Node.js 12.x too
macbre Aug 6, 2020
8b367b9
Merge pull request #757 from macbre/test-nodejs-12x
macbre Aug 6, 2020
a85ecfb
Delete .travis.yml
macbre Aug 6, 2020
8289555
Use http-server for tests (fixes qs security issue)
macbre Aug 6, 2020
fe87e29
Merge pull request #758 from macbre/use-http-server
macbre Aug 6, 2020
e9ad739
Browser.close - check if there is a browser to call close() on
macbre Aug 6, 2020
7ae5485
Merge pull request #759 from macbre/browser-close-fix
macbre Aug 6, 2020
aa91a0c
2.0.0-alpha1
macbre Aug 6, 2020
1212311
build(deps): bump analyze-css from 0.12.10 to 0.12.11
dependabot[bot] Aug 7, 2020
8e6b5df
Merge pull request #760 from macbre/dependabot/npm_and_yarn/analyze-c…
macbre Aug 7, 2020
8216290
.npmignore: make npm package a bit smaller
macbre Aug 7, 2020
936ccca
Bump minimum Node.js version to 12.x
macbre Aug 7, 2020
6a736f9
.eslintrc.yml: make settings more explicit
macbre Aug 7, 2020
a294105
Fixing "No usable sandbox"
macbre Aug 7, 2020
42c3637
Remove mentions of PhantomJS
macbre Aug 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Dockerfile
docs/
examples/
node_modules/
*.png
*.html
*.md
271 changes: 271 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
env:
es2017: true
node: true
browser: true
extends: 'eslint:recommended'
rules:
accessor-pairs: error
array-bracket-newline: error
array-bracket-spacing:
- error
- never
array-callback-return: 'off'
array-element-newline: 'off'
arrow-body-style: 'off'
arrow-parens: 'off'
arrow-spacing:
- error
- after: true
before: true
block-scoped-var: 'off'
block-spacing: error
brace-style: 'off'
callback-return: 'off'
camelcase: 'off'
capitalized-comments: 'off'
class-methods-use-this: error
comma-dangle: 'off'
comma-spacing: 'off'
comma-style:
- error
- last
complexity: 'off'
computed-property-spacing:
- error
- never
consistent-return: 'off'
consistent-this: 'off'
curly: 'off'
default-case: 'off'
dot-location:
- error
- object
dot-notation: 'off'
eol-last: 'off'
eqeqeq: 'off'
func-call-spacing: error
func-name-matching: error
func-names: 'off'
func-style: 'off'
function-paren-newline: 'off'
generator-star-spacing: error
global-require: 'off'
guard-for-in: 'off'
handle-callback-err: 'off'
id-blacklist: error
id-length: 'off'
id-match: error
implicit-arrow-linebreak:
- error
- beside
indent: 'off'
indent-legacy: 'off'
init-declarations: 'off'
jsx-quotes: error
key-spacing: 'off'
keyword-spacing: 'off'
line-comment-position: 'off'
linebreak-style:
- error
- unix
lines-around-comment: 'off'
lines-around-directive: 'off'
lines-between-class-members: error
max-classes-per-file: error
max-depth: 'off'
max-len: 'off'
max-lines: 'off'
max-lines-per-function: 'off'
max-nested-callbacks: error
max-params: 'off'
max-statements: 'off'
max-statements-per-line: error
multiline-comment-style: 'off'
multiline-ternary:
- error
- always-multiline
new-parens: error
newline-after-var: 'off'
newline-before-return: 'off'
newline-per-chained-call: 'off'
no-alert: error
no-array-constructor: error
no-async-promise-executor: 'off'
no-await-in-loop: error
no-bitwise:
- error
- int32Hint: true
no-buffer-constructor: error
no-caller: error
no-catch-shadow: error
no-console: 'off'
no-cond-assign:
- error
- except-parens
no-confusing-arrow: error
no-continue: 'off'
no-div-regex: error
no-duplicate-imports: error
no-else-return: 'off'
no-empty:
- error
- allowEmptyCatch: true
no-empty-function: 'off'
no-eq-null: error
no-eval: error
no-extend-native: error
no-extra-bind: 'off'
no-extra-label: error
no-extra-parens: 'off'
no-floating-decimal: error
no-implicit-globals: error
no-implied-eval: error
no-inline-comments: 'off'
no-inner-declarations:
- error
- functions
no-invalid-this: 'off'
no-iterator: error
no-label-var: error
no-labels: error
no-lone-blocks: error
no-lonely-if: 'off'
no-loop-func: 'off'
no-magic-numbers: 'off'
no-misleading-character-class: error
no-mixed-operators: 'off'
no-mixed-requires: 'off'
no-multi-assign: 'off'
no-multi-spaces:
- error
- ignoreEOLComments: true
no-multi-str: error
no-multiple-empty-lines: error
no-native-reassign: error
no-negated-condition: 'off'
no-negated-in-lhs: error
no-nested-ternary: error
no-new: 'off'
no-new-func: error
no-new-object: error
no-new-require: error
no-new-wrappers: error
no-octal-escape: error
no-param-reassign: 'off'
no-path-concat: 'off'
no-plusplus: 'off'
no-process-env: error
no-process-exit: 'off'
no-proto: error
no-prototype-builtins: 'off'
no-restricted-globals: error
no-restricted-imports: error
no-restricted-modules: error
no-restricted-properties: error
no-restricted-syntax: error
no-return-assign: 'off'
no-return-await: error
no-script-url: error
no-self-compare: error
no-sequences: error
no-shadow: 'off'
no-shadow-restricted-names: error
no-spaced-func: error
no-sync: 'off'
no-tabs: 'off'
no-template-curly-in-string: error
no-ternary: 'off'
no-throw-literal: error
no-trailing-spaces:
- error
- ignoreComments: true
skipBlankLines: true
no-undef-init: error
no-undefined: 'off'
no-underscore-dangle: 'off'
no-unmodified-loop-condition: 'off'
no-unneeded-ternary: error
no-use-before-define: 'off'
no-useless-call: error
no-useless-catch: error
no-useless-computed-key: error
no-useless-concat: error
no-useless-constructor: error
no-useless-rename: error
no-useless-return: error
no-var: 'off'
no-void: error
no-warning-comments: 'off'
no-whitespace-before-property: error
no-with: error
nonblock-statement-body-position:
- error
- any
object-curly-newline: error
object-curly-spacing: 'off'
object-property-newline: 'off'
object-shorthand: 'off'
one-var: 'off'
one-var-declaration-per-line: 'off'
operator-assignment: 'off'
operator-linebreak:
- error
- after
padded-blocks: 'off'
padding-line-between-statements: error
prefer-arrow-callback: 'off'
prefer-const: error
prefer-destructuring: 'off'
prefer-numeric-literals: error
prefer-object-spread: error
prefer-promise-reject-errors: error
prefer-reflect: 'off'
prefer-rest-params: 'off'
prefer-spread: 'off'
prefer-template: 'off'
quote-props: 'off'
quotes: 'off'
radix: 'off'
require-atomic-updates: 'off'
require-await: 'off'
require-jsdoc: 'off'
require-unicode-regexp: 'off'
rest-spread-spacing: error
semi: 'off'
semi-spacing:
- error
- after: true
before: false
semi-style:
- error
- last
sort-imports: error
sort-keys: 'off'
sort-vars: 'off'
space-before-blocks: error
space-before-function-paren: 'off'
space-in-parens: 'off'
space-infix-ops: error
space-unary-ops:
- error
- nonwords: false
words: false
spaced-comment: 'off'
strict: 'off'
switch-colon-spacing: error
symbol-description: error
template-curly-spacing: error
template-tag-spacing: error
unicode-bom:
- error
- never
valid-jsdoc: 'off'
vars-on-top: 'off'
wrap-iife:
- error
- any
wrap-regex: 'off'
yield-star-spacing: error
yoda:
- error
- never
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Basic set up
# https://help.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#package-ecosystem

version: 2
updates:

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
20 changes: 20 additions & 0 deletions .github/workflows/dockerimage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check if a Docker image can be built

on: [push]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Build the Docker image
run: |
docker build . --tag ${{ github.repository }}
docker images

- name: Run tests inside the Docker container
run: |
docker run ${{ github.repository }} ./run_tests.sh
35 changes: 35 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ phantomas-v2 ]
pull_request:
branches: [ phantomas-v2 ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Run tests
run: |
sh test/server-start.sh &
npm test
npm run-script lint
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ log
*.swp
*.har
filmstrip
html

examples/*.png
*.png

phantomas_*.html

node_modules
npm-debug.log
Expand Down
8 changes: 8 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
.github/
docs/
examples/
test/

.*
*.html
*.png
*.sh
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

Loading