Skip to content

Audit and fix malformed build scripts across all workspace packages #333

Description

@Lakes41

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:

  1. Build failures when the first command (e.g., tsc) receives unintended arguments
  2. Confusion about what each script actually does
  3. 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

  1. Write a script that reads all package.json files in the monorepo
  2. For each, check if build, typecheck, or lint scripts contain multiple command words (e.g., contains both "tsc" and "pnpm")
  3. Generate a report of suspicious scripts
  4. Manually review and separate commands into individual scripts:
    {
      "build": "tsc -p tsconfig.json",
      "typecheck": "tsc -p tsconfig.json --noEmit",
      "lint": "eslint src --fix"
    }
  5. Verify with pnpm -r build, pnpm -r typecheck, pnpm -r lint separately

Acceptance Criteria

  • A script or checklist identifying all workspace packages with potentially malformed scripts is created
  • All packages reviewed; malformed scripts are documented
  • Each problematic script is split into clean, single-purpose entries
  • pnpm -r build, pnpm -r typecheck, and pnpm -r lint each run independently without cross-contamination
  • Workspace builds succeed consistently

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/

Metadata

Metadata

Assignees

Labels

Third CampaignOfficial FWC26 campaign issue — eligible for campaign scoring and rewardsbuildUser interface or user experience improvements and design workconsistencyPattern and convention standardization across the codebase for uniformityintermediateIntermediate difficulty tasks requiring solid experience and some context

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions