Packages

@cloudflare/containers

0.3.7 · 4 Jun 2026MIT OR Apache-2.03M / weekRepositoryHomepagenpmAtom feed

Your version

46 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 0.3.x · latest line
  2. 0.3.7

    4 Jun 2026
    • Prevent startup and stop handling races from persisting a stopped state for a running container.

  3. 0.3.6

    1 Jun 2026
    • Use IdentityTransformStream when proxying deferred HTTP response bodies.

    • Remove noisy logs emitted while checking container and port readiness.

  4. 0.3.5

    27 May 2026
    • Use the canonical AlarmInvocationInfo type from @cloudflare/workers-types for the alarm() parameter instead of an inline type. This is a no-op for users (the shape is identical), but keeps the override aligned with the Durable Object base class signature.

    • Refreshed the examples/ projects:

      No changes to the published library API.

    • Add return types to exported functions and public methods to satisfy ESLint and improve type checking.

  5. 0.3.4

    11 May 2026
    • Fix a race in Container where concurrent container.fetch calls to a cold container could throw "start() cannot be called on a container that is already running.".

    • Ensure pending stop events are processed when the persisted container lifecycle state is still running but the underlying container has already exited.

      Migrate the root unit test suite from Jest to Vitest and add a test:unit script for running src/tests directly.

    • Fix subclass sleepAfter overrides being ignored during the initial activity timeout setup. Previously, the base Container constructor called renewActivityTimeout() inside blockConcurrencyWhile() before subclass class-field initializers ran, so the first sleepAfterMs was always computed from the base default ('10m') regardless of whether the subclass declared sleepAfter = '2h'. A container could then be killed by the activity timeout before the subclass's longer window took effect on the next renewActivityTimeout call. Declarations like:

      class BigContainer extends Container {
        sleepAfter = '2h';
      }

      are now honored from the very first alarm check.

  6. 0.3.3

    21 Apr 2026
    • Attach custom labels to your containers to help with observability and attribution. Set a labels property on your Container subclass, or pass labels in the startOptions argument to start() / startAndWaitForPorts(), and tag containers by tenant, environment, feature flag, canary cohort, or any other dimension you want to track. In local development, labels are visible on the underlying Docker container via docker inspect.

      class MyContainer extends Container {
        labels = { tenant: 'acme', env: 'prod' };
      }
  7. 0.3.2

    15 Apr 2026
    • Preserve response headers when proxying WebSocket upgrades through Container.fetch().

  8. 0.3.1

    15 Apr 2026
    • Remove debug console.log(props) statement from ContainerProxy initialization

  9. 0.3.0

    9 Apr 2026
    • Opt in to interceptOutboundHttps when interceptHttps = true

  10. 0.2.x
  11. 0.2.4

    7 Apr 2026
    • Fix containerFetch() throwing on proxied bodyless responses by skipping response reconstruction when Response.body is null.

  12. 0.2.3

    6 Apr 2026
    • Handle Blob WebSocket messages by converting to ArrayBuffer before forwarding between client and container

  13. 0.2.2

    31 Mar 2026
    • Activity tracking refreshes timeout if inflight request instead of depending on alarm polling

  14. 0.2.1

    30 Mar 2026
    • Start tracking activity by piping the response body to a transform stream and proxying the websocket

  15. 0.2.0

    23 Mar 2026
    • Add support to specify outbound hooks in container class (experimental)

  16. 0.1.x
  17. 0.1.1

    26 Feb 2026
    • Fix operator precedence in port-ready timeout retry calculation

    • Update container default Env to Cloudflare.Env

  18. 0.1.0

    15 Jan 2026
    • Add pingEndpoint to configure the ping URL of the container class

    • Add custom ping endpoint

  19. 0.0.x
  20. 0.0.31

    12 Dec 2025
    • Correctly sync state when calling stop()

  21. 0.0.30

    29 Oct 2025
    • Calling stop() on a container that is not running should not send another stop signal

  22. 0.0.29

    24 Oct 2025
    • Miscellaneous minor fixes and improvements to starting containers and port checking.

    • Fix racy condition where we would try and start containers that are running

  23. 0.0.28

    3 Sep 2025
    • Add function overload to startAndWaitForPorts()

      You can now use startAndWaitForPorts({startOptions: {envVars: {FOO:"BAR"}}}) instead of startAndWaitForPorts(undefined, {}, {envVars: {FOO:"BAR"}}), although that is still supported.

  24. 0.0.27

    29 Aug 2025
    • Add startOptions to startAndWaitForPorts()

      This lets you configure env vars, the entrypoint command, and internet access when you call startAndWaitForPorts. Previously this was only supported on start.

    • Use default port by default when making fetch requests to containers. this was breaking local dev as we would check the port of the host url, rather than the port the container was listening on. this was not an issue in production, as all ports are exposed there.

  25. 0.0.1 – 0.0.2626 releases without a noteShow each

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.