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: Update to be Stacks.js v7 compatible #389

Merged
merged 10 commits into from
Oct 18, 2024
Merged

feat: Update to be Stacks.js v7 compatible #389

merged 10 commits into from
Oct 18, 2024

Conversation

janniks
Copy link
Collaborator

@janniks janniks commented Oct 18, 2024

This PR was published to npm with the alpha versions:

  • update to use both legacy and next network
  • update post conditions and clarity serialization
  • switch to npm from yarn

@janniks janniks requested a review from beguene October 18, 2024 12:58
Copy link

changeset-bot bot commented Oct 18, 2024

🦋 Changeset detected

Latest commit: cc06270

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@stacks/connect-react Minor
@stacks/connect-ui Minor
@stacks/connect Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Oct 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
connect ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2024 2:29pm
connect-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 18, 2024 2:29pm

Copy link
Contributor

@beguene beguene left a comment

Choose a reason for hiding this comment

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

Looks great !

If I understand correctly this is backward compatible (with stacks.js v6) at the cost of an increase in bundle size in connect because both versions are imported, which is perfectly fine. But does it mean that stacks v7 is not backward compatible with v6 format ?

Btw I'm curious, why was yarn removed ?

import { AnchorMode, PostConditionMode } from '@stacks/transactions';
import { userSession } from './userSession';

openSTXTransfer({
network: new StacksTestnet(), // which network to use; use `new StacksMainnet()` for mainnet
network: 'testnet', // which network to use; ('mainnet' or 'testnet')
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, this is much simpler now ! 🎉

@janniks
Copy link
Collaborator Author

janniks commented Oct 18, 2024

Had a weird yarn problem for a while, where we could never recreate the lock file. It was hard to update deps. And npm is the default and everyone has it, one step less 😉

Yep, I think the actual web bundle won't be too much bigger, as it only uses a few imports. But for now we want backwards comp. A next version of Connect would reinvent a bunch of stuff and be non-backwards compatible (while the wallet still are probably), but hopefully more on that front soon!

@beguene
Copy link
Contributor

beguene commented Oct 18, 2024

@janniks makes sense !

I just wanted to know, as I rarely use yarn nowadays, it's either pnpm or npm. npm is quite fast now, and it's much simpler and predictable.

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

Successfully merging this pull request may close these issues.

2 participants