diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 34c3cef..7b4a550 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -23,6 +23,10 @@ updates: interval: weekly ignore: - dependency-name: "@rocicorp/zero" + # postgres.js is the client handed to Zero's adapter, so it stays on the major + # @rocicorp/zero depends on (tests/test_pin.py checks this). + - dependency-name: postgres + update-types: ["version-update:semver-major"] groups: npm: patterns: ["*"] diff --git a/harness/package-lock.json b/harness/package-lock.json index bb57a2e..bec8f30 100644 --- a/harness/package-lock.json +++ b/harness/package-lock.json @@ -10,9 +10,9 @@ "postgres": "3.4.9" }, "devDependencies": { - "@codspeed/tinybench-plugin": "6.0.1", + "@codspeed/tinybench-plugin": "6.1.0", "c8": "12.0.0", - "tinybench": "6.2.2" + "tinybench": "6.2.3" } }, "node_modules/@badrap/valita": { @@ -35,9 +35,9 @@ } }, "node_modules/@codspeed/core": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@codspeed/core/-/core-6.0.1.tgz", - "integrity": "sha512-p6yrZIoz/Bf5vW/QfGhiPOCKccGPES3jQ8NA+03qGcUYR3/U0tZ9h6ZkxVg2zLN10YaHrABEY4GtmTEEE5xF5Q==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@codspeed/core/-/core-6.1.0.tgz", + "integrity": "sha512-lxFkexeuf6iOWUZmgCeuGSVgk0fKBbtnCVd3w3UWi3627/4t55FhA046LhFLzedCQUi6183s99DnM3/6TRjzHQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -48,13 +48,13 @@ } }, "node_modules/@codspeed/tinybench-plugin": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@codspeed/tinybench-plugin/-/tinybench-plugin-6.0.1.tgz", - "integrity": "sha512-hu7Cpppv18+UxevaJgKs/PwdfJ6zRXxlDqUoEB0QiB3CU3Ga5ts5+bUAmhKDK2jNM2JPHoFYDLq8E+jXTQAD1A==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@codspeed/tinybench-plugin/-/tinybench-plugin-6.1.0.tgz", + "integrity": "sha512-R34+lpwSyCll2CpHSFaVDJq7uHWexlUpSq+FheiaI9qzKb5BNN3z/WNGwFPMcEXO5xpUfjg7qepO83aGuwcSyg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@codspeed/core": "^6.0.1" + "@codspeed/core": "^6.1.0" }, "peerDependencies": { "tinybench": ">=4.0.1" @@ -2613,9 +2613,9 @@ } }, "node_modules/axios": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.20.0.tgz", - "integrity": "sha512-r8aOh8j9cGKpgQAqpzrUHnSIc6a59Y3Xf/cv8sy1DrHCkZHzQGEuoq1tARk6qSyDdtQGSDgpb9kFlruzPvrgwg==", + "version": "1.21.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.21.0.tgz", + "integrity": "sha512-YCzXMB53Q9PZBsh7yN7wtapit4WepwcHS2fP8QhGsBxSz5YtgYobV7GGlWlAJi+RxfU77GQTQi2DSLUma42EYA==", "dev": true, "license": "MIT", "dependencies": { @@ -3854,9 +3854,9 @@ } }, "node_modules/follow-redirects": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.1.tgz", - "integrity": "sha512-FNvFGzoMLWmE6Yj9spb/zjd7yiNCHiAW9/Tg9CXrQ8wuu32HtlJOwWO11OJafl5FfY3DxTdQ0vj42zU1kvv5jg==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.16.2.tgz", + "integrity": "sha512-/kVP2U8z596Ia0gwFrwyIeo74ta5aVmSeU1FfAUMAmcEP5EP7zydmag3SLiN64NaRKef3lxsq7i/g7ltJQDGow==", "dev": true, "funding": [ { @@ -5753,9 +5753,9 @@ } }, "node_modules/tinybench": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.2.2.tgz", - "integrity": "sha512-nIZ2N2dFpjBsg2hgitKu7mA+FvsIJuGJOwysRngmVRRmWgR/UyPjwJj8c/fT/dhm8EkHnF5EOogRf+0Z2qrimA==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-6.2.3.tgz", + "integrity": "sha512-Al01C2JIBnO2CXCAPbpAl6sUiOZHeThGtHYNTa51JRw9PyWOCdr+9Ong05R4qg/Sk3+H645E8ov1h2c58ityNw==", "dev": true, "license": "MIT", "engines": { diff --git a/harness/package.json b/harness/package.json index 82df5d4..4e5b44c 100644 --- a/harness/package.json +++ b/harness/package.json @@ -14,8 +14,8 @@ "uuid": "^11.1.1" }, "devDependencies": { - "@codspeed/tinybench-plugin": "6.0.1", + "@codspeed/tinybench-plugin": "6.1.0", "c8": "12.0.0", - "tinybench": "6.2.2" + "tinybench": "6.2.3" } } diff --git a/tests/test_pin.py b/tests/test_pin.py index 1a38741..c39ba81 100644 --- a/tests/test_pin.py +++ b/tests/test_pin.py @@ -29,3 +29,14 @@ def test_harnesses_run_the_pinned_zero() -> None: def test_e2e_runs_the_pinned_zero_cache() -> None: version = (ROOT / "ZERO_VERSION").read_text().strip() assert f"image: rocicorp/zero:{version}" in (ROOT / "e2e" / "docker-compose.yml").read_text() + + +def test_harnesses_drive_zero_with_its_postgres_major() -> None: + # The oracle is the published package as it ships: the postgres.js client handed to its adapter + # must be the major release @rocicorp/zero itself depends on, or the oracle's results change with it. + import json + + for project in ("harness", "e2e"): + lock = json.loads((ROOT / project / "package-lock.json").read_text())["packages"] + zero_postgres = lock["node_modules/@rocicorp/zero"]["dependencies"]["postgres"] + assert lock["node_modules/postgres"]["version"].split(".")[0] == zero_postgres.split(".")[0]