Skip to content
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

"watch" doesn't work on Windows #84

Closed
vitorrd opened this issue Mar 17, 2023 · 3 comments · Fixed by #85
Closed

"watch" doesn't work on Windows #84

vitorrd opened this issue Mar 17, 2023 · 3 comments · Fixed by #85
Labels

Comments

@vitorrd
Copy link
Contributor

vitorrd commented Mar 17, 2023

Dependency globby only accepts forward slashes as parameters. As a result, Windows paths will always fail. This currently makes it impossible to use plugin-kit's link-watch on Windows,
The solution is to change src/node/globFiles.ts from:

import globby from 'globby'

export function globFiles(patterns: string[]): Promise<string[]> {
  return globby(patterns)
}

To:

import path from 'path'
import globby from 'globby'

export function globFiles(patterns: string[]): Promise<string[]> {
  return globby(patterns.map(pattern => pattern.split(path.sep).join(path.posix.sep))
}

If no one can get to this soon, I'll make a PR when time permits.

@mariuslundgard
Copy link
Member

Thanks for reporting this 🙏

@vitorrd
Copy link
Contributor Author

vitorrd commented Mar 19, 2023

@mariuslundgard PR #85 submitted to fix this. The linter failed with an import order on my code, but also two other "any" errors, so I'll leave that to you guys if that's okay.

@github-actions
Copy link
Contributor

🎉 This issue has been resolved in version 2.2.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants