Skip to content

chore(deps): update dependency express to v5 #572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion playground/ssr-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@vitejs/plugin-vue-jsx": "workspace:*",
"@vitejs/test-dep-import-type": "link:dep-import-type",
"compression": "^1.8.0",
"express": "^4.21.2",
"express": "^5.1.0",
"serve-static": "^2.2.0"
}
}
2 changes: 1 addition & 1 deletion playground/ssr-vue/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,36 +66,36 @@
)
}

app.use('*', async (req, res) => {
app.use('*all', async (req, res) => {
try {
const url = req.originalUrl.replace('/test/', '/')

let template, render
if (!isProd) {
// always read fresh template in dev
template = fs.readFileSync(resolve('index.html'), 'utf-8')
template = await vite.transformIndexHtml(url, template)
render = (await vite.ssrLoadModule('/src/entry-server.js')).render
} else {
template = indexProd
// @ts-ignore
render = (await import('./dist/server/entry-server.js')).render
}

const [appHtml, preloadLinks] = await render(url, manifest)

const html = template
.replace(`<!--preload-links-->`, preloadLinks)
.replace(`<!--app-html-->`, appHtml)

res.status(200).set({ 'Content-Type': 'text/html' }).end(html)
} catch (e) {
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
vite && vite.ssrFixStacktrace(e)
console.log(e.stack)
res.status(500).end(e.stack)
}
})

Check failure

Code scanning / CodeQL

Missing rate limiting High

This route handler performs
a file system access
, but is not rate-limited.

return { app, vite }
}
Expand Down
Loading