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

Version Packages (preview) #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

github-actions[bot]
Copy link

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

master is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on master.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

  • #2344 deb7b80 Thanks @lorisleiva! - Improve getTupleCodec type inferences and performance

    The tuple codec now infers its encoded/decoded type from the provided codec array and uses the new DrainOuterGeneric helper to reduce the number of TypeScript instantiations.

  • #2322 6dcf548 Thanks @lorisleiva! - Use DrainOuterGeneric helper on codec type mappings

    This significantly reduces the number of TypeScript instantiations on object mappings,
    which increases TypeScript performance and prevents "Type instantiation is excessively deep and possibly infinite" errors.

  • #2381 49a764c Thanks @lorisleiva! - DataEnum codecs can now use numbers or symbols as discriminator values

    const codec = getDataEnumCodec([[1, getStructCodec([[['one', u32]]])][(2, getStructCodec([[['two', u32]]]))]]);
    
    codec.encode({ __kind: 1, one: 42 });
    codec.encode({ __kind: 2, two: 42 });

    This means you can also use enum values as discriminators, like so:

    enum Event {
        Click,
        KeyPress,
    }
    const codec = getDataEnumCodec([
        [
            Event.Click,
            getStructCodec([
                [
                    ['x', u32],
                    ['y', u32],
                ],
            ]),
        ],
        [Event.KeyPress, getStructCodec([[['key', u32]]])],
    ]);
    
    codec.encode({ __kind: Event.Click, x: 1, y: 2 });
    codec.encode({ __kind: Event.KeyPress, key: 3 });
  • #2383 ce1be3f Thanks @lorisleiva! - getScalarEnumCodec is now called getEnumCodec

  • #2382 7e86583 Thanks @lorisleiva! - getDataEnumCodec is now called getDiscriminatedUnionCodec

  • #2380 bf029dd Thanks @lorisleiva! - DataEnum codecs now support custom discriminator properties

    const codec = getDataEnumCodec(
        [
            [
                'click',
                getStructCodec([
                    [
                        ['x', u32],
                        ['y', u32],
                    ],
                ]),
            ],
            ['keyPress', getStructCodec([[['key', u32]]])],
        ],
        { discriminator: 'event' },
    );
    
    codec.encode({ event: 'click', x: 1, y: 2 });
    codec.encode({ event: 'keyPress', key: 3 });
  • Updated dependencies [9370133, ce1be3f, 2d54650, 7e86583, 478443f]:

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

  • #2376 9370133 Thanks @steveluscher! - Fixed a bug that prevented the production error decoder from decoding negative error codes

  • #2383 ce1be3f Thanks @lorisleiva! - getScalarEnumCodec is now called getEnumCodec

  • #2358 2d54650 Thanks @steveluscher! - The encoded SolanaError context that is thrown in production is now base64-encoded for compatibility with more terminal shells

  • #2382 7e86583 Thanks @lorisleiva! - getDataEnumCodec is now called getDiscriminatedUnionCodec

  • #2329 478443f Thanks @luu-alex! - createKeyPairFromBytes() now validates that the public key imported is the one that would be derived from the private key imported

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

Patch Changes

@solana/[email protected]

@solana/[email protected]

@solana/[email protected]

@solana/[email protected]

@solana/[email protected]

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.

0 participants