solana-web3.js
solana-web3.js copied to clipboard
[WIP] Create subpackages for internal-ish code
trafficstars
Summary
The entire problem that this PR tries to solve is this.
- Retain the simplicity of being able to
export * from '@solana/errors'inpackages/library/ - Prevent things like
safeCaptureStackTrace()from being exported frompackages/library/
The steps taken to that end were:
- Change
moduleResolutioneverywhere toNodeNext. This enables subpackage exports - Add
.jsextensions everywhere to satisfy that resolution regime - Create a subpackage export in
@solana/errorsfor all of the stuff that we want to share internally but not to export frompackages/library/
Now any package in the @solana scope can use @solana/errors/internal but we can still enjoy the simplicity of export * from '@solana/errors' in packages/library/