Skip to content

Investigate if server can be run as ESM #5

@Karnaukhov-kh

Description

@Karnaukhov-kh

The Current Problem

External dependencies: The project uses Code Pushup packages:

  • @code-pushup/models (version 0.69.0)
  • @code-pushup/utils (version 0.69.0)
  • @code-pushup/core (version 0.69.0)

Internal duplicates: The project has copied/recreated these as @push-based packages:

  • @push-based/models (version 0.0.1)
  • @push-based/utils (version 0.0.1)

Module format conflict: All the @push-based packages are configured as CommonJS:

   {
     "type": "commonjs",
     "main": "./dist/index.js",
     "module": "./dist/index.js"
   }

The Root Cause

The duplication exists because of module format incompatibility:

  • Code Pushup packages might be ESM-only or have ESM/CommonJS compatibility issues
  • The MCP server currently runs in CommonJS mode
  • To use Code Pushup packages directly, they need to investigate if MCP can run as ESM

Why This Matters

  • Reduces maintenance burden: No need to maintain copied packages
  • Stays up-to-date: Direct use of Code Pushup packages means automatic updates
  • Eliminates duplication: Single source of truth for models and utilities
  • Better architecture: Proper dependency management instead of code copying

Important considerations

How do we handle changes that happened inside of the repo?

Utils and models might have changes that we will need to apply in the original repo. (Requires a check)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions