jellyfishsdk icon indicating copy to clipboard operation
jellyfishsdk copied to clipboard

chore(package.json): add subpath export for typescript

Open fuxingloh opened this issue 2 years ago β€’ 7 comments

What this PR does / why we need it:

Experiment with subpath exports for jellyfish-api-core, new in typescript 4.5, this allows imports of category rpc without using declaring @defichain/jellyfish-api-core/dist/* -> @defichain/jellyfish-api-core/*.

fuxingloh avatar Mar 15 '22 07:03 fuxingloh

Code Climate has analyzed commit 90e09596 and detected 0 issues on this pull request.

View more on Code Climate.

codeclimate[bot] avatar Mar 15 '22 07:03 codeclimate[bot]

βœ”οΈ Deploy Preview for jellyfish-defi ready!

πŸ”¨ Explore the source changes: 90e09596889e6298ecfa27f4f001116c94980068

πŸ” Inspect the deploy log: https://app.netlify.com/sites/jellyfish-defi/deploys/6230441c3dfe24000958bc82

😎 Browse the preview: https://deploy-preview-1212--jellyfish-defi.netlify.app

netlify[bot] avatar Mar 15 '22 07:03 netlify[bot]

Codecov Report

Merging #1212 (90e0959) into main (a76864a) will decrease coverage by 1.38%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1212      +/-   ##
==========================================
- Coverage   93.17%   91.79%   -1.39%     
==========================================
  Files         222      220       -2     
  Lines        6009     5994      -15     
  Branches      761      761              
==========================================
- Hits         5599     5502      -97     
- Misses        398      475      +77     
- Partials       12       17       +5     
Impacted Files Coverage Ξ”
...ners/src/containers/RegTestContainer/Persistent.ts 11.11% <0.00%> (-81.49%) :arrow_down:
...playground-api/src/controllers/WalletController.ts 26.19% <0.00%> (-73.81%) :arrow_down:
apps/legacy-api/src/controllers/TokenController.ts 31.81% <0.00%> (-68.19%) :arrow_down:
packages/whale-api-client/src/api/Tokens.ts 33.33% <0.00%> (-66.67%) :arrow_down:
...s/playground-api-client/src/PlaygroundRpcClient.ts 33.33% <0.00%> (-66.67%) :arrow_down:
packages/playground-api-client/src/apis/Wallet.ts 16.66% <0.00%> (-66.67%) :arrow_down:
...egacy-api/src/controllers/stats/StatsController.ts 25.92% <0.00%> (-62.97%) :arrow_down:
packages/playground-api-client/src/apis/Rpc.ts 40.00% <0.00%> (-60.00%) :arrow_down:
packages/whale-api-client/src/api/Stats.ts 50.00% <0.00%> (-50.00%) :arrow_down:
packages/ocean-api-client/src/apis/RawTx.ts 50.00% <0.00%> (-50.00%) :arrow_down:
... and 39 more

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update a76864a...90e0959. Read the comment docs.

codecov[bot] avatar Mar 15 '22 07:03 codecov[bot]

Docker build preview for jellyfish/apps is ready!

Built with commit 02273590a32c9b8945bfca085556c8d18fe71236

  • ghcr.io/defich/legacy-api:pr-1212
  • ghcr.io/defich/ocean-api:pr-1212
  • ghcr.io/defich/playground-api:pr-1212

github-actions[bot] avatar Mar 15 '22 08:03 github-actions[bot]

Will do some local testing of this PR to see how this works before approving, looks neat!

kodemon avatar Mar 15 '22 09:03 kodemon

Will do some local testing of this PR to see how this works before approving, looks neat!

If this works flawlessly, we need to update typescript to 4.5 and update the config as well in another PR.

fuxingloh avatar Mar 15 '22 09:03 fuxingloh

@fuxingloh I went through the release notes for 4.5 and couldn't find mention of node exports support (which I believe is what we call subpaths?)

Then did a quick search and came over this ticket

  • https://github.com/microsoft/TypeScript/issues/33079

Which through reading seems to indicate that there is still no stable support for this functionality in TS yet.

If I am looking in the wrong place, could you point me in the right direction?

Note! Found some info in their devlog for 4.5 Beta but that doesn't seem to be on stable, following up on comments indicates it may have been removed from the actual 4.5 release.

kodemon avatar Mar 15 '22 10:03 kodemon