diff --git a/.github/scripts/check-packages.mjs b/.github/scripts/check-packages.mjs new file mode 100644 index 000000000..ccd6465b8 --- /dev/null +++ b/.github/scripts/check-packages.mjs @@ -0,0 +1,117 @@ +// Builds packages with their publish config, packs them, and checks the tarballs we would publish. +// Run it through `npm run check-packages [-- ...]`, which puts the pinned publint and attw on PATH. +// Package names match the CI matrix: "testcontainers" or a directory name under packages/modules. +import { spawnSync } from "node:child_process"; +import { existsSync, mkdtempSync, readdirSync, rmSync } from "node:fs"; +import { tmpdir } from "node:os"; +import { dirname, join, resolve } from "node:path"; +import process from "node:process"; +import { fileURLToPath } from "node:url"; + +const rootDir = resolve(dirname(fileURLToPath(import.meta.url)), "../.."); + +const testOnlyFiles = [ + /\.(test|spec)\.[^/]+$/, + /(^|[/._-])test[-_]?(helpers?|utils?)[^/]*$/i, + /(^|\/)(fixtures|__tests__|__mocks__)\//, +]; + +const workspacePath = (name) => (name === "testcontainers" ? "packages/testcontainers" : `packages/modules/${name}`); + +const allPackages = () => { + const modulesDir = resolve(rootDir, "packages/modules"); + const modules = readdirSync(modulesDir, { withFileTypes: true }) + .filter((entry) => entry.isDirectory()) + .filter((entry) => existsSync(resolve(modulesDir, entry.name, "package.json"))) + .map((entry) => entry.name); + return ["testcontainers", ...modules.sort()]; +}; + +const run = (command, args, { capture = false } = {}) => { + const result = spawnSync(command, args, { + cwd: rootDir, + encoding: "utf8", + stdio: capture ? ["ignore", "pipe", "inherit"] : "inherit", + }); + if (result.error) { + throw result.error; + } + return { ok: result.status === 0, stdout: result.stdout }; +}; + +const build = (name) => { + const packageDir = resolve(rootDir, workspacePath(name)); + + // Start clean: `check-compiles` emits tests into the same build directory, and tsc does not re-emit + // files that its tsbuildinfo considers up to date. + rmSync(resolve(packageDir, "build"), { recursive: true, force: true }); + for (const file of readdirSync(packageDir).filter((file) => file.endsWith(".tsbuildinfo"))) { + rmSync(resolve(packageDir, file)); + } + + if (!run("npm", ["run", "build", "--workspace", workspacePath(name)]).ok) { + throw new Error(`Failed to build ${name}`); + } +}; + +const check = (name, packDir) => { + const errors = []; + + const pack = run("npm", ["pack", "--workspace", workspacePath(name), "--pack-destination", packDir, "--json"], { + capture: true, + }); + if (!pack.ok) { + return ["npm pack failed"]; + } + const [{ filename, files }] = JSON.parse(pack.stdout); + const tarball = join(packDir, filename); + + const testFiles = files.map((file) => file.path).filter((path) => testOnlyFiles.some((re) => re.test(path))); + if (testFiles.length > 0) { + console.error(`Test-only files in the tarball:\n${testFiles.map((path) => ` ${path}`).join("\n")}`); + errors.push("test-only files are packed (exclude them in tsconfig.build.json)"); + } + + if (!run("publint", ["run", tarball, "--strict"]).ok) { + errors.push("publint"); + } + + // Check only the types we ship, not any @types package of the same name on the registry. + if (!run("attw", [tarball, "--no-definitely-typed"]).ok) { + errors.push("attw"); + } + + return errors; +}; + +const packages = process.argv.length > 2 ? process.argv.slice(2) : allPackages(); +const unknown = packages.filter((name) => !existsSync(resolve(rootDir, workspacePath(name), "package.json"))); +if (unknown.length > 0) { + console.error(`Unknown packages: ${unknown.join(", ")}`); + process.exit(1); +} + +// Modules compile against the core build output through project references, so core is built first. +for (const name of new Set(["testcontainers", ...packages])) { + build(name); +} + +const packDir = mkdtempSync(join(tmpdir(), "testcontainers-packages-")); +const failures = []; +try { + for (const name of packages) { + console.log(`\n=== ${name} ===`); + const errors = check(name, packDir); + if (errors.length > 0) { + failures.push(`${name}: ${errors.join(", ")}`); + } + } +} finally { + rmSync(packDir, { recursive: true, force: true }); +} + +if (failures.length > 0) { + console.error(`\nPackage checks failed:\n${failures.map((failure) => ` ${failure}`).join("\n")}`); + process.exit(1); +} +console.log(`\nPackage checks passed for ${packages.length} package(s).`); diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index cf2ba23b3..0116d7df0 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -108,6 +108,31 @@ jobs: npm run build --ignore-scripts --workspace ${{ steps.npm-install.outputs.workspace_path }} -- --project tsconfig.json --noEmit fi + package: + if: ${{ needs.detect-modules.outputs.modules_count != '0' }} + name: Package + needs: + - detect-modules + - lint + strategy: + fail-fast: false + matrix: + module: ${{ fromJSON(needs.detect-modules.outputs.modules) }} + runs-on: ubuntu-24.04 + steps: + - name: Code checkout + uses: actions/checkout@v7 + - name: Install Node and Dependencies + uses: ./.github/actions/npm-setup + with: + runner: ubuntu-24.04 + node-version: 24.x + workspace: "${{ matrix.module }}" + - name: Check package + env: + MODULE: ${{ matrix.module }} + run: npm run check-packages -- "${MODULE}" + smoke-test: if: ${{ needs.detect-modules.outputs.has_testcontainers == 'true' }} needs: @@ -208,6 +233,7 @@ jobs: - detect-modules - lint - compile + - package - smoke-test - smoke-test-bun - test diff --git a/AGENTS.md b/AGENTS.md index 043db2c2d..825a1a536 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -33,6 +33,8 @@ It captures practical rules that prevent avoidable CI and PR churn. - Apply the implementation change, rerun the same test, and confirm it passes. - Report the red-green evidence in the PR verification summary. - Test-only helper files under `src` (for example `*-test-utils.ts`) must be explicitly excluded from package `tsconfig.build.json` so they are not emitted into `build` and accidentally published. + - `npm run check-packages [-- ...]` (the `Package` CI job) enforces this: it builds each package from a clean `build` directory, packs it, fails if the tarball contains test-only files, and runs `publint` and `@arethetypeswrong/cli` against the tarball. + - `npm run check-compiles` emits tests into the same `build` directories, so do not `npm pack` from a working tree after running it. - For substantial changes to GitHub Actions, runner images, Node/npm versions, or release/publish automation, consider running the manual `Node.js Package` workflow as a dry-run publish sanity check. - Select the PR branch as the workflow ref to test publish workflow changes before merging. - Use a representative version input, for example the next planned semver. @@ -86,7 +88,7 @@ reviewers can follow the reasoning. 1. Start from `main`. 2. Create a branch prefixed with `/` (for example `claude/fix-exec-output-truncation`). The PR title must not carry such prefixes (see step 9). 3. Implement scoped changes only. -4. Run required checks: `npm run format`, `npm run lint`, `npm run check-compiles` when touching `packages/testcontainers` APIs consumed by modules, and targeted tests. +4. Run required checks: `npm run format`, `npm run lint`, `npm run check-compiles` when touching `packages/testcontainers` APIs consumed by modules, `npm run check-packages -- ` when touching a package's `package.json`, `tsconfig.build.json` or build scripts, and targeted tests. - When working in a fresh git worktree, dependencies are not installed (`node_modules` is absent), so verification commands (tests, `lint`, `format`, `check-compiles`) will fail with "Cannot find module" errors. Run `npm ci` once before verifying. `npm ci` only populates `node_modules` and must not modify `package-lock.json`; if it does, treat that as drift to investigate. 5. Verify git diff only contains intended files. 6. Never commit, push, or post on GitHub (issues, PRs, or comments) without first sharing the proposed diff/message and getting explicit user approval. diff --git a/package-lock.json b/package-lock.json index 244a35950..7ae3a6332 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15221,6 +15221,9 @@ }, "devDependencies": { "arangojs": "^10.5.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/azurecosmosdb": { @@ -15232,6 +15235,9 @@ }, "devDependencies": { "@azure/cosmos": "^4.10.1" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/azureservicebus": { @@ -15243,6 +15249,9 @@ }, "devDependencies": { "@azure/service-bus": "^7.9.5" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/azurite": { @@ -15257,6 +15266,9 @@ "@azure/data-tables": "^13.3.2", "@azure/storage-blob": "12.34.0", "@azure/storage-queue": "12.32.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/cassandra": { @@ -15268,6 +15280,9 @@ }, "devDependencies": { "cassandra-driver": "^4.10.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/chromadb": { @@ -15280,6 +15295,9 @@ "devDependencies": { "@chroma-core/default-embed": "^0.1.9", "chromadb": "^3.5.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/clickhouse": { @@ -15291,6 +15309,9 @@ }, "devDependencies": { "@clickhouse/client": "^1.23.1" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/cockroachdb": { @@ -15303,6 +15324,9 @@ "devDependencies": { "@types/pg": "^8.23.1", "pg": "^8.23.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/couchbase": { @@ -15315,6 +15339,9 @@ "devDependencies": { "couchbase": "^4.7.1", "get-port": "^5.1.1" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/couchbase/node_modules/get-port": { @@ -15339,6 +15366,9 @@ }, "devDependencies": { "nano": "^11.0.7" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/elasticsearch": { @@ -15350,6 +15380,9 @@ }, "devDependencies": { "@elastic/elasticsearch": "^9.5.1" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/etcd": { @@ -15361,6 +15394,9 @@ }, "devDependencies": { "etcd3": "^1.1.2" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/gcloud": { @@ -15380,6 +15416,9 @@ "@google-cloud/storage": "^8.2.0", "firebase-admin": "14.5.0", "msw": "^2.15.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/hivemq": { @@ -15391,6 +15430,9 @@ }, "devDependencies": { "mqtt": "^5.16.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/influxdb": { @@ -15402,6 +15444,9 @@ }, "devDependencies": { "@influxdata/influxdb-client": "^1.35.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/k3s": { @@ -15415,6 +15460,9 @@ "devDependencies": { "@kubernetes/client-node": "^2.0.0", "@types/tar-stream": "^3.1.3" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/kafka": { @@ -15427,6 +15475,9 @@ }, "devDependencies": { "@confluentinc/kafka-javascript": "^1.10.1" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/kurrentdb": { @@ -15438,6 +15489,9 @@ }, "devDependencies": { "@kurrent/kurrentdb-client": "^1.3.1" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/localstack": { @@ -15449,6 +15503,9 @@ }, "devDependencies": { "@aws-sdk/client-s3": "^3.1141.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/mariadb": { @@ -15460,6 +15517,9 @@ }, "devDependencies": { "mariadb": "3.5.4" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/minio": { @@ -15471,6 +15531,9 @@ }, "devDependencies": { "minio": "^8.0.7" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/mockserver": { @@ -15484,6 +15547,9 @@ "@types/superagent": "^8.1.11", "mockserver-client": "^8.0.0", "superagent": "^10.4.1" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/mongodb": { @@ -15496,6 +15562,9 @@ }, "devDependencies": { "mongoose": "^9.10.2" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/mosquitto": { @@ -15507,6 +15576,9 @@ }, "devDependencies": { "mqtt": "^5.16.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/mssqlserver": { @@ -15519,6 +15591,9 @@ "devDependencies": { "@types/mssql": "^12.3.0", "mssql": "^12.7.2" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/mysql": { @@ -15530,6 +15605,9 @@ }, "devDependencies": { "mysql2": "^3.24.4" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/nats": { @@ -15542,6 +15620,9 @@ "devDependencies": { "@nats-io/jetstream": "^3.4.0", "@nats-io/transport-node": "^3.4.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/neo4j": { @@ -15553,6 +15634,9 @@ }, "devDependencies": { "neo4j-driver": "^6.2.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/ollama": { @@ -15561,6 +15645,9 @@ "license": "MIT", "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/opensearch": { @@ -15574,6 +15661,9 @@ "devDependencies": { "@opensearch-project/opensearch": "^3.9.0", "@types/zxcvbn": "^4.4.5" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/oraclefree": { @@ -15586,6 +15676,9 @@ "devDependencies": { "@types/oracledb": "^7.0.3", "oracledb": "^7.0.1" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/postgresql": { @@ -15598,6 +15691,9 @@ "devDependencies": { "@types/pg": "^8.23.1", "pg": "^8.23.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/qdrant": { @@ -15609,6 +15705,9 @@ }, "devDependencies": { "@qdrant/js-client-rest": "^1.19.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/rabbitmq": { @@ -15621,6 +15720,9 @@ "devDependencies": { "@types/amqplib": "^0.10.8", "amqplib": "^2.2.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/redis": { @@ -15632,6 +15734,9 @@ }, "devDependencies": { "redis": "^6.2.1" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/redpanda": { @@ -15644,6 +15749,9 @@ }, "devDependencies": { "@confluentinc/kafka-javascript": "^1.10.1" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/s3mock": { @@ -15655,6 +15763,9 @@ }, "devDependencies": { "@aws-sdk/client-s3": "^3.1141.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/scylladb": { @@ -15666,6 +15777,9 @@ }, "devDependencies": { "cassandra-driver": "^4.10.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/selenium": { @@ -15682,6 +15796,9 @@ "@types/tar-fs": "^2.0.4", "@types/tmp": "^0.2.6", "selenium-webdriver": "^4.49.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/toxiproxy": { @@ -15691,6 +15808,9 @@ "dependencies": { "testcontainers": "^12.2.0", "toxiproxy-node-client": "^4.1.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/valkey": { @@ -15702,6 +15822,9 @@ }, "devDependencies": { "redis": "^6.2.1" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/vault": { @@ -15713,6 +15836,9 @@ }, "devDependencies": { "node-vault": "^0.12.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/modules/weaviate": { @@ -15724,6 +15850,9 @@ }, "devDependencies": { "weaviate-ts-client": "^2.2.0" + }, + "engines": { + "node": ">= 22.22" } }, "packages/testcontainers": { diff --git a/package.json b/package.json index 83f57584f..cbb259992 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "update-deps": "npm-check-updates --workspaces --root -u", "check-engines:root": "npm exec --yes --package=ls-engines@0.10.1 -- ls-engines --mode ideal --dev --no-current", "check-engines:testcontainers": "npm exec --yes --workspace=testcontainers --package=ls-engines@0.10.1 -- ls-engines --mode ideal --no-current", - "check-compiles": "tsc -b packages/testcontainers packages/modules/*" + "check-compiles": "tsc -b packages/testcontainers packages/modules/*", + "check-packages": "npm exec --yes --package=publint@0.3.25 --package=@arethetypeswrong/cli@0.18.5 -- node .github/scripts/check-packages.mjs" }, "devDependencies": { "@biomejs/biome": "^2.5.14", diff --git a/packages/modules/arangodb/package.json b/packages/modules/arangodb/package.json index b5c662280..b573c5784 100644 --- a/packages/modules/arangodb/package.json +++ b/packages/modules/arangodb/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/azurecosmosdb/package.json b/packages/modules/azurecosmosdb/package.json index a85a1298d..883ee298a 100644 --- a/packages/modules/azurecosmosdb/package.json +++ b/packages/modules/azurecosmosdb/package.json @@ -19,6 +19,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -35,5 +36,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/azureservicebus/package.json b/packages/modules/azureservicebus/package.json index 9c91aa7b2..e6e98dce6 100644 --- a/packages/modules/azureservicebus/package.json +++ b/packages/modules/azureservicebus/package.json @@ -18,6 +18,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ }, "devDependencies": { "@azure/service-bus": "^7.9.5" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/azurite/package.json b/packages/modules/azurite/package.json index 15070c6fa..8895f3b8d 100644 --- a/packages/modules/azurite/package.json +++ b/packages/modules/azurite/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -36,5 +37,8 @@ "@azure/data-tables": "^13.3.2", "@azure/storage-blob": "12.34.0", "@azure/storage-queue": "12.32.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/cassandra/package.json b/packages/modules/cassandra/package.json index f7d2cae24..a4f11b75d 100644 --- a/packages/modules/cassandra/package.json +++ b/packages/modules/cassandra/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "devDependencies": { "cassandra-driver": "^4.10.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/chromadb/package.json b/packages/modules/chromadb/package.json index d7dce8fd6..9feb33f62 100644 --- a/packages/modules/chromadb/package.json +++ b/packages/modules/chromadb/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/clickhouse/package.json b/packages/modules/clickhouse/package.json index 0c269bf0a..34c6adb77 100644 --- a/packages/modules/clickhouse/package.json +++ b/packages/modules/clickhouse/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/cockroachdb/package.json b/packages/modules/cockroachdb/package.json index c494d2348..70f0a9e2e 100644 --- a/packages/modules/cockroachdb/package.json +++ b/packages/modules/cockroachdb/package.json @@ -18,6 +18,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -35,5 +36,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/couchbase/package.json b/packages/modules/couchbase/package.json index 31169c541..9ff347df3 100644 --- a/packages/modules/couchbase/package.json +++ b/packages/modules/couchbase/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ "devDependencies": { "couchbase": "^4.7.1", "get-port": "^5.1.1" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/couchdb/package.json b/packages/modules/couchdb/package.json index 0124445c4..7d592fb8d 100644 --- a/packages/modules/couchdb/package.json +++ b/packages/modules/couchdb/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "devDependencies": { "nano": "^11.0.7" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/elasticsearch/package.json b/packages/modules/elasticsearch/package.json index 6c2acc976..540397052 100644 --- a/packages/modules/elasticsearch/package.json +++ b/packages/modules/elasticsearch/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/etcd/package.json b/packages/modules/etcd/package.json index bf09da0da..410934e46 100644 --- a/packages/modules/etcd/package.json +++ b/packages/modules/etcd/package.json @@ -18,6 +18,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/gcloud/package.json b/packages/modules/gcloud/package.json index 6801373fd..e1675aa02 100644 --- a/packages/modules/gcloud/package.json +++ b/packages/modules/gcloud/package.json @@ -25,6 +25,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -49,5 +50,8 @@ "@google-cloud/storage": "^8.2.0", "firebase-admin": "14.5.0", "msw": "^2.15.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/hivemq/package.json b/packages/modules/hivemq/package.json index c558c64ae..bd1f4f4a1 100644 --- a/packages/modules/hivemq/package.json +++ b/packages/modules/hivemq/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/influxdb/package.json b/packages/modules/influxdb/package.json index d633eda16..8fe96c7c2 100644 --- a/packages/modules/influxdb/package.json +++ b/packages/modules/influxdb/package.json @@ -19,6 +19,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -35,5 +36,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/k3s/package.json b/packages/modules/k3s/package.json index 3692a7dfc..7a0fd1f64 100644 --- a/packages/modules/k3s/package.json +++ b/packages/modules/k3s/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -35,5 +36,8 @@ "devDependencies": { "@kubernetes/client-node": "^2.0.0", "@types/tar-stream": "^3.1.3" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/kafka/package.json b/packages/modules/kafka/package.json index 25fb6cbea..8e94b127a 100644 --- a/packages/modules/kafka/package.json +++ b/packages/modules/kafka/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ "dependencies": { "compare-versions": "^6.1.1", "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/kurrentdb/package.json b/packages/modules/kurrentdb/package.json index d83ff8d7a..8c7c83f0a 100644 --- a/packages/modules/kurrentdb/package.json +++ b/packages/modules/kurrentdb/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/localstack/package.json b/packages/modules/localstack/package.json index 012fe49fd..157155924 100644 --- a/packages/modules/localstack/package.json +++ b/packages/modules/localstack/package.json @@ -18,6 +18,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ }, "devDependencies": { "@aws-sdk/client-s3": "^3.1141.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/mariadb/package.json b/packages/modules/mariadb/package.json index 6bcc79dc1..a96625e49 100644 --- a/packages/modules/mariadb/package.json +++ b/packages/modules/mariadb/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "devDependencies": { "mariadb": "3.5.4" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/minio/package.json b/packages/modules/minio/package.json index 259bb164c..6dd1e1386 100644 --- a/packages/modules/minio/package.json +++ b/packages/modules/minio/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "devDependencies": { "minio": "^8.0.7" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/mockserver/package.json b/packages/modules/mockserver/package.json index bc235ee5f..dce5e9b3d 100644 --- a/packages/modules/mockserver/package.json +++ b/packages/modules/mockserver/package.json @@ -2,6 +2,7 @@ "name": "@testcontainers/mockserver", "version": "12.2.0", "description": "Mockserver module for Testcontainers", + "type": "commonjs", "main": "build/index.js", "scripts": { "prepack": "shx cp ../../../README.md . && shx cp ../../../LICENSE .", @@ -35,5 +36,8 @@ "@types/superagent": "^8.1.11", "mockserver-client": "^8.0.0", "superagent": "^10.4.1" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/mongodb/package.json b/packages/modules/mongodb/package.json index a62d58f17..1ea0aa6f7 100644 --- a/packages/modules/mongodb/package.json +++ b/packages/modules/mongodb/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ "dependencies": { "compare-versions": "^6.1.1", "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/mosquitto/package.json b/packages/modules/mosquitto/package.json index 9c5356c87..efa61bfdb 100644 --- a/packages/modules/mosquitto/package.json +++ b/packages/modules/mosquitto/package.json @@ -18,6 +18,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/mssqlserver/package.json b/packages/modules/mssqlserver/package.json index f2985d5b2..a80d3f888 100644 --- a/packages/modules/mssqlserver/package.json +++ b/packages/modules/mssqlserver/package.json @@ -19,6 +19,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -36,5 +37,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/mysql/package.json b/packages/modules/mysql/package.json index 38ff6380e..c16ba1d04 100644 --- a/packages/modules/mysql/package.json +++ b/packages/modules/mysql/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/nats/package.json b/packages/modules/nats/package.json index 363cb665e..a5e9972a4 100644 --- a/packages/modules/nats/package.json +++ b/packages/modules/nats/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ "devDependencies": { "@nats-io/jetstream": "^3.4.0", "@nats-io/transport-node": "^3.4.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/neo4j/package.json b/packages/modules/neo4j/package.json index 53a6b931f..441be572f 100644 --- a/packages/modules/neo4j/package.json +++ b/packages/modules/neo4j/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/ollama/package.json b/packages/modules/ollama/package.json index 25af3af88..30fc28c84 100644 --- a/packages/modules/ollama/package.json +++ b/packages/modules/ollama/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -30,5 +31,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/opensearch/package.json b/packages/modules/opensearch/package.json index 8d55920d3..2f4a33a4b 100644 --- a/packages/modules/opensearch/package.json +++ b/packages/modules/opensearch/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -35,5 +36,8 @@ "dependencies": { "testcontainers": "^12.2.0", "zxcvbn": "^4.4.2" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/oraclefree/package.json b/packages/modules/oraclefree/package.json index f3f842580..ed90d7cf3 100644 --- a/packages/modules/oraclefree/package.json +++ b/packages/modules/oraclefree/package.json @@ -18,6 +18,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -35,5 +36,8 @@ "devDependencies": { "@types/oracledb": "^7.0.3", "oracledb": "^7.0.1" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/postgresql/package.json b/packages/modules/postgresql/package.json index dd93d175a..88546ac06 100644 --- a/packages/modules/postgresql/package.json +++ b/packages/modules/postgresql/package.json @@ -18,6 +18,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -35,5 +36,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/qdrant/package.json b/packages/modules/qdrant/package.json index 8bcd2737a..eccf60f64 100644 --- a/packages/modules/qdrant/package.json +++ b/packages/modules/qdrant/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/rabbitmq/package.json b/packages/modules/rabbitmq/package.json index 15cb97ffc..76352f62d 100644 --- a/packages/modules/rabbitmq/package.json +++ b/packages/modules/rabbitmq/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ "devDependencies": { "@types/amqplib": "^0.10.8", "amqplib": "^2.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/redis/package.json b/packages/modules/redis/package.json index 4c119504e..d57ae6748 100644 --- a/packages/modules/redis/package.json +++ b/packages/modules/redis/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/redpanda/package.json b/packages/modules/redpanda/package.json index 5ff3f7c6f..e670e2a87 100644 --- a/packages/modules/redpanda/package.json +++ b/packages/modules/redpanda/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -35,5 +36,8 @@ }, "devDependencies": { "@confluentinc/kafka-javascript": "^1.10.1" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/s3mock/package.json b/packages/modules/s3mock/package.json index 3ef3fa2a9..cc1181a7e 100644 --- a/packages/modules/s3mock/package.json +++ b/packages/modules/s3mock/package.json @@ -18,6 +18,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ }, "devDependencies": { "@aws-sdk/client-s3": "^3.1141.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/scylladb/package.json b/packages/modules/scylladb/package.json index 7a74a192c..818cf67b6 100644 --- a/packages/modules/scylladb/package.json +++ b/packages/modules/scylladb/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "devDependencies": { "cassandra-driver": "^4.10.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/selenium/package.json b/packages/modules/selenium/package.json index 95f8532e7..8f4c1f218 100644 --- a/packages/modules/selenium/package.json +++ b/packages/modules/selenium/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -38,5 +39,8 @@ "tar-fs": "^3.1.3", "testcontainers": "^12.2.0", "tmp": "^0.2.7" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/toxiproxy/package.json b/packages/modules/toxiproxy/package.json index 3ada00561..b2858081b 100644 --- a/packages/modules/toxiproxy/package.json +++ b/packages/modules/toxiproxy/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -31,5 +32,8 @@ "dependencies": { "testcontainers": "^12.2.0", "toxiproxy-node-client": "^4.1.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/valkey/package.json b/packages/modules/valkey/package.json index cdef80310..fd5f6a0d0 100644 --- a/packages/modules/valkey/package.json +++ b/packages/modules/valkey/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/vault/package.json b/packages/modules/vault/package.json index 7ea00e870..42af09500 100644 --- a/packages/modules/vault/package.json +++ b/packages/modules/vault/package.json @@ -18,6 +18,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -34,5 +35,8 @@ }, "devDependencies": { "node-vault": "^0.12.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/modules/weaviate/package.json b/packages/modules/weaviate/package.json index 28a146e29..c44148c26 100644 --- a/packages/modules/weaviate/package.json +++ b/packages/modules/weaviate/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build" @@ -33,5 +34,8 @@ }, "dependencies": { "testcontainers": "^12.2.0" + }, + "engines": { + "node": ">= 22.22" } } diff --git a/packages/testcontainers/package.json b/packages/testcontainers/package.json index 845a661e7..c146bd1c3 100644 --- a/packages/testcontainers/package.json +++ b/packages/testcontainers/package.json @@ -17,6 +17,7 @@ "bugs": { "url": "https://github.com/testcontainers/testcontainers-node/issues" }, + "type": "commonjs", "main": "build/index.js", "files": [ "build"