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

major poc #2137

Draft
wants to merge 90 commits into
base: main
Choose a base branch
from
Draft

major poc #2137

wants to merge 90 commits into from

Conversation

zaidarain1
Copy link
Contributor

@zaidarain1 zaidarain1 commented Sep 3, 2024

Changes

Major

  • Migrate to separate NPM packages and publish @imtbl/sdk and @imtbl/checkout-widgets, and their workspace dependencies recursively
  • Checkout widgets javascript is now loaded from the @imtbl/checkout-widgets package instead of needing to be copied to the @imtbl/sdk package
  • Removed browser bundle being created from @imtbl/sdk (This was not being exported correctly by our sdk so it was unused unless it was consumed from a CDN rather than as an npm node_module)
  • All packages now create both an esm and cjs javascript output file (Checkout remains the same)

Tooling

  • Migrate to Pnpm from yarn
  • Migrate to tsup from rollup (Checkout remains the same)
  • Upgrade NX to support pnpm v9
  • Migrate release process from release-it and custom scripts to nx release
  • Setup changelog generation to be handled via conventional commit-style PR titles

Misc

  • Make workspace versioning explicit
  • Cleanup cypress from Checkout
  • Add missing dependencies to package.jsons that were imported from previously (pnpm will not allow importing from dependencies that aren't listed in the package's package.json, unlike yarn)
  • Cleanup and remove many custom scripts not needed anymore

Outcomes

  • Heavily improved build times for SDK (~2 m -> ~35 seconds)
  • Reduced overhead on executed commands (~1 s -> ~400 ms)
  • Automated changelog generation from PR titles
  • No russian doll nesting in output bundles
  • Each package can be consumed separately now
  • Much more easier to maintain processes due to clean up and removal of many custom scripts
  • More robust and resilient codebase/SDK
  • Support for conditional exports in commonjs environments

Todo

  • Update docs to reflect changes
  • Attempt to introduce breaking change updates to dependencies (ethers v5 -> ethers v6 for eg)
  • Setup automated conventional commit PR title comment

Copy link

nx-cloud bot commented Sep 3, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 424bf48. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@zaidarain1 zaidarain1 force-pushed the feat/major-poc branch 3 times, most recently from 5ed7a74 to 06119b8 Compare September 19, 2024 01:25
.github/scripts/check-team-membership.sh Show resolved Hide resolved
.github/workflows/publish.yaml Outdated Show resolved Hide resolved
ls -l ./sdk/dist/browser/checkout || echo 1
[ -d "./sdk/dist/browser/checkout" ] || { echo "Error: Directory does not exist." && exit 1; }
- name: Build SDK & Checkout Widgets
run: pnpm nx run-many -t build -p @imtbl/sdk,@imtbl/checkout-widgets
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we create a ticket for discussing if we should change the delivery pattern for chekcout-widgets

nx.json Outdated Show resolved Hide resolved
@shineli1984
Copy link
Collaborator

shineli1984 commented Sep 23, 2024

Please have a think about how do we indicate alpha packages in a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants