Background
During workspace build runs, at least one package (@guildpass/integration-client) was discovered with a malformed build script containing extraneous command text appended: "build": "tsc -p tsconfig.json pnpm start pnpm typecheck pnpm lint".
This pattern suggests a systematic issue where build/lint/type-check scripts may have been incorrectly concatenated across multiple packages.
Problem
Workspace package.json files may contain build scripts that accidentally include multiple commands (build, start, typecheck, lint) in a single string rather than being separate script entries. This causes:
- Build failures when the first command (e.g.,
tsc) receives unintended arguments
- Confusion about what each script actually does
- Inconsistent behavior across the monorepo
Expected Outcome
All workspace packages have clean, single-purpose build, typecheck, and lint scripts:
"build" contains only the compilation/build command
"typecheck" is a separate entry for type checking
"lint" is a separate entry for linting
- No cross-contamination of commands
Suggested Implementation
- Write a script that reads all
package.json files in the monorepo
- For each, check if
build, typecheck, or lint scripts contain multiple command words (e.g., contains both "tsc" and "pnpm")
- Generate a report of suspicious scripts
- Manually review and separate commands into individual scripts:
{
"build": "tsc -p tsconfig.json",
"typecheck": "tsc -p tsconfig.json --noEmit",
"lint": "eslint src --fix"
}
- Verify with
pnpm -r build, pnpm -r typecheck, pnpm -r lint separately
Acceptance Criteria
Affected Files/Directories
- All
*/package.json files in packages/ and apps/ directories
- Potentially:
packages/contracts/, packages/env/, packages/integration-client/, packages/webhook-utils/, apps/docs/, apps/discord-bot/, apps/access-api/, apps/dashboard/
Background
During workspace build runs, at least one package (
@guildpass/integration-client) was discovered with a malformed build script containing extraneous command text appended:"build": "tsc -p tsconfig.json pnpm start pnpm typecheck pnpm lint".This pattern suggests a systematic issue where build/lint/type-check scripts may have been incorrectly concatenated across multiple packages.
Problem
Workspace package.json files may contain build scripts that accidentally include multiple commands (build, start, typecheck, lint) in a single string rather than being separate script entries. This causes:
tsc) receives unintended argumentsExpected Outcome
All workspace packages have clean, single-purpose build, typecheck, and lint scripts:
"build"contains only the compilation/build command"typecheck"is a separate entry for type checking"lint"is a separate entry for lintingSuggested Implementation
package.jsonfiles in the monorepobuild,typecheck, orlintscripts contain multiple command words (e.g., contains both "tsc" and "pnpm"){ "build": "tsc -p tsconfig.json", "typecheck": "tsc -p tsconfig.json --noEmit", "lint": "eslint src --fix" }pnpm -r build,pnpm -r typecheck,pnpm -r lintseparatelyAcceptance Criteria
pnpm -r build,pnpm -r typecheck, andpnpm -r linteach run independently without cross-contaminationAffected Files/Directories
*/package.jsonfiles inpackages/andapps/directoriespackages/contracts/,packages/env/,packages/integration-client/,packages/webhook-utils/,apps/docs/,apps/discord-bot/,apps/access-api/,apps/dashboard/