diff --git a/.github/workflows/scripts/detect-jobs-to-run.js b/.github/workflows/scripts/detect-jobs-to-run.js index 8ff04e6eb3b8..2df596a0b016 100755 --- a/.github/workflows/scripts/detect-jobs-to-run.js +++ b/.github/workflows/scripts/detect-jobs-to-run.js @@ -96,6 +96,17 @@ async function detectJobsTorun({ filesChanged, GITHUB_REF }) { } console.debug({ jobsToRun }) + + // remove github workflow files if they only change things in a job that will be run + /* + + get content or line numbers of changed files + focus on ones we did not "handle" above yet + see in which "block" the changed lines are + eliminate all the lines that are in blocks that we already handled + */ + + // do we have a mismatch? console.debug('filesChanged.length', filesChanged.length) console.debug({ totalNumberOfFilesChangedInsideDirectories }) diff --git a/.github/workflows/scripts/detect-jobs-to-run.test.js b/.github/workflows/scripts/detect-jobs-to-run.test.js index 175d99abc16f..3fa4f150ab44 100644 --- a/.github/workflows/scripts/detect-jobs-to-run.test.js +++ b/.github/workflows/scripts/detect-jobs-to-run.test.js @@ -92,6 +92,20 @@ Array [ expect(jobsToRun.includes('community-generators')).toBe(true) }) + it.only('files changed inside platform folder and github actions workflow', async () => { + const filesChanged = ['platforms/somefile.js', '.github/workflows/test.yaml'] + const jobsToRun = await detectJobsTorun({ filesChanged }) + + expect(jobsToRun).toMatchInlineSnapshot(` +Array [ + "platforms", +] +` +) + expect(jobsToRun.includes('platforms')).toBe(true) + expect(jobsToRun.includes('platforms-serverless')).toBe(false) + }) + it('should fallback: no change', async () => { const filesChanged = [] const jobsToRun = await detectJobsTorun({ filesChanged }) diff --git a/bundlers/webpack-browser-custom-output/package.json b/bundlers/webpack-browser-custom-output/package.json index 3153f298a23f..bc0fea3c20c8 100644 --- a/bundlers/webpack-browser-custom-output/package.json +++ b/bundlers/webpack-browser-custom-output/package.json @@ -1,5 +1,5 @@ { - "name": "webpack", + "name": "webpack-browser-custom-output", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/community-generators/prisma-json-schema-generator/package.json b/community-generators/prisma-json-schema-generator/package.json index 8a715f803da7..dc82b1d0dc8a 100644 --- a/community-generators/prisma-json-schema-generator/package.json +++ b/community-generators/prisma-json-schema-generator/package.json @@ -1,5 +1,5 @@ { - "name": "prisma-dbml-generator", + "name": "prisma-json-schema-generator", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/core-features/browser-build/package.json b/core-features/browser-build/package.json index 70ee9f570002..39612888bc93 100644 --- a/core-features/browser-build/package.json +++ b/core-features/browser-build/package.json @@ -1,5 +1,5 @@ { - "name": "next-test", + "name": "browser-build", "version": "0.1.0", "private": true, "scripts": { diff --git a/core-features/generate-client-and-cli-install-via-global-cli-no-lockfile-npm/package.json b/core-features/generate-client-and-cli-install-via-global-cli-no-lockfile-npm/package.json index 57f97adc076f..68438f6d4d98 100644 --- a/core-features/generate-client-and-cli-install-via-global-cli-no-lockfile-npm/package.json +++ b/core-features/generate-client-and-cli-install-via-global-cli-no-lockfile-npm/package.json @@ -1,5 +1,5 @@ { - "name": "generate-client-and-cli-install-via-global-cli", + "name": "generate-client-and-cli-install-via-global-cli-no-lockfile-npm", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/core-features/generate-client-and-cli-install-via-global-cli-npm-lockfile/package.json b/core-features/generate-client-and-cli-install-via-global-cli-npm-lockfile/package.json index 57f97adc076f..b940ebfb6572 100644 --- a/core-features/generate-client-and-cli-install-via-global-cli-npm-lockfile/package.json +++ b/core-features/generate-client-and-cli-install-via-global-cli-npm-lockfile/package.json @@ -1,5 +1,5 @@ { - "name": "generate-client-and-cli-install-via-global-cli", + "name": "generate-client-and-cli-install-via-global-cli-npm-lockfile", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/core-features/generate-client-and-cli-install-via-global-cli-pnpm-lockfile/package.json b/core-features/generate-client-and-cli-install-via-global-cli-pnpm-lockfile/package.json index 57f97adc076f..8ceb8b53abfd 100644 --- a/core-features/generate-client-and-cli-install-via-global-cli-pnpm-lockfile/package.json +++ b/core-features/generate-client-and-cli-install-via-global-cli-pnpm-lockfile/package.json @@ -1,5 +1,5 @@ { - "name": "generate-client-and-cli-install-via-global-cli", + "name": "generate-client-and-cli-install-via-global-cli-pnpm-lockfile", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/core-features/generate-client-and-cli-install-via-global-cli-yarn-lockfile/package.json b/core-features/generate-client-and-cli-install-via-global-cli-yarn-lockfile/package.json index 57f97adc076f..855f5c662b77 100644 --- a/core-features/generate-client-and-cli-install-via-global-cli-yarn-lockfile/package.json +++ b/core-features/generate-client-and-cli-install-via-global-cli-yarn-lockfile/package.json @@ -1,5 +1,5 @@ { - "name": "generate-client-and-cli-install-via-global-cli", + "name": "generate-client-and-cli-install-via-global-cli-yarn-lockfile", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/core-features/generate-client-install-npm/package.json b/core-features/generate-client-install-npm/package.json index 3347ac6f1e0e..9f592815e8f5 100644 --- a/core-features/generate-client-install-npm/package.json +++ b/core-features/generate-client-install-npm/package.json @@ -1,5 +1,5 @@ { - "name": "generate-client-install", + "name": "generate-client-install-npm", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/core-features/generate-client-install-on-sub-project-npm/package.json b/core-features/generate-client-install-on-sub-project-npm/package.json index 5dc1983dcaca..20beadeeb83c 100644 --- a/core-features/generate-client-install-on-sub-project-npm/package.json +++ b/core-features/generate-client-install-on-sub-project-npm/package.json @@ -1,5 +1,5 @@ { - "name": "generate-client-install-on-sub-project", + "name": "generate-client-install-on-sub-project-npm", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/core-features/generate-client-install-on-sub-project-pnpm/package.json b/core-features/generate-client-install-on-sub-project-pnpm/package.json index 5dc1983dcaca..afa2435ee712 100644 --- a/core-features/generate-client-install-on-sub-project-pnpm/package.json +++ b/core-features/generate-client-install-on-sub-project-pnpm/package.json @@ -1,5 +1,5 @@ { - "name": "generate-client-install-on-sub-project", + "name": "generate-client-install-on-sub-project-pnpm", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/core-features/generate-client-install-on-sub-project-yarn/package.json b/core-features/generate-client-install-on-sub-project-yarn/package.json index 5dc1983dcaca..340afb2cd7fa 100644 --- a/core-features/generate-client-install-on-sub-project-yarn/package.json +++ b/core-features/generate-client-install-on-sub-project-yarn/package.json @@ -1,5 +1,5 @@ { - "name": "generate-client-install-on-sub-project", + "name": "generate-client-install-on-sub-project-yarn", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/core-features/generate-client-install-pnpm/package.json b/core-features/generate-client-install-pnpm/package.json index 3347ac6f1e0e..69605e75537b 100644 --- a/core-features/generate-client-install-pnpm/package.json +++ b/core-features/generate-client-install-pnpm/package.json @@ -1,5 +1,5 @@ { - "name": "generate-client-install", + "name": "generate-client-install-pnpm", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/core-features/generate-client-install-yarn/package.json b/core-features/generate-client-install-yarn/package.json index 3347ac6f1e0e..d03594fe31f2 100644 --- a/core-features/generate-client-install-yarn/package.json +++ b/core-features/generate-client-install-yarn/package.json @@ -1,5 +1,5 @@ { - "name": "generate-client-install", + "name": "generate-client-install-yarn", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/databases-macos/sqlserver-azure-sql/package.json b/databases-macos/sqlserver-azure-sql/package.json index 16c5361a09e9..c9de6857a24b 100644 --- a/databases-macos/sqlserver-azure-sql/package.json +++ b/databases-macos/sqlserver-azure-sql/package.json @@ -1,5 +1,5 @@ { - "name": "sqlserver-azure-sql", + "name": "macos-sqlserver-azure-sql", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/dataproxy/vercel-cli-serverless-functions/package.json b/dataproxy/vercel-cli-serverless-functions/package.json index 349990bcff63..df9341c8b6bb 100644 --- a/dataproxy/vercel-cli-serverless-functions/package.json +++ b/dataproxy/vercel-cli-serverless-functions/package.json @@ -1,5 +1,5 @@ { - "name": "vercel-cli", + "name": "vercel-cli-serverless-functions", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/driver-adapters-wasm/pg-node-basic-esm/package.json b/driver-adapters-wasm/pg-node-basic-esm/package.json index 8e38dc59a4be..45122d1b4005 100644 --- a/driver-adapters-wasm/pg-node-basic-esm/package.json +++ b/driver-adapters-wasm/pg-node-basic-esm/package.json @@ -1,5 +1,5 @@ { - "name": "pg-node-basic-esm", + "name": "wasm-pg-node-basic-esm", "version": "0.1.0", "private": true, "scripts": { diff --git a/driver-adapters-wasm/pg-node-basic/package.json b/driver-adapters-wasm/pg-node-basic/package.json index 76e6c6a6e69f..fb1d71df9462 100644 --- a/driver-adapters-wasm/pg-node-basic/package.json +++ b/driver-adapters-wasm/pg-node-basic/package.json @@ -1,5 +1,5 @@ { - "name": "pg-node-basic", + "name": "wasm-pg-node-basic", "version": "0.1.0", "private": true, "scripts": { diff --git a/frameworks/nextjs/package.json b/frameworks/nextjs/package.json index 70ee9f570002..552298072603 100644 --- a/frameworks/nextjs/package.json +++ b/frameworks/nextjs/package.json @@ -1,5 +1,5 @@ { - "name": "next-test", + "name": "nextjs", "version": "0.1.0", "private": true, "scripts": { diff --git a/generic/basic/package.json b/generic/basic/package.json index fe9fc1585e08..3945dfce038a 100644 --- a/generic/basic/package.json +++ b/generic/basic/package.json @@ -1,5 +1,5 @@ { - "name": "script", + "name": "basic", "license": "MIT", "devDependencies": { "@types/node": "16.18.68", diff --git a/packagers/npm-global/package.json b/packagers/npm-global/package.json index fe9fc1585e08..7168cdf7eef6 100644 --- a/packagers/npm-global/package.json +++ b/packagers/npm-global/package.json @@ -1,5 +1,5 @@ { - "name": "script", + "name": "npm-global", "license": "MIT", "devDependencies": { "@types/node": "16.18.68", diff --git a/packagers/npm/package.json b/packagers/npm/package.json index fe9fc1585e08..8bcd23281720 100644 --- a/packagers/npm/package.json +++ b/packagers/npm/package.json @@ -1,5 +1,5 @@ { - "name": "script", + "name": "npm", "license": "MIT", "devDependencies": { "@types/node": "16.18.68", diff --git a/packagers/pnpm-workspaces-custom-output/package.json b/packagers/pnpm-workspaces-custom-output/package.json index e4b4b2913b63..79d5008b72ba 100644 --- a/packagers/pnpm-workspaces-custom-output/package.json +++ b/packagers/pnpm-workspaces-custom-output/package.json @@ -1,5 +1,5 @@ { - "name": "script", + "name": "pnpm-workspaces-custom-output", "license": "MIT", "devDependencies": { "@types/node": "16.18.68", diff --git a/packagers/pnpm-workspaces-default-output/package.json b/packagers/pnpm-workspaces-default-output/package.json index e4b4b2913b63..41bda24775b7 100644 --- a/packagers/pnpm-workspaces-default-output/package.json +++ b/packagers/pnpm-workspaces-default-output/package.json @@ -1,5 +1,5 @@ { - "name": "script", + "name": "pnpm-workspaces-default-output", "license": "MIT", "devDependencies": { "@types/node": "16.18.68", diff --git a/packagers/pnpm/package.json b/packagers/pnpm/package.json index fe9fc1585e08..a253974a3c4e 100644 --- a/packagers/pnpm/package.json +++ b/packagers/pnpm/package.json @@ -1,5 +1,5 @@ { - "name": "script", + "name": "pnpm", "license": "MIT", "devDependencies": { "@types/node": "16.18.68", diff --git a/packagers/yarn/package.json b/packagers/yarn/package.json index fe9fc1585e08..bdfd27b982df 100644 --- a/packagers/yarn/package.json +++ b/packagers/yarn/package.json @@ -1,5 +1,5 @@ { - "name": "script", + "name": "yarn", "license": "MIT", "devDependencies": { "@types/node": "16.18.68", diff --git a/packagers/yarn3-without-pnp/package.json b/packagers/yarn3-without-pnp/package.json index fe9fc1585e08..04f95d0b250e 100644 --- a/packagers/yarn3-without-pnp/package.json +++ b/packagers/yarn3-without-pnp/package.json @@ -1,5 +1,5 @@ { - "name": "script", + "name": "yarn3-without-pnp", "license": "MIT", "devDependencies": { "@types/node": "16.18.68", diff --git a/platforms-serverless/azure-functions-linux/package.json b/platforms-serverless/azure-functions-linux/package.json index 6714f2414b45..3f30b890c205 100644 --- a/platforms-serverless/azure-functions-linux/package.json +++ b/platforms-serverless/azure-functions-linux/package.json @@ -1,5 +1,5 @@ { - "name": "script", + "name": "azure-functions-linux", "license": "MIT", "scripts": {}, "devDependencies": { diff --git a/platforms-serverless/azure-functions-windows/package.json b/platforms-serverless/azure-functions-windows/package.json index 6714f2414b45..0b59baeed2f8 100644 --- a/platforms-serverless/azure-functions-windows/package.json +++ b/platforms-serverless/azure-functions-windows/package.json @@ -1,5 +1,5 @@ { - "name": "script", + "name": "azure-functions-windows", "license": "MIT", "scripts": {}, "devDependencies": { diff --git a/platforms-serverless/gcp-functions/package.json b/platforms-serverless/gcp-functions/package.json index 36229806f803..28229f98bebe 100644 --- a/platforms-serverless/gcp-functions/package.json +++ b/platforms-serverless/gcp-functions/package.json @@ -1,5 +1,5 @@ { - "name": "script", + "name": "gcp-functions", "license": "MIT", "scripts": { "gcp-build": "CI=1 && PRISMA_TELEMETRY_INFORMATION='ecosystem-tests platforms/gcp-functions postinstall' && npx prisma generate" diff --git a/platforms-serverless/lambda-node-16/package.json b/platforms-serverless/lambda-node-16/package.json index f2098c3c39f9..4cdf3ab997a9 100644 --- a/platforms-serverless/lambda-node-16/package.json +++ b/platforms-serverless/lambda-node-16/package.json @@ -1,5 +1,5 @@ { - "name": "lambda", + "name": "lambda-node-16", "version": "1.0.0", "license": "MIT", "devDependencies": { diff --git a/platforms-serverless/lambda-node-20/package.json b/platforms-serverless/lambda-node-20/package.json index e0506b28374f..9f6adde152cd 100644 --- a/platforms-serverless/lambda-node-20/package.json +++ b/platforms-serverless/lambda-node-20/package.json @@ -1,5 +1,5 @@ { - "name": "lambda", + "name": "lambda-node-20", "version": "1.0.0", "license": "MIT", "devDependencies": { diff --git a/platforms/m1-macstadium/code/package.json b/platforms/m1-macstadium/code/package.json index 01d67349545a..82a0f5950ddf 100644 --- a/platforms/m1-macstadium/code/package.json +++ b/platforms/m1-macstadium/code/package.json @@ -1,5 +1,5 @@ { - "name": "m1-macstadium", + "name": "m1-macstadium-code", "version": "1.0.0", "main": "index.js", "license": "MIT", diff --git a/process-managers/pm2/package.json b/process-managers/pm2/package.json index 5dd0dd868ffb..946a81bb60d9 100644 --- a/process-managers/pm2/package.json +++ b/process-managers/pm2/package.json @@ -1,5 +1,5 @@ { - "name": "script", + "name": "pm2", "license": "MIT", "devDependencies": { "@types/node": "16.18.68",