Skip to content

Should peer dependency break existing functionlaity of spl-token deps? #130

@ComradePashka

Description

@ComradePashka

Hello!

I am using latest spl-token library (0.4.9) in my web3 app and when I add Jupiter Widget as npm package all imports for @solana/spl-token are pointing to Jupiter dependency(0.1.8) so all new features are not available.

if I install @solana/spl-token as alias and import aliased version, e.g.

yarn add @solana/spl-token-latest@npm:@solana/[email protected]

...

import { getMetadataPointerState, getMint, getTokenMetadata, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID } from '@solana/spl-token-latest'

-- all functionality is working as expected not conflicting with Jupiter deps.

yarn list @solana/spl-token                                  
yarn list v1.22.22
warning Filtering by arguments is deprecated. Please use the pattern option instead.
├─ @jup-ag/[email protected]
│  ├─ @metaplex-foundation/[email protected]
│  │  └─ @solana/[email protected]
│  └─ @solana/[email protected]
├─ @jup-ag/[email protected]
│  └─ @solana/[email protected]
├─ @jup-ag/[email protected]
│  └─ @solana/[email protected]
├─ @mercurial-finance/[email protected]
│  └─ @solana/[email protected]
└─ @solana/[email protected]
✨  Done in 0.40s.

Was it designed so? Is there any other solution to not break existing spl-token root dependency for entire project?

thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions