-
-
Notifications
You must be signed in to change notification settings - Fork 545
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converting to ES2015, inspired by georgie105
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
Showing
10 changed files
with
1,367 additions
and
1,166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
@@ -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 | ||
|
@@ -64,4 +39,4 @@ test_script: | |
npm --version | ||
# Run test script | ||
- npm run test-ci | ||
version: "{build}" | ||
version: '{build}' |
Oops, something went wrong.