Skip to content

Commit

Permalink
Converting to ES2015, inspired by georgie105
Browse files Browse the repository at this point in the history
More cleanup

updating linters and more fixes

Updating travis ci and removing lint errors

Updating CI test runner and eslint for console logs

Working on mocha tests, because context is a thing

More mild approach

Updating version and more ES2015 conversion
  • Loading branch information
redaktice committed Oct 7, 2020
1 parent d1f3fcc commit 768e82a
Show file tree
Hide file tree
Showing 10 changed files with 1,367 additions and 1,166 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
root: true
extends: standard
extends:
- 'eslint:recommended'
- 'plugin:node/recommended'
rules:
no-param-reassign: error
no-shadow: error
no-console: off
43 changes: 5 additions & 38 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
language: node_js
node_js:
- "0.10"
- "0.12"
- "1.8"
- "2.5"
- "3.3"
- "4.9"
- "5.12"
- "6.16"
- "7.10"
- "8.15"
- "9.11"
- '8.15'
- '9.11'
- 10
- 11
- 12
matrix:
fast_finish: true
sudo: false
Expand All @@ -22,33 +16,6 @@ before_install:
- |
# Skip updating shrinkwrap / lock
npm config set shrinkwrap false
# Setup Node.js version-specific dependencies
- |
# eslint for linting
# - remove on Node.js < 6
if [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 6 ]]; then
node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \
grep -E '^eslint(-|$)' | \
xargs npm rm --save-dev
fi
- |
# mocha for testing
# - use 3.x for Node.js < 4
# - use 5.x for Node.js < 6
if [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 4 ]]; then
npm install --save-dev [email protected]
elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 6 ]]; then
npm install --save-dev [email protected]
fi
- |
# supertest for http calls
# - use 2.0.0 for Node.js < 4
# - use 3.4.2 for Node.js < 6
if [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 4 ]]; then
npm install --save-dev [email protected]
elif [[ "$(cut -d. -f1 <<< "$TRAVIS_NODE_VERSION")" -lt 6 ]]; then
npm install --save-dev [email protected]
fi
# Update Node.js modules
- |
# Prune and rebuild node_modules
Expand Down
37 changes: 6 additions & 31 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
environment:
matrix:
- nodejs_version: "0.10"
- nodejs_version: "0.12"
- nodejs_version: "1.8"
- nodejs_version: "2.5"
- nodejs_version: "3.3"
- nodejs_version: "4.9"
- nodejs_version: "5.12"
- nodejs_version: "6.16"
- nodejs_version: "7.10"
- nodejs_version: "8.15"
- nodejs_version: "9.11"
- nodejs_version: '8.15'
- nodejs_version: '9.11'
- nodejs_version: '10'
- nodejs_version: '11'
- nodejs_version: '12'
cache:
- node_modules
install:
Expand All @@ -28,25 +22,6 @@ install:
cmd.exe /c "node -pe `"Object.keys(require('./package').devDependencies).join('\n')`"" | `
sls "^eslint(-|$)" | `
%{ npm rm --silent --save-dev $_ }
# Setup Node.js version-specific dependencies
- ps: |
# mocha for testing
# - use 3.x for Node.js < 4
# - use 5.x for Node.js < 6
if ([int]$env:nodejs_version.split(".")[0] -lt 4) {
npm install --silent --save-dev [email protected]
} elseif ([int]$env:nodejs_version.split(".")[0] -lt 6) {
npm install --silent --save-dev [email protected]
}
- ps: |
# supertest for http calls
# - use 2.0.0 for Node.js < 4
# - use 3.4.2 for Node.js < 6
if ([int]$env:nodejs_version.split(".")[0] -lt 4) {
npm install --silent --save-dev [email protected]
} elseif ([int]$env:nodejs_version.split(".")[0] -lt 6) {
npm install --silent --save-dev [email protected]
}
# Update Node.js modules
- ps: |
# Prune & rebuild node_modules
Expand All @@ -64,4 +39,4 @@ test_script:
npm --version
# Run test script
- npm run test-ci
version: "{build}"
version: '{build}'
Loading

0 comments on commit 768e82a

Please sign in to comment.