Skip to content

Releases: basehub-ai/basehub

[email protected]

09 Apr 16:02
9a707eb
Compare
Choose a tag to compare

Patch Changes

  • 8cee68d: React RichText component now implements GithubSlugger to generate the headings IDs

[email protected]

09 Apr 15:57
b186936
Compare
Choose a tag to compare

Patch Changes

[email protected]

05 Apr 20:03
9256a74
Compare
Choose a tag to compare

Patch Changes

  • fix some lil bugs

[email protected]

05 Apr 19:34
3539315
Compare
Choose a tag to compare

Patch Changes

  • update genql

[email protected]

05 Apr 18:54
e958495
Compare
Choose a tag to compare

Patch Changes

  • Fix exports issue

[email protected]

05 Apr 18:28
f803129
Compare
Choose a tag to compare

Major Changes

  • 7a85095: # New fragmentOn helper to extract fragments

    In this new major version, we're introducing fragmentOn, a simpler way to create fragments in the basehub SDK.

    Previously, in order to reuse a fragment, you'd do something like this:

    // old way 👎
    import {
      LinkComponentGenqlSelection,
      LinkComponent,
      FieldsSelection,
    } from "basehub";
    
    const LinkFragment = {
      href: true,
      label: true,
    } satisfies LinkComponentGenqlSelection;
    
    // extract the type
    type LinkFragment = FieldsSelection<LinkComponent, typeof LinkFragment>;

    Looks simple, but it's a bit hard to understand. You need to know that we're exposing a LinkComponentGenqlSelection, and that you should use the satisfies so the object's type is constrained but also can be more specific. Then, to extract the type, you'd get FieldsSelection, and finally, LinkComponent. A lot of types!

    Moreover, if you needed to create another fragment, it'd be this same process, over and over again.

    This is how it's done in the new version:

    // new way 👍
    import { fragmentOn } from "basehub";
    
    const LinkFragment = fragmentOn("LinkComponent", {
      href: true,
      label: true,
    });
    
    // extract the type
    type LinkFragment = fragmentOn.infer<typeof LinkFragment>;

    Much simpler!

    Why is this a breaking change

    Before this version, we exposed a lot of the internal types from 'basehub'. We now don't. Some applications might depend on this, and that's why this is a breaking change. If you need those types for some reason that wasn't discussed in this document, feel free to raise an issue and we can see to bring them back.

[email protected]

04 Apr 17:23
1ca6261
Compare
Choose a tag to compare

Minor Changes

  • 8491d89: Introduce --watch mode, plus a new basehub dev command to help you get up and running faster in your local environment.

[email protected]

04 Apr 01:50
f92016e
Compare
Choose a tag to compare

Patch Changes

  • update @basehub/mutation-api-helpers

[email protected]

03 Apr 15:24
Compare
Choose a tag to compare

Patch Changes

  • Add support custom rel to anchor in target _blank

[email protected]

02 Apr 22:07
Compare
Choose a tag to compare

Patch Changes

  • Accept "_target" in rich text links and add it to default handler