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
fix: retry on EMFILE always, lint sync FS calls #22175
Changes from all commits
6a70198
f057bca
aa6b5e2
8998557
6eec60c
25efccd
fcc6435
5977f26
e49864d
180d068
a45fcd6
1a17036
1a3dc2f
994e6cb
a6f9ae5
9ecc2f1
e0f28f7
9321032
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,8 @@ export const Cypress = ( | |
const indexHtmlFile = options.cypressConfig.indexHtmlFile | ||
|
||
let specsPathsSet = getSpecsPathsSet(specs) | ||
// TODO: use async fs methods here | ||
// eslint-disable-next-line no-restricted-syntax | ||
let loader = fs.readFileSync(INIT_FILEPATH, 'utf8') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this "do not use sync FS calls" also need to be applied in npm, or just things we know are shipping in the binary (and never published separately on npm). It's possible a user is consuming these outside of Cypress (however unlikely) and they may not have access to wrapped Seems safest to either us things we know exist in the Node.js standard lib, or have these depend on There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd use Since this is most likely to run in the plugins process, it should be fine to just use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not too sure this would require a user facing change (this function is internal to the Vite dev server) but sure, happy to leave it like this for now. If we do change it |
||
|
||
devServerEvents.on('dev-server:specs:changed', (specs: Spec[]) => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, hope we don't need to edit this in the near future, did not realize you could do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I pasted a URL there that helps you debug esquery, but even still this took me a bit to figure out.