Skip to content

Releases: testcontainers/testcontainers-node

v10.2.2

26 Oct 14:13
7372a32
Compare
Choose a tag to compare

🧹 Maintenance

v10.2.1

14 Aug 08:38
d887339
Compare
Choose a tag to compare

Changes

🐛 Bug Fixes

v10.2.0

11 Aug 10:12
2af3ae3
Compare
Choose a tag to compare

Changes

🚀 Features

📖 Documentation

🧹 Maintenance

v10.1.0

08 Aug 12:06
824cd8d
Compare
Choose a tag to compare

Changes

🚀 Features

🧹 Maintenance

v10.0.2

04 Aug 15:10
d3e7626
Compare
Choose a tag to compare

Changes

🐛 Bug Fixes

  • Do not call container starting and started lifecycle hooks if container is reused @cristianrgreco (#625)

🧹 Maintenance

v10.0.1

03 Aug 14:00
723d5e6
Compare
Choose a tag to compare

Changes

  • Update publish workflow.

v10.0.0

03 Aug 13:42
59a3018
Compare
Choose a tag to compare

🚨 Breaking Changes

Modules have moved to their own packages

Why?

To reduce bloat! Not everyone who installs Testcontainers needs classes and dependencies for Postgres. It's also now much easier to create and contribute new modules. The modules live in the testcontainers organisation on NPM so it's clear which are officially supported.

Previously:

import { GenericContainer, PostgreSqlContainer, MySqlContainer } from "testcontainers";

Now:

import { GenericContainer } from "testcontainers";
import { PostgreSqlContainer } from "@testcontainers/postgresql";
import { MySqlContainer } from "@testcontainers/mysql";

Added a helper for pull policies

Why?

It's a hassle having an import per type of pull policy. Let's simplify the public API.

1. DefaultPullPolicy and AlwaysPullPolicy replaced by PullPolicy.

Previously:

import { GenericContainer, DefaultPullPolicy, AlwaysPullPolicy } from "testcontainers";

const container1 = await GenericContainer
  .fromDockerfile("/path/to/build-context")
  .withPullPolicy(new AlwaysPullPolicy())
  .build();

const container2 = await GenericContainer
  .fromDockerfile("/path/to/build-context")
  .withPullPolicy(new DefaultPullPolicy())
  .build();

After:

import { GenericContainer, PullPolicy } from "testcontainers";

const container1 = await GenericContainer
  .fromDockerfile("/path/to/build-context")
  .withPullPolicy(PullPolicy.alwaysPull())
  .build();

const container2 = await GenericContainer
  .fromDockerfile("/path/to/build-context")
  .withPullPolicy(PullPolicy.defaultPolicy())
  .build();

2. PullPolicy renamed to ImagePullPolicy

Previously:

import { GenericContainer, PullPolicy } from "testcontainers";

class CustomPullPolicy implements PullPolicy {
  public shouldPull(): boolean {
    return true;
  }
}

After:

import { GenericContainer, ImagePullPolicy } from "testcontainers";

class CustomPullPolicy implements ImagePullPolicy {
  public shouldPull(): boolean {
    return true;
  }
}

Removed deprecated container lifecycle callbacks

Why?

Cleaning up the codebase makes it less confusing!

preStart -> beforeContainerCreated
beforeContainerStarted -> beforeContainerCreated
postStart -> containerStarted

Changes

🚀 Features

  • Separate testcontainers and modules into workspaces and publish as distinct packages into the testcontainers NPM organisation @cristianrgreco (#621)

v9.12.0

20 Jul 16:14
f9e4aa6
Compare
Choose a tag to compare

Changes

🚀 Features

🧹 Maintenance

v9.11.0

17 Jul 10:08
0b89d61
Compare
Choose a tag to compare

Changes

🚀 Features

🐛 Bug Fixes

🧹 Maintenance

v9.10.1

13 Jul 08:53
2e6462b
Compare
Choose a tag to compare

Changes

🧹 Maintenance