language: node_js
node_js:
  # https://github.com/nodejs/LTS
  - "4" # ends April 2018
  - "6" # ends April 2019
  - "8" # ends December 2019

sudo: false

cache:
  directories:
  - node_modules

before_install:
  - if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm install coveralls; fi

before_script:
  # Make npm run work for the script phase:
  - if [ "x$TRAVIS_NODE_VERSION" != "x8" ]; then npm config set ignore-scripts false; fi
  # these build targets only need to run once per build, so let's conserve a few resources
  # ESLint only supports Node >=4
  - if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm run lint; fi

script:
  - npm test

after_success:
  - if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm run test-coverage && cat ./coverage/lcov.info | coveralls lib; fi

git:
  depth: 10

language: node_js
node_js:
  # https://github.com/nodejs/LTS
  - "6" # ends April 2019
  - "8" # ends December 2019
  - "10" # ends April 2021

sudo: false

cache:
  directories:
  - node_modules

before_install:
  - if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm install coveralls; fi

before_script:
  # Make npm run work for the script phase:
  - if [ "x$TRAVIS_NODE_VERSION" != "x8" ]; then npm config set ignore-scripts false; fi
  # these build targets only need to run once per build, so let's conserve a few resources
  # ESLint only supports Node >=4
  - if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm run lint; fi

script:
  - npm test

after_success:
  - if [ "x$TRAVIS_NODE_VERSION" = "x8" ]; then npm run test-coverage && cat ./coverage/lcov.info | coveralls lib; fi

git:
  depth: 10

Remove Node 4 and add Node 10 to Travis config
Remove Node 4 and add Node 10 to Travis config
