Skip to content

Commit

Permalink
[Hotfix] Ensure all types are exported in index.ts (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-agarwal-coinbase authored Sep 23, 2024
1 parent 4c88584 commit e74faca
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 25 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

## [0.6.1] - 2024-09-23

### Added
- Export all missing types in `src/index`

## [0.6.0] - 2024-09-18

### Added
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "ISC",
"description": "Coinbase Platform SDK",
"repository": "https://github.com/coinbase/coinbase-sdk-nodejs",
"version": "0.6.0",
"version": "0.6.1",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion quickstart-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"license": "ISC",
"type": "module",
"dependencies": {
"@coinbase/coinbase-sdk": "^0.6.0",
"@coinbase/coinbase-sdk": "^0.6.1",
"csv-parse": "^5.5.6",
"csv-writer": "^1.6.0",
"viem": "^2.21.6"
Expand Down
47 changes: 26 additions & 21 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
export * from "./coinbase/coinbase";
export * from "./coinbase/wallet";
export * from "./coinbase/address";
export * from "./coinbase/asset";
export * from "./coinbase/balance";
export * from "./coinbase/balance_map";
export * from "./coinbase/constants";
export * from "./coinbase/errors";
export * from "./coinbase/faucet_transaction";
export * from "./coinbase/server_signer";
export * from "./coinbase/trade";
export * from "./coinbase/transaction";
export * from "./coinbase/transfer";
export * from "./coinbase/types";
export * from "./coinbase/address/external_address";
export * from "./coinbase/address/wallet_address";
export * from "./coinbase/staking_operation";
export * from "./coinbase/staking_reward";
export * from "./coinbase/staking_balance";
export * from "./coinbase/validator";
export * from "./coinbase/webhook";
export * from "./coinbase/smart_contract";
export * from "./coinbase/payload_signature";
export * from "./coinbase/hash";
export * from './coinbase/api_error';
export * from './coinbase/asset';
export * from './coinbase/authenticator';
export * from './coinbase/balance';
export * from './coinbase/balance_map';
export * from './coinbase/coinbase';
export * from './coinbase/constants';
export * from './coinbase/contract_event';
export * from './coinbase/contract_invocation';
export * from './coinbase/errors';
export * from './coinbase/faucet_transaction';
export * from './coinbase/hash';
export * from './coinbase/historical_balance';
export * from './coinbase/payload_signature';
export * from './coinbase/server_signer';
export * from './coinbase/smart_contract';
export * from './coinbase/staking_balance';
export * from './coinbase/staking_operation';
export * from './coinbase/staking_reward';
export * from './coinbase/trade';
export * from './coinbase/transaction';
export * from './coinbase/transfer';
export * from './coinbase/types';
export * from './coinbase/validator';
export * from './coinbase/wallet';
export * from './coinbase/webhook';
39 changes: 39 additions & 0 deletions src/tests/index_test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// test/index.test.ts
import * as index from "../index";

describe('Index file exports', () => {
it('should export all modules correctly', () => {
expect(index).toBeDefined();
expect(index).toHaveProperty('Address');
expect(index).toHaveProperty('APIError');
expect(index).toHaveProperty('Asset');
expect(index).toHaveProperty('Balance');
expect(index).toHaveProperty('BalanceMap');
expect(index).toHaveProperty('Coinbase');
expect(index).toHaveProperty('ContractEvent');
expect(index).toHaveProperty('ContractInvocation');
expect(index).toHaveProperty('ExternalAddress');
expect(index).toHaveProperty('FaucetTransaction');
expect(index).toHaveProperty('GWEI_DECIMALS');
expect(index).toHaveProperty('HistoricalBalance');
expect(index).toHaveProperty('InvalidAPIKeyFormatError');
expect(index).toHaveProperty('PayloadSignature');
expect(index).toHaveProperty('ServerSigner');
expect(index).toHaveProperty('SmartContract');
expect(index).toHaveProperty('SponsoredSendStatus');
expect(index).toHaveProperty('StakeOptionsMode');
expect(index).toHaveProperty('StakingBalance');
expect(index).toHaveProperty('StakingOperation');
expect(index).toHaveProperty('StakingReward');
expect(index).toHaveProperty('Trade');
expect(index).toHaveProperty('Transaction');
expect(index).toHaveProperty('TransactionStatus');
expect(index).toHaveProperty('Transfer');
expect(index).toHaveProperty('TransferStatus');
expect(index).toHaveProperty('Validator');
expect(index).toHaveProperty('Wallet');
expect(index).toHaveProperty('WalletAddress');
expect(index).toHaveProperty('Webhook');
});
});

0 comments on commit e74faca

Please sign in to comment.