Conversation
🦋 Changeset detectedLatest commit: b10b0bf The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This is also a change needed for safe migration to allow |
There was a problem hiding this comment.
Pull Request Overview
This PR simplifies the sandbox file URL signing mechanism by automatically determining when to use signed URLs based on whether the sandbox was created with the secure option. It removes the manual useSignature parameter from both JavaScript and Python SDKs, making signed URLs the default behavior for secure sandboxes.
- Removes
useSignatureparameter fromdownloadUrlanduploadUrlmethods - Automatically enables URL signing when sandbox has an access token (secure mode)
- Updates error messages to clarify that signature expiration requires a secured sandbox
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/js-sdk/src/sandbox/index.ts | Removes useSignature parameter and implements automatic signing detection |
| packages/python-sdk/e2b/sandbox/main.py | Removes useSignature parameter and implements automatic signing detection |
| packages/js-sdk/tests/sandbox/secure.test.ts | Updates test to remove useSignature parameter usage |
| packages/js-sdk/tests/sandbox/files/signing.test.ts | Updates multiple tests to remove useSignature parameter and removes obsolete tests |
| packages/python-sdk/tests/sync/sandbox_sync/files/test_secured.py | Updates test calls to remove useSignature parameter |
| packages/python-sdk/tests/async/sandbox_async/files/test_secured.py | Updates test calls to remove useSignature parameter |
| apps/web/src/app/(docs)/docs/filesystem/upload/page.mdx | Updates documentation to remove useSignature usage |
| apps/web/src/app/(docs)/docs/filesystem/download/page.mdx | Updates documentation to remove useSignature usage |
| .changeset/wicked-ghosts-tie.md | Adds changelog entry for the breaking change |
ben-fornefeld
left a comment
There was a problem hiding this comment.
small usability enhancement, otherwise LGTM.
Some users report that JS/Python types lack a
useSignatureattribute, which only works whensecure=trueis set for the sandbox. This change removes theuseSignatrueparameter and makes all upload/download URL requests signed ifsecurewas provided, making sure the function will work for all possible cases.