Skip to content

Conversation

@benduran
Copy link
Contributor

@benduran benduran commented Oct 29, 2025

Summary

  • Moved to using a new dual-publishing library called ts-duality, which handles the whole song-and-dance of compiling, generating types and dual writing ESM and CJS output formats (if needed).
    • this library was actually built in the last week, initially internally, to try and solve this problem (which is a common one in OSS-land, but hasn't been solved well yet). Now that the project is further along, it has been published under the beta npm tag, where I have been updating it.
  • Deleted any bespoke tsconfig.json files that drifted from the repo best practices.
  • via ts-duality, generated tsconfig.build.json files, which are exclusively used for building packages.
  • went through various files, by hand, and updated TypeScript typing issues that were causing build failures as a result of moving to the stricter TypeScript configurations

Rationale

we have many brilliant engineers here, but only a few who have been deep in the TypeScript and JavaScript weeds, especially with regards to package build and distribution practices. This PR is an initial step to clamp on a single "paved-path" way of doing things here.

How has this been tested?

  • Current tests cover my changes
  • Added new tests
  • Manually tested the code
    • no logic changes have been made to any existing code. only changes have been solely typing-related or package.json#exports related

Tested building and running the following apps (which are powered by NextJS). Will check more off as more tests and changes are made. Anything with a strikethrough is unrelated and likely not a JS / TS project. Verification involved verifying the apps loaded up without issue. Functionality-wise, they haven't been extensively tested.

  • api-reference
  • [ ] argus
  • developer-hub
    • NOTE: This doesn't seem to load anything more than an empty page, but it does run
  • entropy-debugger
  • entropy-explorer
  • entropy-tester
  • [ ] fortuna
  • [ ] hermes
  • [ ] hip-3-pusher
  • insights
  • price_pusher
  • [ ] pyth-lazer-agent
  • [ ] quorum
  • staking

Picture of all builds passing locally

CleanShot 2025-10-30 at 14 00 11

@benduran benduran added the enhancement New feature or request label Oct 29, 2025
@vercel
Copy link

vercel bot commented Oct 29, 2025

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

Project Deployment Preview Comments Updated (UTC)
staking Ready Ready Preview Comment Nov 6, 2025 11:06am
6 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
api-reference Skipped Skipped Nov 6, 2025 11:06am
component-library Skipped Skipped Nov 6, 2025 11:06am
developer-hub Skipped Skipped Nov 6, 2025 11:06am
entropy-explorer Skipped Skipped Nov 6, 2025 11:06am
insights Skipped Skipped Nov 6, 2025 11:06am
proposals Skipped Skipped Nov 6, 2025 11:06am

Copy link
Collaborator

Choose a reason for hiding this comment

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

dumb question, what is this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a file that tells typescript that there are typings for this plain javascript file, even if it doesn't have one. this was required to allow typescript to build this project without erroring, after moving to a more strict typescript config (this is specifically for this file: target_chains/ethereum/contracts/scripts/contractManagerConfig.js)

Copy link
Collaborator

Choose a reason for hiding this comment

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

i'm wondering why we have similar git ignore files everywhere, i think it might be good to move some just up at the root of the repo

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good callout. could probably just apply a blanket ignore and allow local packages to override as needed.

I can address in a separate PR, so as to not bloat this already excessively-large one 🫠

@ali-behjati
Copy link
Collaborator

LGTM

@vercel vercel bot temporarily deployed to Preview – component-library November 6, 2025 11:03 Inactive
@vercel vercel bot temporarily deployed to Preview – proposals November 6, 2025 11:03 Inactive
@vercel vercel bot temporarily deployed to Preview – developer-hub November 6, 2025 11:03 Inactive
@vercel vercel bot temporarily deployed to Preview – insights November 6, 2025 11:03 Inactive
@vercel vercel bot temporarily deployed to Preview – api-reference November 6, 2025 11:03 Inactive
@vercel vercel bot temporarily deployed to Preview – entropy-explorer November 6, 2025 11:03 Inactive
@benduran benduran merged commit a52f61e into main Nov 6, 2025
23 checks passed
@benduran benduran deleted the bduran/dual-publish branch November 6, 2025 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants