Skip to content

Bug: makeSource args type not updated with new config options for 0.2.5 release #243

Closed

Description

@Saeris

In the 0.2.5 release notes, for MDX, it's recommended to use a new mdxOptions property, but the PartialArgs type that makeSource expects hasn't been updated for this as far as I can tell. Whereas with the markdown field, it was correctly updated to optionally support a builder callback function. Here's a link the relevant code:

export type PartialArgs = {
markdown?: MarkdownOptions | MarkdownUnifiedBuilderCallback | undefined
mdx?: MarkdownOptions | undefined
date?: DateOptions | undefined
fieldOptions?: Partial<FieldOptions>
extensions?: PluginExtensions
disableImportAliasWarning?: boolean
}

And the release notes where there is a mismatch: https://github.com/contentlayerdev/contentlayer/releases/tag/v0.2.5

Additionally, I'm unsure how this solves the problem I was aiming to resolve with #192

Activity

  1. Saeris commented on Jun 1, 2022

    @Saeris
    Author

    Ah, as for #192 I see that in fact the rawDocumentData was added to the VFile data object, which was undocumented in the release notes. So that does solve for my problem. Thanks!

    Clarity may still be needed for this issue though on the makeSource arg types.

  2. seancdavis commented on Jun 3, 2022

    @seancdavis
    Collaborator

    @Saeris There are two issues on the website repo for better documenting markdown behavior:

    Do you suspect properly completing those issues would solve this topic here?

  3. Saeris commented on Jun 4, 2022

    @Saeris
    Author

    This topic is specifically about the types the library is shipping need to be updated. Currently you cannot use mdxOptions as documented because it raises a type error. So no, it's not a documentation issue, it's missing code. Either that or the release notes were inaccurate.

    Read the section on MDX Processing in the page I linked above. You cannot use the code snippet there because it raises a type error.

  4. added this to the 0.2.6 milestone on Jul 5, 2022
  5. schickling commented on Jul 8, 2022

    @schickling
    Collaborator

    This should be addressed with the 0.2.6 release. 🎉

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions