Skip to content

Commit

Permalink
feat: require node >= 14, modernize, bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Jul 4, 2022
1 parent b193e06 commit 5414a59
Show file tree
Hide file tree
Showing 17 changed files with 72 additions and 6,891 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: ['@commitlint/config-conventional']
};
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
!.*.js
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* text=auto
* text=auto eol=lf
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: CI
on:
- push
- pull_request
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
node_version:
- 14
- 16
- 18
name: Node ${{ matrix.node_version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
- name: Install dependencies
run: npm install
- name: Run tests
run: npm run test
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
node_modules
coverage
.nyc_output

locales/
package-lock.json
yarn.lock

Thumbs.db
tmp/
temp/
*.lcov
.env
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit $1
npx --no-install commitlint --edit $1
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
npx --no-install lint-staged && npm test
5 changes: 5 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
'*.md': (filenames) => filenames.map((filename) => `remark ${filename} -qfo`),
'package.json': 'fixpack',
'*.js': 'xo --fix'
};
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
singleQuote: true,
bracketSpacing: true,
trailingComma: 'none'
};
1 change: 0 additions & 1 deletion .remarkignore

This file was deleted.

3 changes: 3 additions & 0 deletions .remarkrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
plugins: ['preset-github']
};
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .xo-config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
prettier: true,
space: true,
extends: ['xo-lass']
};
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# [**@ladjs/proxy**](https://github.com/ladjs/proxy)

[![build status](https://img.shields.io/travis/ladjs/proxy.svg)](https://travis-ci.org/ladjs/proxy)
[![code coverage](https://img.shields.io/codecov/c/github/ladjs/proxy.svg)](https://codecov.io/gh/ladjs/proxy)
[![build status](https://github.com/ladjs/proxy/actions/workflows/ci.yml/badge.svg)](https://github.com/ladjs/proxy/actions/workflows/ci.yml)
[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![made with lass](https://img.shields.io/badge/made_with-lass-95CC28.svg)](https://lass.js.org)
Expand All @@ -26,12 +25,6 @@
npm install @ladjs/proxy
```

[yarn][]:

```sh
yarn add @ladjs/proxy
```


## Usage

Expand All @@ -53,5 +46,3 @@ See <https://github.com/ladjs/lad/blob/master/template/proxy.js> for the most up
##

[npm]: https://www.npmjs.com/

[yarn]: https://yarnpkg.com/
78 changes: 15 additions & 63 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,10 @@
"description": "Proxy for Lad",
"version": "2.1.1",
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",
"ava": {
"failFast": true,
"verbose": true
},
"bugs": {
"url": "https://github.com/ladjs/proxy/issues",
"email": "niftylettuce@gmail.com"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"contributors": [
"Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)"
],
Expand All @@ -28,33 +19,26 @@
"url-parse": "^1.5.10"
},
"devDependencies": {
"@commitlint/cli": "^17.0.1",
"@commitlint/config-conventional": "^17.0.0",
"ava": "^4.2.0",
"codecov": "^3.8.2",
"@commitlint/cli": "^17.0.3",
"@commitlint/config-conventional": "^17.0.3",
"ava": "^4.3.0",
"cross-env": "^7.0.3",
"eslint": "^8.16.0",
"eslint-config-xo-lass": "^1.0.6",
"eslint": "^8.19.0",
"eslint-config-xo-lass": "^2.0.1",
"fixpack": "^4.0.0",
"husky": "^8.0.1",
"lint-staged": "^12.4.3",
"lint-staged": "^13.0.3",
"nyc": "^15.1.0",
"remark-cli": "^10.0.1",
"remark-preset-github": "^4.0.1",
"remark-cli": "^11.0.0",
"remark-preset-github": "^4.0.4",
"sinon": "^14.0.0",
"supertest": "^6.2.3",
"xo": "^0.49.0"
"supertest": "^6.2.4",
"xo": "^0.50.0"
},
"engines": {
"node": ">=8.3"
"node": ">=14"
},
"homepage": "https://github.com/ladjs/proxy",
"husky": {
"hooks": {
"pre-commit": "lint-staged && npm test",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"keywords": [
"config",
"domain",
Expand All @@ -81,50 +65,18 @@
"virtuals"
],
"license": "MIT",
"lint-staged": {
"*.js": [
"xo --fix",
"git add"
],
"*.md": [
"remark . -qfo",
"git add"
],
"package.json": [
"fixpack",
"git add"
]
},
"main": "index.js",
"prettier": {
"singleQuote": true,
"bracketSpacing": true,
"trailingComma": "none"
},
"publishConfig": {
"access": "public"
},
"remarkConfig": {
"plugins": [
"preset-github"
]
},
"repository": {
"type": "git",
"url": "https://github.com/ladjs/proxy"
},
"scripts": {
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"lint": "xo && remark . -qfo",
"precommit": "lint-staged && npm test",
"test": "npm run lint && npm run test-coverage",
"test-coverage": "cross-env NODE_ENV=test nyc ava"
},
"xo": {
"prettier": true,
"space": true,
"extends": [
"xo-lass"
]
"lint": "xo --fix && remark . -qfo && fixpack",
"prepare": "husky install",
"pretest": "npm run lint",
"test": "cross-env NODE_ENV=test nyc ava"
}
}
Loading

0 comments on commit 5414a59

Please sign in to comment.