Skip to content

packages/analytics: fix entry point, lint, and CI coverage #853

Description

@BigBen-7

Three small, mechanical infra gaps in `packages/analytics`, combined since they're all quick and independent of the real fix in #851.

1. No entry point (main/types)

`packages/analytics/package.json` has no `"main"`, `"types"`, or `"exports"` field:

```json
{
"name": "@stellar-explain/analytics",
"version": "0.1.0",
"private": true,
"scripts": { ... },
"devDependencies": { ... }
}
```

`tsc` builds to `dist/` (per `tsconfig.json`'s `outDir`), but nothing in the manifest points there — `import ... from "@stellar-explain/analytics"` can't resolve today. This is a hard blocker for #851 (nothing can import the package until this is fixed).

Fix: add
```json
"main": "dist/index.js",
"types": "dist/index.d.ts"
```
and confirm `src/index.ts` actually re-exports the public API (EventEmitter, sinks, etc.).

2. Lint is completely broken

`"lint": "eslint src"` is defined but `eslint` isn't a devDependency at all — standalone install + lint fails with `eslint: command not found`. Even with `eslint` available (e.g. hoisted from `packages/ui` at the workspace root), it still fails because the package only has a legacy `.eslintrc.json`, and the resolved ESLint version (9.x) no longer reads that format:

```
ESLint: 9.39.5
ESLint couldn't find an eslint.config.(js|mjs|cjs) file.
```

Fix: add `eslint` as an explicit devDependency, replace `.eslintrc.json` with a flat `eslint.config.mjs` — follow the pattern already working in `packages/ui/eslint.config.mjs` or `packages/cli/eslint.config.mjs`.

3. No CI coverage

`.github/workflows/ci.yml` only triggers on `packages/core/` and `packages/cli/` — a push/PR touching only `packages/analytics/` or `packages/ui/` runs no CI at all (confirmed: zero mentions of "analytics" in any workflow file). This is how #1 and #2 above went unnoticed.

Fix: add a job (or extend the `paths` filters) to run install/build/typecheck/lint/test for `packages/analytics` and `packages/ui`, mirroring `ci.yml`'s existing `cli` job.


Related: #851 (the actual analytics/ui disconnect — depends on item 1 here to even be possible).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions