Skip to content

v2.0.0-rc.8

Pre-release
Pre-release

Choose a tag to compare

@christianalfoni christianalfoni released this 06 Jun 21:17
· 99 commits to main since this release

📝 DOCS

You can find the 2.0.0 RC docs at: https://fsnpxp-3000.csb.app/sdk

🚨 Breaking

  • The server side SDK and the browser side SDK is now decoupled. Now Node has a much smaller dependency graph and will by default be compatible with edge environments. This did result in certain methods, like commands.getAll and terminals.getAll to become async
  • The concept of "sources" is removed. To clone a repository you now create a Sandbox as normal and then use session.git.clone to clone a repository. This is partially related to the complexity of managing git credentials, but also setting a path to give your more lower level programmatic tools as opposed to high level declarative and constrained options

🚀 Features

  • You can now pass --alias when building your template to point an alias to the generated template id. The alias is in the format of namespace@tag , where it will by default use the template folder as namespace or you can explicitly pass the full alias
npx @codesandbox/sdk build ./my-template --alias latest
my-template@latest now points to the generated template id
  • You can now use git with credentials. You still assign these credentials to sandbox.connect({ id, git }) or sandbox.createBrowserSession({ id, git ), but there are some additional options. ⚠️ You have to use the latest version of our Sandbox Agent for this to work. Make sure to update your templates etc.
  • When building a template where one Sandbox fails you can now manually verify the Sandbox before continuing to create snapshots and template id
    Screenshot 2025-06-04 at 12 57 34
  • A new CLI flag called --ci can be sent to prevent the interactive fallback from firing and rather give you a template id, but showing the Sandbox that errored
  • The CLI can now run without a command, which opens up a starting point for our interactive CLI. Currently it allows you to open a Sandbox, see its running status and change it (See image below)

Screenshot 2025-06-04 at 13 20 51

Screenshot 2025-06-04 at 13 36 46

🐛 Fixes

  • Restarting a Sandbox now has a retry mechanism in case of race conditions
  • When building templates we now have a 2 min timeout, instead of 30 sec, on starting Sandboxes. This is what the rest of the flow in our infra is configured to. There are edge cases where starting a Sandbox can take more than 30 sec and the "Bad Gateway" error should be gone
  • Certain processes exposing ports are not assigned to the related task. This has been fixed, given that you configure the port on your task in tasks.json