Skip to content

fix(api): flatten apps/api dist build output#352

Merged
collinsezedike merged 5 commits into
drydocs:mainfrom
siddhanttiwari19:fix/350-api-tsconfig-dist-layout
Jul 13, 2026
Merged

fix(api): flatten apps/api dist build output#352
collinsezedike merged 5 commits into
drydocs:mainfrom
siddhanttiwari19:fix/350-api-tsconfig-dist-layout

Conversation

@siddhanttiwari19

Copy link
Copy Markdown
Contributor

Remove the paths override for @meridian/shared and @meridian/stellar-sdk-helpers in apps/api/tsconfig.json — workspace symlink resolution already reaches both packages' own dist without it. Add an explicit rootDir: src, matching the #349 fix for stellar-sdk-helpers, so a stray inclusion can't silently change the output layout again.

Also adds a CI check verifying apps/api/dist/index.js lands flat, per collinsezedike's suggestion on the issue.

Fixes #350

Summary

  • apps/api/tsconfig.json had a paths override pointing @meridian/shared
    and @meridian/stellar-sdk-helpers at their raw src directories, the
    same misconfiguration fixed in fix(web): validate faucet XDR and env-configure the faucet URL #349 for stellar-sdk-helpers. Without an
    explicit rootDir, TypeScript inferred the common ancestor across all
    three src trees as the build root, so pnpm --filter @meridian/api build
    produced dist/apps/api/src/index.js instead of a flat dist/index.js
    confirmed by reproducing the bug before applying this fix.
  • Removed the paths override and baseUrl, and set an explicit
    "rootDir": "src", mirroring the exact fix applied in fix(web): validate faucet XDR and env-configure the faucet URL #349. Workspace
    symlink resolution already reaches both packages' own dist output via
    their package.json main field, so no override is needed.
  • Added a CI step to lint-typecheck that builds @meridian/api and
    asserts apps/api/dist/index.js exists, so this can't silently regress a
    third time (per collinsezedike's suggestion on the issue).

Test plan

  • pnpm lint && pnpm typecheck && pnpm test pass locally
  • Reproduced the bug on main first (rm -rf apps/api/dist && pnpm --filter @meridian/api build → nested dist/apps/api/src/index.js), then confirmed this branch produces a flat dist/index.js
  • Full workspace pnpm typecheck — 6/6 tasks pass
  • Full workspace pnpm test — 7/7 packages, 163 tests pass
  • pnpm format:check — clean

Closes #350

Remove the paths override for @meridian/shared and
@meridian/stellar-sdk-helpers in apps/api/tsconfig.json — workspace
symlink resolution already reaches both packages' own dist without it.
Add an explicit rootDir: src, matching the drydocs#349 fix for
stellar-sdk-helpers, so a stray inclusion can't silently change the
output layout again.

Also adds a CI check verifying apps/api/dist/index.js lands flat,
per collinsezedike's suggestion on the issue.

Fixes drydocs#350
@vercel

vercel Bot commented Jul 10, 2026

Copy link
Copy Markdown

@siddhanttiwari19 is attempting to deploy a commit to the Collins' projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
meridian Ready Ready Preview, Comment Jul 13, 2026 6:29am

Comment thread apps/api/tsconfig.json Outdated
siddhanttiwari19 and others added 3 commits July 13, 2026 00:56
Matches the exclude pattern from drydocs#349 - without it, dist/__tests__/*.test.js
would end up in the production build output alongside the flattened
dist/index.js.

@collinsezedike collinsezedike left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this one. Root cause correctly identified, and the fix mirrors #349 exactly.

Good to merge!

@collinsezedike collinsezedike merged commit f875b3e into drydocs:main Jul 13, 2026
8 checks passed
@collinsezedike

Copy link
Copy Markdown
Collaborator

Thank you for your contribution, @siddhanttiwari19

If you're looking for what to pick up next, there are a few open issues in the repo right now.

Maybe #371?

Feel free to browse and grab whatever fits.

@siddhanttiwari19

Copy link
Copy Markdown
Contributor Author

Thanks, @collinsezedike! Appreciate the review and the pointer — I'll check out #371 and comment there if it's a good fit.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] apps/api tsconfig may have the same broken dist build as stellar-sdk-helpers had

2 participants