Skip to content

Commit a555222

Browse files
authored
Merge branch 'master' into fix/fixRequestBody
2 parents e0f64c3 + 1ee26ed commit a555222

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+5640
-3165
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ trim_trailing_whitespace = true
1313
[*.md]
1414
trim_trailing_whitespace = false
1515

16-
# Matches the exact files either package.json or .travis.yml
17-
[{package.json,.travis.yml}]
16+
# Matches the exact files
17+
[{package.json}]
1818
indent_size = 2

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 46 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,47 @@ name: CI
33
on: ['push', 'pull_request']
44

55
jobs:
6+
build:
7+
name: Build
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Use Node.js 22.x
13+
uses: actions/setup-node@v4
14+
with:
15+
node-version: 22.x
16+
17+
- uses: actions/cache@v4
18+
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
19+
with:
20+
path: '**/node_modules'
21+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
22+
restore-keys: |
23+
${{ runner.os }}-yarn-
24+
25+
- name: yarn install
26+
if: steps.yarn-cache.outputs.cache-hit != 'true' # Over here!
27+
run: yarn install --frozen-lockfile --ignore-scripts
28+
29+
- name: yarn build
30+
run: yarn build
31+
32+
env:
33+
CI: true
34+
635
lint:
736
name: Lint
837
runs-on: ubuntu-latest
938

1039
steps:
11-
- uses: actions/checkout@v3
12-
- name: Use Node.js 18.x
13-
uses: actions/setup-node@v3
40+
- uses: actions/checkout@v4
41+
- name: Use Node.js 22.x
42+
uses: actions/setup-node@v4
1443
with:
15-
node-version: 18.x
44+
node-version: 22.x
1645

17-
- uses: actions/cache@v3
46+
- uses: actions/cache@v4
1847
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
1948
with:
2049
path: '**/node_modules'
@@ -38,16 +67,16 @@ jobs:
3867

3968
strategy:
4069
matrix:
41-
node-version: [14.x, 16.x, 18.x]
70+
node-version: [18.x, 20.x, 22.x]
4271

4372
steps:
44-
- uses: actions/checkout@v3
73+
- uses: actions/checkout@v4
4574
- name: Use Node.js ${{ matrix.node-version }}
46-
uses: actions/setup-node@v3
75+
uses: actions/setup-node@v4
4776
with:
4877
node-version: ${{ matrix.node-version }}
4978

50-
- uses: actions/cache@v3
79+
- uses: actions/cache@v4
5180
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
5281
with:
5382
path: '**/node_modules'
@@ -60,7 +89,7 @@ jobs:
6089
run: yarn install --frozen-lockfile --ignore-scripts
6190

6291
- name: yarn test
63-
run: yarn test --reporters="default" --reporters="github-actions"
92+
run: yarn test --ci --reporters="default" --reporters="github-actions"
6493

6594
env:
6695
CI: true
@@ -70,13 +99,13 @@ jobs:
7099
runs-on: ubuntu-latest
71100

72101
steps:
73-
- uses: actions/checkout@v3
74-
- name: Use Node.js 18.x
75-
uses: actions/setup-node@v3
102+
- uses: actions/checkout@v4
103+
- name: Use Node.js 22.x
104+
uses: actions/setup-node@v4
76105
with:
77-
node-version: 18.x
106+
node-version: 22.x
78107

79-
- uses: actions/cache@v3
108+
- uses: actions/cache@v4
80109
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
81110
with:
82111
path: '**/node_modules'
@@ -100,8 +129,8 @@ jobs:
100129
name: Spellcheck
101130
runs-on: ubuntu-latest
102131
steps:
103-
- uses: actions/checkout@v3
104-
- uses: streetsidesoftware/cspell-action@main
132+
- uses: actions/checkout@v4
133+
- uses: streetsidesoftware/cspell-action@v6
105134
with:
106135
# Github token used to fetch the list of changed files in the commit.
107136
# Default: ${{ github.token }}

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: publish to npmjs
2+
on:
3+
release:
4+
types: [prereleased, released]
5+
jobs:
6+
build-and-publish:
7+
# prevents this action from running on forks
8+
if: github.repository == 'chimurai/http-proxy-middleware'
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '22.x'
18+
registry-url: 'https://registry.npmjs.org'
19+
20+
- name: Install Dependencies
21+
run: yarn install
22+
23+
- name: Publish to NPM (beta)
24+
if: 'github.event.release.prerelease'
25+
run: npm publish --provenance --access public --tag beta
26+
env:
27+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28+
29+
- name: Publish to NPM (stable)
30+
if: '!github.event.release.prerelease'
31+
run: npm publish --provenance --access public
32+
env:
33+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitpod.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,6 @@ tasks:
77
yarn build
88
yarn test --maxWorkers=30%
99
10-
github:
11-
# https://www.gitpod.io/docs/prebuilds/#configure-prebuilds
12-
prebuilds:
13-
master: true
14-
branches: true
15-
pullRequests: true
16-
pullRequestsFromForks: true
17-
addCheck: true
18-
addComment: false
19-
addBadge: true
20-
2110
vscode:
2211
extensions:
2312
- bierner.markdown-preview-github-styles

.husky/commit-msg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
yarn commitlint --edit $1

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
yarn lint-staged

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
package-lock=false
2+
provenance=true

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"deno.enable": false,
33
"editor.codeActionsOnSave": {
4-
"source.fixAll.eslint": true
4+
"source.fixAll.eslint": "explicit"
55
},
66
"markdown.extension.toc.levels": "2..3"
77
}

0 commit comments

Comments
 (0)