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

Switch to node8 & npm5 #2323

Merged
merged 11 commits into from
Feb 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@ version: 2.0
# Inspired by:
# https://github.com/CircleCI-Public/circleci-demo-workflows/blob/workspace-forwarding/.circleci/config.yml
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
#
# For list of official CircleCI node.js images, go to:
# https://hub.docker.com/r/circleci/node/tags/

jobs:
build:
docker:
- image: circleci/node:6.10.3
- image: circleci/node:8.9.4
working_directory: ~/plotly.js
steps:
- checkout
- restore_cache:
keys:
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package.json" }}
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-master-{{ checksum "package.json" }}
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package-lock.json" }}
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-master-{{ checksum "package-lock.json" }}
- run:
name: Install dependencies
command: |
npm install
npm dedupe
npm prune
npm install
- run:
name: List dependency versions
command: |
Expand All @@ -47,7 +47,7 @@ jobs:
test-jasmine:
docker:
# need '-browsers' version to test in real (xvfb-wrapped) browsers
- image: circleci/node:6.10.3-browsers
- image: circleci/node:8.9.4-browsers
working_directory: ~/plotly.js
steps:
- checkout
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:

test-syntax:
docker:
- image: circleci/node:6.10.3
- image: circleci/node:8.9.4
working_directory: ~/plotly.js
steps:
- checkout
Expand Down
8 changes: 5 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"no-trailing-spaces": [2],
"no-multiple-empty-lines": [2, {"max": 2, "maxEOF": 0}],
"eol-last": [2],
"indent": [2, 4, {"SwitchCase": 1}],
"indent": [0],
"indent-legacy": [2, 4, {"SwitchCase": 1}],
"max-len": [0, 80],
"brace-style": [0, "stroustrup", {"allowSingleLine": true}],
"curly": [2, "multi-line"],
Expand All @@ -46,7 +47,7 @@
"space-before-blocks": [2],
"spaced-comment": [2, "always"],
"no-tabs": [2],
"no-multi-spaces": [2],
"no-multi-spaces": [2, {"ignoreEOLComments": true}],
"no-whitespace-before-property": [2],
"no-unexpected-multiline": [2],
"no-floating-decimal": [2],
Expand All @@ -65,6 +66,7 @@
"no-use-before-define": [2, "nofunc"],
"no-loop-func": [2],
"no-console": [0],
"no-unused-labels": [2]
"no-unused-labels": [2],
"no-useless-escape": [0]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how badly do we break this rule?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this bad:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and they are not auto-fixable (using eslint . --fix) unfortunately.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and I don't want to waste time with linting stuff. I really think we should be switching to standardjs and be done with it (cc #950) 😛

}
}
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Developers are strongly encouraged to first make a PR to their own plotly.js for
Before opening a pull request, developer should:

- `git rebase` their local branch off the latest `master`,
- make sure to **not** `git add` the `dist/` folder (the `dist/` is updated only on verion bumps),
- make sure to **not** `git add` the `dist/` folder (the `dist/` is updated only on version bumps),
- make sure to commit changes to the `package-lock.json` file (if any),
- write an overview of what the PR attempts to do,
- select the _Allow edits from maintainers_ option (see this [article](https://help.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) for more details).

Expand Down
17 changes: 11 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,24 @@ We use the following [labels](https://github.com/plotly/plotly.js/labels) to tra
| `type: community` | issue left open for community input and pull requests |
| `type: duplicate` | *self-explanatory* |
| `type: wontfix` | *self-explanatory* |
| `status: discussion needed` | Issue or PR that required discussion among maintaners before moving forward |
| `status: in progress` | PRs that required some intial feedback but not ready to merge |
| `status: discussion needed` | Issue or PR that required discussion among maintainers before moving forward |
| `status: in progress` | PRs that required some initial feedback but not ready to merge |
| `status: reviewable` | PRs that are completed from the author's perspective |
| `status: on hold` | PRs that are put on hold |

## Development

#### Perequisites
#### Prerequisites

- git
- [node.js](https://nodejs.org/en/). We recommend using node.js v6.x or v4.x (both LTS).
Upgrading and managing node versions can be easily done using
[`nvm`](https://github.com/creationix/nvm) or its Windows alternatives.
- [node.js](https://nodejs.org/en/). We recommend using node.js v8.x, but all
versions starting from v4 should work. Upgrading and managing node versions
can be easily done using [`nvm`](https://github.com/creationix/nvm) or its
Windows alternatives.
- [`npm`](https://www.npmjs.com/) v5.x and up (which ships by default with
node.js v8.x) to ensure that the
[`package-lock.json`](https://docs.npmjs.com/files/package-lock.json) file is
used and updated correctly.

#### Step 1: Clone the plotly.js repo and install its dependencies

Expand Down
Loading