Skip to content

Commit

Permalink
Require Node.js 10
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Dec 15, 2020
1 parent aa2eec5 commit 75abf31
Show file tree
Hide file tree
Showing 10 changed files with 199 additions and 140 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI
on:
- push
- pull_request
jobs:
test:
name: Node.js ${{ matrix.node-version }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
node-version:
- 14
- 12
- 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
- uses: codecov/codecov-action@v1
if: matrix.node_version == 14
with:
fail_ci_if_error: true
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

146 changes: 100 additions & 46 deletions code-of-conduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,73 +2,127 @@

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:
Examples of behavior that contributes to a positive environment for our
community include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior by participants include:
Examples of unacceptable behavior include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
## Enforcement Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
reported to the community leaders responsible for enforcement at
[email protected].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https:/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
2 changes: 1 addition & 1 deletion license
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
79 changes: 32 additions & 47 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
"description": "Capture website screenshots",
"license": "MIT",
"repository": "sindresorhus/pageres",
"funding": "https:/sponsors/sindresorhus",
"author": {
"name": "Sindre Sorhus",
"email": "[email protected]",
"url": "sindresorhus.com"
"url": "https://sindresorhus.com"
},
"main": "dist/index.js",
"engines": {
"node": ">=8"
"node": ">=10"
},
"scripts": {
"test": "xo && nyc ava",
Expand Down Expand Up @@ -54,54 +55,48 @@
],
"dependencies": {
"array-differ": "^3.0.0",
"array-uniq": "^2.0.0",
"capture-website": "^0.8.0",
"date-fns": "^2.2.1",
"filenamify": "^3.0.0",
"filenamify-url": "^1.0.0",
"array-uniq": "^2.1.0",
"capture-website": "^1.2.6",
"date-fns": "^2.16.1",
"filenamify": "^4.2.0",
"filenamify-url": "^2.1.1",
"get-res": "^3.0.0",
"lodash.template": "^4.0.1",
"log-symbols": "^3.0.0",
"make-dir": "^3.0.0",
"p-memoize": "^3.1.0",
"plur": "^3.0.1",
"unused-filename": "^2.0.0",
"viewport-list": "^5.0.1"
"lodash.template": "^4.5.0",
"log-symbols": "^4.0.0",
"make-dir": "^3.1.0",
"p-memoize": "^4.0.1",
"plur": "^4.0.0",
"unused-filename": "^2.1.0",
"viewport-list": "^5.1.1"
},
"devDependencies": {
"@sindresorhus/tsconfig": "^0.4.0",
"@types/cookie": "^0.3.2",
"@sindresorhus/tsconfig": "^0.7.0",
"@types/cookie": "^0.4.0",
"@types/filenamify-url": "^1.0.1",
"@types/get-res": "^3.0.1",
"@types/lodash.template": "^4.4.5",
"@types/node": "^12.7.5",
"@types/lodash.template": "^4.5.0",
"@types/node": "^14.14.13",
"@types/pify": "^3.0.2",
"@types/png.js": "^0.2.0",
"@types/sinon": "^7.0.6",
"@types/sinon": "^9.0.9",
"@types/viewport-list": "^5.1.1",
"@typescript-eslint/eslint-plugin": "^2.3.0",
"@typescript-eslint/parser": "^2.2.0",
"ava": "^2.4.0",
"cookie": "^0.4.0",
"coveralls": "^3.0.0",
"del-cli": "^3.0.0",
"eslint-config-xo-typescript": "^0.18.0",
"ava": "^3.14.0",
"cookie": "^0.4.1",
"del-cli": "^3.0.1",
"file-type": "^12.3.0",
"get-port": "^5.0.0",
"image-size": "^0.8.0",
"nyc": "^14.1.1",
"get-port": "^5.1.1",
"image-size": "^0.9.3",
"nyc": "^15.1.0",
"path-exists": "^4.0.0",
"pify": "^4.0.1",
"pify": "^5.0.0",
"png.js": "^0.2.1",
"sinon": "^7.3.1",
"ts-node": "^8.0.2",
"typescript": "^3.4.1",
"xo": "^0.24.0"
"sinon": "^9.2.2",
"ts-node": "^9.1.1",
"typescript": "^4.1.3",
"xo": "^0.36.1"
},
"types": "dist/index.d.ts",
"ava": {
"babel": false,
"compileEnhancements": false,
"extensions": [
"ts"
],
Expand All @@ -110,22 +105,12 @@
]
},
"xo": {
"extends": "xo-typescript",
"extensions": [
"ts"
],
"parserOptions": {
"project": "./test/tsconfig.json"
},
"rules": {
"import/named": "off",
"import/no-unresolved": "off",
"import/first": "off",
"import/newline-after-import": "off",
"no-dupe-class-members": "off",
"ava/no-ignored-test-files": "off",
"no-await-in-loop": "off",
"@typescript-eslint/member-naming": "off"
"@typescript-eslint/no-unused-vars": "off"
}
},
"nyc": {
Expand Down
5 changes: 3 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# ![pageres](media/promo.png)

[![Build Status](https://travis-ci.org/sindresorhus/pageres.svg?branch=master)](https://travis-ci.org/sindresorhus/pageres) [![Coverage Status](https://coveralls.io/repos/sindresorhus/pageres/badge.svg?branch=master)](https://coveralls.io/r/sindresorhus/pageres?branch=master) [![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https:/xojs/xo)
[![Coverage Status](https://codecov.io/gh/sindresorhus/pageres/branch/master/graph/badge.svg)](https://codecov.io/gh/sindresorhus/pageres)
[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https:/xojs/xo)

Capture screenshots of websites in various resolutions. A good way to make sure your websites are responsive. It's speedy and generates 100 screenshots from 10 different websites in just over a minute. It can also be used to render SVG images.

Expand All @@ -26,7 +27,7 @@ const Pageres = require('pageres');
.src('data:text/html,<h1>Awesome!</h1>', ['1024x768'])
.dest(__dirname)
.run();

console.log('Finished generating screenshots!');
})();
```
Expand Down
Loading

0 comments on commit 75abf31

Please sign in to comment.