Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: make packages usable locally #984

Merged
merged 62 commits into from
May 30, 2023

Conversation

arboleya
Copy link
Member

@arboleya arboleya commented May 5, 2023

This PR is the final piece extracted from:

Closes:

  • Adds a new internal workspace
  • Adds a new @internal/tsup package (and revamps TSUP configs)
  • Reconfigures all package.json, using:
    • .js for package exports
    • .ts for types @ local env
    • .d.ts for types @ published packages
  • Standardized all package.json files (block order, line sorting, etc.)
  • DRY all tsup.config.ts files (reusing shared configs from @internal/tsup)

@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2023

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements
84.57% (-10.95% 🔻)
4488/5307
🟡 Branches
64.44% (-20.45% 🔻)
647/1004
🟡 Functions
69.27% (-17.97% 🔻)
726/1048
🟢 Lines
84.78% (-10.74% 🔻)
4328/5105
Show files with reduced coverage 🔻
St.
File Statements Branches Functions Lines
🟡
... / provider.ts
60.69% (-20.23% 🔻)
53.33% (-22.22% 🔻)
52.08% (-29.17% 🔻)
62.42% (-17.58% 🔻)
🟢
... / operations.ts
72.88% (-15.25% 🔻)
100%
45.76% (-30.51% 🔻)
82.42% (-9.89% 🔻)
🔴
... / coin-quantity.ts
38.46% (-61.54% 🔻)
0% (-83.33% 🔻)
0% (-100% 🔻)
33.33% (-66.67% 🔻)
🟢
... / resource.ts
66.67% (-16.67% 🔻)
100%
0% (-50% 🔻)
80%
🟢
... / input.ts
87.5% (-6.25% 🔻)
81.25% (-6.25% 🔻)
100%
86.67% (-6.67% 🔻)
🔴
... / output.ts
42.86% (-50% 🔻)
0% (-85.71% 🔻)
0% (-100% 🔻)
38.46% (-53.85% 🔻)
🔴
... / transaction-request.ts
33.54% (-46.84% 🔻)
33.77% (-41.56% 🔻)
16.07% (-57.14% 🔻)
33.77% (-46.75% 🔻)
🟢
... / receipts.ts
85.71% (-7.14% 🔻)
50% (-33.33% 🔻)
100%
84.62% (-7.69% 🔻)
🟢
... / fee.ts
94.44% (-5.56% 🔻)
80% (-20% 🔻)
100%
92.86% (-7.14% 🔻)
🔴
... / sleep.ts
25% (-75% 🔻)
100%
0% (-100% 🔻)
25% (-75% 🔻)
🔴
... / storage-slot.ts
30.77% (-53.85% 🔻)
0% (-50% 🔻)
0% (-100% 🔻)
25% (-58.33% 🔻)
🔴
... / witness.ts
60% (-40% 🔻)
100%
0% (-100% 🔻)
50% (-50% 🔻)
🔴
... / transaction-response.ts
21.62% (-72.97% 🔻)
0% (-72.73% 🔻)
0% (-100% 🔻)
21.62% (-72.97% 🔻)
🟢
... / bn.ts
87.5% (-9.09% 🔻)
85.37% (-4.88% 🔻)
78.79% (-18.18% 🔻)
87.21% (-9.3% 🔻)
🟢
... / abi-coder.ts
83.84% (-12.12% 🔻)
72.09% (-16.28% 🔻)
90% (-10% 🔻)
83.33% (-12.5% 🔻)
🟢
... / enum.ts
82.98% (-17.02% 🔻)
55.56% (-44.44% 🔻)
100%
82.98% (-17.02% 🔻)
🟢
... / param-type.ts
95.45% (-2.27% 🔻)
78.95% (-5.26% 🔻)
100%
95.12% (-2.44% 🔻)
🟢
... / function-fragment.ts
95.83% (-4.17% 🔻)
25% (-75% 🔻)
87.5% (-12.5% 🔻)
95.65% (-4.35% 🔻)
🔴
... / json-abi.ts
51.11% (-46.67% 🔻)
30.43% (-56.52% 🔻)
50% (-50% 🔻)
51.35% (-45.95% 🔻)
🟡
... / input.ts
78.23% (-20.41% 🔻)
70% (-10% 🔻)
86.67% (-13.33% 🔻)
78.23% (-20.41% 🔻)
🟢
... / receipt.ts
94.88% (-2.71% 🔻)
84.62% (-3.85% 🔻)
91.89% (-5.41% 🔻)
94.88% (-2.71% 🔻)
🟢
... / address.ts
89.47% (-7.89% 🔻)
54.55% (-36.36% 🔻)
82.35% (-17.65% 🔻)
89.47% (-7.89% 🔻)
🟢
... / utils.ts
89.13% (-8.7% 🔻)
84.62% (-7.69% 🔻)
90.91% (-9.09% 🔻)
88.1% (-9.52% 🔻)
🟢
... / predicate.ts
92.98% (-7.02% 🔻)
92.86% 100%
92.86% (-7.14% 🔻)
🟡
... / script.ts
78.26% (-21.74% 🔻)
100%
75% (-25% 🔻)
78.26% (-21.74% 🔻)
🔴
... / script-invocation-scope.ts
16.67% (-75% 🔻)
0% (-100% 🔻)
0% (-80% 🔻)
16.67% (-75% 🔻)
🟡
... / interface.ts
71.88% (-14.06% 🔻)
60% (-10% 🔻)
66.67% (-26.67% 🔻)
72.58% (-12.9% 🔻)
🟢
... / signer.ts
85% (-15% 🔻)
50% (-50% 🔻)
75% (-25% 🔻)
85% (-15% 🔻)
🟢
... / keystore.ts
100% 50%
33.33% (-33.33% 🔻)
100%
🟢
... / contract.ts
85% (-15% 🔻)
83.33% (-16.67% 🔻)
50% (-50% 🔻)
89.47% (-10.53% 🔻)
🔴
... / invocation-scope.ts
14.29% (-85.71% 🔻)
0% (-62.5% 🔻)
0% (-100% 🔻)
15% (-85% 🔻)
🔴
... / base-invocation-scope.ts
8.99% (-91.01% 🔻)
0% (-92.86% 🔻)
0% (-100% 🔻)
9.2% (-90.8% 🔻)
🔴
... / contract-call-script.ts
16.67% (-79.17% 🔻)
0% (-87.5% 🔻)
0% (-100% 🔻)
17.02% (-78.72% 🔻)
🔴
... / script-request.ts
27.27% (-61.36% 🔻)
0% (-75% 🔻)
10% (-80% 🔻)
27.27% (-61.36% 🔻)
🔴
... / errors.ts
38.46% (-61.54% 🔻)
0% (-83.33% 🔻)
0% (-100% 🔻)
38.46% (-61.54% 🔻)
🔴
... / revert-error-codes.ts
36.84% (-57.89% 🔻)
0% (-66.67% 🔻)
0% (-100% 🔻)
38.89% (-55.56% 🔻)
🔴
... / revert-error.ts
29.41% (-52.94% 🔻)
0% (-62.5% 🔻)
0% (-75% 🔻)
27.27% (-54.55% 🔻)
🔴
... / utils.ts
41.67% (-50% 🔻)
0% (-83.33% 🔻)
0% (-100% 🔻)
36.36% (-54.55% 🔻)
🔴
... / invocation-results.ts
17.78% (-77.78% 🔻)
0% (-75% 🔻)
0% (-100% 🔻)
18.18% (-77.27% 🔻)
🔴
... / multicall-scope.ts
33.33% (-66.67% 🔻)
100%
0% (-100% 🔻)
33.33% (-66.67% 🔻)
🟡
... / hasher.ts
65.85% (-34.15% 🔻)
37.5% (-62.5% 🔻)
100%
65.85% (-34.15% 🔻)

Test suite run success

972 tests passing in 172 suites.

Report generated by 🧪jest coverage report action from 74b6b08

@arboleya arboleya self-assigned this May 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2023

This PR is published in NPM with version 0.0.0-pr-984-20230526204612

@arboleya arboleya marked this pull request as ready for review May 5, 2023 20:01
@arboleya arboleya requested a review from nedsalk as a code owner May 23, 2023 22:58
@arboleya
Copy link
Member Author

with pnpm dev:crx there is an infinity loop on building after changes after made to SDK

@LuizAsFight Thank you for the feedback.

I validated this a few iterations back; maybe something got messed up.

I will do a quick final check. This should be easy to fix.

@arboleya
Copy link
Member Author

@LuizAsFight I ran several tests here and couldn't replicate the infinite loop you mentioned. We can try reproducing it later on if you think it's useful.

@camsjams camsjams self-requested a review May 30, 2023 04:53
@danielbate danielbate self-requested a review May 30, 2023 08:37
@arboleya arboleya merged commit 59d5c65 into master May 30, 2023
5 checks passed
@arboleya arboleya deleted the aa/feat/make-packages-usable-locally branch May 30, 2023 11:41
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.

None yet

6 participants