Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/js-sdk/src/template/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1043,8 +1043,8 @@ export class TemplateBase
* Internal implementation of the template build process.
*
* @param client API client for communicating with E2B backend
* @param config connection configuration for the API client
* @param name Template name in 'name' or 'name:tag' format
* @param tags Additional tags to assign to the build
* @param options Build configuration options
* @throws BuildError if the build fails
*/
Expand Down
6 changes: 2 additions & 4 deletions packages/js-sdk/src/volume/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,7 @@ export class Volume extends ClientFactory {
* Create a directory.
*
* @param path path to the directory to create.
* @param options directory creation options.
* @param opts connection options.
* @param opts directory creation and connection options.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T-69 (docstrings are part of the API — every public method documents its parameters, defaults and failure modes) and T-72 (a @returns that restates the method name documents nothing — here it is missing entirely while the method returns VolumeEntryStat).

Dropping the phantom options param is right, but "directory creation and connection options" names no knob the caller can act on: opts is VolumeWriteOpts & VolumeApiOpts, i.e. uid/gid/mode, force (create missing parents), and the connection surface (requestTimeoutMs, headers, proxy, domain).

Suggested change
* @param opts directory creation and connection options.
* @param opts directory metadata (`uid`, `gid`, `mode`), `force` to also create missing parent directories, and connection options such as `requestTimeoutMs` (default 60_000), `headers`, and `proxy`.
*
* @returns stat of the created directory: its name, path, type, size, and access/modification/creation times

*/
async makeDir(
path: string,
Expand Down Expand Up @@ -663,8 +662,7 @@ export class Volume extends ClientFactory {
*
* @param path path to the file.
* @param data data to write to the file. Data can be a string, `ArrayBuffer`, `Blob`, or `ReadableStream`. Outside the browser, `ReadableStream` data is streamed to the API instead of being buffered in memory.
* @param options file creation options.
* @param opts connection options.
* @param opts file creation and connection options.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T-69 — same issue as makeDir: "file creation and connection options" documents nothing. force here means overwrite an existing file (not "create parents" as in makeDir), and this method defaults requestTimeoutMs to FILE_TIMEOUT_MS (1 hour) rather than the usual 60s — exactly the kind of default T-69/T-47 want stated in the docstring, and the kind of same-name/different-meaning flag a docstring is the only place to settle.

Suggested change
* @param opts file creation and connection options.
* @param opts file metadata (`uid`, `gid`, `mode`), `force` to overwrite an existing file, and connection options such as `requestTimeoutMs` (defaults to 1 hour for file writes), `headers`, and `proxy`.

*
* @returns information about the written file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T-72 — a @returns that restates the method name documents nothing: "information about the written file" is the value's type spelled in English. Say which fields come back (VolumeEntryStat), the way getInfo is expected to enumerate what it returns.

Suggested change
* @returns information about the written file
* @returns stat of the written file: its name, path, type, size, and access/modification/creation times

*/
Expand Down