-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Breaking change: Update
engines
to Node 10+
- Linting: As per latest eslint config - Linting: Add `--report-unused-disable-directives` flag - Linting: Switch to `.eslintrc.js` so can add comments - CI: Add `travis.yml` - Testing: Make `nyc` separate script and add it and `lint` to `test` script - Maintenance: Add `.ncurc.js` config to allow `npm-check-updates` to avoid auto-updating peerDeps. - npm: Update deps. (esm, ws) and devDeps.
- Loading branch information
Showing
9 changed files
with
109 additions
and
51 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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
extends: 'airbnb/base', | ||
overrides: [ | ||
{ | ||
files: '.eslintrc.js', | ||
parserOptions: { | ||
sourceType: 'script' | ||
}, | ||
// airbnb's config here is too inflexible as it prevents strict mode | ||
// even with scripts, so set to `safe` | ||
// Changed: https://github.com/airbnb/javascript/pull/1962 | ||
rules: { | ||
strict: ['error', 'safe'] | ||
} | ||
}, | ||
{ | ||
files: ['examples/**'], | ||
rules: { | ||
'no-console': 0 | ||
} | ||
}, | ||
{ | ||
files: ['test/**'], | ||
env: { | ||
mocha: true | ||
}, | ||
globals: { | ||
expect: true | ||
}, | ||
rules: { | ||
'no-console': 0, | ||
// Is otherwise reporting in Atom ESLint linter (though not on command line) | ||
'import/no-extraneous-dependencies': 0 | ||
} | ||
} | ||
], | ||
rules: { | ||
'comma-dangle': 0, | ||
'no-param-reassign': 0 | ||
} | ||
}; |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
// Whitelist all for checking besides `peer` which indicates | ||
// somewhat older versions of peer deps. we still support even | ||
// while our devDeps point to a more recent version | ||
"dep": "prod,dev,optional,bundle" | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
language: node_js | ||
node_js: | ||
- 14 | ||
- 12 | ||
- 10 | ||
|
||
notifications: | ||
email: false | ||
|
||
script: | ||
- npm ci | ||
- 'if [ -n "${LINT-}" ]; then npm run lint; fi' | ||
|
||
before_install: | ||
- npm config set depth 0 | ||
|
||
before_script: > | ||
node_version=$(node -v); | ||
npm install --no-save "express@${EXPRESS}" | ||
env: | ||
matrix: | ||
- EXPRESS=4 | ||
- EXPRESS=5.0.0-alpha.8 | ||
matrix: | ||
fast_finish: true | ||
include: | ||
- node_js: 'lts/*' | ||
env: LINT=true | ||
# If Express exclusions needed by Node version | ||
# exclude: | ||
# - node_js: 10 | ||
# env: EXPRESS=7 |
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
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
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
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 |
---|---|---|
|
@@ -6,8 +6,9 @@ | |
"module": "src/index", | ||
"scripts": { | ||
"mocha": "mocha --require esm --require chai/register-expect --timeout 20000 test", | ||
"test": "echo 'Blanking out cache for ESM/nyc that can get corrupted by terminated processes...' && rm -Rf ./node_modules/.cache && nyc npm run mocha", | ||
"lint": "eslint ." | ||
"nyc": "echo 'Blanking out cache for ESM/nyc that can get corrupted by terminated processes...' && rm -Rf ./node_modules/.cache && nyc npm run mocha", | ||
"lint": "eslint --report-unused-disable-directives .", | ||
"test": "npm run lint && npm run nyc" | ||
}, | ||
"author": "Henning Morud <[email protected]>", | ||
"contributors": [ | ||
|
@@ -21,7 +22,7 @@ | |
], | ||
"license": "BSD-2-Clause", | ||
"engines": { | ||
"node": ">=4.5.0" | ||
"node": ">=10.0.0" | ||
}, | ||
"directories": { | ||
"example": "examples" | ||
|
@@ -40,19 +41,19 @@ | |
}, | ||
"homepage": "https://github.com/HenningM/express-ws", | ||
"dependencies": { | ||
"esm": "^3.0.84", | ||
"ws": "^6.0.0" | ||
"esm": "^3.2.25", | ||
"ws": "^7.3.1" | ||
}, | ||
"peerDependencies": { | ||
"express": "^4.0.0 || ^5.0.0-alpha.1" | ||
}, | ||
"devDependencies": { | ||
"chai": "^4.2.0", | ||
"eslint": "^4.19.0", | ||
"eslint-config-airbnb": "^15.1.0", | ||
"eslint-plugin-import": "^2.12.0", | ||
"express": "^5.0.0-alpha.6", | ||
"got": "^11.4.0", | ||
"eslint": "^7.4.0", | ||
"eslint-config-airbnb": "^18.2.0", | ||
"eslint-plugin-import": "^2.22.0", | ||
"express": "^5.0.0-alpha.8", | ||
"got": "^11.5.0", | ||
"mocha": "^8.0.1", | ||
"nyc": "^15.1.0" | ||
} | ||
|
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