Skip to content

Releases: souporserious/renoun

[email protected]

30 Sep 08:10
f40be7a
Compare
Choose a tag to compare

Major Changes

  • 1c4c390: Moves MDXContent and MDXComponents type exports to @renoun/mdx package.

  • 5fa1a9e: Renames createCollection to collection.

    Breaking Changes

    Replace all instances of createCollection with collection:

    -import { createCollection } from 'renoun/collections'
    +import { collection } from 'renoun/collections'
    
    -const PostsCollection = createCollection({
    +const PostsCollection = collection({
      filePattern: 'posts/*.mdx',
    })
  • f5ecc15: Removes getDefaultExport and getNamedExport from collection export sources in favor of a new getExport method. This method works exactly the same as the previous getNamedExport method with the addition of accepting default as an export. This simplifies the API and reduces the number of methods needed to query an export source.

    Breaking Changes

    Update any usage of getDefaultExport and getNamedExport to use the new getExport method:

    • getDefaultExport() -> getExport('default')
    • getNamedExport('metadata') -> getExport('metadata')

Minor Changes

  • 5cdff4d: Adds @renoun/mdx to core renoun package as a renoun/mdx export. The @renoun/mdx package was initially split off to make maintenance easier. Since renoun is catering to content authoring, the MDX features should be as easy as possible to use.

Patch Changes

  • 482e1e4: Fixes fast refresh when using a custom JSX pragma.
  • 78080ed: Fixes fast refresh for collections targeting files outside of workspace.
  • abca1f8: Fixes package manager tab panel layout shift on page load.
  • 7e58c6d: Adds better error handling to internal CLI WebSocketClient.
  • 5da3781: Fixes watch command running during deployments.
  • Updated dependencies [1c4c390]
  • Updated dependencies [b9d52a3]

@renoun/[email protected]

30 Sep 08:10
f40be7a
Compare
Choose a tag to compare

Minor Changes

  • 1c4c390: Moves MDXContent and MDXComponents type exports to @renoun/mdx package.
  • b9d52a3: More descriptive name for remark paragraphs plugin, removeParagraphs -> removeImmediateParagraphs.

[email protected]

25 Sep 05:58
9c57054
Compare
Choose a tag to compare

Minor Changes

  • ff7665e: Moves import map generation from the .renoun directory to the second argument of the createCollection call expression. This will automatically be updated to the new filePattern argument and generate the import getter for each collection:

    import { createCollection } from 'renoun/collections'
    
    export const DocsCollection = createCollection(
      {
        filePattern: 'docs/**/*.mdx',
        baseDirectory: 'docs',
        basePath: 'docs',
      },
      (slug) => import(`docs/${slug}.mdx`)
    )

    This reduces a lot of boilerplate and configuration. Previously, the .renoun directory needed to be generated, added to .gitignore, and then the server needed to be restarted after the first initialization. Now, import maps are colocated with their respective collection configuration.

  • a484f7e: Adds support for Vite by utilizing the package.json imports field when the workspace is a module.

Patch Changes

  • 2f4837b: Prevents error when tsconfig exclude field is not defined.
  • d49606d: Adds baseUrl field if it does not exist when code-modding tsconfig to add the path alias.
  • 46e463f: Fixes PackageInstall component warning showing when not being used.
  • 8621338: Uses CJS compatible imports to fix bundlers like Vite that will end up with undefined imports.

[email protected]

22 Sep 05:49
497c986
Compare
Choose a tag to compare

Minor Changes

  • 2d64da1: Adds a PackageInstall component for displaying a list of package manager install commands that can be copied.

Patch Changes

  • 2ad1db1: Removes unused createCollection title and label options.
  • 779df0a: Adds better error when trying to create a collection within a route group file pattern that needs to be escaped properly.
  • 170d382: Fixes error when collection baseDirectory does not have any additional segments after normalizing file paths.

@renoun/[email protected]

22 Sep 05:49
497c986
Compare
Choose a tag to compare

Patch Changes

  • ca8b35d: Enables old school dashes through SmartyPants remark plugin.

[email protected]

19 Sep 00:26
81c1bde
Compare
Choose a tag to compare

Minor Changes

  • 9f6c0f2: Moves config from .renoun/config.json to renoun.json. See configuration docs for more information.

  • 1a71061: Moves renoun package to ESM only. To upgrade in Next.js projects, modify the next.config.js file to include the following in the webpack extensionAlias configuration:

    export default {
      webpack(config) {
        config.resolve.extensionAlias = {
          '.js': ['.ts', '.tsx', '.js'],
        }
    
        // ...
    
        return config
      },
    }
  • 3c78b3e: Adds the ability to filter export sources when creating a collection:

    import {
      createCollection,
      isFileSystemSource,
      isExportSource,
    } from 'renoun/collections'
    
    export const ComponentsCollection = createCollection<
      Record<string, React.ComponentType>
    >('src/components/**/*.{ts,tsx}', {
      baseDirectory: 'components',
      basePath: 'components',
      filter: (source) => {
        if (isFileSystemSource(source)) {
          if (source.isFile()) {
            const allInternal = source
              .getExports()
              .every((exportSource) =>
                exportSource.getTags()?.every((tag) => tag.tagName === 'internal')
              )
    
            if (allInternal) {
              return false
            }
          }
        }
    
        if (isExportSource(source)) {
          if (source.getTags()?.find((tag) => tag.tagName === 'internal')) {
            return false
          }
        }
    
        return true
      },
    })

Patch Changes

  • aaf965c: Collections now respect the tsconfig ignore field if defined and will filter out sources that should be ignored.
  • e40258a: Fixes large font sizes on mobile devices. See this article for more info.
  • bf684ca: Fixes svg warning for logo asset.
  • af07785: Uses css container padding for CodeBlock internal padding if defined.
  • d207ecc: Fixes CodeBlock highlightedLines regression.
  • cb3843c: Fixes suspense fallback layout shift during local development.
  • 700969a: Normalizes custom CodeBlock padding values to offset CopyButton correctly.

@renoun/[email protected]

19 Sep 00:26
81c1bde
Compare
Choose a tag to compare

Major Changes

  • 3565fa9: Adds @renoun/mdx package that includes pre-configured and custom remark and rehype plugins.

[email protected]

16 Sep 05:51
1608806
Compare
Choose a tag to compare

Major Changes

  • 8e1a7e1: Renames the package from omnidoc to renoun.

@renoun/[email protected]

16 Sep 05:51
1608806
Compare
Choose a tag to compare

Major Changes

  • 52b18ed: Renames the package from @omnidoc/mdx-plugins to @renoun/mdx-plugins.

[email protected]

15 Sep 01:03
b16898b
Compare
Choose a tag to compare

Patch Changes

  • 677d117: Clean up formatting for source export errors.
  • 830724b: Prevents exiting the process in development when the collection does not target valid directories or source files to allow fixing without restarting the server.