Skip to content

fix: await Cypress after-run cleanup#2669

Merged
antfu merged 1 commit into
slidevjs:mainfrom
NgoQuocViet2001:fix/cypress-after-run-typing
Jul 14, 2026
Merged

fix: await Cypress after-run cleanup#2669
antfu merged 1 commit into
slidevjs:mainfrom
NgoQuocViet2001:fix/cypress-after-run-typing

Conversation

@NgoQuocViet2001

Copy link
Copy Markdown
Contributor

Summary

  • await the base-path server cleanup inside the Cypress after:run lifecycle callback
  • keep the shared task handler's null result unchanged

Problem

stopBasePathServer() intentionally resolves to null because Cypress task handlers must return a defined value. Passing that promise through directly makes the after:run callback return Promise<null>, but Cypress types accept only void | Promise<void>. The root typecheck therefore reports TS2769 at cypress.config.ts.

Awaiting the helper inside an async callback preserves the task contract while making the lifecycle callback resolve to void.

Validation

  • pnpm exec tsc --ignoreConfig --noEmit --skipLibCheck --moduleResolution bundler --module esnext --target esnext --types node,cypress --esModuleInterop cypress.config.ts cypress/basePathServer.ts
  • pnpm exec eslint cypress.config.ts
  • git diff --check
  • pnpm typecheck no longer reports the Cypress overload error; the remaining four errors are the existing VitePress declaration and duplicate markdown-exit dependency errors on main

@netlify

netlify Bot commented Jul 13, 2026

Copy link
Copy Markdown

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit 62a3671
🔍 Latest deploy log https://app.netlify.com/projects/slidev/deploys/6a54aad344e813000820b17c
😎 Deploy Preview https://deploy-preview-2669--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Jul 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

@slidev/client

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/client@2669

create-slidev

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev@2669

create-slidev-theme

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev-theme@2669

@slidev/parser

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/parser@2669

@slidev/cli

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/cli@2669

@slidev/types

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/types@2669

commit: 62a3671

@antfu antfu merged commit 79b7280 into slidevjs:main Jul 14, 2026
19 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants