Skip to content

Commit 554cc24

Browse files
authored
chore: fix not work e2e in local (#2026)
* chore: fix not work e2e in local * chore: update github actions and release for v10
1 parent bd85a57 commit 554cc24

File tree

6 files changed

+80
-21
lines changed

6 files changed

+80
-21
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: CI
33
on:
44
push:
55
branches:
6-
- master
6+
- v10
77
pull_request:
88
branches:
9-
- master
9+
- v10
1010
permissions:
1111
contents: read
1212
env:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Commit changelog
5151
uses: stefanzweifel/git-auto-commit-action@v5
5252
with:
53-
branch: master
53+
branch: v10
5454
file_pattern: '*.md'
5555
commit_message: 'chore: sync changelog'
5656

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
"@types/minimist": "^1.2.5",
8989
"@types/node": "^22.5.3",
9090
"@types/rc": "^1.2.4",
91+
"@types/serve-handler": "^6.1.4",
9192
"@vitest/coverage-v8": "^2.0.0",
9293
"api-docs-gen": "^0.4.0",
9394
"benchmark": "^2.1.4",
@@ -121,7 +122,7 @@
121122
"rollup-plugin-node-globals": "^1.4.0",
122123
"rollup-plugin-typescript2": "^0.36.0",
123124
"secretlint": "^3.2.0",
124-
"serve-static": "^1.15.0",
125+
"serve-handler": "^6.1.6",
125126
"textlint": "^12.6.1",
126127
"textlint-filter-rule-comments": "^1.2.2",
127128
"textlint-rule-abbr-within-parentheses": "^1.0.2",

pnpm-lock.yaml

Lines changed: 65 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ for PKG in packages/* ; do
2323
continue
2424
fi
2525
pushd $PKG
26-
TAG="latest"
26+
TAG="stable"
2727
echo "⚡ Publishing $PKG with tag $TAG"
2828
pnpm publish --access public --no-git-checks --tag $TAG
2929
popd > /dev/null

scripts/vitest.globalSetup.ts

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
import { fileURLToPath } from 'node:url'
2-
import { URL } from 'node:url'
1+
import { fileURLToPath, URL } from 'node:url'
32

4-
// @ts-ignore
5-
import serveStatic from 'serve-static'
63
import { listen } from 'listhen'
4+
import handler from 'serve-handler'
75

86
const __dirname = fileURLToPath(new URL('..', import.meta.url))
97

108
export async function setup() {
11-
const listener = await listen(serveStatic(__dirname), { port: 8080 })
9+
const listener = await listen(
10+
(req, res) => {
11+
// eslint-disable-next-line @typescript-eslint/no-floating-promises
12+
handler(req, res, { public: __dirname })
13+
},
14+
{ port: 8080 }
15+
)
1216
return async () => {
1317
await listener.close()
1418
}

0 commit comments

Comments
 (0)