From 362f8e6a3792411fec073156bc9635b0ad4cd11d Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Wed, 10 Jul 2024 07:39:44 +1000 Subject: [PATCH] ci: Improve Nx inputs (#7702) --- nx.json | 60 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/nx.json b/nx.json index 6570b33474..afb9c2239a 100644 --- a/nx.json +++ b/nx.json @@ -7,7 +7,6 @@ "namedInputs": { "sharedGlobals": [ "{workspaceRoot}/.nvmrc", - "{workspaceRoot}/eslint.config.js", "{workspaceRoot}/package.json", "{workspaceRoot}/scripts/getTsupConfig.js", "{workspaceRoot}/tsconfig.json" @@ -17,52 +16,51 @@ "{projectRoot}/**/*", "!{projectRoot}/**/*.md" ], - "public": [ + "production": [ "default", - "{projectRoot}/build", - "{projectRoot}/dist", + "!{projectRoot}/tests/**/*", "!{projectRoot}/eslint.config.js" ] }, "targetDefaults": { - "test:lib": { - "dependsOn": ["^build"], - "inputs": ["default", "^public"], - "outputs": ["{projectRoot}/coverage"], - "cache": true + "test:format": { + "cache": true, + "inputs": ["{workspaceRoot}/**/*"] }, - "test:eslint": { - "dependsOn": ["^build"], - "inputs": ["default", "^public"], - "cache": true + "test:knip": { + "cache": true, + "inputs": ["{workspaceRoot}/**/*"] }, - "test:types": { - "dependsOn": ["^build"], - "inputs": ["default", "^public"], - "cache": true + "test:sherif": { + "cache": true, + "inputs": ["{workspaceRoot}/**/package.json"] }, - "test:build": { - "dependsOn": ["build"], - "inputs": ["default", "^public"], - "cache": true + "test:eslint": { + "cache": true, + "dependsOn": ["^build"], + "inputs": ["default", "^production", "{workspaceRoot}/eslint.config.js"] }, - "build": { + "test:lib": { + "cache": true, "dependsOn": ["^build"], - "inputs": ["default", "^public"], - "outputs": ["{projectRoot}/build", "{projectRoot}/dist"], - "cache": true + "inputs": ["default", "^production"], + "outputs": ["{projectRoot}/coverage"] }, - "test:knip": { + "test:types": { "cache": true, - "inputs": ["{workspaceRoot}/**/*"] + "dependsOn": ["^build"], + "inputs": ["default", "^production"] }, - "test:format": { + "build": { "cache": true, - "inputs": ["{workspaceRoot}/**/*"] + "dependsOn": ["^build"], + "inputs": ["production", "^production"], + "outputs": ["{projectRoot}/build", "{projectRoot}/dist"] }, - "test:sherif": { + "test:build": { "cache": true, - "inputs": ["{workspaceRoot}/**/*"] + "dependsOn": ["build"], + "inputs": ["production"] } } }