Skip to content

Commit 5414a59

Browse files
committed
feat: require node >= 14, modernize, bump deps
1 parent b193e06 commit 5414a59

17 files changed

+72
-6891
lines changed

.commitlintrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@commitlint/config-conventional']
3+
};

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
!.*.js

.gitattributes

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* text=auto
1+
* text=auto eol=lf

.github/workflows/ci.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CI
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os:
11+
- ubuntu-latest
12+
node_version:
13+
- 14
14+
- 16
15+
- 18
16+
name: Node ${{ matrix.node_version }} on ${{ matrix.os }}
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Setup node
20+
uses: actions/setup-node@v3
21+
with:
22+
node-version: ${{ matrix.node_version }}
23+
- name: Install dependencies
24+
run: npm install
25+
- name: Run tests
26+
run: npm run test

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
node_modules
55
coverage
66
.nyc_output
7-
7+
locales/
8+
package-lock.json
9+
yarn.lock
810

911
Thumbs.db
1012
tmp/
1113
temp/
1214
*.lcov
15+
.env

.husky/commit-msg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn commitlint --edit $1
4+
npx --no-install commitlint --edit $1

.husky/pre-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
yarn lint-staged
4+
npx --no-install lint-staged && npm test

.lintstagedrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
'*.md': (filenames) => filenames.map((filename) => `remark ${filename} -qfo`),
3+
'package.json': 'fixpack',
4+
'*.js': 'xo --fix'
5+
};

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.prettierrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
singleQuote: true,
3+
bracketSpacing: true,
4+
trailingComma: 'none'
5+
};

.remarkignore

-1
This file was deleted.

.remarkrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
plugins: ['preset-github']
3+
};

.travis.yml

-7
This file was deleted.

.xo-config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
prettier: true,
3+
space: true,
4+
extends: ['xo-lass']
5+
};

README.md

+1-10
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# [**@ladjs/proxy**](https://github.com/ladjs/proxy)
22

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

29-
[yarn][]:
30-
31-
```sh
32-
yarn add @ladjs/proxy
33-
```
34-
3528

3629
## Usage
3730

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

5548
[npm]: https://www.npmjs.com/
56-
57-
[yarn]: https://yarnpkg.com/

package.json

+15-63
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,10 @@
33
"description": "Proxy for Lad",
44
"version": "2.1.1",
55
"author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)",
6-
"ava": {
7-
"failFast": true,
8-
"verbose": true
9-
},
106
"bugs": {
117
"url": "https://github.com/ladjs/proxy/issues",
128
"email": "niftylettuce@gmail.com"
139
},
14-
"commitlint": {
15-
"extends": [
16-
"@commitlint/config-conventional"
17-
]
18-
},
1910
"contributors": [
2011
"Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)"
2112
],
@@ -28,33 +19,26 @@
2819
"url-parse": "^1.5.10"
2920
},
3021
"devDependencies": {
31-
"@commitlint/cli": "^17.0.1",
32-
"@commitlint/config-conventional": "^17.0.0",
33-
"ava": "^4.2.0",
34-
"codecov": "^3.8.2",
22+
"@commitlint/cli": "^17.0.3",
23+
"@commitlint/config-conventional": "^17.0.3",
24+
"ava": "^4.3.0",
3525
"cross-env": "^7.0.3",
36-
"eslint": "^8.16.0",
37-
"eslint-config-xo-lass": "^1.0.6",
26+
"eslint": "^8.19.0",
27+
"eslint-config-xo-lass": "^2.0.1",
3828
"fixpack": "^4.0.0",
3929
"husky": "^8.0.1",
40-
"lint-staged": "^12.4.3",
30+
"lint-staged": "^13.0.3",
4131
"nyc": "^15.1.0",
42-
"remark-cli": "^10.0.1",
43-
"remark-preset-github": "^4.0.1",
32+
"remark-cli": "^11.0.0",
33+
"remark-preset-github": "^4.0.4",
4434
"sinon": "^14.0.0",
45-
"supertest": "^6.2.3",
46-
"xo": "^0.49.0"
35+
"supertest": "^6.2.4",
36+
"xo": "^0.50.0"
4737
},
4838
"engines": {
49-
"node": ">=8.3"
39+
"node": ">=14"
5040
},
5141
"homepage": "https://github.com/ladjs/proxy",
52-
"husky": {
53-
"hooks": {
54-
"pre-commit": "lint-staged && npm test",
55-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
56-
}
57-
},
5842
"keywords": [
5943
"config",
6044
"domain",
@@ -81,50 +65,18 @@
8165
"virtuals"
8266
],
8367
"license": "MIT",
84-
"lint-staged": {
85-
"*.js": [
86-
"xo --fix",
87-
"git add"
88-
],
89-
"*.md": [
90-
"remark . -qfo",
91-
"git add"
92-
],
93-
"package.json": [
94-
"fixpack",
95-
"git add"
96-
]
97-
},
9868
"main": "index.js",
99-
"prettier": {
100-
"singleQuote": true,
101-
"bracketSpacing": true,
102-
"trailingComma": "none"
103-
},
10469
"publishConfig": {
10570
"access": "public"
10671
},
107-
"remarkConfig": {
108-
"plugins": [
109-
"preset-github"
110-
]
111-
},
11272
"repository": {
11373
"type": "git",
11474
"url": "https://github.com/ladjs/proxy"
11575
},
11676
"scripts": {
117-
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
118-
"lint": "xo && remark . -qfo",
119-
"precommit": "lint-staged && npm test",
120-
"test": "npm run lint && npm run test-coverage",
121-
"test-coverage": "cross-env NODE_ENV=test nyc ava"
122-
},
123-
"xo": {
124-
"prettier": true,
125-
"space": true,
126-
"extends": [
127-
"xo-lass"
128-
]
77+
"lint": "xo --fix && remark . -qfo && fixpack",
78+
"prepare": "husky install",
79+
"pretest": "npm run lint",
80+
"test": "cross-env NODE_ENV=test nyc ava"
12981
}
13082
}

0 commit comments

Comments
 (0)