vuepress
vuepress copied to clipboard
Watch of .md file conflicts with Typora's temp file
- [x] I confirm that this is an issue rather than a question.
Bug report
Steps to reproduce
When we use Typora to edit .md files watched by Vuepress (v2.x with Vite, vuepress dev docs), when we save (Ctrl+S) on Typora, it creates a temporary file like .~README.md. This file only exists for a very short time, however, watched by Vuepress, and Vuepress trys to process it but failed since .~README.md no more exists. This leads to an fatal error in Vuepress and causes it to crash.

What is expected?
I think Vuepress should not watch files with name starting with .~ or even . by default, since they are more likely to be file that the user wants Vuepress to ignore. Or, provide a way to rule out certain filename pattern in Vuepress config file.
What is actually happening?
Vuepress crashes due to the failure to process the temporary file.
Other relevant information
- Call stack of the error
at makeError (file:///[SEALED]/node_modules/execa/lib/error.js:59:11)
at handlePromise (file:///[SEALED]/node_modules/execa/index.js:119:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async getUpdatedTime (file:///[SEALED]/node_modules/@vuepress/plugin-git/lib/node/utils/getUpdatedTime.js:6:24)
at async Object.extendsPage [as hook] (file:///[SEALED]/node_modules/@vuepress/plugin-git/lib/node/gitPlugin.js:21:45)
at async Object.process (file:///[SEALED]/node_modules/@vuepress/core/dist/index.js:681:26)
at async createPage (file:///[SEALED]/node_modules/@vuepress/core/dist/index.js:568:3)
at async handlePageAdd (file:///[SEALED]/node_modules/@vuepress/cli/dist/index.js:261:16)
at async FSWatcher.<anonymous> (file:///[SEALED]/node_modules/@vuepress/cli/dist/index.js:399:18)
- Output of
npx vuepress infoin my VuePress project:
Binaries:
Node: 16.18.0 - c:\program files\nodejs\node.EXE
Yarn: 1.22.19 - c:\program files\nodejs\yarn.CMD
npm: 9.5.0 - c:\program files\nodejs\npm.CMD
Utilities:
Git: 2.32.0.
npmPackages:
@vuepress/bundler-vite: 2.0.0-beta.61
@vuepress/bundler-webpack: Not Found
@vuepress/cli: 2.0.0-beta.61
@vuepress/client: 2.0.0-beta.61
@vuepress/core: 2.0.0-beta.61
@vuepress/markdown: 2.0.0-beta.61
@vuepress/plugin-active-header-links: 2.0.0-beta.61
@vuepress/plugin-back-to-top: 2.0.0-beta.61
@vuepress/plugin-container: 2.0.0-beta.61
@vuepress/plugin-docsearch: Not Found
@vuepress/plugin-external-link-icon: 2.0.0-beta.61
@vuepress/plugin-git: 2.0.0-beta.61
@vuepress/plugin-google-analytics: Not Found
@vuepress/plugin-medium-zoom: 2.0.0-beta.61
@vuepress/plugin-nprogress: 2.0.0-beta.61
@vuepress/plugin-palette: 2.0.0-beta.61
@vuepress/plugin-prismjs: 2.0.0-beta.61
@vuepress/plugin-pwa: Not Found
@vuepress/plugin-pwa-popup: Not Found
@vuepress/plugin-register-components: Not Found
@vuepress/plugin-search: Not Found
@vuepress/plugin-shiki: Not Found
@vuepress/plugin-theme-data: 2.0.0-beta.61
@vuepress/plugin-toc: Not Found
@vuepress/shared: 2.0.0-beta.61
@vuepress/theme-default: 2.0.0-beta.61
@vuepress/utils: 2.0.0-beta.61
vue: 3.2.47
vue-loader: Not Found
vue-router: 4.1.6
vuepress: ^2.0.0-beta.60 => 2.0.0-beta.50-pre.1
vuepress-vite: 2.0.0-beta.61
vuepress-webpack: Not Found