From 39ccab9fa2966a53e5aeaa9bfd4bedb8c8871fe2 Mon Sep 17 00:00:00 2001 From: Philippe Serhal Date: Mon, 17 Mar 2025 16:46:58 -0400 Subject: [PATCH] chore: add missing testing package dependencies `@netlify/build` and `@netlify/config` had dev dependencies on the local `@netlify/testing` package (which is a local package only, not published to NPM) but they weren't specified in its `package.json` So: - These imports only sort of happened to work - TS wasn't complaining because we've explictly remapped that import: https://github.com/netlify/build/blob/65206cf/tsconfig.base.json#L30. - ESLint wasn't complaining because although we are using eslint-plugin-import, we aren't using the recommended ruleset and we aren't enabling [`no-extraneous-dependencies`] (https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules) - release-please didn't know about that part of our dependency graph, so it was opening [release PRs like this one](https://github.com/netlify/build/pull/6107) that should have bumped `@netlify/build` and `@netlify/config` in `packages/testing` but [did not](https://github.com/netlify/build/pull/6124) pnpm and yarn support `workspace:*` to make this local dependency explicit, but we're using npm workspaces, which do not. I opted to include a `-local` prefix to make this extra explicit. --- package-lock.json | 3 +++ packages/build/package.json | 1 + packages/config/package.json | 5 +++-- packages/testing/package.json | 1 + 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index db18a41477..cedb93873f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28691,6 +28691,7 @@ }, "devDependencies": { "@netlify/nock-udp": "^4.0.0", + "@netlify/testing": "^0.0.0-local", "@opentelemetry/api": "~1.8.0", "@opentelemetry/sdk-trace-base": "~1.24.0", "@types/node": "^14.18.53", @@ -29079,6 +29080,7 @@ "netlify-config": "bin.js" }, "devDependencies": { + "@netlify/testing": "^0.0.0-local", "@types/node": "^14.18.53", "ava": "^4.0.0", "c8": "^7.12.0", @@ -29983,6 +29985,7 @@ }, "packages/testing": { "name": "@netlify/testing", + "version": "0.0.0-local", "devDependencies": { "@netlify/build": "^30.0.0", "@netlify/config": "^21.0.0", diff --git a/packages/build/package.json b/packages/build/package.json index c94419e5f7..c66c9dfb36 100644 --- a/packages/build/package.json +++ b/packages/build/package.json @@ -127,6 +127,7 @@ }, "devDependencies": { "@netlify/nock-udp": "^4.0.0", + "@netlify/testing": "^0.0.0-local", "@opentelemetry/api": "~1.8.0", "@opentelemetry/sdk-trace-base": "~1.24.0", "@types/node": "^14.18.53", diff --git a/packages/config/package.json b/packages/config/package.json index 179a40ce30..56e854e5ef 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -59,6 +59,8 @@ "license": "MIT", "dependencies": { "@iarna/toml": "^2.2.5", + "@netlify/headers-parser": "^8.0.0", + "@netlify/redirect-parser": "^14.5.0", "chalk": "^5.0.0", "cron-parser": "^4.1.0", "deepmerge": "^4.2.2", @@ -73,8 +75,6 @@ "js-yaml": "^4.0.0", "map-obj": "^5.0.0", "netlify": "^13.3.3", - "@netlify/headers-parser": "^8.0.0", - "@netlify/redirect-parser": "^14.5.0", "node-fetch": "^3.3.1", "omit.js": "^2.0.2", "p-locate": "^6.0.0", @@ -84,6 +84,7 @@ "yargs": "^17.6.0" }, "devDependencies": { + "@netlify/testing": "^0.0.0-local", "@types/node": "^14.18.53", "ava": "^4.0.0", "c8": "^7.12.0", diff --git a/packages/testing/package.json b/packages/testing/package.json index afc15bc621..7a370d336e 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,7 @@ { "name": "@netlify/testing", "private": true, + "version": "0.0.0-local", "type": "module", "exports": "./lib/index.js", "main": "./lib/index.js",