-
Notifications
You must be signed in to change notification settings - Fork 3.4k
chore: convert server files p3 #32950
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
base: develop
Are you sure you want to change the base?
Conversation
| contents, | ||
| } | ||
| }) | ||
| } |
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.
Bug: Unresolved Promises Break File Selection
The readFiles function returns an array of unresolved promises instead of awaiting them. The original code used Bluebird.map() which waits for all promises to resolve, but the new code uses Array.map() with an async callback, which immediately returns an array of promises. This breaks the selectFile command as callers expect resolved file data, not promises.
Additional details
Steps to test
How has the user experience changed?
PR Tasks
cypress-documentation?type definitions?Note
Migrates file IO and fixture handling to TypeScript, updates importing sites and fs typings, and converts/updates unit tests and snapshots.
packages/server/lib/files.js→files.tsandpackages/server/lib/fixture.js→fixture.tswith equivalent async APIs (readFile,readFiles,writeFile,get, etc.).xhrs.tsandsocket-base.tsusefixture.getasfixtureGet;privileged-commands-manager.tsimports* as files.fs.readJsonAsynctyping inlib/util/fs.ts; use it infiles.tsandutil/file.ts(remove ts-ignore usage).@ts-expect-errorwhere needed.packages/server/test/unit/files_spec.js→files_spec.ts; updatefixture_spec.tsto ESM/TS imports and context setup.__snapshots__/fixture_spec.ts.jsfor invalid JSON error.Written by Cursor Bugbot for commit 9ebb342. This will update automatically on new commits. Configure here.